Skip to content
Snippets Groups Projects
  1. May 04, 2024
    • Rob Swindell's avatar
      Support dir/subdir syntax in DIRS.TXT (CD-ROM) import · d787ad1a
      Rob Swindell authored
      getfname() just returns the last path element, so can't use that here.
      d787ad1a
    • Rob Swindell's avatar
      Re-assign the dirnum and subnum fields after sorting dirs or subs · c1847394
      Rob Swindell authored
      The dirnum and subnum are used for the next/previous (left and right) arrow
      nav through sub-boards and directories. For message groups or file libs that
      are configured to auto-sort the sub-boards or directory list, when importing
      an unsorted list, the dirnum and subnum values would then be wrong after the
      qsort() at the end of the import thus making the left/right nav thing broken
      (jump to other groups/libs and such).
      
      This fixes that.
      
      Could I have fixed this by passing an index value to the next/prev_dirnum()
      and _subnum() functions and returning the next/previous index value instead of
      relying on the subnum/dirnum elemment to be correct? Maybe. <shrug>
      Do I like second guessing myself? Not really.
      c1847394
    • Rob Swindell's avatar
      Fixup extract_diz() - fallback to external archivers · e2d3cd89
      Rob Swindell authored
      The fallback to external extractors/archivers didn't really work unless a
      libarchive function (called from extract_files_from_archive) actually failed
      and the return value was < 0. A return value of 0 would mean the external
      file extractor would never be used.
      
      This was discovered when trying to import DIZ from old ZIP files (from 1992)
      that used "Implode" compression method for the FILE_ID.DIZ, which is a
      compression method *not* supported by libarchive. This is a reason why sysops
      might want to leave Info-zip's 'unzip' as a configured Extractable File Type
      handler (in SCFG) for 'zip' files.
      
      Don't call the external archiver 3 times for the 3 DIZ filenames supported.
      Just call the external archiver once, and pass all 3 filesnames. This also
      means that the call to system() can return non-zero (e.g. Info-zip 'unzip'
      will return 2 if any of the files aren't present in the archive, even if
      one is) - so ignore this return value from system(). This speeds up bulk
      import (e.g. using addfiles.js).
      
      Unfortunately, I couldn't really find a nice cross-platform way to suppress
      the unzip "caution: filename not matched" message sent to stderr. That's
      a bummer and a little annoying.
      
      Ignore 0-length DIZ files.
      e2d3cd89
    • Rob Swindell's avatar
      Change client_t.protocol from pointer to buffer · dd2afc92
      Rob Swindell authored
      Fix observed crash when shutting down services server where the client_t
      protocol was pointing to a freed service's protocol description string.
      
      This was the last pointer in client_t and should resolve the last race
      conditions (memory ownership issues) with its data members.
      
      This also resolves a small memory leak in getnodeclient() where the last
      client "gotten" would have its heap-duplicated protocol string leaked.
      dd2afc92
  2. May 03, 2024
  3. May 01, 2024
    • Rob Swindell's avatar
      Better support for CD-ROM filenaming (no dashes in ISO 9660 filenames!) · 6614794d
      Rob Swindell authored
      Though the FILES.BBS might have filenames with dashes, the filenames actually
      have underscores. Consider converting any other valid DOS filename characters
      that are not allowed in ISO 9660 filenames as well (but to what?).
      
      More logging of missing and renamed files (e.g. fixed case, dashes replaced
      with underscores).
      6614794d
  4. Apr 30, 2024
  5. Apr 28, 2024
  6. Apr 27, 2024
  7. Apr 26, 2024
    • Rob Swindell's avatar
    • 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
  8. Apr 25, 2024
  9. Apr 24, 2024
  10. Apr 23, 2024
    • Rob Swindell's avatar
      Track Telnet Binary TX mode set by server via Telnet (IAC) commands · 2bae9a96
      Rob Swindell authored
      As reported by Chris/akacastor (21:1/162), SyncTERM would always assume the
      Telnet session was in ASCII mode until/unless conn_binary_mode_on() was called
      which is only called at the beginning of a file transfer, which sets the
      conn_api.binary_mode accordingly. Unfortunately, if the Telnet server
      requested binary mode itself (e.g. during initial connection), SyncTERM would
      (try to) set the connection back to ASCII mode after any file transfer. :-(
      
      With this change, the conn_api.binary_mode will track the actual binary TX
      mode whether initiated locally or remotely (by the server), but it'll only be
      set to true when *both* directions are succesfully set to binary mode. And
      this way, if the connection was already in binary mode before any file
      transfer, it'll remain in binary mode as was apparently desired by the server.
      
      Also with this change, we could probably remove the setting of
      conn_api.binary_mode to true/false in conn_binary_mode_on()/off() functions,
      but it shouldn't hurt anything if it's left there I suppose (in case some
      *other* terminal transport protocols have the concept of binary mode?).
      2bae9a96
    • Rob Swindell's avatar
      68ac22af
    • Rob Swindell's avatar
      Fix apparent missing return statement in get_win_filename() · 668d2e59
      Rob Swindell authored
      Found by MSVC warning
      668d2e59
Loading