anchor.diff:  
   
   % Continue searching through the archived files for a channel.
  +% This is a recursive function which steps backwards one archive file at a time
  +% until it reaches a point just before the "created" time for a channel.
  +% If an archive file doesn't exist for any particular day, then that day
  +% is simply skipped.  If an archive file is found for a particular day, then
  +% the file is opened and it's file descriptor is passed to the read_a_line()
  +% function which recursively searches all lines in that file.
   
   search_archive_files(ResultList, First, Created, Channel, RowsBack, SearchString) ->
     if
  -    length(ResultList) == RowsBack ->
  +    length(ResultList) >= RowsBack ->
   %     error_logger:info_msg("DEBUG: Search complete (1): ~p ~p ~p ~p~n", [ First, Created, length(ResultList), RowsBack ]),
         ResultList
         ;
  
positive.code:           file:close(Iod),
            lists:reverse(FileLines)
            ;
          { error, Reason } ->
            error_logger:warning_msg("Error: Open of archive ~p failed: ~p~n", [ ArchiveName, Reason ]),
            []
        end,
  
        { Ms, Sc, Us } = First,
        NewVal = ((Ms * 1000000000000) + (Sc * 1000000) + Us) - 86400000000,
        NewMs = NewVal div 1000000000000,
        NewSc = (NewVal - (NewMs * 1000000000000)) div 1000000,
        NewUs = NewVal - (NewMs * 1000000000000) - (NewSc * 1000000),
        NewFst = { NewMs, NewSc, NewUs },
  
        if
          NewFst < Created ->
  
negative.code: 
  
  
  
  % 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
  