anchor.diff:      end.
       
   add_new_delete_old_keys(PoToWash, DefPo) ->
  -    add_new_delete_old_keys(PoToWash, DefPo, []).
  -add_new_delete_old_keys([{K, _V1} = KV|PoToWash], [{K, _V2}|DefPo], Acc) ->
  -    add_new_delete_old_keys(PoToWash, DefPo, [KV|Acc]);
  -add_new_delete_old_keys([{K1, _V1}|_]=PoToWash, [{K2, _V2} = KV|DefPo], Acc) when K1 > K2 ->
  -    add_new_delete_old_keys(PoToWash, DefPo, [KV|Acc]);
  -add_new_delete_old_keys([{_K, _V}|PoToWash], DefPo, Acc) ->
  -    add_new_delete_old_keys(PoToWash, DefPo, Acc);
  -add_new_delete_old_keys([], [KV|DefPo], Acc) ->
  -    add_new_delete_old_keys([], DefPo, [KV|Acc]);
  -add_new_delete_old_keys(_, [], Acc) ->
  -    lists:reverse(Acc).
  +    add_new_delete_old_keys(PoToWash, DefPo, {[], 0, 0, 0}).
  +add_new_delete_old_keys([{K, _V1} = KV|PoToWash], [{K, _V2}|DefPo], 
  +			{Acc, New, RU, RT}) ->
  +    add_new_delete_old_keys(PoToWash, DefPo, {[KV|Acc], New, RU, RT});
  +add_new_delete_old_keys([{K1, _V1}|_] = PoToWash, [{K2, _V2} = KV|DefPo], 
  +			{Acc, New, RU, RT}) when K1 > K2 ->
  +    add_new_delete_old_keys(PoToWash, DefPo, {[KV|Acc], New + 1, RU, RT});
  +add_new_delete_old_keys([{K, K}|PoToWash], DefPo, 
  +			{Acc, New, RU, RT}) ->
  +    add_new_delete_old_keys(PoToWash, DefPo, {Acc, New, RU + 1, RT});
  +add_new_delete_old_keys([{_K, _V}|PoToWash], DefPo, 
  +			{Acc, New, RU, RT}) ->
  +    add_new_delete_old_keys(PoToWash, DefPo, {Acc, New, RU, RT + 1});
  +add_new_delete_old_keys([], [KV|DefPo], {Acc, New, RU, RT}) ->
  +    add_new_delete_old_keys([], DefPo, {[KV|Acc], New + 1, RU, RT});
  +add_new_delete_old_keys([], [], {Acc, New, RU, RT}) ->
  +    {lists:reverse(Acc), New, RU, RT}.
   
   sort_po_file(LC) ->
       LCPo = read_po_file(LC),
  
positive.code: 
  read_and_check_po_file(LC) ->
      LCPo = read_po_file(LC),
      case check_no_duplicates_and_sorted(LCPo, LC) of
  	unsorted ->
  	    sort_po_file(LC),
  
negative.code: 				  "in "++LC++".~n~n"),
  	    Duplicated;
  	ok ->
  	    {LCPo, TransUntrans}
      end.    
  
  get_amount_translated_and_untranslated(LC) ->
      F = fun({K, K}, {Trans, Untrans})   -> {Trans, Untrans + 1};
  	   ({_K, _V}, {Trans, Untrans}) -> {Trans + 1, Untrans} end,
      lists:foldl(F, {0, 0}, LC).
  
  check_no_duplicates_and_sorted([], _LC) ->
      ok;
  