• Reading files directly

    From Charles Blackburn@VERT/FBOBBS to All on Sat Sep 17 16:17:49 2022
    All

    I'm looking at writing some programsand i figured i would start by looking at the message base as that's the easiest thing to do right now... read/list etc.

    i found the structures definition here (http://synchro.net/docs/smb.html) but for the life of me the C structs that are listed in there are not valid that I can tell as for example, you can't have a flexible array that's not at the end of the struct. They would need a length definition.

    So unless i'm missing something, is there a definitive SDK or header file i can use that has the correct structures in them?

    i'm not a C programmer, although i do know the basics, but i would also rather code in python, but there's no echo for that :P

    i found SMBLIB in the repo, but is there any example programs that show how to use it ?

    regards
    Charles Blackburn
    SYSOP - The F.B.O BBS 21:1/221
    Aviation related fun @ bbs.thefbo.us IPV4 and IPV6
    DOVE-Net FSX-Net USENET
    Coming soon: FIDO-Net

    ---
    þ Synchronet þ The FBO BBS - bbs.thefbo.us - A place for aviation fun....
  • From Digital Man@VERT to Charles Blackburn on Sat Sep 17 16:39:04 2022
    Re: Reading files directly
    By: Charles Blackburn to All on Sat Sep 17 2022 04:17 pm

    All

    I'm looking at writing some programsand i figured i would start by looking at the message base as that's the easiest thing to do right now... read/list etc.

    i found the structures definition here (http://synchro.net/docs/smb.html) but for the life of me the C structs that are listed in there are not valid that I can tell as for example, you can't have a flexible array that's not at the end of the struct. They would need a length definition.

    They're valid structs since empty arrays are pointers in C. If you want to see the actual C structure definitions used in SMBLIB, see smbdefs.h.

    So unless i'm missing something, is there a definitive SDK or header file i can use that has the correct structures in them?

    Yes, SMBLIB.

    i'm not a C programmer, although i do know the basics, but i would also rather code in python, but there's no echo for that :P

    You'd save a lot of trouble by using the Synchronet JavaScript MsgBase class instead. It's *much* easier for reading/manipulating message bases than what is necessary in C or C++.

    i found SMBLIB in the repo, but is there any example programs that show how to use it ?

    Sure, smbutil.c is probably the simplest example.
    --
    digital man (rob)

    Rush quote #70:
    He's got a problem with his power, with weapons on patrol .. New World Man Norco, CA WX: 79.4øF, 53.0% humidity, 5 mph S wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nelgin@VERT/EOTLBBS to All on Wed Sep 21 13:38:39 2022
    On Sat, 17 Sep 2022 16:39:04 -0700
    "Digital Man" <digital.man@VERT> wrote:

    Re: Reading files directly
    By: Charles Blackburn to All on Sat Sep 17 2022 04:17 pm

    All

    I'm looking at writing some programsand i figured i would start by
    looking at the message base as that's the easiest thing to do
    right now... read/list etc.

    i found the structures definition here
    (http://synchro.net/docs/smb.html) but for the life of me the C
    structs that are listed in there are not valid that I can tell as
    for example, you can't have a flexible array that's not at the end
    of the struct. They would need a length definition.

    They're valid structs since empty arrays are pointers in C. If you
    want to see the actual C structure definitions used in SMBLIB, see
    smbdefs.h.

    So unless i'm missing something, is there a definitive SDK or
    header file i can use that has the correct structures in them?

    Yes, SMBLIB.

    i'm not a C programmer, although i do know the basics, but i would
    also rather code in python, but there's no echo for that :P

    You'd save a lot of trouble by using the Synchronet JavaScript
    MsgBase class instead. It's *much* easier for reading/manipulating
    message bases than what is necessary in C or C++.

    https://synchro.net/docs/jsobjs.html

    In case you don't have this link, I'd highly recommend bookmarking it.
    This gives you easy access to a lot of syncrhonet objects. Pretty much
    all the end-user produced scripts are done in javascript. If you know C
    or C++ then it shouldn't be difficult to transition to JS.
    --
    End Of The Line BBS - Plano, TX
    telnet endofthelinebbs.com 23
    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com