Skip to content
Snippets Groups Projects
  1. Jan 14, 2025
    • Rob Swindell's avatar
      First pass run of uncrustify (code beautification) · 45c8fa94
      Rob Swindell authored
      White-space changes only, exception being the rare insertion of NL before
      closing brace (couldn't find the option to disable that behavior).
      
      I excluded some header files (e.g. sbbs.h) since uncrustify seemed to be doing
      more harm than good there. I might just end up applying different set of rules
      to .h files.
      45c8fa94
  2. Jan 20, 2024
    • Rob Swindell's avatar
      The great BOOL->bool conversion in xpdev · 118984e9
      Rob Swindell authored
      Still using BOOL where we need Win32 API compatibility.
      Using JSBool instead of BOOL or bool where it matters.
      Changed most relevant TRUE/FALSE to true/false too (though it's not as critical).
      
      You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case.
      Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case.
      
      For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef).
      
      I didn't convert UIFC yet.
      
      This addresses issue #698
      118984e9
  3. Dec 17, 2023
    • Rob Swindell's avatar
      Add support for metadata in *.can (filter) files · 2af212db
      Rob Swindell authored
      I wanted a couple of features for filters (e.g. blocked IP addreses):
      - expiration date, optionally (only block for a limited time)
      - display details of reason for filter in log messages (at time of block)
      
      I've been thinking for some time that these files should be converted to .ini,
      but then it occurred to me that I could do a sort of hybrid where the metadata
      was key/value pairs tab-delimited from the search-pattern (first text on the
      line). This is backward comaptible, relatively easy to view/edit by hand, and
      extensible (easy to add/remove metadata fields in the future). So they'll
      remain as text/*.can files.
      
      The maximum line length for findstr/trashcan parsed files extended from 255 to
      1000 characters.
      
      Moved all trashcan-related functions from scfglib1.c to (new file) trash.c.
      
      For the first time, I actually tested a build on WSL *before* committing to
      Git. So, this *should* pass CI the first time. :-O
      2af212db
  4. 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
  5. 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
  6. Apr 04, 2021
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · 925e3b0a
      Rob Swindell authored
      This won't impact Synchronet as it has a separate signal handling
      thread, but we still need to behave properly for processes that
      don't.  I'm also saying that ENOMEM does not indicate a disconnection,
      though it may be better to pretend it was disconnected...
      925e3b0a
  7. Nov 23, 2020
    • Rob Swindell's avatar
      The great C function dependency refactor of 2020 · cee2d280
      Rob Swindell authored
      The goal of this commit is that: only modules that either are part-of sbbs.dll/libsbbs.so or need to link with/use that library, will #include "sbbs.h" and thus be dependent on its subsequent includes (e.g. cryptlib.h, jsapi.h). This should mean extdeps.mk can be trimmed way down.
      
      I also removed CVS keyword/comments and trimmed up the boilerplate copyright notice in modified and added source/header files in this commit.
      
      There is no functional change in behavior in this comment.
      cee2d280
  8. Aug 16, 2020
  9. Jul 08, 2019
  10. Jul 24, 2018
    • rswindell's avatar
      The great Copyright year update and (mostly) removal of 2018: · f869ad3d
      rswindell authored
      Most of the copyright years in the source code were misleading (the date of
      most recent publish was actually later) and all were unnecessary. I've been
      removing copyright years piecemeal, for a long time, but I decided it was time
      to just perform a bulk search and (mostly) replace. In some cases, I left
      old copyright years on files that either are not used (and soon to be removed)
      or obsolete and unlikely to ever be touched again (e.g. Win9x FOSSIL VXD). Some
      of the runtime binaries still contain copyright years and those were updated to
      2018.
      f869ad3d
  11. Nov 08, 2011
    • rswindell's avatar
      At Deuce's request, revert his change: · 62b2e592
      rswindell authored
      "Change the last argument of wordwrap() to a flags argument and support
      making a bare LF not be ignored."
      If soft line breaks (bare LFs) are stored in the message base, they're
      expected to wrapped for 80-column terminal only.
      62b2e592
  12. Nov 04, 2011
  13. Mar 12, 2010
  14. Feb 10, 2009
  15. May 15, 2003
  16. Apr 01, 2003
  17. Apr 26, 2002
  18. Nov 11, 2000
  19. Oct 10, 2000
  20. Sep 25, 2000
Loading