anchor.diff:  	    {exit, terminated}
       end.
   
  -get_chars_n(Prompt, M, F, Xa, Drv, Buf, Encoding) ->
  +get_chars_n(Prompt, M, F, Xa, Drv, Shell, Buf, Encoding) ->
       Pbs = prompt_bytes(Prompt, Encoding),
       case get(echo) of
           true ->
  -            get_chars_loop(Pbs, M, F, Xa, Drv, Buf, start, Encoding);
  +            get_chars_loop(Pbs, M, F, Xa, Drv, Shell, Buf, start, Encoding);
           false ->
  -            get_chars_n_loop(Pbs, M, F, Xa, Drv, Buf, start, Encoding)
  -    end.
  -
  -get_chars_line(Prompt, M, F, Xa, Drv, Buf, Encoding) ->
  +            get_chars_n_loop(Pbs, M, F, Xa, Drv, Shell, Buf, start, Encoding)
  +    end.
  +
  +get_chars_line(Prompt, M, F, Xa, Drv, Shell, Buf, Encoding) ->
       Pbs = prompt_bytes(Prompt, Encoding),
  -    get_chars_loop(Pbs, M, F, Xa, Drv, Buf, start, Encoding).
  -
  -get_chars_loop(Pbs, M, F, Xa, Drv, Buf0, State, Encoding) ->
  +    get_chars_loop(Pbs, M, F, Xa, Drv, Shell, Buf, start, Encoding).
  +
  +get_chars_loop(Pbs, M, F, Xa, Drv, Shell, Buf0, State, Encoding) ->
       Result = case get(echo) of
   		 true ->
  -		     get_line(Buf0, Pbs, Drv, Encoding);
  +		     get_line(Buf0, Pbs, Drv, Shell, Encoding);
   		 false ->
   		     % get_line_echo_off only deals with lists
   		     % and does not need encoding...
  -		     get_line_echo_off(Buf0, Pbs, Drv)
  +		     get_line_echo_off(Buf0, Pbs, Drv, Shell)
   	     end,
       case Result of
   	{done,Line,Buf} ->
  -            get_chars_apply(Pbs, M, F, Xa, Drv, Buf, State, Line, Encoding);
  +            get_chars_apply(Pbs, M, F, Xa, Drv, Shell, Buf, State, Line, Encoding);
   	interrupted ->
   	    {error,{error,interrupted},[]};
   	terminated ->
   	    {exit,terminated}
       end.
   
  -get_chars_apply(Pbs, M, F, Xa, Drv, Buf, State0, Line, Encoding) ->
  +get_chars_apply(Pbs, M, F, Xa, Drv, Shell, Buf, State0, Line, Encoding) ->
       case catch M:F(State0, cast(Line,get(read_mode), Encoding), Encoding, Xa) of
           {stop,Result,Rest} ->
               {ok,Result,append(Rest, Buf, Encoding)};
           {'EXIT',_} ->
               {error,{error,err_func(M, F, Xa)},[]};
           State1 ->
  -            get_chars_loop(Pbs, M, F, Xa, Drv, Buf, State1, Encoding)
  -    end.
  -
  -get_chars_n_loop(Pbs, M, F, Xa, Drv, Buf0, State, Encoding) ->
  +            get_chars_loop(Pbs, M, F, Xa, Drv, Shell, Buf, State1, Encoding)
  +    end.
  +
  +get_chars_n_loop(Pbs, M, F, Xa, Drv, Shell, Buf0, State, Encoding) ->
       try M:F(State, cast(Buf0, get(read_mode), Encoding), Encoding, Xa) of
           {stop,Result,Rest} ->
               {ok, Result, Rest};
           State1 ->
  -            case get_chars_echo_off(Pbs, Drv) of
  +            case get_chars_echo_off(Pbs, Drv, Shell) of
                   interrupted ->
                       {error,{error,interrupted},[]};
                   terminated ->
                       {exit,terminated};
                   Buf ->
  -                    get_chars_n_loop(Pbs, M, F, Xa, Drv, Buf, State1, Encoding)
  +                    get_chars_n_loop(Pbs, M, F, Xa, Drv, Shell, Buf, State1, Encoding)
               end
       catch _:_ ->
               {error,{error,err_func(M, F, Xa)},[]}
  
positive.code: 	    get_line1(edlin:edit_line1(lists:sublist(Lcs, 1, length(Lcs)-1),
  				      Ncont),
  		      Drv,
  		      Ls, Encoding)
      end;
  %% ^R = backward search, ^S = forward search.
  
negative.code: %%	{Result,NewSaveBuffer}
  %%	{error,What,NewSaveBuffer}
  
  get_password_chars(Drv,Shell,Buf) ->
      case get_password_line(Buf, Drv, Shell) of
  	{done, Line, Buf1} ->
  	    {ok, Line, Buf1};
  	interrupted ->
  