Skip to content
Snippets Groups Projects
  1. Feb 27, 2024
  2. Jan 20, 2024
    • Rob Swindell's avatar
      The great BOOL->bool conversion in xpdev · cc98c9f1
      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
      cc98c9f1
  3. Dec 31, 2023
  4. Dec 14, 2023
    • Rob Swindell's avatar
      Don't log "symbol 'x' is not defined by script 'y'" error when terminating · 78dc9470
      Rob Swindell authored
      When a JS environment (e.g. server, jsexec) is terminated, it's possible
      that a require() script was being evaluated. But since termination would
      abort that evaluation, it's not unexpected if a symbol ends up not being
      defined before the require() script was terminated, so don't report an
      error in that case.
      
      Fix issue #681
      78dc9470
  5. Nov 07, 2023
    • Rob Swindell's avatar
      JSDOC build cleanup (used to generate jsobjs.html) · 108e825b
      Rob Swindell authored
      Replaced _property_ver_list (array of numbers) with _property_ver_list (array
      of objects) with a "ver" and (optional) "desc" property. This solves the
      enumeration order problem with objects that have both manual and table-based
      properties. Object's property tables (arrays of jsSyncPropertySpec) can now
      (optionally) contain the property descriptions. For properties defined in this
      manner, there will never be another mismatch between ther name/type and
      description/version in the jsobjs.html (a problem has re-occurred several
      times through the years with nebulous work-arounds).
      
      We still use _property_desc_list arrays for additional (e.g. manually defined)
      properties in such objects or just objects that only use one method of
      property definition and are not subject to the enumeration order problem.
      
      Fixed numerous typos.
      
      Using more consistent terminology and HTML mark-up.
      
      Some beautification and enhancement of readability, but nothing too major.
      108e825b
  6. Sep 01, 2023
  7. Jul 21, 2023
  8. Mar 14, 2023
  9. Feb 13, 2023
  10. Feb 23, 2022
  11. May 22, 2021
  12. Apr 13, 2021
  13. Apr 08, 2021
  14. Apr 05, 2021
  15. Apr 04, 2021
  16. Apr 03, 2021
  17. Apr 02, 2021
    • Deucе's avatar
      Initial work on setTimeout() · ad635a64
      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.
      ad635a64
  18. Mar 06, 2021
  19. Feb 28, 2021
  20. Feb 15, 2021
    • Rob Swindell's avatar
      Address more Coverity issues · 5e7baf93
      Rob Swindell authored
      Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
      5e7baf93
    • Rob Swindell's avatar
      Address more Coverity issues · 9344a7d8
      Rob Swindell authored
      Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
      9344a7d8
  21. Jan 17, 2021
  22. Jan 16, 2021
    • Rob Swindell's avatar
      Fix js.exec() returned nul" unless exit() was called explicitly · da7c67c9
      Rob Swindell authored
      Don't use the "exit_code" property value as the return value of js.exec() unless it's a number. As reported by mlong (thanks).
      
      Also, "exit_code" was being set to null (instead of void/undefined) in js_PrepareToExecute(). I think this was just an oversight or typo by Deuce from his commit of 5 years ago (f3256d81). Since we're comparing exit_code with JSVAL_VOID in other places to determine if it was actually set, this appears to be a long standing bug.
      da7c67c9
  23. Nov 23, 2020
    • Deucе's avatar
      Add generic on_exit support. · f09622cd
      Deucе authored
      Store all on_exit() strings in the global scope, execute them
      one scope at a time with scopes ordered in reverse order of
      first call to js.on_exit().  Within a scope, they are ordered
      last string first.
      f09622cd
  24. Nov 18, 2020
  25. Sep 26, 2020
  26. Aug 16, 2020
  27. Mar 29, 2020
    • rswindell's avatar
      Revert the last commit (mostly): don't treat array arguments to js.exec() · ac1a0004
      rswindell authored
      specially, just pass them on to the script as-is. Included a JSDOC note about
      the use of js.exec.apply() to pass a variable number of arguments (ala execv).
      
      Thanks Tracker1 for the pointer to 'spread' which led me to function.apply()
      and the JS-standard method of achieving the result I needed with this
      enhancement.
      
      I still think that a script that calls exit() is unlikely to expect non-string
      arguments in the first place, but if we don't need special case behavior, it's
      better not to add it and keep the behavior consistent with load() and
      require(). That was the decision of the executive board anyway. :-|
      ac1a0004
    • rswindell's avatar
      js.exec() enhancement: if any of the arguments to be passed to the executed · e5b2931a
      rswindell authored
      script are arrays, pass each element of the array as a separate argument to the
      child script. This allows one script to generate a variable-length list of
      arguments to be passed to another.
      e5b2931a
    • rswindell's avatar
      Fix double-free (of startup_dir) in js.exec() method. · f6e34d37
      rswindell authored
      Improve "script missing" error reporting in js.exec().
      f6e34d37
Loading