File 0561-debugger-Print-Unicode-atoms-consistently.patch of Package erlang

From 275c17ca00fc996d6575ac94f6d551e7585fafac Mon Sep 17 00:00:00 2001
From: Hans Bolinder <hasse@erlang.org>
Date: Wed, 16 Oct 2019 15:09:07 +0200
Subject: [PATCH] debugger: Print Unicode atoms consistently

Use "~tlp" instead of "~lp". PR 1743 made it possible to have "l" and
"p" together.
---
 lib/debugger/src/dbg_wx_mon_win.erl   | 3 +--
 lib/debugger/src/dbg_wx_trace.erl     | 6 +++---
 lib/debugger/src/dbg_wx_trace_win.erl | 8 ++++----
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/lib/debugger/src/dbg_wx_mon_win.erl b/lib/debugger/src/dbg_wx_mon_win.erl
index fcd954454b..84de762b65 100644
--- a/lib/debugger/src/dbg_wx_mon_win.erl
+++ b/lib/debugger/src/dbg_wx_mon_win.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %%
-%% Copyright Ericsson AB 2008-2017. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2019. All Rights Reserved.
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -85,7 +85,6 @@ init() ->
 -define(W, 800).
 -define(H, 390).
 
-%% FIXME
 -define(autoId, 314).
 -define(stringsId, 271).
 
diff --git a/lib/debugger/src/dbg_wx_trace.erl b/lib/debugger/src/dbg_wx_trace.erl
index 25f32ca7e7..210987d3e6 100644
--- a/lib/debugger/src/dbg_wx_trace.erl
+++ b/lib/debugger/src/dbg_wx_trace.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %% 
-%% Copyright Ericsson AB 2008-2018. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2019. All Rights Reserved.
 %% 
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -518,7 +518,7 @@ gui_cmd({user_command, Cmd}, State) ->
 gui_cmd({edit, {Var, Value}}, State) ->
     Window = dbg_wx_trace_win:get_window(State#state.win),
     Val = case State#state.strings of
-              []        -> dbg_wx_win:to_string("~0lp",[Value]);
+              []        -> dbg_wx_win:to_string("~0ltp",[Value]);
               [str_on]  -> dbg_wx_win:to_string("~0tp",[Value])
           end,
     case dbg_wx_win:entry(Window, "Edit variable", Var, {term, Val}) of
@@ -813,7 +813,7 @@ map(?STRNAME)            -> str_on;            % Strings
 map(str_on)              -> ?STRNAME.
 
 p(#state{strings=[str_on]}) -> "~tp";
-p(#state{strings=[]}) ->       "~lp".
+p(#state{strings=[]}) ->       "~ltp".
 
 %% gui_show_module(Win, Mod, Line, Cm, Pid, How) -> Win
 %% gui_show_module(Win, {Mod,Line}, _Reason, Cm, Pid, How) -> Win
diff --git a/lib/debugger/src/dbg_wx_trace_win.erl b/lib/debugger/src/dbg_wx_trace_win.erl
index 972a917728..f5e5fbc5bf 100644
--- a/lib/debugger/src/dbg_wx_trace_win.erl
+++ b/lib/debugger/src/dbg_wx_trace_win.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %%
-%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2019. All Rights Reserved.
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -572,8 +572,8 @@ update_bindings(#winInfo{bind=#sub{out=BA}}, Bs) ->
 		     wxListCtrl:insertItem(BA, Row, ""), 
 		     wxListCtrl:setItem(BA, Row, 0, dbg_wx_win:to_string(Var)),
                      Format = case get(strings) of
-                                  []        -> "~999999lP";
-                                  [str_on]  -> "~999999tP"
+                                  []        -> "~0ltP";
+                                  [str_on]  -> "~0tP"
                               end,
 		     wxListCtrl:setItem(BA, Row, 1, dbg_wx_win:to_string(Format,[Val, 20])),
 		     Row+1
@@ -866,7 +866,7 @@ handle_event(#wx{event=#wxList{type=command_list_item_selected, itemIndex=Row}},
     Bs = get(bindings),
     {Var,Val} = lists:nth(Row+1, Bs),
     Str = case get(strings) of
-              []       -> io_lib:format("< ~s = ~lp~n", [Var, Val]);
+              []       -> io_lib:format("< ~s = ~ltp~n", [Var, Val]);
               [str_on] -> io_lib:format("< ~s = ~tp~n", [Var, Val])
           end,
     eval_output(Wi, Str, bold),
-- 
2.16.4

openSUSE Build Service is sponsored by