From 26e1cb4c017cbad1a35920d5d45ecdba47863595 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 10:43:10 +0200 Subject: stdlib: Remove commented out code --- lib/stdlib/src/edlin.erl | 5 +---- lib/stdlib/src/io.erl | 12 ++---------- lib/stdlib/src/io_lib_pretty.erl | 3 --- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/lib/stdlib/src/edlin.erl b/lib/stdlib/src/edlin.erl index f027d05f55..6078c5e67b 100644 --- a/lib/stdlib/src/edlin.erl +++ b/lib/stdlib/src/edlin.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -352,9 +352,6 @@ do_op({blink,C,M}, Bef=[$$,$$|_], Aft, Rs) -> %% don't blink after a $ do_op({blink,C,_}, Bef=[$$|_], Aft, Rs) -> do_op({insert,C}, Bef, Aft, Rs); -%do_op({blink,C,M}, Bef, [], Rs) -> -% N = over_paren(Bef, C, M), -% {blink,N+1,{[C|Bef],[]},[{move_rel,-(N+1)},{put_chars,[C]}|Rs]}; do_op({blink,C,M}, Bef, Aft, Rs) -> case over_paren(Bef, C, M) of beep -> diff --git a/lib/stdlib/src/io.erl b/lib/stdlib/src/io.erl index 63c9a6bddf..1848aa3628 100644 --- a/lib/stdlib/src/io.erl +++ b/lib/stdlib/src/io.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -106,7 +106,6 @@ nl() -> IoDevice :: device(). nl(Io) -> -% o_request(Io, {put_chars,io_lib:nl()}). o_request(Io, nl, nl). -spec columns() -> {'ok', pos_integer()} | {'error', 'enotsup'}. @@ -255,8 +254,6 @@ read(Io, Prompt) -> case request(Io, {get_until,unicode,Prompt,erl_scan,tokens,[1]}) of {ok,Toks,_EndLine} -> erl_parse:parse_term(Toks); -% {error, Reason} when atom(Reason) -> -% erlang:error(conv_reason(read, Reason), [Io, Prompt]); {error,E,_EndLine} -> {error,E}; {eof,_EndLine} -> @@ -352,12 +349,7 @@ fread(Prompt, Format) -> | server_no_data(). fread(Io, Prompt, Format) -> - case request(Io, {fread,Prompt,Format}) of -% {error, Reason} when atom(Reason) -> -% erlang:error(conv_reason(fread, Reason), [Io, Prompt, Format]); - Other -> - Other - end. + request(Io, {fread,Prompt,Format}). -spec format(Format) -> 'ok' when Format :: format(). diff --git a/lib/stdlib/src/io_lib_pretty.erl b/lib/stdlib/src/io_lib_pretty.erl index 77f02eafe0..838d412d0c 100644 --- a/lib/stdlib/src/io_lib_pretty.erl +++ b/lib/stdlib/src/io_lib_pretty.erl @@ -895,9 +895,6 @@ write_string(S, _Uni) -> io_lib:write_string(S, $"). %" expand({_, _, _Dots=0, no_more} = If, _T, _Dd) -> If; -%% expand({{list,L}, _Len, _, no_more}, T, Dd) -> -%% {NL, NLen, NDots} = expand_list(L, T, Dd, 2), -%% {{list,NL}, NLen, NDots, no_more}; expand({{tuple,IsTagged,L}, _Len, _, no_more}, T, Dd) -> {NL, NLen, NDots} = expand_list(L, T, Dd, 2), {{tuple,IsTagged,NL}, NLen, NDots, no_more}; -- cgit v1.2.3 From db98e5be02e5153439921d41cecd199c8bf55b15 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 10:43:28 +0200 Subject: kernel: Remove commented out code --- lib/kernel/src/group.erl | 8 +------- lib/kernel/src/user.erl | 53 +----------------------------------------------- 2 files changed, 2 insertions(+), 59 deletions(-) diff --git a/lib/kernel/src/group.erl b/lib/kernel/src/group.erl index 5625ae6eb7..8c0ced8678 100644 --- a/lib/kernel/src/group.erl +++ b/lib/kernel/src/group.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -795,12 +795,6 @@ save_line({stack, U, _L, D}, Line) -> {stack, U, Line, D}. get_lines(Ls) -> get_all_lines(Ls). -%get_lines({stack, U, {}, []}) -> -% U; -%get_lines({stack, U, {}, D}) -> -% tl(lists:reverse(D, U)); -%get_lines({stack, U, L, D}) -> -% get_lines({stack, U, {}, [L|D]}). %% There's a funny behaviour whenever the line stack doesn't have a "\n" %% at its end -- get_lines() seemed to work on the assumption it *will* be diff --git a/lib/kernel/src/user.erl b/lib/kernel/src/user.erl index 5a3487a9ba..81520dd841 100644 --- a/lib/kernel/src/user.erl +++ b/lib/kernel/src/user.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2017. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -537,54 +537,6 @@ get_line_doit(Prompt, Port, Q, Accu, Enc) -> binrev(L, T) -> list_to_binary(lists:reverse(L, T)). -%% is_cr_at(Pos,Bin) -> -%% case Bin of -%% <<_:Pos/binary,$\r,_/binary>> -> -%% true; -%% _ -> -%% false -%% end. - -%% collect_line_bin_re(Bin,_Data,Stack,_) -> -%% case re:run(Bin,<<"\n">>) of -%% nomatch -> -%% X = byte_size(Bin)-1, -%% case is_cr_at(X,Bin) of -%% true -> -%% <> = Bin, -%% [<<$\r>>,D|Stack]; -%% false -> -%% [Bin|Stack] -%% end; -%% {match,[{Pos,1}]} -> -%% PosPlus = Pos + 1, -%% case Stack of -%% [] -> -%% case is_cr_at(Pos - 1,Bin) of -%% false -> -%% <> = Bin, -%% {stop, Head, Tail}; -%% true -> -%% PosMinus = Pos - 1, -%% <> = Bin, -%% {stop, binrev([],[Head,$\n]),Tail} -%% end; -%% [<<$\r>>|Stack1] when Pos =:= 0 -> - -%% <<_:PosPlus/binary,Tail/binary>> = Bin, -%% {stop,binrev(Stack1, [$\n]),Tail}; -%% _ -> -%% case is_cr_at(Pos - 1,Bin) of -%% false -> -%% <> = Bin, -%% {stop,binrev(Stack, [Head]),Tail}; -%% true -> -%% PosMinus = Pos - 1, -%% <> = Bin, -%% {stop, binrev(Stack,[Head,$\n]),Tail} -%% end -%% end -%% end. %% get_chars(Prompt, Module, Function, XtraArg, Port, Queue, Encoding) %% Gets characters from the input port until the applied function %% returns {stop,Result,RestBuf}. Does not block output until input @@ -618,9 +570,6 @@ get_chars(Prompt, M, F, Xa, Port, Q, State, Enc) -> {Port, eof} -> put(eof, true), {ok, eof, queue:new()}; - %%{io_request,From,ReplyAs,Request} when is_pid(From) -> - %% get_chars_req(Prompt, M, F, Xa, Port, queue:new(), State, - %% Request, From, ReplyAs); {io_request,From,ReplyAs,{get_geometry,_}=Req} when is_pid(From) -> do_io_request(Req, From, ReplyAs, Port, queue:new()), %Keep Q over this call -- cgit v1.2.3 From 227a93f6d1b5e856a7b880257c2e1c08f396e19f Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 10:44:12 +0200 Subject: stdlib: Remove no longer used function --- lib/stdlib/src/io_lib.erl | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl index 21d66c5529..e2823b70f2 100644 --- a/lib/stdlib/src/io_lib.erl +++ b/lib/stdlib/src/io_lib.erl @@ -78,7 +78,7 @@ %% Utilities for collecting characters. -export([collect_chars/3, collect_chars/4, - collect_line/2, collect_line/3, collect_line/4, + collect_line/3, collect_line/4, get_until/3, get_until/4]). %% The following functions were used by Yecc's include-file. @@ -851,6 +851,7 @@ collect_chars({binary,Stack,N}, Data,latin1, _) -> end; collect_chars({list,Stack,N}, Data, _,_) -> collect_chars_list(Stack, N, Data); + %% collect_chars(Continuation, MoreChars, Count) %% Returns: %% {done,Result,RestChars} @@ -881,32 +882,6 @@ collect_chars_list(Stack, N, []) -> collect_chars_list(Stack,N, [H|T]) -> collect_chars_list([H|Stack], N-1, T). -%% collect_line(Continuation, MoreChars) -%% Returns: -%% {done,Result,RestChars} -%% {more,Continuation} -%% -%% XXX Can be removed when compatibility with pre-R12B-5 nodes -%% is no longer required. -%% -collect_line([], Chars) -> - collect_line1(Chars, []); -collect_line({SoFar}, More) -> - collect_line1(More, SoFar). - -collect_line1([$\r, $\n|Rest], Stack) -> - collect_line1([$\n|Rest], Stack); -collect_line1([$\n|Rest], Stack) -> - {done,lists:reverse([$\n|Stack], []),Rest}; -collect_line1([C|Rest], Stack) -> - collect_line1(Rest, [C|Stack]); -collect_line1(eof, []) -> - {done,eof,[]}; -collect_line1(eof, Stack) -> - {done,lists:reverse(Stack, []),[]}; -collect_line1([], Stack) -> - {more,{Stack}}. - %% collect_line(State, Data, _). New in R9C. %% Returns: %% {stop,Result,RestData} -- cgit v1.2.3 From 5e59a04c56efb9e824c1c357930f046408239157 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 10:46:01 +0200 Subject: kernel: Update old format I/O-requests --- lib/kernel/src/file.erl | 6 +++--- lib/kernel/test/file_SUITE.erl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl index a0616da670..853fa26871 100644 --- a/lib/kernel/src/file.erl +++ b/lib/kernel/src/file.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -545,7 +545,7 @@ allocate(#file_descriptor{module = Module} = Handle, Offset, Length) -> | {no_translation, unicode, latin1}. read(File, Sz) when (is_pid(File) orelse is_atom(File)), is_integer(Sz), Sz >= 0 -> - case io:request(File, {get_chars, '', Sz}) of + case io:request(File, {get_chars, latin1, '', Sz}) of Data when is_list(Data); is_binary(Data) -> {ok, Data}; Other -> @@ -566,7 +566,7 @@ read(_, _) -> | {no_translation, unicode, latin1}. read_line(File) when (is_pid(File) orelse is_atom(File)) -> - case io:request(File, {get_line, ''}) of + case io:request(File, {get_line, latin1, ''}) of Data when is_list(Data); is_binary(Data) -> {ok, Data}; Other -> diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl index 21aaefa654..cd7dc8ea9d 100644 --- a/lib/kernel/test/file_SUITE.erl +++ b/lib/kernel/test/file_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -273,11 +273,11 @@ mini_server(Parent) -> Parent ! {io_request,From,To,{put_chars,Data}}, From ! {io_reply, To, ok}, mini_server(Parent); - {io_request,From,To,{get_chars,'',N}} -> + {io_request,From,To,{get_chars,_Encoding,'',N}} -> Parent ! {io_request,From,To,{get_chars,'',N}}, From ! {io_reply, To, {ok, lists:duplicate(N,$a)}}, mini_server(Parent); - {io_request,From,To,{get_line,''}} -> + {io_request,From,To,{get_line,_Encoding,''}} -> Parent ! {io_request,From,To,{get_line,''}}, From ! {io_reply, To, {ok, "hej\n"}}, mini_server(Parent) -- cgit v1.2.3 From 4109a03fe96226d10f36ac9b7c574670be875f13 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 10:46:22 +0200 Subject: mnesia: Update old format I/O-request --- lib/mnesia/src/mnesia_text.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mnesia/src/mnesia_text.erl b/lib/mnesia/src/mnesia_text.erl index cc21621ff4..ee31fdfd27 100644 --- a/lib/mnesia/src/mnesia_text.erl +++ b/lib/mnesia/src/mnesia_text.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -170,7 +170,7 @@ read_terms(Stream, File, Line, L) -> end. read_term_from_stream(Stream, File, Line) -> - R = io:request(Stream, {get_until,'',erl_scan,tokens,[Line]}), + R = io:request(Stream, {get_until,latin1,'',erl_scan,tokens,[Line]}), case R of {ok,Toks,EndLine} -> case erl_parse:parse_term(Toks) of -- cgit v1.2.3 From 2dcf085df9dd9a215ce85ab55b666417897452d6 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 10:46:47 +0200 Subject: parsetools (doc): Update old format I/O-requests --- lib/parsetools/doc/src/leex.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/parsetools/doc/src/leex.xml b/lib/parsetools/doc/src/leex.xml index 3b82f60201..3944c650d8 100644 --- a/lib/parsetools/doc/src/leex.xml +++ b/lib/parsetools/doc/src/leex.xml @@ -4,7 +4,7 @@
- 20092017 + 20092019 Ericsson AB. All Rights Reserved. @@ -193,7 +193,7 @@ Token = tuple() but used through the i/o system where it can typically be called in an application by:

-io:request(InFile, {get_until,Prompt,Module,token,[Line]}) +io:request(InFile, {get_until,unicode,Prompt,Module,token,[Line]}) -> TokenRet @@ -240,7 +240,7 @@ io:request(InFile, {get_until,Prompt,Module,token,[Line]}) but used through the i/o system where it can typically be called in an application by:

-io:request(InFile, {get_until,Prompt,Module,tokens,[Line]}) +io:request(InFile, {get_until,unicode,Prompt,Module,tokens,[Line]}) -> TokensRet -- cgit v1.2.3 From 6987b6fcea8e3627382cb498ab888dde95726f19 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 11:54:53 +0200 Subject: sasl: Use encoding when reading terms --- lib/sasl/src/systools_lib.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sasl/src/systools_lib.erl b/lib/sasl/src/systools_lib.erl index dd97aeff08..f5489e7900 100644 --- a/lib/sasl/src/systools_lib.erl +++ b/lib/sasl/src/systools_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2016. All Rights Reserved. +%% Copyright Ericsson AB 1996-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. @@ -63,8 +63,8 @@ read_term(File) -> end. read_term_from_stream(Stream, File) -> - _ = epp:set_encoding(Stream), - R = io:request(Stream, {get_until,'',erl_scan,tokens,[1]}), + Encoding = epp:set_encoding(Stream), + R = io:request(Stream, {get_until,Encoding,'',erl_scan,tokens,[1]}), case R of {ok,Toks,_EndLine} -> case erl_parse:parse_term(Toks) of -- cgit v1.2.3 From fcb69bc48b69fd73f0838309652a176c56d61f8f Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 12 Jun 2019 11:59:22 +0200 Subject: snmp: Update old format I/O-request --- lib/snmp/src/compile/snmpc_misc.erl | 5 +++-- lib/snmp/src/misc/snmp_conf.erl | 3 ++- lib/snmp/src/misc/snmp_config.erl | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/snmp/src/compile/snmpc_misc.erl b/lib/snmp/src/compile/snmpc_misc.erl index 312074f2e7..d0fee418e1 100644 --- a/lib/snmp/src/compile/snmpc_misc.erl +++ b/lib/snmp/src/compile/snmpc_misc.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2016. All Rights Reserved. +%% Copyright Ericsson AB 2003-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. @@ -156,7 +156,8 @@ loop(Fd, Res, Func, StartLine, File) -> %% io:read modified to give us line numbers. %%----------------------------------------------------------------- read(Io, Prompt, StartLine) -> - case io:request(Io, {get_until, Prompt, erl_scan, tokens, [StartLine]}) of + Enc = latin1, + case io:request(Io, {get_until, Enc, Prompt, erl_scan, tokens, [StartLine]}) of {ok, Toks, EndLine} -> case erl_parse:parse_term(Toks) of {ok, Term} -> diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl index d73291764d..e8a541f490 100644 --- a/lib/snmp/src/misc/snmp_conf.erl +++ b/lib/snmp/src/misc/snmp_conf.erl @@ -257,7 +257,8 @@ open_file(File) -> end. do_read(Io, Prompt, StartLine) -> - case io:request(Io, {get_until,Prompt,erl_scan,tokens,[StartLine]}) of + Enc = latin1, + case io:request(Io, {get_until,Enc,Prompt,erl_scan,tokens,[StartLine]}) of {ok, Toks, EndLine} -> case erl_parse:parse_term(Toks) of {ok, Term} -> diff --git a/lib/snmp/src/misc/snmp_config.erl b/lib/snmp/src/misc/snmp_config.erl index 26e85897f4..da2c1721f9 100644 --- a/lib/snmp/src/misc/snmp_config.erl +++ b/lib/snmp/src/misc/snmp_config.erl @@ -2738,7 +2738,8 @@ read_lines(Fd, Acc, StartLine) -> end. read_and_parse_term(Fd, StartLine) -> - case io:request(Fd, {get_until, "", erl_scan, tokens, [StartLine]}) of + Enc = latin1, + case io:request(Fd, {get_until, Enc, "", erl_scan, tokens, [StartLine]}) of {ok, Tokens, EndLine} -> case erl_parse:parse_term(Tokens) of {ok, Term} -> -- cgit v1.2.3 From 6f7ab48afd4a843c51ecaa59d29d7991cdac90aa Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 13 Jun 2019 13:20:37 +0200 Subject: stdlib (doc): Do not mention old requests --- lib/stdlib/doc/src/io_protocol.xml | 43 +------------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/lib/stdlib/doc/src/io_protocol.xml b/lib/stdlib/doc/src/io_protocol.xml index 84b5f62c7f..f05c358866 100644 --- a/lib/stdlib/doc/src/io_protocol.xml +++ b/lib/stdlib/doc/src/io_protocol.xml @@ -5,7 +5,7 @@
1999 - 2016 + 2019 Ericsson AB. All Rights Reserved. @@ -168,16 +168,6 @@ ok returns it "as is". -

For backward compatibility, the following Requests are also to be - handled by an I/O server (they are not to be present after - Erlang/OTP R15B):

- -
-{put_chars, Characters}
-{put_chars, Module, Function, Args}
- -

These are to behave as {put_chars, latin1, Characters} and - {put_chars, latin1, Module, Function, Args}, respectively.

@@ -332,19 +322,6 @@ eof -

For backward compatibility, the following Requests are also to be - handled by an I/O server (they are not to be present after - Erlang/OTP R15B):

- -
-{get_until, Prompt, Module, Function, ExtraArgs}
-{get_chars, Prompt, N}
-{get_line, Prompt}
- -

These are to behave as - {get_until, latin1, Prompt, Module, Function, ExtraArgs}, - {get_chars, latin1, Prompt, N}, and - {get_line, latin1, Prompt}, respectively.

@@ -637,24 +614,6 @@ request({requests, Reqs}, State) -> function applying the requests in the list one after another, returning the last result.

-

We need to handle backward compatibility and the - file module (which - uses the old requests until backward compatibility with pre-R13 nodes is - no longer needed). Notice that the I/O server does not work with a simple - file:write/2 if these are not added:

- - -request({put_chars,Chars}, State) -> - request({put_chars,latin1,Chars}, State); -request({put_chars,M,F,As}, State) -> - request({put_chars,latin1,M,F,As}, State); -request({get_chars,Prompt,N}, State) -> - request({get_chars,latin1,Prompt,N}, State); -request({get_line,Prompt}, State) -> - request({get_line,latin1,Prompt}, State); -request({get_until, Prompt,M,F,As}, State) -> - request({get_until,latin1,Prompt,M,F,As}, State); -

{error, request} must be returned if the request is not recognized:

-- cgit v1.2.3 From b9aef66da02a8e27b021ad3be2101b221c760a1f Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 13 Jun 2019 13:20:59 +0200 Subject: stdlib: Remove old I/O-requests from test suites --- lib/stdlib/test/io_proto_SUITE.erl | 20 +------------------- lib/stdlib/test/shell_SUITE.erl | 9 --------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/stdlib/test/io_proto_SUITE.erl b/lib/stdlib/test/io_proto_SUITE.erl index e497b2fb5d..df6958cfa9 100644 --- a/lib/stdlib/test/io_proto_SUITE.erl +++ b/lib/stdlib/test/io_proto_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2017. All Rights Reserved. +%% Copyright Ericsson AB 2009-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. @@ -1568,10 +1568,6 @@ request({put_chars, Encoding, Chars}, State) -> request({put_chars, Encoding, Module, Function, Args}, State) -> {ok, ok, State#state{q=[{put_chars, Encoding, Module, Function, Args} | State#state.q ]}}; -request({put_chars,Chars}, State) -> - {ok, ok, State#state{q=[{put_chars, Chars} | State#state.q ]}}; -request({put_chars,M,F,As}, State) -> - {ok, ok, State#state{q=[{put_chars, M,F,As} | State#state.q ]}}; request({get_until, Encoding, Prompt, M, F, As}, State) -> {ok, convert(State#state.nxt, Encoding, State#state.mode), State#state{nxt = eof, q = [{get_until, Encoding, Prompt, M, F, As} | State#state.q]}}; request({get_chars, Encoding, Prompt, N}, State) -> @@ -1583,20 +1579,6 @@ request({get_line, Encoding, Prompt}, State) -> State#state{nxt = eof, q = [{get_line, Encoding, Prompt} | State#state.q]}}; -request({get_until, Prompt, M, F, As}, State) -> - {ok, convert(State#state.nxt, latin1, State#state.mode), - State#state{nxt = eof, - q = [{get_until, Prompt, M, F, As} | State#state.q]}}; -request({get_chars, Prompt, N}, State) -> - {ok, convert(State#state.nxt, latin1, State#state.mode), - State#state{nxt = eof, - q = [{get_chars, Prompt, N} | - State#state.q]}}; -request({get_line, Prompt}, State) -> - {ok, convert(State#state.nxt, latin1, State#state.mode), - State#state{nxt = eof, - q = [{get_line, Prompt} | - State#state.q]}}; request({get_geomentry,_}, State) -> {error, {error,enotsup}, State}; request({setopts, Opts}, State) when Opts =:= [{binary, false}]; Opts =:= [list] -> diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl index cdb6031b07..4d85e1f04b 100644 --- a/lib/stdlib/test/shell_SUITE.erl +++ b/lib/stdlib/test/shell_SUITE.erl @@ -3141,25 +3141,16 @@ io_request({get_geometry,columns}, S) -> {ok,80,S}; io_request({get_geometry,rows}, S) -> {ok,24,S}; -io_request({put_chars,Chars}, S) -> - {ok,ok,S#state{reply = [S#state.reply | Chars]}}; io_request({put_chars,latin1,Chars}, S) -> {ok,ok,S#state{reply = [S#state.reply | Chars]}}; io_request({put_chars,unicode,Chars0}, S) -> Chars = unicode:characters_to_list(Chars0), {ok,ok,S#state{reply = [S#state.reply | Chars]}}; -io_request({put_chars,Mod,Func,Args}, S) -> - case catch apply(Mod, Func, Args) of - Chars when is_list(Chars) -> - io_request({put_chars,Chars}, S) - end; io_request({put_chars,Enc,Mod,Func,Args}, S) -> case catch apply(Mod, Func, Args) of Chars when is_list(Chars) -> io_request({put_chars,Enc,Chars}, S) end; -io_request({get_until,_Prompt,Mod,Func,ExtraArgs}, S) -> - get_until(Mod, Func, ExtraArgs, S, latin1); io_request({get_until,Enc,_Prompt,Mod,Func,ExtraArgs}, S) -> get_until(Mod, Func, ExtraArgs, S, Enc). -- cgit v1.2.3