anchor.diff:      end.
   
   get_progs() ->
  -    try
  -        do_get_progs()
  -    catch
  -        throw:Thrown ->
  -            {error, Thrown}
  -    end.
  -
  -do_get_progs() ->
       case os:type() of
  -	{unix,freebsd} ->
  -	    throw("Can't use run_erl on FreeBSD");
  -	{unix,openbsd} ->
  -	    throw("Can't use run_erl on OpenBSD");
  -	{unix,_} ->
  +        {unix,freebsd} ->
  +            {error,"Can't use run_erl on FreeBSD"};
  +        {unix,openbsd} ->
  +            {error,"Can't use run_erl on OpenBSD"};
  +        {unix,_} ->
               RunErl = find_executable("run_erl"),
               ToErl = find_executable("to_erl"),
  -            Erl = find_executable("erl"),
  +            Erl = string:split(ct:get_progname()," ",all),
               {RunErl, ToErl, Erl};
  -	_ ->
  -	    throw("Not a Unix OS")
  -    end.
  +        _ ->
  +            {error,"Not a Unix OS"}
  +        end.
   
   find_executable(Name) ->
       case os:find_executable(Name) of
  
positive.code:     end.
  
  rtstart(Args) ->
      rtstart([], [], Args).
  
  rtstart(Nodename, ErlPrefix, Args) ->
      case get_progs() of
  	{error,_Reason} ->
  	    {skip,"No runerl present"};
  	{RunErl,ToErl,Erl} ->
  	    case create_tempdir() of
  		{error, Reason2} ->
  		    {skip, Reason2};
  		Tempdir ->
  		    SPid =
  			start_runerl_node(RunErl,ErlPrefix++"\\\""++Erl++"\\\"",
  					  Tempdir,Nodename,Args),
  		    CPid = start_toerl_server(ToErl,Tempdir),
                      {ok, SPid, CPid, {CPid, SPid, ToErl, Tempdir}}
              end
      end.
  
  rtstop({CPid, SPid, ToErl, Tempdir}) ->
      case stop_runerl_node(CPid) of
          {error,_} ->
              catch rtstop_try_harder(ToErl, Tempdir);
          _ ->
              ok
      end,
  
negative.code:     {ok, Logs} =
          rtnode([
                  {putline, ""},
                  {putdata, [$\^p]}, {expect, "echo2[.]$"},
                  {putdata, [$\^p]}, {expect, "echo[.]$"},
                  {putdata, [$\n]},
                  {expect, "echo\r\n"}
                 ], [], [], mk_history_param(Path)),
  
      rtnode_check_logs("erlang.log.1", "Invalid chunk in the file", Logs),
      ok.
  