Skip to content
Snippets Groups Projects
Rob Swindell (on Windows 11)'s avatar
Rob Swindell authored
Many searches are done (e.g. in the mail server, QWK import) for either of 2
strings in single file or list, so let's optimize that to a single iteration
through the file/list. This should reduce some redundant file I/O.

I do find this API a little confusing with the filename or list at the end
of the argument list, but kept it consistent with the existing single string
findstr functions (which are now just wrappers for the new 2-string flavors).

I noticed during this update that findstr() did not share the same behavior
as findstr_in_list() (feature added in commit f08f2137) whereby if all the
patterns were negative searches (beginning with '!'), then *all* the
negative matches would have to be successful (not just the first) for the
function to return true. So now findstr() behaves like findstr_in_list()
in this regard.

I also added some optimizations to findstr_in_string().
a19d58c1
History

Synchronet Project

BBS-Related Software Source Repository

Directories within:

  • 3rdp - Third-party libraries
  • ctrl - Synchronet BBS configuration and run-time data files
  • docs - Synchronet BBS documentation (mostly legacy HTML)
  • exec - Synchronet BBS executable files (mostly JavaScript)
  • install - Synchronet BBS installation files
  • node1 - Synchronet BBS Terminal Server "node" configuration files
  • src - Source code (mostly C/C++)
  • text - Synchronet BBS text and menu files
  • web - Synchronet Legacy/Runemaster web UI
  • webv4 - echicken's web interface (v4) for Synchronet
  • xtrn - Synchronet BBS doors (mostly JavaScript)

Related web-sites:
Synchronet BBS Software
Synchronet Wiki
Synchronet Source Repository