- Jul 08, 2019
-
-
rswindell authored
New function (derived from sbbs_t::utf8_to_cp437()): unicode_to_cp437() New utf8 functions: utf8_replace_chars(), utf8_str_is_valid(). utf8_getc() enhancement: val arg may be NULL (for length/validation uses).
-
- May 31, 2019
- May 30, 2019
-
-
rswindell authored
-
- May 06, 2019
-
-
rswindell authored
-
rswindell authored
heavy-handed (performs strdup/malloc's and modifications of the strings), so a temporary hack is to perform a case-sensitive search (using the standard strstr() function) first. The results won't exactly match the traditional strstr() and the performance improvement is only for positive matches (where the correct case was guessed in the passed 'needle' string arg). TODO: re-write or copy a good/fast strcasestr() implementation for Win32 builds.
-
- Apr 11, 2019
- Mar 22, 2019
-
-
rswindell authored
Fix age-old bug with Borland/C++Builder built executables (Windows): to achieve compatibility with the default __cdecl symbol naming rules of Visual C++, we were using __stdcall convention for DLL functions when building code with Borland/C++Builder tools and using the default (__cdecl) convention when building with Microsoft (Visual C++) tools. Although this allowed symbols to be located when linking, the calling convention mismatch caused a stack cleanup issue that very rarely manifested itself in a bug (e.g. exception of some kind in sbbsctrl.exe, usually). Mismatching the calling conventions was unintentional (I thought the default for MSVC DLL functions was __stdcall) - but since the calls to MSVC-Built DLL functions worked 99% of the time, I didn't realize there was an underlying issue. So I now work-around the DLL symbol naming mismatch using a command-line option (-a) passed to implib in src/sbbs3/ctrl/makelibs.bat I had previously worked-around exceptions when calling MSVC DLL functions in sbbsctrl.exe by calling the problematic DLL functions from a timer tick handler rather than a user control (e.g. button) event handler. Those work-arounds can now be removed. The erroneous "DLLCALL" definition design pattern was replicated (copy/pasted) to many other projects' header files in cvs.synchro.net. In the future, we may want to just remove all instances of *CALL since they now serve no purpose and appear as useless "Kruft" (but do allow us to more-easily globally change DLL function calling conventions if/when necessary in the future).
-
- Mar 19, 2019
-
-
rswindell authored
-
- Feb 18, 2019
-
-
rswindell authored
error: 'PTHREAD_MUTEX_RECURSIVE_NP' undeclared as ported by GeoKM
-
- Feb 14, 2019
-
-
rswindell authored
If the modify callback function returned a pointer *within* the list item's allocated buffer, the strcpy() would copy from potentialy free'd memory as realloc may change the location of the heap buffer when resizing. Fixed by allocating a copy of the returned pointer before freeing the original list item buffer and then just assign the allocated pointer (no copying needed). This likely will result in more heap fragmentation for modified list items are now newly-allocated buffers rather than reallocated existing buffers but the other option would have been to allocate a temporary copy of the string before reallocating and then copying and that would've been a lot more overhead than with this approach. This likely fixes any crashes seen in recent revs of v3.17c (e.g. when imported QWK or REP packets and text/*.can and the twitlist.cfg are parsed). The sighting on Vertrauen was only in the Windows build and appeared when importing QWK/REP packets.
-
- Feb 08, 2019
-
-
rswindell authored
commit.
-
rswindell authored
a caller-supplied function (callback) which can modify each string or leave the string in tact by returning NULL. Shrinking strings is trivial while expanding strings (making them bigger) is a little more involved, probably using the cbdata to pass a temporary buffer around to store each expanded string or returning a new globally-valid pointer. Removed the malloc.h #include as we haven't used alloca() here for a while.
-
- Jan 31, 2019
-
-
rswindell authored
HEX_DIGITS() and DEC_DIGITS()
-
- Jan 15, 2019
-
-
rswindell authored
same name in uifc/filepick.c - specifically with regards to paths that begin with a / (or \ on Windows).
-
- Jan 12, 2019
-
-
rswindell authored
pathname (directories must end in a '/'). Unlike getfname() which returns an empty string if passed a path ending in a '/'. Useful with glob(.., GLOB_MARK).
-
rswindell authored
There's no reason to call access() before stat() since stat() will fail (return -1) if the file does not exist.
-
- Dec 30, 2018
-
-
rswindell authored
-
- Oct 30, 2018
-
-
rswindell authored
now have their output translated to PETSCII equivalents for PETSCII terminals (but input is not yet translated). .seq files are now sent untranslated via printfile() and putmsg() to PETSCII terminals (using the new P_PETSCII putmsg mode flag). .seq files (and P_PETSCII mode text printed via putmsg) is now converted (poorly) from PETSCII to CP437 - this is still a work-in-progress. Remove the remants of WIP and HTMLterm support from putmsg() and printfile().
-
- Oct 22, 2018
-
-
rswindell authored
So Omegix recently asked in the Synchronet Discussion group whether or not a PETSCII (Commodore) terminal could be used to access his Synchronet BBS. Now, the answer is "Yes". :-) The major issues addressed: - detecting a PETSCII terminal, solved by assigning specific (configurable): TCP ports to be used for incoming PETSCII connections, by default: port 64 is for 40-column PETSCII and port 128 is for 80-column PETSCII, but if the terminal sends a Telnet Window Size reply (e.g. SyncTERM), then either size terminal should fine on either port. The port numbers are configurable in the [BBS] section of your sbbs.ini file using the new keys: PET40Port (default value: 64) and PET80Port (default value: 128). Having these keys set doesn't make make the terminal server listen on that additional port - you'll need to add more IP:port combinations to one of Interfaces values, example: TelnetInterface=71.95.196.34,71.95.196.34:64,71.95.196.34:128 And you don't have to use Telnet for the PETSCII connections - you could use RLogin or SSH instead (or in addition). - support for terminal widths < 80 columns: This was achieved through a combination of text.dat changes (numerous), new Ctrl-A and @-codes and new optional terminal-width-specific menu files (e.g. text/menu/main.40col.asc) A side effect of these changes is actually better support for terminals *wider* than 80 columns as well! - support for terminals that don't expand tabs to spaces (e.g. PETSCII): The terminal server now handles tab expansion with a run-time settable tab-size (default size: 8) - conditional access based on PETSCII (or small) terminal use (or not): + New PETSCII ARS keyword (boolean) + New COLS and ROWS ARS keywords (for terminal width and height requirements) + New TERM (string) ARS keyword New @-codes: - WORDWRAP, when placed at the top of a file, enables auto-wordwrap for lines longer than the terminal width - CENTER, the text following before an end of line will be displayed centered on the terminal (whatever the width, in columns) - CLEAR, like CLS, except it ignores (doesn't display) a CRLF that follows - COLS, current number of terminal columns (width) - ROWS, current number of terminal rows (height) - TERM, the auto-detected or reported terminal type (e.g. ANSI, TTY, etc.) - SYSONLY, toggles "echo" (display) off/back-on for non-sysops similar to the Ctrl-A( and ) codes, but more convenient to use (and PabloDraw won't strip the @-code from the file like it does with Ctrl-A codes it doesn't support) New Ctrl-A codes: - \ conditional new-line/continuation when the terminal width is < 80 cols prints the new text.dat string LongLineContinuationPrefix yesno() will now return true if passed a blank string. noyes() will now return false if passed a blank string. getstr()'s input length limiting based on terminal width is more broadly applied now (not just when using the K_LINE mode flag). New JS bbs object method: menu_exists(<base_filename>) returns Boolean New JS console object property: tabstop (Number) New JS console object methods: getbyte() and putbyte() to recv/send raw byte value with (very little) interpretation/intervention by the terminal server New JS console object method: creturn() - performs a carriage return (or equivalent) New JS (and C) printfile() mode flag: P_TRUNCATE, causes long lines to be truncated, rather than displaying causing a line-wrap. New text.dat strings: - NoAccessTerminal (for ARS check failures) - LongLineContinuationPrefix (for breaking long lines for 40col terminals) - Scanning (replaces a previously hard-coded "Scanning" string) - Done (replaces a previusly hard-coded "Done") - Scanned (when finished scannning, clears the progress bar)
-
- Aug 28, 2018
-
-
rswindell authored
of default style elements.
-
rswindell authored
and no actual observed problem.
-
rswindell authored
malloc'd strings.
-
rswindell authored
elements (member variables) would be changed to point to a string constant. Don't do that - instead just use local stack variables for those style element default values. This leads the way to constifying the style arguments in the future and allows the caller to use non-NULL style elements as indicator of something that should be freed if the caller allocated some memory for it.
-
- Jul 26, 2018
-
-
rswindell authored
section) in the returned stringlist. Created iniAppendSectionWithKeys(): similar to iniAppendSection, but a list of list of "key=[value]" strings (like those returned from iniGetSection()) can be added at the same time.
-
- Jul 25, 2018
-
-
rswindell authored
a faliure. delfiles() now returns a negative result upon any deletion errors.
-
- Jul 24, 2018
-
-
rswindell authored
-
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.
-
- Jul 23, 2018
-
-
rswindell authored
the number of decimal places in the resulting string.
-
- Jul 20, 2018
-
-
rswindell authored
Created byte_estimate_to_str(), much like byte_count_to_str(), except the byte count is rounded to the nearest tera/giga/mega/kilo-byte (technically tebi/gibi/mebi/kibi-byte, but ugh, I'm old-sk00l!).
-
- Jul 19, 2018
-
-
rswindell authored
-
- Jun 04, 2018
-
-
rswindell authored
-
- Apr 30, 2018
-
-
rswindell authored
instead truncate to the new length after writing the contents. This should make .ini files more tolerate of "out of disk space" situations and reduce the risk of lost data (0-byte .ini files) due to low/no disk space.
-
- Apr 07, 2018
-
-
rswindell authored
cast from pointer to integer of different size
-
- Mar 30, 2018
- Mar 16, 2018
-
-
rswindell authored
literals (e.g. won't detect and escape them automatically). If you set a key value with carriage-returns and line-feeds, those will end up in the .ini file as-is, so use with caution.
-
- Mar 10, 2018
-
-
deuce authored
-