anchor.diff:      end.
   			   
   
  -io_request(Req, From, ReplyAs, Drv, Buf0) ->
  -    case io_request(Req, Drv, {From,ReplyAs}, Buf0) of
  +io_request(Req, From, ReplyAs, Drv, Shell, Buf0) ->
  +    case io_request(Req, Drv, Shell, {From,ReplyAs}, Buf0) of
   	{ok,Reply,Buf} ->
   	    io_reply(From, ReplyAs, Reply),
   	    Buf;
  
positive.code: 	    {Ls2, {RevCmd, "': "++Line}}
      end,
      Cont = {line,Prompt,NewStack,search},
      more_data(What, Cont, Drv, Ls, Encoding);
  get_line1({What,Cont0,Rs}, Drv, Ls, Encoding) ->
      send_drv_reqs(Drv, Rs),
      more_data(What, Cont0, Drv, Ls, Encoding).
  
  more_data(What, Cont0, Drv, Ls, Encoding) ->
      receive
  	{Drv,{data,Cs}} ->
  	    get_line1(edlin:edit_line(Cs, Cont0), Drv, Ls, Encoding);
  	{Drv,eof} ->
  	    get_line1(edlin:edit_line(eof, Cont0), Drv, Ls, Encoding);
  	{io_request,From,ReplyAs,Req} when is_pid(From) ->
  	    {more_chars,Cont,_More} = edlin:edit_line([], Cont0),
  	    send_drv_reqs(Drv, edlin:erase_line(Cont)),
  	    io_request(Req, From, ReplyAs, Drv, []), %WRONG!!!
  	    send_drv_reqs(Drv, edlin:redraw_line(Cont)),
  	    get_line1({more_chars,Cont,[]}, Drv, Ls, Encoding);
          {reply,{{From,ReplyAs},Reply}} ->
              %% We take care of replies from puts here as well
              io_reply(From, ReplyAs, Reply),
              more_data(What, Cont0, Drv, Ls, Encoding);
  	{'EXIT',Drv,interrupt} ->
  	    interrupted;
  	{'EXIT',Drv,_} ->
  	    terminated
      after
  	get_line_timeout(What)->
  	    get_line1(edlin:edit_line([], Cont0), Drv, Ls, Encoding)
      end.
  
  get_line_echo_off(Chars, Pbs, Drv) ->
      send_drv_reqs(Drv, [{put_chars, unicode,Pbs}]),
      get_line_echo_off1(edit_line(Chars,[]), Drv).
  
  get_line_echo_off1({Chars,[]}, Drv) ->
      receive
  	{Drv,{data,Cs}} ->
  	    get_line_echo_off1(edit_line(Cs, Chars), Drv);
  	{Drv,eof} ->
  	    get_line_echo_off1(edit_line(eof, Chars), Drv);
  	{io_request,From,ReplyAs,Req} when is_pid(From) ->
  	    io_request(Req, From, ReplyAs, Drv, []),
  	    get_line_echo_off1({Chars,[]}, Drv);
          {reply,{{From,ReplyAs},Reply}} when From =/= undefined ->
              %% We take care of replies from puts here as well
              io_reply(From, ReplyAs, Reply),
              get_line_echo_off1({Chars,[]},Drv);
  	{'EXIT',Drv,interrupt} ->
  	    interrupted;
  	{'EXIT',Drv,_} ->
  	    terminated
      end;
  get_line_echo_off1({Chars,Rest}, _Drv) ->
      {done,lists:reverse(Chars),case Rest of done -> []; _ -> Rest end}.
  
  get_chars_echo_off(Pbs, Drv) ->
      send_drv_reqs(Drv, [{put_chars, unicode,Pbs}]),
      get_chars_echo_off1(Drv).
  
  get_chars_echo_off1(Drv) ->
      receive
          {Drv, {data, Cs}} ->
              Cs;
  	{Drv, eof} ->
              eof;
  	{io_request,From,ReplyAs,Req} when is_pid(From) ->
  	    io_request(Req, From, ReplyAs, Drv, []),
  	    get_chars_echo_off1(Drv);
          {reply,{{From,ReplyAs},Reply}} when From =/= undefined ->
              %% We take care of replies from puts here as well
              io_reply(From, ReplyAs, Reply),
              get_chars_echo_off1(Drv);
  	{'EXIT',Drv,interrupt} ->
  	    interrupted;
  	{'EXIT',Drv,_} ->
  	    terminated
      end.
  
  %% We support line editing for the ICANON mode except the following
  
negative.code: 	_ ->
  	    {error,{error,{put_chars,latin1,Chars}},Buf}
      end;
  io_request({put_chars,latin1,M,F,As}, Drv, _Shell, From, Buf) ->
      case catch apply(M, F, As) of
  	Binary when is_binary(Binary) ->
  	    send_drv(Drv, {put_chars_sync, unicode,
  