home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / s / sltpu70a.zip / FILEDEF.REF < prev    next >
Text File  |  1992-07-08  |  23KB  |  583 lines

  1.  
  2. The follwing is a reference of the data types provided by FILEDEF.TPU.
  3. Note: do not attempt to compile this file.  Doing so may cause the
  4. updated FILEDEF.TPU file to be incompatible with the other TPU files.
  5.  
  6.  
  7. const logsize   =  75;  { size of last caller log }
  8.       chatsize  =   4;  { chat queue size - 1 }
  9.       ulistmax  =  50;  { upload list size }
  10.       maxproto  =  15;  { number of external protocols }
  11.  
  12.  
  13. const { Message File Constants }
  14.       indexsize = 1024;       { size of index hash table }
  15.       blocksize = 250;        { text block size }
  16.  
  17.  
  18. const configspec  = 'CONFIG.SL2';   { Configuration Info }
  19.       nodesspec   = 'NODES.SL2';    { Node Information }
  20.  
  21.       chatspec    = 'CHAT.SL2';     { Chat File }
  22.       logspec     = 'LOG.SL2';      { Caller Log }
  23.  
  24.       subspec     = 'SUBBOARD.SL2'; { Subboard Definitions }
  25.       dirspec     = 'FILEDIR.SL2';  { UL/DL Directory Definitions }
  26.       doorspec    = 'DOORS.SL2';    { External Program Definitions }
  27.  
  28.       msysspec: string[80]
  29.                   = 'STRINGS.SYS';  { Offline Message Strings }
  30.  
  31.       ulistspec   = 'UPLIST.SL2';   { Batch Upload Description List }
  32.  
  33.       configpath: string[60] = '';
  34.         { path to CONFIG file }
  35.  
  36.  
  37. Type  { -- Preliminary Type Definitions ------------------------------------ }
  38.  
  39.      RSbaud = (B110,B150,B300,B600,B1200,B2400,B4800,B9600,B19200,B38400);
  40.      cmpresult = (Less,Equal,Greater);
  41.      comparefunction = function (p1,p2: pointer): cmpresult;
  42.  
  43.      ansitype = (GENERIC,PROCOMM,STANDARD);
  44.      helplevel = (EXPERT,INTERMEDIATE,NOVICE);
  45.  
  46.      IxType = (SEQ,UID,MAIL);
  47.        { index type, seqential/universal/mail }
  48.  
  49.      filetype = (CONFIGF,NODESF,CHATF);
  50.      fileset = set of filetype;
  51.  
  52.      timetype = record   { time }
  53.        hour: byte;
  54.        minute: byte;
  55.      end;
  56.  
  57.      datetype = record   { date }
  58.        year: byte;
  59.        month: byte;
  60.        day: byte;
  61.      end;
  62.  
  63.      pwtype = array[1..3] of byte;  { 3-byte password }
  64.  
  65.      maillogtype = (MLOFF,MLON,MLTAP);
  66.  
  67.      attribtype = 1..24;
  68.      attribset = set of attribtype;    { access attribute set A-X }
  69.  
  70.      ExProtocol = record
  71.        name: string[40];      { protocol name }
  72.        sendcmd: string[72];   { send command }
  73.        rcvcmd: string[72];    { receive command }
  74.        extra: string[20];     { expansion room }
  75.      end;
  76.  
  77.      ColorType = (NULLCOLOR,     { no color set }
  78.                   NORMAL,        { normal screen color for most i/o }
  79.                   INVERSE,       { foreground color for input highlighting }
  80.                   BACKGROUND,    { background color for input highlighting }
  81.                   COMCOLOR,      { color for command highlight }
  82.                   SUBCOLOR,      { subboard information }
  83.                   HEADCOLOR,     { color for headings }
  84.                   CHATCOLOR,     { chat mode color }
  85.                   SPECIAL,       { special prompts and messages }
  86.                   ERRCOLOR,      { error and warning messages }
  87.                   ALTCOLOR,      { alt. special color }
  88.                   PROMPTCOLOR ); { colour for prompts }
  89.  
  90.      MsgType = record    { inter-terminal message }
  91.        from: integer;         { node where from }
  92.        name: string[25];      { name of sender }
  93.        message: string[73];   { text of msg }
  94.      end;
  95.  
  96.      AutoDoorType = record   { automatic door }
  97.        command: string[60];
  98.        directory: string[60];
  99.        commtype: byte;
  100.        abort: byte;
  101.        writeprot: boolean;
  102.        dropfile: byte;      { 0=None 1=PCB14 2=PCB12 }
  103.        pause: boolean;      { pause after door executes? }
  104.        extra: string[8];
  105.      end;
  106.  
  107.      PortDefType = record   { COM port definition }
  108.        PortType: byte;        { type of port; 0=standard }
  109.        BaseAddress: word;     { base address }
  110.        IRQ: word;             { interrupt }
  111.        Num: byte;             { physical port number }
  112.        extra: string[7];      { extra bytes }
  113.      end;
  114.  
  115.      AccessType = record   { access level set }
  116.        attrib: attribset;    { attributes }
  117.        msglevel: integer;    { message system access level }
  118.        filelevel: integer;   { file system access level }
  119.        ratio: byte;          { download:upload ratio }
  120.        timelimit: integer;   { daily time limit }
  121.        sesslimit: integer;   { per session time limit }
  122.        expiredate: datetype; { expiration date }
  123.      end;
  124.  
  125.      AccessDefType = record
  126.        name: string[20];     { name of access level }
  127.        days: integer;        { # of days added to expiration date }
  128.        a: accesstype;        { access levels }
  129.      end;
  130.  
  131.  
  132.  
  133.  
  134. Type  { -- CONFIG, NODES and CHAT file types ------------------------------- }
  135.  
  136.      configtype = record   { format of CONFIG file }
  137.  
  138.        systemname: string[30]; { the name of the BBS }
  139.        sysopname: string[25];  { sysop's name }
  140.        node: integer;          { node number this node }
  141.        maxnode: integer;       { total number of nodes }
  142.        version: integer;       { version of SLBBS program in use }
  143.  
  144.        progpath: string[45];   { path to program files }
  145.        altprogpath: string[45];{ alternate program path }
  146.        datapath: string[45];   { path to data files }
  147.        chatpath: string[45];   { path to chat.bbs }
  148.        textpath: string[45];   { path to text files }
  149.        incpath: string[45];    { path to user include files }
  150.        mailpath: string[45];   { path for MAIL.LOG files }
  151.        alogspec: string[45];   { activity log filespec }
  152.        flogspec: string[45];   { files log filespec [std] }
  153.        logfile: string[45];    { default general log file }
  154.        sysfile: string[45];    { path/filename for pcboard.sys file }
  155.        defaultpw: string[45];  { default password for uploads }
  156.        presshard: byte;        { reserved }
  157.  
  158.        curruser: longint;      { current user ID number }
  159.        currsub: string[8];     { current/last used message area }
  160.        currdir: string[8];     { current/last used file area }
  161.        lastdoor: string[45];   { current/last door menu executed }
  162.        logtime: timetype;      { time current user logged on }
  163.        laston: datetype;       { last logon date of current user }
  164.        remote: boolean;        { set if remote logon }
  165.        rsactive: boolean;      { set if rs port active }
  166.        baudrate: rsbaud;       { caller's actual effective baud rate }
  167.        errorfree: boolean;     { set if error free connect detected }
  168.        ansi: boolean;          { caller's ANSI graphics mode }
  169.        color: boolean;         { caller's color mode indicator }
  170.        timelimit: integer;     { caller's time limit for this session }
  171.        newlogon: boolean;      { set if main program not yet run }
  172.  
  173.        sysavail: boolean;      { set if sysop is available }
  174.        sysopnext: boolean;     { set if sysop will be next login }
  175.        paged: boolean;         { set if sysop was paged }
  176.        superuser: boolean;     { set if superuser key (alt-s) pressed }
  177.  
  178.        newusers: boolean;      { new user registration? }
  179.        reginfo: word;          { registration info to collect? }
  180.        minaccess: byte;        { min. access lev req. for login }
  181.        noquotes: boolean;      { set if Quotes are Off }
  182.        inithelp: helplevel;    { initial help level }
  183.        partreg: boolean;       { collect partial user info? }
  184.  
  185.        comport: byte;          { com port to use }
  186.        bsupport: byte;         { baud rates supported }
  187.        initstr: string[45];    { modem 'remote' init string }
  188.        localstr: string[45];   { modem 'local' init string }
  189.        buffactor: integer;     { output buffer size }
  190.        bufferdoors: boolean;   { buffer DOOR output? }
  191.        modemmsg: boolean;      { true for modem msg baud detect }
  192.        flowcntrl: boolean;     { set for harware cts/dsr flow control }
  193.        lockedbaud: rsbaud;     { baud rate to lock modem at }
  194.        hardbreak: boolean;     { if set, bbs uses hard modem breaks }
  195.  
  196.        directvid: boolean;     { direct screen/BIOS output switch }
  197.        dateformat: byte;       { desired date format }
  198.        timeformat: byte;       { desired time format }
  199.        payback: byte;          { upload time payback }
  200.        romcopy: boolean;       { set for ROM file copies }
  201.        userpriv: boolean;      { set if user lists are private }
  202.        PauseSource: byte;      { source for pause routine (dos/bios/ram) }
  203.  
  204.        command: string[255];   { next command executed by slbbs.exe }
  205.        commtype: byte;         { next command type }
  206.        commdir: string[80];    { default dir for command }
  207.        wp: boolean;            { write protection for command }
  208.        abort: byte;            { abort type for command }
  209.        doorflag: byte;         { program to run on return from door }
  210.        keyflag: boolean;       { set if "press return" desired }
  211.        indoors: byte;          { doors active flag }
  212.  
  213.        relog: boolean;         { relog flag }
  214.        lastevent: integer;     { line number of last event }
  215.        lastday: byte;          { day last event executed }
  216.        nextevent: integer;     { time until next system event (-1=None) }
  217.        eventsoon: boolean;     { set if event scheduled after current session }
  218.        idletime: byte;         { idle time limit }
  219.  
  220.        lastactive: boolean;    { set if lastuser currently logged in }
  221.        host: boolean;          { if set, return to DOS on logout }
  222.        hangup: boolean;        { if set, hang up after each call }
  223.        disablekeys: boolean;   { if set, hot keys are disabled }
  224.  
  225.        AccessDef: array[1..25]
  226.          of AccessDefType;     { access level definitions }
  227.  
  228.        Colorchart: array [NORMAL..PROMPTCOLOR]
  229.          of byte;              { color definitions }
  230.  
  231.        PortDef: array[1..8]
  232.          of PortDefType;       { COM port setup info }
  233.  
  234.        Ex: array[1..MaxProto]
  235.          of exprotocol;        { external protocols setup }
  236.  
  237.        Autodoors: array[1..3] of autodoortype;
  238.  
  239.        MainlevelsX: array[1..30] of byte;
  240.          { access levels for main menu - Not used in 2.25 & up }
  241.  
  242.        FileslevelsX: array[1..30] of byte;
  243.          { access levels for files menu - Not used in 2.25 & up }
  244.  
  245.        ftime: timetype;        { start of xfer time }
  246.        fdisc: char;            { disconnect from external xfer }
  247.  
  248.        fileset: string[60];
  249.          { name of DIR file to use upon startup }
  250.  
  251.        invis: boolean;         { Alt-I invisible switch }
  252.  
  253.        expireaction: byte;     { 0=none, 1=reset access, 2=delete account }
  254.        usesession: boolean;    { Use session time limit? }
  255.        junk: boolean;          { reserved }
  256.  
  257.        UserAnsiMode: AnsiType;   { Ansi type of person running door }
  258.        RegDays: integer;         { reserved }
  259.        subdoors: boolean;        { internal flag for doors menu }
  260.  
  261.        menupath: string[45];     { Path to menu files }
  262.  
  263.        { Misc. Functionality Security Attributes }
  264.        FwdAttrib: AttribSet;     { Attribs. needed to forward messages }
  265.        ChatAttrib: AttribSet;    { Needed to use internode chatting }
  266.        QuotAttrib: AttribSet;    { Needed to use F4 message quoting }
  267.  
  268.        More: Array[1..8] of AttribSet;  { Room for more }
  269.  
  270.        UploadDoor: Autodoortype;        { Upload autodoor }
  271.        ExUD: boolean;                   { Execute upload autodoor? }
  272.  
  273.        extra: array[1..701] of byte;
  274.  
  275.      end;
  276.  
  277.  
  278. type nodetype = record    { NODES file }
  279.  
  280.        syscalls: longint;      { record 0: total calls to system }
  281.        lastuser: longint;      { record 0: last user on the system }
  282.        lastquote: string[72];  { record 0: quote left by last user }
  283.  
  284.        name: string[25];       { logged user's name }
  285.        id: longint;            { logged user's id }
  286.        stat: byte;             { logged user's chat status }
  287.        savestat: byte;         { saved status from door or ext. proto. }
  288.  
  289.        extra: string[14];      { pad to 128 bytes }
  290.  
  291.      end;
  292.  
  293.  
  294. type chattype = record      { CHAT.BBS file }
  295.  
  296.        head,tail: byte;          { head, tail of msg queue }
  297.        msg: array[0..chatsize]   { up to four messages }
  298.          of msgtype;
  299.  
  300.      end;
  301.  
  302.  
  303.  
  304. { -- USER file ----------------------------------------------------------- }
  305.  
  306.  
  307. type UserHeader = record       { file header info }
  308.        root: TreeRootType;       { tree root info }
  309.        pad: array[1..116] of byte;
  310.      end;
  311.  
  312.      Usertype = record
  313.        Leaf: TreeLeafType;     { tree leaf info }
  314.  
  315.        name: string[25];       { user's real name }
  316.        alias: string[25];      { user's alias name }
  317.        passwd: pwtype;         { password }
  318.        cksum: integer;         { checksum of name }
  319.  
  320.        firston: datetype;      { date of first logon }
  321.        laston: datetype;       { date of last logon }
  322.        lasttime: timetype;     { time of last logon }
  323.        calls: longint;         { total number of calls }
  324.  
  325.        location: string[20];   { user's location }
  326.        systype: string[15];    { system type }
  327.        phoneno: string[12];    { phone number }
  328.        pref: attribset;        { user preference attributes }
  329.        NoSubPrompt,
  330.        NoMsgPrompt: boolean;   { display subboard/mail disposition prompts? }
  331.        LastMailDate: datetype; { date specified in last mail list/inquire }
  332.        extra: string[42];      { extra space }
  333.        subboard: string[8];    { current or last used subboard }
  334.  
  335.        xproto: byte;           { default file xfer protocol }
  336.        logmail: maillogtype;   { log mail sent/rcv'd }
  337.        scrnsize: byte;         { screen size (0=continuous scroll) }
  338.        help: helplevel;        { help level }
  339.        ansimode: ansitype;     { default ANSI mode }
  340.  
  341.        access: accesstype;     { access & time limits }
  342.        timeleft: integer;      { time left today }
  343.  
  344.        uploads: longint;       { Kbytes uploaded }
  345.        ulcount: longint;       { File upload count }
  346.        downloads: longint;     { Kbytes downloaded }
  347.        dlcount: longint;       { File download count }
  348.  
  349.        listformat: byte;       { file list format prompt/short/long }
  350.        msgpause: byte;         { msg pause default prompt/yes/no }
  351.  
  352.        pad: array[1..18] of byte;   { pad to 256 bytes }
  353.  
  354.      end;
  355.  
  356.  
  357.  
  358. { -- Setup Files ------------------------------------------------------------ }
  359.  
  360. type SetupHeader = record
  361.        root: TreeRootType;       { tree root info }
  362.        pad: string[116];         { header for subboard SETUP files }
  363.      end;
  364.  
  365.      SetupData = record             { data for SETUP files }
  366.        Leaf: TreeLeafType;     { tree leaf info }
  367.        name: string[8];        { eight-char item name }
  368.        path: string[40];       { path to HDR/DIR file }
  369.        descrip: string[40];    { name of subboard/file area }
  370.        access: integer;        { access level required to use }
  371.        attrib: attribset;      { attributes required to read/join }
  372.  
  373.        case integer of
  374.          1: (                { Subboards }
  375.          subsysop: string[25];   { subop's name }
  376.          echomail: boolean;      { echomail attrib for subboards }
  377.          postattrib: attribset;  { attributes required to post }
  378.          visible: boolean;       { subboard visible? }
  379.          pad: string[13]);       { extra bytes }
  380.  
  381.          2: (                { Filedirs }
  382.          filepath: string[38];   { path to upload/download files }
  383.          readonly,
  384.          writeonly: boolean;
  385.          Free: word;
  386.          Value: integer;
  387.          display: boolean);      { subboard visible? }
  388.  
  389.      end;
  390.  
  391.  
  392.  
  393. { -- Message Files ---------------------------------------------------------- }
  394.  
  395. type SubType = record   { subboard header information }
  396.        access: integer;        { access level required to use subboard }
  397.        attrib: attribset;      { attributes required to read/join }
  398.        name: string[40];       { long sub board name }
  399.        subsysop: string[25];   { sub-sysop's name }
  400.        maxsize: longint;       { maximum number of msgs allowed }
  401.        maxmsglen: integer;     { max. message length }
  402.        anonymous: boolean;     { set if anonymous posts are allowed }
  403.        echomail: boolean;      { set if echomail on this subboard }
  404.        autokill: boolean;      { purge old messages automatically }
  405.        compress: boolean;      { set to compress message texts }
  406.  
  407.        messages: longint;      { number of active headers }
  408.        nextid: longint;        { next MSG ID number }
  409.  
  410.        firstmsg,
  411.        lastmsg: longint;       { first & last active msg by ID # }
  412.  
  413.        orignode: word;         { originating node, for echomail }
  414.        orignet: word;          { originating net, for echomail }
  415.        origzone: word;         { originating zone, for echomail }
  416.        origpoint: word;        { originating point }
  417.  
  418.        userjoin: boolean;      { set if users allowed to join }
  419.        postattrib: attribset;  { attributes required to post msgs }
  420.        visible: boolean;       { false hides subboard from list }
  421.  
  422.        pad: string[14];        { pad to 128 bytes }
  423.  
  424.      end;
  425.  
  426.  
  427.      IndexType = array [SEQ..UID,0..IndexSize-1]
  428.        of longint;           { index for sequential and uid values }
  429.  
  430.  
  431.      HeaderType = record        { message header }
  432.        status: byte;         { 0=header, 255=deleted }
  433.        id: array[SEQ..UID]
  434.          of longint;         { sequential and universal ID numbers }
  435.        next: array[SEQ..UID]
  436.          of longint;         { pointers to next headers if any }
  437.        txt: longint;         { pointer to start of text in text file }
  438.  
  439.        from: string[25];     { text of sender's name }
  440.        fromid: longint;      { sender's user record, if local }
  441.        touser: string[25];   { text of receiver's name }
  442.        toid: longint;        { receiver's user record, if local }
  443.        subj: string[40];     { subject }
  444.  
  445.        time: timetype;       { time recorded }
  446.        date: datetype;       { date recorded }
  447.        rd: longint;          { times read }
  448.        replies: longint;     { times replied-to }
  449.  
  450.        ffrom: string[40];    { forwarded-from }
  451.        extra: string[19];    { extra heading information }
  452.  
  453.        prot: boolean;        { purge protection }
  454.        logged: boolean;      { set if mail logged to disk }
  455.  
  456.        lastseq,
  457.        nextseq: longint;     { next/previous sequential message }
  458.  
  459.        lastthread,
  460.        nextthread: longint;  { next/previous threaded message }
  461.  
  462.        topthread,            { first msg in this thread }
  463.        lastreply,            { last reply to this message }
  464.        replyto: longint;     { message to which this is a direct reply }
  465.  
  466.        lastmail,
  467.        nextmail: longint;    { next/previous personal mail message }
  468.  
  469.        attribute: word;      { echomail flags/attributes }
  470.  
  471.        nextseqrec: longint;  { record # of next sequential msg }
  472.        nextmailrec: longint; { record # of next mail message }
  473.  
  474.        pad: string[11];   { pad to 256 bytes }
  475.      end;
  476.  
  477.  
  478.      TextHeader = record     { header info for message file }
  479.        pad: string[127];
  480.      end;
  481.  
  482.      TexType = record        { block of text from text file }
  483.        copies: byte;              { #of copies 255=deleted }
  484.        data: string[blocksize];   { block of text }
  485.        next: longint;             { pointer to next block }
  486.      end;
  487.  
  488.  
  489.      MembHeader = record      { header for member file }
  490.        root: treeroottype;
  491.        pad: string[116];
  492.      end;
  493.  
  494.      MembType = record        { block data for member file }
  495.        Leaf: treeleaftype;
  496.        name: string[25];      { member's name }
  497.        firston: datetype;     { date joined this subboard }
  498.        laston: datetype;      { date last accessed this subboard }
  499.        lastread: longint;     { highest message read }
  500.        firstmail,
  501.        lastmail: longint;     { first/last personal message this subboard }
  502.        pad: string[66];
  503.      end;
  504.  
  505.  
  506. { -- Log and Quotes Files ------------------------------------------------- }
  507.  
  508. type logtype = record  { LOG file }
  509.        head: integer;
  510.        users: array[1..logsize] of record
  511.          id: longint;     { user ID # }
  512.          chksum: integer; { user checksum }
  513.          time: timetype;  { time of login }
  514.          date: datetype;  { date of login }
  515.        end;
  516.      end;
  517.  
  518.      logfiletype = file of logtype;
  519.  
  520.  
  521. type quotehead = record
  522.        head: longint;
  523.        tail: longint;
  524.        pad: string[7];
  525.      end;
  526.  
  527.      quotetype = record
  528.        status: byte;
  529.        name: string[25];    { their name }
  530.        quote: string[72];   { what they said }
  531.        time: timetype;      { when they said it }
  532.        date: datetype;
  533.        pad: string[22];
  534.      end;
  535.  
  536.  
  537.  
  538. { -- File Directories ------------------------------------------------------ }
  539.  
  540. type DirHeader = record    { File directory header info }
  541.        root: treeroottype;     { root information }
  542.  
  543.        access: byte;           { access level required to use directory }
  544.        attrib: attribset;      { attributes required to use/upload }
  545.        name: string[40];       { long directory name }
  546.        visible: boolean;       { directory visible? }
  547.        subsysop: string[25];   { directory subsysop }
  548.  
  549.        filepath: string[45];   { path to files }
  550.        maxsize: word;          { max number of files allowed }
  551.        autokill: boolean;      { auto kill oldest files }
  552.        readonly: boolean;      { read only dir }
  553.        writeonly: boolean;     { write only dir }
  554.        free: longint;          { free files limit }
  555.        value: integer;         { value multiplier }
  556.        dlattrib: attribset;    { attributes required to download }
  557.  
  558.        pad: array[1..110] of byte;   { pad to 256 bytes }
  559.      end;
  560.  
  561.  
  562.      DirType = record      { File directory record format }
  563.        leaf: treeleaftype;     { tree/list leaf data }
  564.  
  565.        name: string[12];       { filename }
  566.        descrip: string[40];    { description }
  567.        edescrip: array[1..2]
  568.          of string[60];        { extended description }
  569.        spare: byte;            { spare byte }
  570.        length: longint;        { length in 128-char blocks }
  571.        id: longint;            { ID of uploader }
  572.        cksum: integer;         { checksum of uploader }
  573.        date: datetype;         { date uploaded }
  574.        times: longint;         { # of times downloaded }
  575.        passwd: pwtype;         { password }
  576.        offline: boolean;       { flag if file not available }
  577.  
  578.        pad: array[1..41] of byte;    { pad to 256 bytes }
  579.      end;
  580.  
  581.  
  582. (c) Copyright 1992 Searchlight Software
  583.