• src/smblib/smblib.c smblib.h

    From rswindell@1:103/705 to CVS commit on Sat Jul 7 20:50:33 2018
    src/smblib smblib.c 1.176 1.177 smblib.h 1.85 1.86
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/home/rswindell/sbbs/src/smblib

    Modified Files:
    smblib.c smblib.h
    Log Message:
    Re-write of smb_getmsgidx_by_time() - using a proper binary search
    algorithm now. Also, now returns the index offset of the matched index
    (if found), negative error value otherwise.

    I was testing something and noticed that the old smb_getmsgidx_by_time() implementation could sometimes return the index of a message posted before
    the requested time. That was fixed by re-writing the binary search logic.

    Also, I found it useful in my testing to have this function return the
    offset of the matching index (in addition to the index record itself), so checks of the return value need to compare >= SMB_SUCCESS, not just ==
    or != SMB_SUCCESS.


    --- SBBSecho 3.05-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Mon Jul 23 22:15:55 2018
    src/smblib smblib.c 1.179 1.180 smblib.h 1.86 1.87
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/tmp/cvs-serv5685/smblib

    Modified Files:
    smblib.c smblib.h
    Log Message:
    Singificantlly improve message scan pointer initialization (e.g. for new
    users) and adjusting scan ptrs by date or set to "Last msg" while online:
    - speed (on my system, reduced from 12 to < 2 seconds)
    This involved 2 enhancements: check msgbase index file timestamp (fast)
    before opening any files. When opening the msgbase, just open the index
    file (no other msgbase files) - required new smblib function: smb_open_index. - fixed off-by-one when setting by date (when setting the new-scan ptr to
    Jan-1-2018, you want that first message posted on/after Jan-1-2018 to be
    found as "new", not the first message posted *after* that date.
    - re-added the fixmsgptrs() call in putmsgptrs(), inadvertently removed
    in the .ixb -> .ini ptr storage update in rev 1.192 of userdat.c.


    --- SBBSecho 3.05-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Tue Apr 9 13:25:37 2019
    src/smblib smblib.c 1.188 1.189 smblib.h 1.88 1.89
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/tmp/cvs-serv28365

    Modified Files:
    smblib.c smblib.h
    Log Message:
    Eliminate smb_stack(), SMB_STACK_* as this implementation is non-thread-safe and frankly could cause all kinds of havok with multiple thread (e.g. nodes) pushing and popping SMB's concurrently. eek.



    --- SBBSecho 3.07-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Fri Jul 5 21:27:02 2019
    src/smblib smblib.c 1.198 1.199 smblib.h 1.94 1.95
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/tmp/cvs-serv3716

    Modified Files:
    smblib.c smblib.h
    Log Message:
    Created new SMBLIB function: smb_msg_is_utf8() which reutrns TRUE if the passed message body is UTF-8 encoded. This works for either messages received via FTN (with the "CHRS: UTF-8" control paragraph) or MIME-encoded messages (e.g. Internet e-mail).

    This is to be used by things to display messages. If the viewer (e.g. user's terminal) supports UTF-8, just send through as-is. If not, translation (e.g. to CP437) or filtering may be needed.

    --- SBBSecho 3.07-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)