diff options
Diffstat (limited to 'lib/stdlib/src')
| -rw-r--r-- | lib/stdlib/src/binary.erl | 8 | ||||
| -rw-r--r-- | lib/stdlib/src/c.erl | 17 | ||||
| -rw-r--r-- | lib/stdlib/src/ets.erl | 7 | ||||
| -rw-r--r-- | lib/stdlib/src/stdlib.appup.src | 4 | 
4 files changed, 25 insertions, 11 deletions
| diff --git a/lib/stdlib/src/binary.erl b/lib/stdlib/src/binary.erl index 4850a59eb6..8d07a356dd 100644 --- a/lib/stdlib/src/binary.erl +++ b/lib/stdlib/src/binary.erl @@ -89,9 +89,9 @@ copy(_, _) ->  decode_unsigned(_) ->      erlang:nif_error(undef). --spec decode_unsigned(Subject, Endianess) -> Unsigned when +-spec decode_unsigned(Subject, Endianness) -> Unsigned when        Subject :: binary(), -      Endianess :: big | little, +      Endianness :: big | little,        Unsigned :: non_neg_integer().  decode_unsigned(_, _) -> @@ -103,9 +103,9 @@ decode_unsigned(_, _) ->  encode_unsigned(_) ->      erlang:nif_error(undef). --spec encode_unsigned(Unsigned, Endianess) -> binary() when +-spec encode_unsigned(Unsigned, Endianness) -> binary() when        Unsigned :: non_neg_integer(), -      Endianess :: big | little. +      Endianness :: big | little.  encode_unsigned(_, _) ->      erlang:nif_error(undef). diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl index c2256c0cf9..9860adf04d 100644 --- a/lib/stdlib/src/c.erl +++ b/lib/stdlib/src/c.erl @@ -509,9 +509,12 @@ m(M) ->      {exports,E} = lists:keyfind(exports, 1, L),      Time = get_compile_time(L),      COpts = get_compile_options(L), -    format("Module ~w compiled: ",[M]), print_time(Time), -    format("Compiler options:  ~p~n", [COpts]), +    format("Module: ~w~n", [M]), +    print_md5(L), +    format("Compiled: "), +    print_time(Time),      print_object_file(M), +    format("Compiler options:  ~p~n", [COpts]),      format("Exports: ~n",[]), print_exports(keysort(1, E)).  print_object_file(Mod) -> @@ -522,6 +525,12 @@ print_object_file(Mod) ->  	    ignore      end. +print_md5(L) -> +    case lists:keyfind(md5, 1, L) of +        {md5,<<MD5:128>>} -> io:format("MD5: ~.16b~n",[MD5]); +        _ -> ok +    end. +  get_compile_time(L) ->      case get_compile_info(L, time) of  	{ok,Val} -> Val; @@ -569,8 +578,8 @@ split_print_exports([{F1, A1}|T1], [{F2, A2} | T2]) ->  split_print_exports([], []) -> ok.  print_time({Year,Month,Day,Hour,Min,_Secs}) -> -    format("Date: ~s ~w ~w, ", [month(Month),Day,Year]), -    format("Time: ~.2.0w.~.2.0w~n", [Hour,Min]); +    format("~s ~w ~w, ", [month(Month),Day,Year]), +    format("~.2.0w:~.2.0w~n", [Hour,Min]);  print_time(notime) ->      format("No compile time info available~n",[]). diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl index 42b11a97e2..93c4f59896 100644 --- a/lib/stdlib/src/ets.erl +++ b/lib/stdlib/src/ets.erl @@ -1613,13 +1613,18 @@ choice(Height, Width, P, Mode, Tab, Key, Turn, Opos) ->      end.  get_line(P, Default) -> -    case io:get_line(P) of +    case line_string(io:get_line(P)) of  	"\n" ->  	    Default;  	L ->  	    L      end. +%% If the standard input is set to binary mode +%% convert it to a list so we can properly match. +line_string(Binary) when is_binary(Binary) -> unicode:characters_to_list(Binary); +line_string(Other) -> Other. +  nonl(S) -> string:strip(S, right, $\n).  print_number(Tab, Key, Num) -> diff --git a/lib/stdlib/src/stdlib.appup.src b/lib/stdlib/src/stdlib.appup.src index 7802ea884f..951dbca68e 100644 --- a/lib/stdlib/src/stdlib.appup.src +++ b/lib/stdlib/src/stdlib.appup.src @@ -17,11 +17,11 @@  %% %CopyrightEnd%  {"%VSN%",   %% Up from - max one major revision back - [{<<"2\\.[1-2](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3 + [{<<"2\\.[1-3](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3    {<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.0    {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R16   %% Down to - max one major revision back - [{<<"2\\.[1-2](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3 + [{<<"2\\.[1-3](\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.1-17.3    {<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% 17.0    {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16  }. | 
