- Jan 06, 2025
-
-
Rob Swindell authored
These @-codes can be used to construct ftp[s] and http[s] URLs to display to users. For use in new/optional display file text/menu/download.* Add optional configurable 'vpath' (per-directory) for directories that have web/ftp aliases, so they preferred/short path (alias) will be used in the expanded @-codes. In SCFG, display each directory's virtual file path ([auto-generated] or set manually). getfilevpath() no longer assumes the target buf is >= MAX_PATH+1 bytes long Add dir_vpath() to get a directory's vpath Extend maximum file library parent directory from 47 to 100 chars. This limit was likely imposed because we didn't have horiztonal scrolling input in UIFC getstr() support at the time. We're no longer limited by that.
-
- Oct 26, 2024
-
-
Rob Swindell authored
Returns count of files removed now (not bool).
-
- Sep 17, 2024
-
-
Rob Swindell authored
Commit 3a3c889b (2 years ago now) changed loadfiles() to use liberal file matching (e.g. "syncterm.exe" matched both "syncterm.exe" and "syncterm_v1.2b.exe"). This could produce surprising results when doing file list querieis/operations with the FileBase methods via JS (e.g. jsexec utils) and (now that I look at it), the FTP server too. So we should not have been doing liberal file matching *everywhere* loadfiles is used, just where it was a usability issue (due to displayed filenames being truncated to 12 chars for <=80 column terminals). Now solved by add/use of new liberal_filepattern() function only in the built-in file listing methods: sbbs_t::listfiles() and sbbs_t::listfileinfo(). Note: Custom JS file searching/listing scripts may now need their own work-arounds for this usability issue, if they have it.
-
- 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
-
- Jun 09, 2023
-
-
Rob Swindell authored
So Clang-FreeBSD was warning (in compiles of scfg/scfg*.c by Deuce): result of comparison of constant 100000 with expression of type 'uint16_t' (aka 'unsigned short') is always true Why? Cause a uint16_t's max value is 65535 (less than 100000). Sure we could have just lowered the UIFC max number of config items to 65535, but that would have been too easy. And why are these compared-with values of type uint16_t to begin with? Because most ctrl/*.cnf lists (of configuration items) were limited to 65535 entries cause ... 16-bit DOS, historically. Now that *.cnf files aren't used, we could just increase these scfg_t.*_total type sizes from 16 to 32-bits, yeah? The result is this commit. I went to (signed) int so we could still keep -1 as the special illegal sub/dir num value (e.g. INVALID_SUB, which is sometimes used to indicate the email message base). Theoretically, 2 billion configuration items could be supported in these lists, but SCFG will limit you to 100000 anyway. So there's a whole lot of s/uint/int in this commit. I'd be very surprised if this doesn't result in some new GCC/Clang warnings, but at least the old "comparison of constant 100000" warnings are now gone!
-
- Mar 13, 2023
-
-
Rob Swindell authored
For archives with directories, the first call to extract_files_from_archive() from extract_diz() would create sub-directories in the target (temp) directory, but no files within them. To correctly solve the original problem identified in commit 79a302f4, introduce/use a new 'recurse' argument to extract_files_from_archive() which means to recursively apply the file_list filter (if specified). Always pass 'with_path' argument as false to prevent sub-dir creation. The JS Archive.extract() method now excepts an additional boolean argument (recurse) following the file list arguments, default is false. Remove extra whitespace in Archive JSDOC method descriptions to be consistent with other object/class docs.
-
- Jan 13, 2023
-
-
Rob Swindell authored
Allows for more/better wildcard matching in viewable and testable file types and download-events (e.g. "tar.gz" or "tar.*"). This solves the "double-dot" problem in some file types/extensions. An implicit "*." is prepended before the configured file type/extension.
-
- Nov 12, 2022
-
-
Rob Swindell authored
Now, if the BOOL argument value is FALSE, then the .ini file is opened read-only (and thus only read permissions are needed, resolving issue #455). If the BOOL argument value is TRUE, create-if-not-exist is implied. There are no use cases where we would want to open an .ini file for writing only if it already existed.
-
- Apr 30, 2022
-
-
Rob Swindell authored
1. Was not setting f->dir to the correct directory number, so only ftp-uploads to the *first* directory (dirnum = 0) would extract DIZ files of uploaded files. Removing the 'dirnum' parameter to addfile() since that implied that you did not have to initialize the 'dir' element of the passed file_t, but you do: to get the correct file path for file size/date detection and the DIZ extraction. 2. Was getting heap-corruption when freeing the imported/formatted DIZ text on Windows once the above problem was fixed: can't free() in one DLL memory that was allocated in another DLL. Created and now using free_diz() to free the memory allocated in read_diz(). format_diz() handles a NULL 'lines' argument correctly/gracefully, so no need for the NULL lines check in sbbs_t::uploadfile(). Added FTP server log messages for successful file upload or update by user.
-
- Apr 28, 2022
-
-
Rob Swindell authored
-
- Jan 27, 2022
-
-
Rob Swindell authored
This fixes issue #328. The user actually *can* remove files from the batch queues in v3.19b, but you have to type the filenames which is not obvious from the prompt which implies you need to type the file index position (e.g. '1' for the first file in the queue). In all Synchronet versions prior, you could only remove by number (and not by name). The fix is to allow either the number or the name of the file to be entered at the RemoveWhich prompt and the file is removed from the queue successfully. Thanks Ragnarok!
-
- Jan 16, 2022
-
-
Rob Swindell authored
file_area.web_vpath_prefix file-metadata-object (return value of FileBase.get()).vpath
-
- Jan 04, 2022
-
-
Rob Swindell authored
Previously, extracted files were always overwritten (so that is the "default" for Archive.extract() and mostly what I'm specifying in the C/C++ code by default now), but this caused a problem with DIZ extraction: archives that contained multiple DIZ files (e.g in sub-directories), the last to be extracted would be used. A maximum of 3 DIZs can be extracted, so it would usually be the 3rd DIZ in the archive if there were that many. Another solution would be to *only* extract DIZ files from the root of the archive and I should look into that as well, but the always-overwrite behavior also seemed to be wrong, so that *also* needed fixing (allow caller to control behavior). This fixes issue #317, at least for archives where the root DIZ exists *before* any nested DIZ files. I'll have to try and create a purposeful archive to test the other conditions (where the root DIZ would appear *after* the nested DIZ(s)).
-
- Jun 10, 2021
-
-
Rob Swindell authored
It's anticipated that this will be used for JS-populated file metadata in JSON format in the future (and not just "archive contents" in .ini format). Also, fix the double-free issue that was occurring when moving files with extended file descriptions (sbbs_t::movefile()). This was actually the primary problem I was fixing here, but noticed the metadata issue: metadata would not have been moved along with the other file info between bases.
-
- Jun 06, 2021
-
-
Rob Swindell authored
5 options: - Safest Subset - Most ASCII, Excluding Spaces (the default) - Most ASCII, Including Spaces - Most CP437, Excluding Spaces - Most CP437, Including Spaces
-
Rob Swindell authored
sbbs_t::checkfname() now checks the file.can too. new filedat.c functions: - safest_filename() - not currently used - illegal_filename() - returns true for a highly-suspicious (e.g. hack attempt) filename - allowed_filename() - returns true if the filename is good for upload (assumed to be already checked to be legal as well). Importantly, filenames beginning or ending in a '.' are now unallowed: - 'dot files' are hidden (by default) on *nix - files ending in a '.' are problematic on Windows
-
- May 13, 2021
-
-
Rob Swindell authored
Do this in JS and use JSON for format instead of .ini.
-
- May 04, 2021
-
-
Rob Swindell authored
Some archives contain exactly the same files as others, but in a different order. Believe it or not.
-
- May 02, 2021
-
-
Rob Swindell authored
This will allow fast/easy display of archive contents without actually reading the archive files. Introduces some new functions: - list_archive_contents() - smb_adddfile_withlist() A new SMB convenience variable ("tail", aliased as "content" for a file). A new file detail level ("file_detail_content", exposed in JS as FileBase.DETAIL.CONTENTS) which adds a "content" array property to file metadata objects for JS FileBase.get(). Files already added to the new filebases won't have this archive content automatically - I'm looking into that now (likely a new or updated JS script to run).
-
- Apr 24, 2021
-
-
Rob Swindell authored
-
Rob Swindell authored
Inspired by Blocktronics (and other ANSI art group) packs' FILE_ID.DIZ/ANS files: * Support (and prioritize) FILE_ID.ANS * Convert ANSI color/attribute sequences in DIZ files to Ctrl-A equivalent (uses SAUCE width and ICE color, if specified) * Don't treat DIZ as a series of lines, they're not always nowadays. * New putmsg() mode: P_INDENT to print files indented by current column * Display full (up to 64-char) filenames in lists when using 132+ column terminal. * Use the Author, Group, and Title fields from the SAUCE if present/non-blank * 2 new text.dat strings: 301 (FiAuthor) and 302 (FiGroup) * Also fix bug with repeated Cost header field on bulk-uploaded files. I know this'll break the *nix build (sauce.c dependency), but I'll fix that next.
-
- Apr 22, 2021
-
-
Rob Swindell authored
-
Rob Swindell authored
Increase total extended description length from 1024 to 4000 characters. Perhaps this should be configurable?
-
- Apr 17, 2021
-
-
Rob Swindell authored
I forget who it was that said they were still using this feature in v3.18, but here you go, it's working again (the /D and /U commands). I'm not migrating any file sender/recipient info from v3.18, so only files added after upgrading to this will be downloadable from the "user" directory (if you have one). Something that I never implemented before but noticed is missing is the removal (or dereferencing) of user-to-user files that were sent from/to a user that is then deleted. So that's still a TODO item.
-
- Apr 04, 2021
-
-
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...
-
- Nov 23, 2020
-
-
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.
-
- Aug 16, 2020
-
-
Rob Swindell authored
-
- Jul 08, 2019
-
-
rswindell authored
This means the JS global word_wrap() method has a new optional Boolean arg as well.
-
- Jul 24, 2018
-
-
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.
-
- Nov 08, 2011
-
-
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.
-
- Nov 04, 2011
- Mar 12, 2010
-
-
rswindell authored
-
- Feb 10, 2009
- May 15, 2003
- Apr 01, 2003
-
-
rswindell authored
-
- Apr 26, 2002
-
-
rswindell authored
-
- Nov 11, 2000
-
-
rswindell authored
Separated code from crc32.h into crc32.c (to allow combination of mailsrvr and sbbs into single module).
-