1. 29 Dec, 2022 1 commit
    • Deucе's avatar
      Remove RINGBUF_SEM for RINGBUG_EVENT · a2aa9631
      Deucе authored
      We've never really cared how many times the ring buffer has become
      empty, how many times data was added to it, or how many times we've
      been over the highwater mark.  These have effectively always been
      event signalling, with extra hackiness to clear "extra" semaphore
      posts.
      
      This commit removes RINGBUF_SEM entirely, and uses events for
      everything.  There's an empty event (set when the ring buffer is empty),
      a data event (set when the ring buffer is not empty), and a highwater
      event (set when the ring buffer has at least highwater mark bytes).
      
      A RingBufWrite() will set data and highwater events if applicable,
      and clear the empty event.
      
      A RingBufRead() will set empty event and clear data and highwater
      events if applicable.
      
      RingBufReInit() will now set the empty event, and clear the data
      and highwater events.
      
      These are the only actions the RingBuf API will perform on the
      events, it does *not* clear the highwater event on a RingBufWrite()
      if the buffer does not have enough bytes in it for example, this
      will *only* be done by RingBufRead() or RingBufReInit().  This
      allows consumers to force specific behaviours (such as forcing
      the highwater event on shutdown to prevent waiting for it).  Since
      the current code was able to deal with the semaphores having
      arbitrarily high counts, the existing code shouldn't have any
      issue with this.
      
      For things that want to shut something down, we're now setting both
      the data and highwater events to ensure it doesn't wait for a
      timeout (even for things that don't use highwater like the inbuf).
      The RingBuffer API should grow a thing to do this (RingBufferFlush
      perhaps?) rather than the consumers poking into the innards
      arbitrarily.
      
      Tested on the webserver and RLogin server and seems to be working
      great.  sexyz builds.  It seems there's some Windows thing that
      uses the ringbuffer sem for something, but I couldn't figure out
      what... updated the build file, but no clue if that's broken or not
      now... I'm sure DigitalMan will be happy to fix it if CI doesn't
      catch it. ;)
      
      This should allow the console object to grow a "flush" method that
      will set the highwater and data events.
      a2aa9631
  2. 12 Dec, 2022 1 commit
  3. 02 Jun, 2022 1 commit
    • Rob Swindell's avatar
      Decompose some library files to enable reuse by SVDM (virtual DOS modem) · 92bcd45e
      Rob Swindell authored
      I just wanted to reuse findstr() in vdmodem.c and I fell down this hole :-)
      
      findstr.* is new (findstr() related functions moved from str_util)
      getctrl.* is now finally the real home of get_ctrl_dir(), moved from str_util
      trashcan* functions moved from str_util to scfglib
      other scfg_t dependent functions moved from str_util to scfglib
      
      net_addr() appears to be a function that was never created/used (?)
      
      This will definitely break the *nix build, for now.
      92bcd45e
  4. 24 May, 2022 1 commit
  5. 24 Apr, 2021 1 commit
    • Rob Swindell's avatar
      DIZ enhancements: Read/use SAUCE data, support ANSI, increase max 1->4K · 2a8e1c11
      Rob Swindell authored
      Inspired by Blocktronics (and other ANSI art group) packs' FILE_ID.DIZ/ANS files:
      * Support (and prioritize) FILE_ID.ANS
      * Convert ANSI color/attribute sequences in DIZ files to Ctrl-A equivalent (uses SAUCE width and ICE color, if specified)
      * Don't treat DIZ as a series of lines, they're not always nowadays.
      * New putmsg() mode: P_INDENT to print files indented by current column
      * Display full (up to 64-char) filenames in lists when using 132+ column terminal.
      * Use the Author, Group, and Title fields from the SAUCE if present/non-blank
      * 2 new text.dat strings: 301 (FiAuthor) and 302 (FiGroup)
      * Also fix bug with repeated Cost header field on bulk-uploaded files.
      
      I know this'll break the *nix build (sauce.c dependency), but I'll fix that next.
      2a8e1c11
  6. 04 Apr, 2021 1 commit
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · fcf58640
      Rob Swindell authored
      This won't impact Synchronet as it has a separate signal handling
      thread, but we still need to behave properly for processes that
      don't.  I'm also saying that ENOMEM does not indicate a disconnection,
      though it may be better to pretend it was disconnected...
      fcf58640
  7. 12 Dec, 2020 1 commit
  8. 15 Sep, 2020 1 commit
  9. 07 Aug, 2019 1 commit
  10. 18 Jul, 2019 1 commit
  11. 10 Jul, 2019 1 commit
  12. 08 Jul, 2019 1 commit
    • rswindell's avatar
      Moved cp437_unicode_tbl and unicode_is_zerowidth() to (new file) unicode.c. · 1340f563
      rswindell authored
      New function (derived from sbbs_t::utf8_to_cp437()): unicode_to_cp437()
      New utf8 functions: utf8_replace_chars(), utf8_str_is_valid().
      utf8_getc() enhancement: val arg may be NULL (for length/validation uses).
      
      Convert quoted UTF-8 message text to CP437 when terminal is not UTF8.
      
      Set Fido CHRS: UTF-8 header field when posted message is UTF-8.
      1340f563
  13. 06 Jul, 2019 1 commit
  14. 29 Jun, 2019 2 commits
  15. 28 Jun, 2019 1 commit
  16. 24 Feb, 2018 1 commit
  17. 26 Nov, 2017 1 commit
  18. 23 Aug, 2015 1 commit
  19. 22 Aug, 2015 2 commits
  20. 16 Dec, 2014 1 commit
    • rswindell's avatar
      New MSVC property sheet for Multi-threaded XPDEV builds and usage: · e024987d
      rswindell authored
      defines XPDEV_THREAD_SAFE (not currently used in Windows builds) and
      LINK_LIST_THREADSAFE (notice the inconsistent use of underscore :-)
      Use of this property sheet fixes the problem with the terminal server global
      variable 'uptime' getting corrupted when jsrt_GetNew() called listInit() from
      js_rtpool.c which didn't #include sbbs.h and therefore had a different idea
      about the size of link_list_t and thus corrupted the global data region
      (zeroing out the 'uptime' variable, probably amonst other important things).
      e024987d
  21. 19 Nov, 2014 1 commit
  22. 28 Mar, 2014 1 commit
    • rswindell's avatar
      Change the target to Windows XP-IA32: resolves the "not a valid Win32 · 40f5417e
      rswindell authored
      application" error message (when run on XP) and reportedly will allow target
      executables to run on non-SEE (pre-Pentium III) CPUs. Seriously, anyone really
      running Windows XP on a Pentium II today? I guess it's possible <shrug> and we
      really get little benefit from SSE in Synchronet.
      
      I couldn't get Windows 2000 running in Hyper-V, so I guess Windows 2000 is
      now officially unsupported by Synchronet (and long unsupported by Microsoft).
      
      Thanks to Android8675 for the bug report and Rushfan for the solution tip.
      40f5417e
  23. 13 Mar, 2014 1 commit
  24. 21 Oct, 2011 1 commit
  25. 16 Oct, 2011 1 commit
  26. 09 Oct, 2011 1 commit