- Jan 14, 2025
-
-
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.
-
- Nov 04, 2024
-
-
Rob Swindell authored
-
- Jan 20, 2024
-
-
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
-
- Dec 17, 2023
-
-
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
-
Rob Swindell authored
-
- Dec 16, 2023
-
-
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().
-
- Jun 02, 2022
-
-
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.
-