diff options
author | Dan Gudmundsson <[email protected]> | 2013-11-07 15:42:36 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-11-07 15:42:36 +0100 |
commit | d45950d46037d169d5efd969ac2e3b7477481f9c (patch) | |
tree | 0e3916a1cf5f2a44eab36f491485505dd199f641 /lib/pman/src/pman_buf_printer.erl | |
parent | ebd380903569c2ae254849128542297629946feb (diff) | |
download | otp-d45950d46037d169d5efd969ac2e3b7477481f9c.tar.gz otp-d45950d46037d169d5efd969ac2e3b7477481f9c.tar.bz2 otp-d45950d46037d169d5efd969ac2e3b7477481f9c.zip |
Remove pman
Diffstat (limited to 'lib/pman/src/pman_buf_printer.erl')
-rw-r--r-- | lib/pman/src/pman_buf_printer.erl | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/lib/pman/src/pman_buf_printer.erl b/lib/pman/src/pman_buf_printer.erl deleted file mode 100644 index 3284c57559..0000000000 --- a/lib/pman/src/pman_buf_printer.erl +++ /dev/null @@ -1,91 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. -%% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% - --module(pman_buf_printer). --compile([{nowarn_deprecated_function,{gs,config,2}}, - {nowarn_deprecated_function,{gs,start,0}}]). - -%%-compile(export_all). --export([init/2]). - - --include("pman_buf.hrl"). - -%% --------------------------------------------------------------- -%% Starts the part of the buffer which regulates the flow of data to -%% be printed in the pid editors - - -init(Editor,Buffer_pid) -> - Buffer_pid!{printer,send}, - printer_loop(Editor,Buffer_pid). - -printer_loop(Editor,Buffer_pid)-> - receive - {save_buffer,Name} -> - gs:config(Editor,{save,Name}), - TT = "Buffer saved in file\n" ++ Name, - pman_win:dialog_window(gs:start(),TT), - printer_loop(Editor,Buffer_pid); - {buffer,Trace} -> - case lists:flatlength(Trace) of - Len when Len > ?MAX_OUTPUT -> - printer_long(lists:flatten(Trace),Editor), - Buffer_pid!{printer,send}, - printer_loop(Editor,Buffer_pid); - _ -> - Buffer_pid!{printer,send}, - print_trace(Editor,Trace), - printer_loop(Editor,Buffer_pid) - end; - clear -> - pman_win:configeditor(Editor, [{enable, true}]), - pman_win:configeditor(Editor,clear), - pman_win:configeditor(Editor, [{enable, false}]), - printer_loop(Editor,Buffer_pid); - _Other -> - printer_loop(Editor,Buffer_pid) - end. - -printer_long([],_) -> ok; -printer_long(Trace,Editor) -> - receive - clear -> - pman_win:configeditor(Editor, [{enable, true}]), - pman_win:configeditor(Editor,clear), - pman_win:configeditor(Editor, [{enable, false}]) - after 0 -> - {_Length,Rest,Print} = pman_buf_utils:split(Trace, - ?MAX_OUTPUT, - 0, - []), - print_trace(Editor,Print), - printer_long(Rest,Editor) - end. - - - -%% --------------------------------------------------------------- -%% Function which print trace messages on the window -%% --------------------------------------------------------------- - -print_trace(Editor,Elements) -> - pman_win:configeditor(Editor, [{enable, true}]), - pman_win:configeditor(Editor, [{insert, {'end',Elements}}]), - pman_win:configeditor(Editor, [{enable, false}]). |