• src/tith/GNUmakefile base

    From Deuc¿@VERT to Git commit to main/sbbs/m on Friday, November 14, 2025 11:42:00
    https://gitlab.synchro.net/main/sbbs/-/commit/9816527184efa37027df73d0
    Modified Files:
    src/tith/GNUmakefile base64.c nodelist.c tith-client.c tith-common.c tith-common.h tith-config.c tith-config.h tith-file.c tith-file.h tith-server.c tith.c tith.h
    Log Message:
    Fix up alloc/free usage

    Since this is being designed so it can be used by third-party software,
    and since we no longer call exit() on errors, we need to actually
    free all memory that we allocate... we can't just bail and let the
    OS clean it up.

    So, the current command and the config are now thread-local globals
    which are automatically clean up on termination, and ephemeral allocs
    now go onto a thread-local stack.

    You need to pushAlloc() anything that's allocated (which checks if
    the allocation failed), then popAlloc() when the value is free()d
    or returned.

    With that, we can clean up all the allocations and longjmp() out
    on errors.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Monday, November 17, 2025 19:25:00
    https://gitlab.synchro.net/main/sbbs/-/commit/b7124aa75b677f9e78acb9d2
    Modified Files:
    src/tith/GNUmakefile base64.c base64.h tith-client.c tith-common.c tith-common.h tith-config.c tith-config.h tith-nodelist.c tith-nodelist.h tith-server.c tith-strings.c tith-strings.h
    Log Message:
    And, generate/validate signatures.

    We now have all the pieces to write the bundler/unbundler utilities.
    The API is a bit complex though, especially around the need to
    explicitly parse TLVs. The only way I can think of off-hand to
    help with this is by passing a list of types to parseTLV which walks
    the whole tree recursively parsing them... which is a fairly icky
    way to do it.

    I'm starting to the the feeling that I'm going to be writing a
    selector language for these trees... and am worried I'll take
    inspiration from CSS...

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net