anchor.diff:  %% Description: Decode a string to an erlang term.
   %%--------------------------------------------------------------------
   decode(String) ->
  -    case decode_b(String) of
  -	{Res, []} ->
  -	    {ok, Res};
  -	E ->
  -	    {error, E}
  -    end.
  +    {Res, []} = decode_b(String),
  +    Res.
   
   %%--------------------------------------------------------------------
   %% Function: search_dict/1
   %% Description: Search the dict for a key. Returns {ok, Val} or false.
   %%   if the bastard is not a dict, return not_a_dict.
   %%--------------------------------------------------------------------
  -search_dict(Key, Dict) ->
  -    case Dict of
  -	{dict, Elems} ->
  -	    case lists:keysearch(Key, 1, Elems) of
  -		{value, {_, V}} ->
  -		    {ok, V};
  -		false ->
  -		    false
  -	    end;
  -	_ ->
  -	    not_a_dict
  +search_dict(Key, {dict, Elems}) ->
  +    case lists:keysearch(Key, 1, Elems) of
  +	{value, {_, V}} ->
  +	    V;
  +	false ->
  +	    false
       end.
   
   search_dict_default(Key, Dict, Default) ->
       case search_dict(Key, Dict) of
  -	{ok, Val} ->
  -	    Val;
  -	_ ->
  -	    Default
  +	false ->
  +	    Default;
  +	X ->
  +	    X
       end.
   
   %%--------------------------------------------------------------------
  
positive.code: %% Description: Parse a file into a Torrent structure.
  %%--------------------------------------------------------------------
  parse(File) ->
      case file:open(File, [read]) of
  	{ok, IODev} ->
  	    Data = read_data(IODev),
  	    ok = file:close(IODev),
  	    case decode(Data) of
  		{ok, Torrent} ->
  		    {ok, Torrent};
  		{error, Reason} ->
  		    {not_a_torrent, Reason}
  	    end;
  	{error, Reason} ->
  	    {could_not_read_file, Reason}
      end.
  
  %%====================================================================
  %% Internal functions
  
negative.code: 
  decode_integer(String) ->
      {IntegerPart, RestPart} = lists:splitwith(charPred($e), String),
      {Int, _} = string:to_integer(IntegerPart),
      {{integer, Int}, tl(RestPart)}.
  
  decode_list(String) ->
      {ItemTree, Rest} = decode_list_items(String, []),
      {{list, ItemTree}, Rest}.
  
  decode_list_items([], Accum) -> {lists:reverse(Accum), []};
  decode_list_items(Items, Accum) ->
      case decode_b(Items) of
  	{end_of_data, Rest} ->
  	    {lists:reverse(Accum), Rest};
  	{I, Rest} -> decode_list_items(Rest, [I | Accum])
      end.
  
  