• src/sbbs3/jsexec.c

    From deuce@VERT to CVS commit on Saturday, August 22, 2015 00:12:36
    src/sbbs3 jsexec.c 1.169 1.170
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv31573

    Modified Files:
    jsexec.c
    Log Message:
    Fix warning.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Monday, September 28, 2015 00:01:18
    src/sbbs3 jsexec.c 1.170 1.171
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv19311

    Modified Files:
    jsexec.c
    Log Message:
    Allow kilo/mega/giga/etc. byte short-hand for -m and -s command-line options (e.g. use "-m1g" to allocate 1 gigabyte/gibibyte memory for JS runtime).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Monday, September 28, 2015 01:20:30
    src/sbbs3 jsexec.c 1.171 1.172
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23154

    Modified Files:
    jsexec.c
    Log Message:
    More fixes for bugs introduced in the great JavaScript-C (SpiderMonkey) upgrade of 2011:
    - Memory leak in log() when passed multiple string arguments.
    - print/write/writeln would all choke when passed multiple arguments
    (display the first argument repeatedly)
    and leak memory.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, October 06, 2015 21:01:45
    src/sbbs3 jsexec.c 1.172 1.173
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2410

    Modified Files:
    jsexec.c
    Log Message:
    Support byte units (e.g. 'k' for kilobytes, 'm' for megabytes, etc.) in -m (memory) and -s (stack) option argument handlers.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Thursday, October 29, 2015 14:21:27
    src/sbbs3 jsexec.c 1.174 1.175
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv19948

    Modified Files:
    jsexec.c
    Log Message:
    Don't set jsexec_revision and jsexec_revision_default for jsdoor.
    Use jsdoor_revision* instead.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Tuesday, November 10, 2015 05:19:17
    src/sbbs3 jsexec.c 1.175 1.176
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24294

    Modified Files:
    jsexec.c
    Log Message:
    Set standard input mode to raw.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Monday, November 16, 2015 09:52:33
    src/sbbs3 jsexec.c 1.178 1.179
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv18315

    Modified Files:
    jsexec.c
    Log Message:
    Set console raw on Windows too. This will break ^C handling just like it's broken on *nix now.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Tuesday, November 24, 2015 23:50:35
    src/sbbs3 jsexec.c 1.179 1.180
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26322

    Modified Files:
    jsexec.c
    Log Message:
    Use different input modes for jsdoor than jsexec.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Wednesday, November 25, 2015 00:03:50
    src/sbbs3 jsexec.c 1.180 1.181
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28413

    Modified Files:
    jsexec.c
    Log Message:
    Open nullfp before assigning it to something (derp).




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Saturday, December 05, 2015 02:27:39
    src/sbbs3 jsexec.c 1.181 1.182
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv32439

    Modified Files:
    jsexec.c
    Log Message:
    Send all log messages to statfp (defaults to stderr) instead of confp (defaults to stdout).

    Previous behaviour was:
    1) By default, send error messages to errfp (stderr), and other log messages to
    confp (stdout).
    2) If -e and one of -o or -q are specified, also send a copy of error messages
    to statfp (defaults to stderr, changed to /dev/null by -n)
    3) If -e is specified, also send a copy of error messages to confp (defaults to stdout)

    If -e, -o, were both specified, this resulted in an error log entry going into the file
    specified by -e, the file specified by -o, and confp (stdout by default).

    New behaviour:
    1) By default, send error messages to errfp (stderr), and other log messages to statfp
    (stderr).
    2) If -e is specified, send error messages to the specified file and statfp (stderr).
    3) Always send status messages to statfp (stderr).

    Set up some more stuff for jsdoor...

    Call gethostname() since there is no "SCFG value" for it.

    Send "status messages" (log messages that aren't errors, and the banner) to /dev/null by default (ie: force the "-n" argument)

    Send "error messages" (log messages that are error according to log level) to "error.log" by default (ie: force the "-eerror.log" argument)




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Monday, November 13, 2017 11:50:15
    src/sbbs3 jsexec.c 1.185 1.186
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    jsexec.c
    Log Message:
    Fix inadvertent commit of changes to jsexec.c



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, November 27, 2017 14:38:59
    src/sbbs3 jsexec.c 1.186 1.187
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8736

    Modified Files:
    jsexec.c
    Log Message:
    Fix: when using the '-!' option, if the script failed with an exception, there would be no pause on exit. Now we insure an error level of (at least) 1 if the script execution fails for any reason.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, November 28, 2017 01:42:56
    src/sbbs3 jsexec.c 1.187 1.188
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    jsexec.c
    Log Message:
    A script premature terminating with exit(0) should no longer be considered
    an errorneous exit (and trigger the -! pause on error).



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Friday, December 29, 2017 20:07:12
    src/sbbs3 jsexec.c 1.188 1.189
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv32075

    Modified Files:
    jsexec.c
    Log Message:
    DigitalMan's commit from over a year ago (1.184, Nov-15-2016) to fix console input on Windows (e.g. the prompt() method no longer worked) broke JSDoor,
    and caused Windows and Linux console input to behave differently. Create functions to cook/thaw the tty, and call them around stdin things.
    This change was related to his postpoll.js work, so that might be broken now.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Friday, December 29, 2017 20:23:24
    src/sbbs3 jsexec.c 1.189 1.190
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2513

    Modified Files:
    jsexec.c
    Log Message:
    Fix previous commit for Windows.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, December 29, 2017 20:42:55
    src/sbbs3 jsexec.c 1.190 1.191
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4703

    Modified Files:
    jsexec.c
    Log Message:
    Remove 'ENABLE_VIRTUAL_TERMINAL_INPUT' : undeclared identifier
    Not defined in MSVC2013.
    Appears to work again/still.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, January 05, 2018 18:45:20
    src/sbbs3 jsexec.c 1.191 1.192
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    jsexec.c
    Log Message:
    Fix gcc warnings about #warning usage (missing terminating ' char)



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, January 12, 2018 14:31:09
    src/sbbs3 jsexec.c 1.192 1.193
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10850

    Modified Files:
    jsexec.c
    Log Message:
    Added command-line option -C (capital 'C'):
    - This option instruts JSexec to *not* change the current working directory to
    the control (CTRL) directory
    - This is useful when using jsexec to deal with files and passing relative
    paths or wildcards on the command-line
    - Warning: scripts executed with this option may behave differently than the
    same script executed from SBBS where the current working directory is always
    the CTRL directory.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, February 13, 2018 23:55:11
    src/sbbs3 jsexec.c 1.193 1.194
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2514

    Modified Files:
    jsexec.c
    Log Message:
    environ is a magic word in msvc2013+, don't use it (fixes crash in msvc2013/2017 build)


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thursday, March 08, 2018 15:52:33
    src/sbbs3 jsexec.c 1.196 1.197
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17875

    Modified Files:
    jsexec.c
    Log Message:
    Interrupt syscalls on break_handler() signals.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thursday, March 08, 2018 19:55:41
    src/sbbs3 jsexec.c 1.197 1.198
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    jsexec.c
    Log Message:
    Output the name of the module that set the exit_code.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, October 22, 2018 00:41:16
    src/sbbs3 jsexec.c 1.199 1.200
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    jsexec.c
    Log Message:
    Another gcc printf warning fix.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, January 19, 2019 17:55:56
    src/sbbs3 jsexec.c 1.201 1.202
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24802

    Modified Files:
    jsexec.c
    Log Message:
    Fix long-standing bug: if jsexec was passed any option which requires a parameter value and no value was supplied (e.g. 'jsexec -c'), a null pointer dereference would cause the program to crash.
    Also display more helpful error if option parameter value is missing.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Wednesday, May 29, 2019 09:44:28
    src/sbbs3 jsexec.c 1.203 1.204
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24021

    Modified Files:
    jsexec.c
    Log Message:
    Support terminating the script from the debugger before it actually runs.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, August 05, 2019 20:22:24
    src/sbbs3 jsexec.c 1.204 1.205
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2403

    Modified Files:
    jsexec.c
    Log Message:
    Call make_data_dirs() from JSexec. Without this, sbbs would have to be run to be sure all necessary dirs are created.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thursday, August 08, 2019 08:29:38
    src/sbbs3 jsexec.c 1.205 1.206
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv4915

    Modified Files:
    jsexec.c
    Log Message:
    Remove call to make_data_dirs() - no exported from sbbs.dll. Also, scfgsave() already creates the dirs that were of concern (Transfser File Paths). May
    want to DLL-export this and call from here later.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, August 27, 2019 01:12:09
    src/sbbs3 jsexec.c 1.206 1.207
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv32386

    Modified Files:
    jsexec.c
    Log Message:
    Restore cooked TTY mode *before* prompting for the user to hit ENTER when
    run with the '-p' or '-!' options. This resolve the issue of (on Win32)
    having to enter *twice* to close the program in this mode.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, August 27, 2019 12:02:09
    src/sbbs3 jsexec.c 1.207 1.208
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv15318

    Modified Files:
    jsexec.c
    Log Message:
    Enable some interesting JS options for jsdoor only (for now).
    These almost certainly improve performance a bunch, but may result in
    new behaviours.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thursday, August 29, 2019 09:26:40
    src/sbbs3 jsexec.c 1.208 1.209
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv6296

    Modified Files:
    jsexec.c
    Log Message:
    We do *not* want JSOPTION_VAROBJFIX set since it causes variables to be
    created in the global scope when when a scope is passed to load(), require()
    or js.exec().

    While having 'var x = 0;' and 'x = 0;' put x in different scopes is bad, we actually want them all in the passed scope, not the global scope... and that's not an option.

    It looks like js.exec() will actually need to set scope as the global object and add a second global object to the original scope.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Monday, September 02, 2019 13:13:45
    src/sbbs3 jsexec.c 1.209 1.210
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26977

    Modified Files:
    jsexec.c
    Log Message:
    Set values in JSDoor scfg_t required to create and use a TLS certificate...

    scfg.prepped = TRUE
    scfg.tls_certificate = -1
    scfg.sys_inetaddr = "example.com"
    scfg.sys_name = "JSDoor"
    scfg.sys_pass = "ThisIsNotHowToDoSecurity"




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, April 08, 2020 00:04:37
    src/sbbs3 jsexec.c 1.211 1.212
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv29331

    Modified Files:
    jsexec.c
    Log Message:
    Added support for exec/jsexec.ini file which can over-ride default values globally and per-module. Command-line options still take precedence.
    For jsdoor builds, jsdoor.ini is supported in whatever directory jsdoor is run from.
    Changed the default log level from Debug to Informational.
    (If you need the old default, set LogLevel=debug in your ctrl/jsexec.ini file).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, April 11, 2020 23:09:59
    src/sbbs3 jsexec.c 1.213 1.214
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21582

    Modified Files:
    jsexec.c
    Log Message:
    Remove unused string constant.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, May 04, 2020 15:01:19
    src/sbbs3 jsexec.c 1.214 1.215
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv18286

    Modified Files:
    jsexec.c
    Log Message:
    Move expected location of jsexec.ini from exec directory to ctrl directory:
    - argv[0] does not always contain the full path to the executable, so that is
    not a good way to locate the exec directory.
    - since we already need to know the ctrl dir and that is the normal place to
    put config files, that's where it shall be.
    - jsdoor builds don't get a .ini file - I don't think they need it (?)


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, May 04, 2020 21:09:11
    src/sbbs3 jsexec.c 1.215 1.216
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv22813

    Modified Files:
    jsexec.c
    Log Message:
    Only complain about not being able to open ctrl/jsexec.ini, if the file exists


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Friday, November 13, 2020 19:43:21
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/74b4a948bb366ce463a78eef
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    More control over output streams

    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Friday, November 13, 2020 21:40:45
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/8cdd04222f1b14ff8fb239cf
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Restore console to "cooked" mode before daemonizing().

    Previously, the console would be left in "raw" mode after invoking
    'jsexec -d <module>'.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to Main/master on Tuesday, November 24, 2020 00:06:52
    https://gitlab.synchro.net/main/sbbs/-/commit/abb3bcccb3c217ff0dea5327
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Resolve warning: `strJavaScriptContextStack' defined but not used

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, January 30, 2021 02:22:11
    https://gitlab.synchro.net/main/sbbs/-/commit/6cd643a3e500532fd395fef1
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Add -I (Interpret) command-line option to execute cmdline string

    At Tracker1's request/suggestion.

    jsexec -Itrue
    ...
    Result (boolean): true

    More elaborate expressions can be evaluated and white-space included by quoting the "-I expression".

    Also, send all cmd-line usage errors to stderr and syntax help to stdout, always (Deuce's request).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, January 30, 2021 02:22:11
    https://gitlab.synchro.net/main/sbbs/-/commit/d5dc867b8717f227bc3942c2
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    I said, usage to stdout.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, January 30, 2021 11:13:15
    https://gitlab.synchro.net/main/sbbs/-/commit/d33e6a4444321febdff0ee1b
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Make it 'jsexec -r' (run) instead of 'jsexec -I'

    Also, it's not technically an option, so remove from the option list.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Dream Master@VERT/CIAD to Rob Swindell on Saturday, January 30, 2021 16:20:23
    Re: src/sbbs3/jsexec.c
    By: Rob Swindell to Git commit to main/sbbs/master on Sat Jan 30 2021 11:13 am

    Make it 'jsexec -r' (run) instead of 'jsexec -I'

    Let me guess, I for instantiate? :)

    Brian Klauss <-> Dream Master
    Caught in a Dream | caughtinadream.com a Synchronet BBS

    ---
    þ Synchronet þ Caught in a Dream - caughtinadream.com
  • From Digital Man@VERT to Dream Master on Saturday, January 30, 2021 15:40:45
    Re: src/sbbs3/jsexec.c
    By: Dream Master to Rob Swindell on Sat Jan 30 2021 04:20 pm

    Re: src/sbbs3/jsexec.c
    By: Rob Swindell to Git commit to main/sbbs/master on Sat Jan 30 2021 11:13 am

    Make it 'jsexec -r' (run) instead of 'jsexec -I'

    Let me guess, I for instantiate? :)

    I was thinking Invoke or Interpret, but the capital 'I' just isn't a great thing to convey or document (looks too much like an 'l') or use (shift key and all) when there's another option, so I went with '-r' for Run. :-)
    --
    digital man

    Synchronet "Real Fact" #81:
    Vertrauen has had the FidoNet node number 1:103/705 since 1992.
    Norco, CA WX: 61.3øF, 50.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Dream Master@VERT/CIAD to Digital Man on Saturday, January 30, 2021 17:19:17
    Re: src/sbbs3/jsexec.c
    By: Digital Man to Dream Master on Sat Jan 30 2021 03:40 pm

    I was thinking Invoke or Interpret, but the capital 'I' just isn't a great thing to convey or document (looks too much like an 'l') or use (shift key and all) when there's another option, so I went with '-r' for Run. :-)

    I've come up with some crazy variables in my time. Hell, I wish all *nixes would keep their options the same. In AIX, if you want to see everything in terms of 1024, you use -g (df -g, for example). In Linux, -h (df -h), which Mibs, Gibs, or Tibs them.

    Oh well.

    Brian Klauss <-> Dream Master
    Caught in a Dream | caughtinadream.com a Synchronet BBS

    ---
    þ Synchronet þ Caught in a Dream - caughtinadream.com
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, January 30, 2021 23:41:46
    https://gitlab.synchro.net/main/sbbs/-/commit/6751ec5c6552c2af7507c80a
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Apply Deuce's feedback on the usage/syntax help output.

    Also change the wording of the -D option to be more descriptive.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, January 30, 2021 23:44:13
    https://gitlab.synchro.net/main/sbbs/-/commit/d49668063295eec1dab3f5e4
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Typo

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, February 21, 2021 21:45:04
    https://gitlab.synchro.net/main/sbbs/-/commit/39c0b830e2d6c839f90b3542
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Remove unnecessary NULL check (caught by Coverity)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, March 06, 2021 14:10:06
    https://gitlab.synchro.net/main/sbbs/-/commit/4365aac62118b6e5a509f219
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Don't compile the .ini parsing stuff for JSDoor

    This should fix the recent JSDoor build issue introduced.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Sunday, March 07, 2021 11:52:50
    https://gitlab.synchro.net/main/sbbs/-/commit/8f4425cba02558a1c2c31fca
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Enable JSOPTION_VAROBJFIX for JSDoor.

    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Sunday, March 07, 2021 21:26:57
    https://gitlab.synchro.net/main/sbbs/-/commit/a64184e0046bdda67b3cdce1
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    JSDoor still needs the module name.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Monday, April 05, 2021 23:36:36
    https://gitlab.synchro.net/main/sbbs/-/commit/aa4c080b13259eaa89016787
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Typos in help

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, August 08, 2021 23:40:32
    https://gitlab.synchro.net/main/sbbs/-/commit/3313031a70bb0b995e0006ea
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Don't fclose(errfp) if it's NULL.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thursday, June 16, 2022 21:47:40
    https://gitlab.synchro.net/main/sbbs/-/commit/d49facc893a919fefcb8969d
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Flush console output stream after executing a script

    Solves problem of status output lines being interleved with console
    output (e.g. from print()) after executing a script.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Monday, May 01, 2023 12:00:24
    https://gitlab.synchro.net/main/sbbs/-/commit/65bde885de939d6b1157382e
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    More verbose help output for -L option

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Wednesday, May 03, 2023 09:52:54
    https://gitlab.synchro.net/main/sbbs/-/commit/29001ba126bfd344c1f9ad63
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    This should allow it to link as a console program.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Sunday, June 11, 2023 14:33:40
    https://gitlab.synchro.net/main/sbbs/-/commit/20da5318bafa58eb3ead19e2
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Fix (harmless) memory leak reported by ASan when running 'jsexec -?'

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Sunday, July 09, 2023 15:23:31
    https://gitlab.synchro.net/main/sbbs/-/commit/cd997ea347ee9db7c5f3e474
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Resource cleanup on exit (when no module specified)

    Eliminates a SANITIZE build error

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Tuesday, August 08, 2023 17:43:51
    https://gitlab.synchro.net/main/sbbs/-/commit/40995ce1868fdb8cdbacf2a6
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Insure the exec_dir is *always* prepped (fix for Windows upgrade to v3.20)

    A "prepped" means directory means a relative path from the configuration files (or default settings) has been converted to a full/absolute path with proper slashes for the platform (i.e. backslashes instead of forward-slashes on Windows).

    JSexec doesn't require that the new v3.20 ctrl/*.ini files exist to run; this was necessary to be able to run 'jsexec update -> upgrade_to_v320.js' which does the ctrl/*.cnf to .ini file conversion (egg not required to build chicken). When JSexec failed to load ctrl/msgs.ini
    (e.g. "!ERROR loading configuration files: 2 (No such file or directory) opening /sbbs/ctrl\msgs.ini"), it would continue to run, but not "prep" any
    of the "path" settings (e.g. exec_dir).

    The first run of 'jsexec update.js' would fail to run upgrade_to_v320.exe (which does the v3.20 user base conversion) and a bunch of other (but not as important) update steps because Windows couldn't execute "../exec/*".

    Multiple errors would be displayed in this case, but the most important (as reported by Ree in #synchronet of irc.synchro.net) was:
    '..' is not recognized as an internal or external command

    right after the status output:
    No v3.20 user base found, running ../exec/upgrade_to_v320

    Notice the "../exec/" prefix, which is not support by Windows when specifying
    a file path to execute.

    A second run of 'jsexec update' would work fine because the new v3.20 .ini files would be successfully created after the first run (though the user base was not).

    This is likely the same issue that MRO reported recently when upgrading a Windows SBBS v3.19 install to v3.20 and not having the user base upgraded
    the first time.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Monday, February 05, 2024 22:18:08
    https://gitlab.synchro.net/main/sbbs/-/commit/b53254b6bcc9d02aae63da2e
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Resolve full path to specified ctrl directory, before chdir

    If a relative path to the ctrl directory is specified on the command-line
    or in the SBBSCTRL environment variable, the loading of ctrl/*.ini would
    fail after the changing of the working directory.

    We should probably get replace all use of FULLPATH with _fullpath someday,
    but for now, I just went with majority-rule.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Monday, February 05, 2024 22:27:55
    https://gitlab.synchro.net/main/sbbs/-/commit/7d3b61d7f59fcdf32e739baf
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    PATH_MAX (not an MSVC thing) -> MAX_PATH

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Sunday, March 17, 2024 00:13:16
    https://gitlab.synchro.net/main/sbbs/-/commit/97fb3f1f463adc057fc05ea8
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Make Windows hack Windows-only

    We need _CIOLIB_main on macOS... at least until the curses stuff works.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Sunday, March 17, 2024 01:35:53
    https://gitlab.synchro.net/main/sbbs/-/commit/1e48f1252859924638b52e96
    Modified Files:
    src/sbbs3/jsexec.c
    Log Message:
    Don't use the non-standard third parameter to main for enivronment

    Use the standard `extern char **environ' instead.
    Fixes an issue with macOS.

    Also, check that env is not NULL in js_init.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net