Skip to content
Snippets Groups Projects
  1. Jan 14, 2025
  2. Jan 11, 2025
  3. Jan 09, 2025
  4. Jan 08, 2025
    • Rob Swindell's avatar
      FILE_ @-code changes/additions · b6654722
      Rob Swindell authored
      New:
      - FILE_COST, file's credit value or "FREE" when applicable
        (see also FILE_CREDITS - the file's credit value or 0 when free download)
      - FILE_AUTHOR - file's author (e.g. from SAUCE record) or blank if N/A
      - FILE_GROUP - file's author group (e.g. from SAUCE record) or blank if N/A
      - FILE_BYTES - file's size in bytes (previously, would use FILE_SIZE for this)
      - FILE_CRC32 - 8 hex digits or blank if N/A
      - FILE_MD5 - 32 hex digits or blank if N/A
      - FILE_SHA1 - 40 hex digits or blank if N/A
      - FILE_TIME_TO_DL - estimated time ("HH:MM:SS") to download file at current CPS
      
      Changed:
      FILE_SIZE is now the file size estimated in KB, MB, GB, etc., not the exact
      file size in bytes.
      b6654722
    • Rob Swindell's avatar
      Support "virtual shortcuts" to directory configured in SCFG->File Areas · 0dde9df8
      Rob Swindell authored
      As an alternative to directory aliases configured in ftpalias.cfg and/or
      web_alias.ini, a sysop can specify a shortcut (virtual directory name) per
      directory in SCFG->File Areas. These shortcuts will appears as top/root level
      directories in the FTP and Web servers for quick user access to important
      directories.
      
      The advantages (over ftpalias.cfg / web_alias.ini) are:
      - one place to configure
      - FILE_FTP_PATH and FILE_WEB_PATH @-codes will use the shortcut
        (usually a shorter, preferred virtual path to the directory)
      
      * New JS file_area.dir[].vshortcut property
      0dde9df8
  5. Jan 06, 2025
    • Rob Swindell's avatar
      Resolve GCC warning · c045c2d6
      Rob Swindell authored
      c045c2d6
    • Rob Swindell's avatar
      New @-codes: FILE_FTP_PATH and FILE_WEB_PATH (don't include scheme and host) · 95191fa9
      Rob Swindell authored
      These @-codes can be used to construct ftp[s] and http[s] URLs to display to
      users. For use in new/optional display file text/menu/download.*
      
      Add optional configurable 'vpath' (per-directory) for directories that have
      web/ftp aliases, so they preferred/short path (alias) will be used in the
      expanded @-codes.
      
      In SCFG, display each directory's virtual file path ([auto-generated] or set
      manually).
      
      getfilevpath() no longer assumes the target buf is >= MAX_PATH+1 bytes long
      
      Add dir_vpath() to get a directory's vpath
      
      Extend maximum file library parent directory from 47 to 100 chars. This limit
      was likely imposed because we didn't have horiztonal scrolling input in UIFC
      getstr() support at the time. We're no longer limited by that.
      95191fa9
  6. Jan 05, 2025
  7. Dec 21, 2024
    • Rob Swindell's avatar
      Encode local wallclock (not time_t) in SMB's when_t.time · 445394f9
      Rob Swindell authored
      Increment SMBLIB version to 3.10
      
      Fix issue #845: Changing system/OS time zone, changes dates/times of posted
      messages
      
      Sysops and users shouldn't notice any change unless they change the time zone
      of their system/OS (not accounting changes for daylight/standard time) and
      the result will be that message dates appear the same after such a change.
      
      For backward compatibily, any stored time_t's in msghdr_t.when_written.time
      (i.e. all existing SMB messages) will still be decoded and displayed properly.
      We detect a time_t value by the upper 6 bits being non-zero. When the upper
      6 bits of a when_written.time value are zero, then we know the 'year' is
      stored in the 16-bits before the when_written field (never used bits of the
      netattr field, now part of the when_t structure definition) and the Month,
      Day, Hour, Minute, and Second of the wallclock at the poster's site are
      encoded in the low 26 bits of the time field.
      
      This also eliminates more uses of 32-bit time_t that'll likely start being
      a problem 2038 and really fall over and die in 2106. At least messages'
      posting dates won't have any issue now. The "when_imported" values could use
      a similar treatment someday I suppose - and we could get rid of the
      when_imported.zone value as its not really needed we could use those 16-bits
      for the when_imported.year.
      
      Didn't change anything with filebases (still using time_t's though the
      when_written hdr field isn't used for much with regards to files).
      
      Yes, we could have converted all imported "broken down" message dates to
      UTC and continued to store them as a time_t using timegm() instead of mktime()
      for conversion to time_t, and I considered that. But we would have needed to
      create/use a flag in the message header to indicate such stored date/times
      (since they'd have to go through different adjustment for original time zone
      before display, basically reversing the logic of all the places we display the
      message dates/times using localtime verus gmtime/UTC C RTL functions),
      couldn't just initialize the time with a call to time() upon import of local
      messages (unless the local timezone happened to be UTC). And in the end, we'd
      still have a 32-bit time_t value. So this seemed the better path.
      
      I would have liked to have stored the date fields in a more human readable
      encoding (BCD or decimal, ala isoDate and isoTime_t), but I just didn't have
      the spare bits in the fixed portion of message headers to be wasteful like
      that.
      
      Here's an example from smbutil v of a message header posted after this change:
        when_written     03292595 41E0 Fri Dec 20 18:22:21 2024 PST
        when_imported    6766265D 41E0 Fri Dec 20 18:22:21 2024 PST
      
      Notice the difference in the hex encoding of the date/time between the 2
      header fields: when_imported still uses time_t. The when_written.year value
      isn't output here.
      445394f9
  8. Dec 20, 2024
    • Rob Swindell's avatar
      Add @-codes to display dates/times in UTC · 9f2c2e51
      Rob Swindell authored
      When the system time zone is not UTC, but the sysop wants to display some
      dates and times in UTC, they can now use these @-codes to do that:
      - TIME_UTC
      - DATE_UTC
      - UTC:fmt
      - DATETIME_UTC
      - MSG_DATE_UTC
      9f2c2e51
  9. Dec 02, 2024
  10. Dec 01, 2024
    • Rob Swindell's avatar
      Simplify the getnode.cpp API - use bool returns, default paramaeter value · 62ed3d3a
      Rob Swindell authored
      getnodedat() now performs a non-locked read by default.
      
      Perform more checks of getnodedat() return value before calling putnodedat()
      to avoid unintentionally zeroing out node.dab records.
      
      Add/use unlocknodedat() method for unlocking a node.dab record without
      writing.
      
      Note: The userdat.c getnodedat() and putnodedat() still return int (i.e. 0 on
      success), so that can be confusing.
      62ed3d3a
  11. Oct 29, 2024
    • Rob Swindell's avatar
      Add option to display short dates in verbal/unambiguous formats · a893b66f
      Rob Swindell authored
      Although we've added (in SBBS v3.20) configurable numeric date input/display
      formats for the system, the output was still ambiguous for users (e.g.
      NN/NN/NN which could be interpretted a number of ways), so I've added an option
      to choose "verbal" short date formats to be displayed where possible instead.
      The same value separate from the numeric format (whatever the sysop chose) is
      used in the verbal date output, but since month name abbreviations are 3
      characters, only one separator is used (to keep the output length fixed at 8
      characters).
      
      The new "Verbal" short date display format is choosable in the SCFG wizard and
      via SCFG->System->Short Date Format.
      a893b66f
  12. Oct 23, 2024
    • Rob Swindell's avatar
      Rename sbbs_t::ansi_getlines() to ansi_getdims(), add sbbs_t::getdimensions() · e4cdd4ac
      Rob Swindell authored
      Add JS console.ansi_getdims()
      
      Use sbbs_t::getdimensions() or JS console.getdimensions() to move user
      cols/rows values to run-time console values (querying ANSI terminal if
      appropriate/supported).
      
      JS console.pushxy(), popxy(), and gotoxy() all return Boolean now.
      
      sbbs_t::getdimensions() and its JS wrapper is now the proper way to propagate
      user's cols/rows settings to the run-time console values. This was done
      (post-login) only via use of the TERMROWS and TERMCOLS @-codes in
      user_settings.js. Weird.
      e4cdd4ac
  13. Sep 25, 2024
  14. May 25, 2024
    • Rob Swindell's avatar
      Add rainbow (elite text) attribute feature · cb4eddcb
      Rob Swindell authored
      New key "rainbow" in ctrl/attr.ini
      New Ctrl-A codes: 'X' to turn on repeating/wrapping rainbow attributes,
       'x' to turn on non-repeating/wrapping rainbow attributes.
      New @-code: RAINBOW:x to set the list of (comma-separated) rainbow attribute
       values (in same form as attr.ini).
       When used in a display file, the rainbow attribute change is temporary.
      
      Ever wanted to add alternating attributes to @-code expanded text in display
      files? Now you can.
      
      Also can be used to easily/quickly create display files with repeating
      elements (e.g. commands/options) using alternating attributes.
      cb4eddcb
  15. Apr 26, 2024
    • Rob Swindell's avatar
      Add MNE:<low>[:high][:cmd] @-code for mnemonic string attribute control · 8eef2dc8
      Rob Swindell authored
      The "default" mnemonic string attributes are still set in ctrl/attr.cfg,
      but now, each mnemonic string (e.g. from text.dat or passed to JS
      console.mnemonics()) can include a "MNE:" @-code to over-ride the default
      mnemonic string attributes (low, high, and command). If the "high"
      attribute isn't specified, it defaults to the same color as the "low"
      attribute with the "high intensity" flag flipped. The "cmd" attribute
      defaults to whatever was included in the attr.cfg, if not specified.
      Technically, the separator between the attributes can be any non-valid
      attribute character (e.g. symbol).
      
      Renamed (really old function) attrstr() to strtoattr() since its usage now
      more closely resembles other std C strto* functions (has an 'endptr' arg).
      8eef2dc8
  16. Mar 17, 2024
  17. Mar 07, 2024
  18. Feb 16, 2024
    • Rob Swindell's avatar
      UTF-8 improvements · 2584a864
      Rob Swindell authored
      Don't corrupt UTF-8 strings with SAFECOPY() (use new SAFECOPY_UTF8).
      
      Some terminals (notably, Windows Terminal) display zero width UNICODE chars
      as a single column-wide space. <sigh> Auto-detect the zero-width "width"
      (1 or 0) of the terminal during connection and UTF-8 auto-detection.
      
      getstr() works a lot better now with UTF-8 strings with wide chars (e.g.
      emojis), but likely much more to do.
      2584a864
  19. Feb 07, 2024
  20. Jan 25, 2024
  21. Jan 16, 2024
  22. Jan 15, 2024
    • Rob Swindell's avatar
      Fix the recently-added NODE_USER @-code · 0639add9
      Rob Swindell authored
      Since "NODE*" is a match for a node number status (ugh), and this comparison
      happened before the comparison for "NODE_USER", we'd never hit that condition.
      Thought I tested this before original commit, but I guess I did not. Oops.
      0639add9
  23. Jan 13, 2024
  24. Dec 31, 2023
    • Rob Swindell's avatar
      Allow sysop-configurable date separator (e.g. YYYY-MM-DD) · 013bcca9
      Rob Swindell authored
      To complete the request from: Max (WESTLINE)
      
        Is it possible to do a new dateformat in scfg
        In sweden we using YYYY-MM-DD format as standard.
      
      The default will be '/'.  Technically, any separator is possible by editing
      the "date_sep" value in the global section of main.ini.  SCFG allows the
      most popular separators: /.- and space.
      013bcca9
    • Rob Swindell's avatar
      Introduce 3rd system/local date display format: YY/MM/DD · 96976ab5
      Rob Swindell authored
      ... and YYYY/MM/DD for birthdate input/display.
      
      Now set in SCFG->System (not toggle options) and stored in the "date_fmt" key
      (new) in main.ini. The old sys_misc SM_EURODATE flag is deprecated (but used
      to determine the default value of date_fmt when not present).
      
      As requested from: Max (WESTLINE)
      
        Is it possible to do a new dateformat in scfg
        In sweden we using YYYY-MM-DD format as standard.
      96976ab5
  25. Dec 12, 2023
    • Rob Swindell's avatar
      Fix the @-code support in the Regarding* text.dat strings · a31f4346
      Rob Swindell authored
      Actually tested myself this time, needed a lot more than first appearances.
      
      Also includes a security/safety enhancement where the @-code expanded string
      is *not* used as an sprintf format string. Supporting both format specifiers
      and @-codes in a single text.dat string is tricky (always has been).
      
      For Accession.
      a31f4346
  26. Dec 10, 2023
  27. Dec 02, 2023
  28. Oct 26, 2023
  29. Sep 26, 2023
    • Rob Swindell's avatar
      Fast text.dat string references, more localization support via JS and @-codes · 9fb7c2c3
      Rob Swindell authored
      sbbs_t::mnemonics() now supports @-codes immediately following the tilde
      (e.g. ~@Yes@) to use the first character of a dynamically-replaced
      (e.g. localized/translated) text string as a command key.
      Fixed issue in sbbs_t::mnemonics if multiple @-codes were specified in the
      string, but no space characters (just noticed this bug while reviewing).
      
      Created: sbbs_t::expand_atcodes() - used by sbbs_t::mnemonics(), exposed in
      JS as bbs.expand_atcodes().
      
      bbs.text and system.text now have properties: each text string ID is the
      property name and the text index number (1-based) is the property value -
      enabling fast text string lookup without load/require text.js
      
      Constified sbbs_t::atcode() and attrstr() - not too painful
      
      Deprecated YNQP text.dat string in favor of (the first character of)
        "Yes" and "No" text strings and new strings: "Quit", and "PasswordChar"
      
      Other text.dat changes: ListKey->List, AllKey->Unused853
      More new text.dat strings: Which, Next, Previous, Language, LANG
      Deprecate the "AllKey" text string
      Create/use sbbs_t::all_key() - first character of "All" text string
      
      New JS console properties that present common (possibly localized) command
      keys: yes_key, no_key, quit_key, all_key, list_key, next_key, prev_key
      9fb7c2c3
Loading