Skip to content
Snippets Groups Projects
  1. Dec 16, 2023
    • Rob Swindell's avatar
      New findstr functions that can search for (up to) two strings in one go · dd37a468
      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().
      dd37a468
  2. Jun 02, 2022
    • Rob Swindell's avatar
      Decompose some library files to enable reuse by SVDM (virtual DOS modem) · a8c4fc8a
      Rob Swindell authored
      I just wanted to reuse findstr() in vdmodem.c and I fell down this hole :-)
      
      findstr.* is new (findstr() related functions moved from str_util)
      getctrl.* is now finally the real home of get_ctrl_dir(), moved from str_util
      trashcan* functions moved from str_util to scfglib
      other scfg_t dependent functions moved from str_util to scfglib
      
      net_addr() appears to be a function that was never created/used (?)
      
      This will definitely break the *nix build, for now.
      a8c4fc8a
Loading