Skip to content
Snippets Groups Projects
  1. Jun 26, 2023
    • Rob Swindell's avatar
      Eliminate STRERROR macro · 4a53863e
      Rob Swindell authored
      This macro hasn't done anything meaningful since we stopped using really old
      versions of Borland compilers (and std libraries) where strerror() returned a
      string terminated with a line-feed (\n) character.
      4a53863e
  2. Jun 11, 2023
  3. Jun 04, 2023
    • Rob Swindell's avatar
      Fix warnings raised by gcc -D_FORTIFY_SOURCE=3 -O1 · 8667e329
      Rob Swindell authored
      A bunch of possible (but often, not really) use of undefined values.
      Some ignored return values (e.g. of chsize/ftruncate, read, write, fgets).
      
      Other than some added diagnostics upon some of these unexpected syscall
      failures, there should be no change in behavior from this commit.
      8667e329
  4. May 03, 2023
  5. May 01, 2023
  6. Mar 14, 2023
  7. Dec 24, 2022
  8. Nov 12, 2022
    • Rob Swindell's avatar
      Change iniOpenFile() argument meaning from "create" and "for_modify" · f4d2e708
      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.
      f4d2e708
  9. Aug 14, 2022
  10. Jun 17, 2022
  11. Feb 24, 2022
  12. Aug 09, 2021
  13. Apr 06, 2021
  14. Apr 02, 2021
    • Deucе's avatar
      Initial work on setTimeout() · 19289739
      Deucе authored
      This appears to work and the event handler *should* work on other
      event types already.
      
      Note, this is *nix-only due to the use of poll().  select() will
      need to be used for Windows to keep XP compatability.
      19289739
  15. Mar 08, 2021
  16. Mar 07, 2021
    • Deucе's avatar
      Enable JSOPTION_VAROBJFIX for JSDoor. · 96f3df2d
      Deucе authored
      This option fixes the fact that the following two lines sometimes
      place the variables in different scopes at the top-level of included
      scripts:
      var x = 1;
      y = 2;
      
      I plan to use this to experiment on if this is what's causing much
      of the remaining scope chain weirdness... it certain explains some
      things we've been seeing (and possibly even things like the METHODJIT
      issues DigitalMan saw yesterday).
      
      Enabling in sbbs/jsexec is a much bigger lift, but this change may
      end up being all upside... the docs have suggested this option always
      be set since it was originally introduced, and now that I understand
      scopes better, it's pretty clear why that is.
      96f3df2d
    • Rob Swindell's avatar
      Disable METHODJIT by default for JavaScript, 'cept in JSDoor · a0607c01
      Rob Swindell authored
      METHODJIT (JägerMonkey) is doing weird stuff with xtrn_sec.js when
      enabled, so don't introduce that noise.
      a0607c01
    • Rob Swindell's avatar
  17. Mar 06, 2021
    • Rob Swindell's avatar
      Don't compile the .ini parsing stuff for JSDoor · ca21e0dd
      Rob Swindell authored
      This should fix the recent JSDoor build issue introduced.
      ca21e0dd
    • Rob Swindell's avatar
      Allow fine-grained control over JavaScript compiler options via *.ini · b82be101
      Rob Swindell authored
      JavaScriptOptions bit-field can be set in sbbs.ini and jsexec.ini to over-ride the default JS compiler options which have been changed from 0 to (options previously only used by JSDoor):
      JIT | METHODJIT | COMPILE_N_GO | PROFILING
      
      * JIT - TraceMonkey
      * METHODJIT - JägerMonkey
      * COMPILE_N_GO - compile-time scope chain resolution of consts
      * PROFILING - Choose between TraceMonkey and JägerMonkey at compile-time based on profiling results
      
      Other options available but not enabled by default:
      * STRICT - warn on debious practice (i.e. similar to "use strict")
      * WERROR - convert warnings to errors
      * VAROBJFIX -  use last object on scope chain as the ECMA 'variables object'
      * RELIMIT - Throw exception on any regular expression which backtracks more than n^3 times, where n is length of the input string
      * ANONFUNFIX - Disallow function () {} in statement context per ECMA-262 Edition 3.
      * METHODJIT_ALWAYS - Always whole-method JIT, don't tune at run-time.
      
      Also:
      - Fixed JS warning string formatting (missing space separator).
      - Removed an extraneous new-line in lprintf() call in mailsrvr.
      - Added basic assertEq() global method to jsexec, required when running SpiderMonkey test scripts.
      b82be101
  18. Feb 22, 2021
  19. Feb 21, 2021
  20. Feb 15, 2021
  21. Feb 14, 2021
  22. Jan 31, 2021
  23. Jan 30, 2021
  24. Jan 27, 2021
  25. Jan 18, 2021
    • Rob Swindell's avatar
      Safe string handling with config-load error messages · 4a13b65d
      Rob Swindell authored
      We were just trusting that the error strings would be shorter than 256 (usually), but since we're including paths and strerror() results, we really have no control over the length of the error strings. So enforce some healthy boundaries. This could explain the crashes that Divarin of Mutiny is seeing with SCFG on WinXP or maybe it was the truncsp(strerror()) stuff that was just removed as well. We'll see...
      4a13b65d
  26. Nov 24, 2020
  27. Nov 14, 2020
    • Rob Swindell's avatar
      Restore console to "cooked" mode before daemonizing(). · 75b871a7
      Rob Swindell authored
      Previously, the console would be left in "raw" mode after invoking
      'jsexec -d <module>'.
      75b871a7
    • Rob Swindell's avatar
      More control over output streams · 6eac2079
      Rob Swindell authored
      Added options -A[filename] and -S[filename] to allow more control over which output streams go where (for mlong and his troubles with running ircd via systemd).
      
      -A controls "all messages" either sending all to stdout or the specified filename. This override the automatic suppression of the console output stream when run without a controlling TTY.
      
      -S controls "status message" (includes non-error level log messages), either sending the status messages to stdout or the specified filename. This also overrides the automatic suppression of the console output stream when run without a controlling TTY.
      6eac2079
  28. Nov 06, 2020
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · ec20d959
      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.
      ec20d959
  29. Aug 17, 2020
  30. Aug 16, 2020
    • Rob Swindell's avatar
      Fix issue with jsexec being used for CGI scripts · 54431b31
      Rob Swindell authored
      If jsexec is used for a CGI script and the SBBSCTRL env var was not
      set, a warning would be printed (to stderr), even if the -c option
      was used to specify the path to the ctrl dir.
      
      get_ctrl_dir() now accepts a boolean argument to specify whether to
      print a warning when the default value ("/sbbs/ctrl") is used.
      Pass FALSE for jsexec, TRUE for other callers (currently).
      54431b31
Loading