anchor.diff:      {ok, Bin} = file:read_file(File),
       S = erlang:binary_to_list(Bin),
       LEs = scan_line_endings(S),
  -    case lists:all(fun(E) -> E=="\r\n" end, LEs) of 
  -	true -> dos;
  -	_ -> case lists:all(fun(E) -> E=="\r" end, LEs)  of
  -		 true ->
  -		     mac;
  -		 _ -> case lists:all(fun(E)-> E=="\n" end, LEs) of
  -			  true -> unix;
  -			  _ -> throw({error, File ++ " uses a mixture of line endings,"
  -				      " please normalise it to one of the standard file formats (i.e. unix/dos/mac) before performing any refactorings."})
  -		      end
  -	     end
  +    case LEs of 
  +	[] -> unix;    %% default fileformat;
  +	_ ->  case lists:all(fun(E) -> E=="\r\n" end, LEs) of 
  +		  true -> dos;
  +		  _ -> case lists:all(fun(E) -> E=="\r" end, LEs)  of
  +			   true ->
  +			       mac;
  +			   _ -> case lists:all(fun(E)-> E=="\n" end, LEs) of
  +				    true -> unix;
  +				    _ -> throw({error, File ++ " uses a mixture of line endings,"
  +						" please normalise it to one of the standard file formats (i.e. unix/dos/mac) before performing any refactorings."})
  +				end
  +		       end
  +	      end
       end.
   
   scan_line_endings(Cs)->
  
positive.code: 	     [[syntaxTree()]]).
  pos_to_syntax_units(FileName, Tree, Start, End, F, TabWidth) ->
      Res = pos_to_syntax_units_1(Tree, Start, End, F),
      %% io:format("StartEnd:\n~p\n", [{Start, End}]),
  %%     io:format("Res:\n~p\n", [Res]),
      Res1 = filter_syntax_units(Res),
     %% io:format("Res1:\n~p\n", [Res1]),
      Units = case length(Res1)=<1 of 
  		true ->
  		    [Res1];
  
negative.code:        (S > End) or (E < Start) -> [];
         (S < Start) or (E > End) ->
  	   Ts = refac_syntax:subtrees(Tree),
  	   R0 = [[pos_to_syntax_units_1(T, Start, End, F) || T <- G]
  		 || G <- Ts],
  	   lists:append(R0);
  