1. 29 Apr, 2022 1 commit
    • Rob Swindell's avatar
      When running 16-bit DOS commands "offline" on Windows, don't use dosxtrn · 47e60472
      Rob Swindell authored
      We shouldn't need a virtual UART/FOSSIL driver to execute "offline" program (e.g. timed events) in the first place, and our virtual UART/FOSSIL for Windows wouldn't work right in the scenario anyway even if it did load successfully.
      
      This resolves the reported issues with timed events configured as not "native" returning error 255 (and not running successfully) on Windows with SBBS v3.19. I'm not even sure what changed exactly in xtrn.cpp, dosxtrn.c, and sbbexec.c between v3.18 and v3.19 that's causing this to now fail, but it (using DOSXTRN to run offline DOS programs) really shouldn't have been attempted in the first place. So that was just a design issue that happened to kind of sort of work up until v3.19.
      47e60472
  2. 24 Mar, 2022 1 commit
    • Rob Swindell's avatar
      Support user credits and transfer stats > 4GB in total · 1cac2c8a
      Rob Swindell authored
      Credits and daily free credits are accurate to the byte up to (a maximum) of 18446744073709551615 (that's 18 Exbibytes - 1).
      
      User's upload and download byte stats are now similarly extended in maximum range, but the accuracy is only "to the byte" for values less than 10,000,000,000. Beyond that value, the accuracy declines, but is generally pretty damn accurate (to 4 decimal places beyond the nearest multiple of a power of 1024), so I don't expect that to be an issue. This method of storing upload/download byte stats allowed me to use the same 10-character user record fields in the user.dat file.
      
      As a side-effect of this enhancements:
      * User and file credit values are now expressed in multiples of powers of 1024 (e.g. 4.0G rather than 4,294,967,296).
      * Free credits per day per security level has now been extended from 32 to 64-bits (to accommodate values >= 4GB).
      * adjustuserrec() now longer takes the record length since we can easily determine that automatically and don't need more "sources of truth" that can be out-of-sync (e.g. the U_CDT field length going from 10 to 20 chars with this change).
      * setting the stage for locale-dependent thousands-separators (e.g. space instead of comma) - currently still hard-coded to comma
      * more/better support for files > 4GB in size (e.g. in the batch download queue)
      * user_t ulong fields changed to either uint32_t or uint64_t - I didn't realize how many long/ulong's remained in the code (which are sometmies 32-bit, sometimes 64-bit) - ugh
      * Steve's ultoac() function renamed to u32toac() and created a C++ wrapper that still uses the old name, for homage
      1cac2c8a
  3. 29 Jan, 2022 1 commit
  4. 27 Jan, 2022 1 commit
    • Rob Swindell's avatar
      Ignore VDD WriteFile() failures if the child process has terminated · 9445866c
      Rob Swindell authored
      If the child process (e.g. door game) has terminated, don't log errors if/when WriteFile() to the mailslot fails. This would be expected as the mailslot is created/owen-by sbbsexec.dll which would also terminate along with the process, thus closing the mailslot. 
      
      Hopefully resolves the errors reported by DesotoFireflite (VALHALLA).
      9445866c
  5. 01 Dec, 2021 1 commit
    • Rob Swindell's avatar
      Remove the last remnants of Win9x/Me support · 717592bc
      Rob Swindell authored
      Allow "FOSSIL Only" as a configuration option for external programs in SCFG. This is a much easier method of disabling the virtual UART support in the Virtual UART/FOSSIL device driver (if/when necessary) than editing the sbbsexec.ini file (which is still supported).
      717592bc
  6. 30 Nov, 2021 1 commit
    • Rob Swindell's avatar
      Add support for NTVDMx64 · 6b5de04a
      Rob Swindell authored
      Yes, you can run 16-bit DOS doors on 64-bit (x64) Windows now.
      
      Install NTVDMx64 (http://www.columbia.edu/~em36/ntvdmx64.html, it's not as onerous as it sounds) and re-enable DOS program support in SBBS (i.e. make sure "NO_DOS" is not in your sbbs.ini [bbs] Options value) and voila: DOS doors work.
      
      This change adds an empty init routine to sbbsexec.dll since older versions of NTVDM (which NTVDMx64 is based on) required one. Also, the sbbsexec.dll should be located in your Synchronet "exec" directory when using NTVDMx64 (in addition to or instead of your Windows/System32 directory).
      6b5de04a
  7. 23 Nov, 2021 1 commit
    • Rob Swindell's avatar
      Allow FOSSIL mode of the Win32 virtual UART/FOSSIL driver to be disabled · 5b36ab9a
      Rob Swindell authored
      When configuring an external program, a Win32 sysop can now choose to *only* enable the virtual UART (and not the FOSSIL driver) feature of the Synchronet virtual UART/FOSSIL driver (dosxtrn.exe/sbbsexec.dll). Some programs (e.g. TradeWars 2) will always use the FOSSIL driver if one is detected and in order to force the use of COM/UART driver for I/O (if that is desired), then one must disable the FOSSIL driver. It's a rare use case, but I can see the potential need.
      
      Renamed the "Intercept I/O" option in SCFG to "I/O Method" and make it clear that "Socket" (for native programs) and "FOSSIL or UART" (for 16-bit DOS programs) is the default method (what was previously identified as "No" I/O Interception).
      
      If a sysop want to disable the virtual UART support (on Win32, e.g. so *only* FOSSIL is available to one or all DOS programs), they do that via their sbbsexec.ini file.
      5b36ab9a
  8. 16 Nov, 2021 1 commit
  9. 05 Apr, 2021 1 commit
    • Deucе's avatar
      More closely reproduce select() behaviour when using poll() · b5b02ba5
      Deucе authored
      Specifically, have errors mean the fd is "ready".
      
      Also, fix some extra revent clearing and a spy socket issue while
      we're looking at this code.
      
      Should fix issues with CGI scripts that close stdin/stdout but do
      not terminate, and maybe deal with some other corner cases at the
      same time.
      b5b02ba5
  10. 04 Apr, 2021 2 commits
  11. 31 Mar, 2021 1 commit
    • Deucе's avatar
      Use new PREFER_POLL define to control poll() usage · 3de05e2d
      Deucе authored
      Rather than depending on _WIN32 which is silly, make it clear what
      exactly is being done and why.
      
      Note that the spy socket stuff and some external stuff on *nix have
      had the select() implementation removed.  To support using select()
      on !Win32 will require de-refactoring that's not really worth doing.
      Instead, just use #error and reference the commit where the old
      code can be found.
      3de05e2d
  12. 30 Mar, 2021 1 commit
    • Deucе's avatar
      Initial poll() work · af30c430
      Deucе authored
      Still needs updates in services_thread(), CGI stuff in websrvr.c,
      and sbbs_t::external()
      af30c430
  13. 22 Feb, 2021 1 commit
  14. 21 Feb, 2021 1 commit
  15. 19 Feb, 2021 1 commit
  16. 18 Feb, 2021 1 commit
  17. 17 Feb, 2021 1 commit
  18. 15 Feb, 2021 2 commits
  19. 17 Dec, 2020 1 commit
    • Michael Long's avatar
      Improvements to linux dosemu support · 0bf85543
      Michael Long authored
      The hardcoded external.bat file has been moved to a templated
      /exec/external.bat which can be modified by the sysop. ENV
      vars are in there to be able to customize as needed. emusetup.bat
      is no longer needed, but still supported. The actual dosemu command line
      is now stored in /exec/dosemulaunch.ini and can be customized for
      fossil or i/o command lines. the keystroke is now only sent for i/o, and
      only sent as \n instead of \r which would trigger undesired behavior in
      certain programs. The above 2 files can also be placed in door dirs
      to override. ansi.com has been removed as it was not needed. default
      external.bat includes cmd lines for share, x00, etc. (user will still
      need to provide these in xtrn/dosutils).
      0bf85543
  20. 02 Dec, 2020 1 commit
  21. 01 Dec, 2020 2 commits
  22. 30 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Better native vs. DOS cmd-line detection in cmdstr() · 94517fdf
      Rob Swindell authored
      Always check the command-line for a '*' or '?' prefix and compare the executed filename against the native program list. For DOSEMU magic drive/path name command-line specifier substitution, but only when invoking DOS programs. Reported by bobrob via IRC.
      94517fdf
  23. 29 Nov, 2020 1 commit
  24. 28 Nov, 2020 1 commit
  25. 25 Nov, 2020 6 commits
  26. 06 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · 8a7b7308
      Rob Swindell authored
      I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values.
      
      This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service).
      
      The new macros names are bit more descriptive as well.
      8a7b7308
  27. 05 Nov, 2020 1 commit
  28. 30 Aug, 2020 2 commits
    • Rob Swindell's avatar
      Fix compile issue in previous commit. Add more semicolons. · ec5cbb84
      Rob Swindell authored
      One can't have too many semicolons.
      ec5cbb84
    • Rob Swindell's avatar
      External program "use shell" option can be used to use a new JS context · 1decdc69
      Rob Swindell authored
      Rather than introduce yet-another-external-program/config flag to enable
      the "new JS run-time/context" per invocation of any particular JS command,
      I'm using the XTRN/EX_SH ("Use Shell") option as it had no function for
      JavaScript command-lines and the concept is similar.
      
      So if you want to invoke a JS external program/timed-event in its own
      "sandbox", enable the "Use Shell / New Context" option for that
      program/command in SCFG. There may be performance penalties when running
      JS mods in this way, but you get the benefit of isolating one JS module
      from all others, if/when necessary.
      1decdc69
  29. 16 Aug, 2020 1 commit
  30. 02 Aug, 2020 1 commit
  31. 01 Aug, 2020 1 commit
    • rswindell's avatar
      An experimental external() mode flag that runs JS modules in their own... · b898eb73
      rswindell authored
      An experimental external() mode flag that runs JS modules in their own separate runtime and context - currently does not work (appears to corrupt the shared JS context). Not actually used currently.
      The reason I wanted to run a JS module (actually JS doorgame) in its own context was to get useful error messages (filenames and line numbers) when the module throws an exception. Currently, the error is just reported as occuring in xtrn_sec.js, which isn't helpful or correct.
      b898eb73