anchor.diff:  
   
   
  -% Find a matching line in an archive file.
  +
  +% Subtract a microsecond time from a now(), returning a new now().
  +
  +subtract_time(Now, UsTime) ->
  +  { Ms, Sc, Us } = Now,
  +  NewVal = ((Ms * 1000000000000) + (Sc * 1000000) + Us) - UsTime,
  +  NewMs = NewVal div 1000000000000,
  +  NewSc = (NewVal - (NewMs * 1000000000000)) div 1000000,
  +  NewUs = NewVal - (NewMs * 1000000000000) - (NewSc * 1000000),
  +  { NewMs, NewSc, NewUs }.
  +
  +
  +
  +
  +
  +% Find a matching line in an archive file.  Like the cache search, row "text"
  +% is searched first, if no match then row "user", if no match then row "date".
  +% This is a recursive function which checks for matches within
  +% a given file.  Matches are added to an accumulator list until either:
  +% - The end of the file is reached.
  +% - Or, the total number of matches equals "RowsBack".  (Total number of matches
  +%   so far, for cache search matches plus file matches is provided in "PrevLen".)
  +% - Or, a failure occurs when trying to read from the file descriptor.
  +% Known Issue: Files are searched oldest -> newest (as that is the order that
  +% they are written).  Whereas the cache is searched newest -> oldest.  This
  +% means that if RowsBack is reached whilst searching a file, then it is
  +% possible that newer rows within that file will be omitted from the results,
  +% yet older ones (up to RowsBack) will be included.
   
   read_a_line(Iod, Acc, PrevLen, RowsBack, SearchString) ->
     if
  
positive.code: 
  
  % Continue searching through the archived files for a channel.
  
  search_archive_files(ResultList, First, Created, Channel, RowsBack, SearchString) ->
    if
      length(ResultList) == RowsBack ->
  %     error_logger:info_msg("DEBUG: Search complete (1): ~p ~p ~p ~p~n", [ First, Created, length(ResultList), RowsBack ]),
        ResultList
        ;
  
negative.code:           file:close(Iod),
            lists:reverse(FileLines)
            ;
          { error, _Reason } ->
  %         error_logger:warning_msg("Error: Open of archive ~p failed: ~p~n", [ ArchiveName, Reason ]),
            []
        end,
  
        NewFst = subtract_time(First, 86400000000),
  
        if
          NewFst < Created ->
  