home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / TGARTS.ZIP / TGDEV309.ZIP / TELEGARD.INC < prev    next >
Text File  |  1997-11-06  |  105KB  |  1,836 lines

  1. {*****************************************************************************}
  2. {*>                                                                         <*}
  3. {*>                     Telegard Bulletin Board System                      <*}
  4. {*>         Copyright 1995,1997 by Tim Strike.  All rights reserved.        <*}
  5. {*>                                                                         <*}
  6. {*>                      Data types and structures                          <*}
  7. {*>                                                                         <*}
  8. {*****************************************************************************}
  9. {*****************************************************************************}
  10. {* ------------- IMPORTANT NOTICE -- PLEASE READ CAREFULLY ----------------- *}
  11. {*****************************************************************************}
  12.  
  13. {                                                         November 5, 1997
  14.  
  15.    Note to all Telegard 3.1 developers:
  16.  
  17.    These structures represent the release structures for 3.09.g1, and 
  18.    subsequently, the preliminary release structures for 3.10.  While there 
  19.    is still some work to be done, we hope that these structures will be 
  20.    very close to the final release structures (another package will be 
  21.    assembled in any event for Telegard 3.10 final release).
  22.    
  23.    PLEASE FEEL FREE TO UPDATE YOUR UTILITIES FOR THE 3.09 GAMMA SERIES; BUT 
  24.    DO NOT PRESUME THEY WILL WORK FOR THE 3.10 SERIES AS CHANGES TO THESE 
  25.    STRUCTURES MIGHT STILL BE REQUIRED.
  26.  
  27.    These structures may be used to modify and create new programs which
  28.    will be compatible with Telegard 3.09.g1.  Enclosed with this structure 
  29.    kit are several documents which outline the various data file formats 
  30.    that Telegard 3.09.g1 uses.  The development documentation, 
  31.    DEVEL309.DOC, has many helpful hints and information regarding most of 
  32.    the data file which Telegard uses -- please read it before attempting to 
  33.    use the data structures.
  34.  
  35.    The structures have been commented as best as possible.  If you need 
  36.    more information on how to use/access data within these structures, 
  37.    please see the accompanying documentation for contact methods.
  38.  
  39.    Thanks for your interest in Telegard 3.1.  Utility developers who wish
  40.    more information regarding distribution should look at the accompanying
  41.    documentation -- there are several helpful areas which should be read.
  42.  
  43.    We can use all the questions, comments and ideas that you can think of.
  44.  
  45.    Thanks,
  46.    Telegard 3.1 Development Team
  47. }
  48.  
  49. {*****************************************************************************}
  50. {* ------------------------ CONSTANT DEFINITIONS --------------------------- *}
  51. {*****************************************************************************}
  52.  
  53. const
  54.  
  55.   TG_VERSION   = $0309;                       { Telegard file level 3.09 }
  56.  
  57.   maxword      = 65535;                       { TP/BP shortcoming . . . }
  58.  
  59.   maxarcs      = 10;                          { archive records  (1..max) }
  60.   maxprotocol  = 26;                          { protocol records (A..Z) }
  61.   maxlevel     = 26;                          { level records (A..Z) }
  62.   maxevents    = 15;                          { scheduled events (0..max) }
  63.                                               {  0 = -X[n] cmd (RESERVED) }
  64.   maxmenucmds  = 75;                          { menu commands    (1..max) }
  65.   maxqueue     = 50;                          { dl queue storage (1..max) }
  66.   numvoteas    = 15;                          { voting answers   (0..max) }
  67.   numvoteqs    = 20;                          { voting questions (1..max) }
  68.   maxfdesclen  = 1250;                        { file description (1..max) }
  69.  
  70.   mJAM         = 1;                           { JAM format }
  71.   mSquish      = 2;                           { Squish format }
  72.  
  73.   mLocal       = 1;                           { Local }
  74.   mNetmail     = 2;                           { Netmail }
  75.   mEchomail    = 3;                           { Echomail }
  76.  
  77.   mPublic      = 1;                           { Public Messages }
  78.   mPrivate     = 2;                           { Private Messages }
  79.   mPubPriv     = 3;                           { Public/Private Messages }
  80.  
  81.   sigNone      = 0;                           { No signatures allowed }
  82.   sigShort     = 1;                           { Short signatures allowed }
  83.   sigLong      = 2;                           { Long signatures allowed }
  84.  
  85.   atNo         = 1;                           { No anonymous allowed }
  86.   atYes        = 2;                           { Anonymous allowed }
  87.   atForced     = 3;                           { Forced anonymous }
  88.   atDearabby   = 4;                           { "Dear Abby" message area }
  89.   atAnyname    = 5;                           { Anyname posting }
  90.   atRealname   = 6;                           { Realname/handle select }
  91.  
  92.                                               { Track anonymous with: }
  93.   atTrackName  = 1;                           { Name (^aREALNAME: kludge) }
  94.   atTrackID    = 2;                           { UserID (From=Anonymous (An####)) }
  95.   atTrackNone  = 3;                           { None (lose poster info) }
  96.  
  97.   fsNone       = 0;                           { File Sorting Constants }
  98.   fsFileName   = 1;                           {   Ascending Sort = positive }
  99.   fsFileDate   = 2;                           {  Descending Sort = negative }
  100.   fsFileSize   = 3;
  101.   fsFilePoints = 4;
  102.   fsULDate     = 5;
  103.   fsFileExt    = 6;
  104.   fsDLDate     = 7;
  105.   fsTimesDL    = 8;
  106.   fsULName     = 9;
  107.  
  108.   logFrontDoor = 0;                           { Logging Style Constants }
  109.   logBinkley   = 1;
  110.  
  111. {*****************************************************************************}
  112. {* -------------------------- TYPE DEFINITIONS ----------------------------- *}
  113. {*****************************************************************************}
  114.  
  115. type
  116.  
  117.   acstring  = string[40];                     { Access Control System string }
  118.   datestring = string[8];                     { date string MM/DD/YY }
  119.   intrange  = array[0..255] of integer;       { security tables - integers }
  120.   byterange = array[0..255] of byte;          { security tables - bytes }
  121.  
  122.   {$IFDEF OS2}                                { Variable definitions, for }
  123.      iostatus = longint;                      { Virtual Pascal & Borland }
  124.      dtimevar = longint;                      { Pascal code compatability }
  125.   {$ELSE}                      
  126.      iostatus = word;
  127.      dtimevar = word;
  128.   {$ENDIF}
  129.  
  130.   unixtime  = longint;                        { unix time stamp - seconds
  131.                                                   since 01/01/70 }
  132.  
  133.   acrq      = '@'..'Z';                       { AR flags }
  134.   acrqs     = set of acrq;                    { AR flags set }
  135.  
  136.   uflag =                                     { user AC flags }
  137.   (
  138.     rlogon,                                   { L - One call per day }
  139.     rchat,                                    { C - Can't page the SysOp }
  140.     rnetmaildel,                              { F - Force Netmail deletion }
  141.     ramsg,                                    { A - Can't post AutoMessage }
  142.     rpostan,                                  { * - Can't post anonymously }
  143.     rpostpvt,                                 { E - Can't post private }
  144.     rpostnet,                                 { N - Can't post NetMail }
  145.     rpost,                                    { P - Can't post at all }
  146.     rvoting,                                  { K - Can't vote }
  147.     rmsg,                                     { M - Force Email deletion }
  148.     rpostecho,                                { G - Can't post EchoMail }
  149.     fnodlratio,                               { 1 - No UL/DL ratio }
  150.     fnopostratio,                             { 2 - No post/call ratio }
  151.     fnofilepts,                               { 3 - No file points checking }
  152.     fnodeletion,                              { 4 - Protection from deletion }
  153.     fnodailyratio,                            { 5 - No daily DL ratio }
  154.     fnodltime,                                { 6 - No DL time check }
  155.     fnopwchange,                              { 7 - No forced pw change }
  156.     ftimepercall,                             { 8 - Time on per call basis }
  157.     fnopwalert                                { 9 - No password alert msg }
  158.   );
  159.   uflags = set of uflag;                      { set of user AC flags }
  160.  
  161.   fulldate =
  162.   record
  163.      month,                                   { month 1..12 }
  164.      day   : byte;                            { day 1..31 }
  165.      year  : word;                            { year 1900..2037 }
  166.   end;
  167.  
  168.   bitmapdate =                                { Bitmapped date format }
  169.   record
  170.      date,                                    { date  5432109876543210 }
  171.                                               {       Y----->M-->D---> }
  172.      time  : word;                            { time  5432109876543210 }
  173.                                               {       H--->M---->S---> }
  174.   end;
  175.  
  176. {*****************************************************************************}
  177. {* ------------------- CONFIGURATION DATA STRUCTURES ----------------------- *}
  178. {*****************************************************************************}
  179.  
  180.   configrec=            { CONFIG.TG : System configuration }
  181.   record
  182.      versionid:word;                          { version (eg $0309 = v3.09) }
  183.  
  184.      datapath,                                { DATA path }
  185.      textpath,                                { TEXT path }
  186.      langpath,                                { LANGUAGES path }
  187.      menupath,                                { MENUS path }
  188.      logspath,                                { LOG path }
  189.      msgpath,                                 { MSGS path }
  190.      semaphore,                               { SEMAPHORE path }
  191.      attachpath,                              { FILE ATTACH path }
  192.      swappath    : string[79];                { SWAP path }
  193.      arcpath,                                 { ARCHIVE path }
  194.      protpath    : string[40];                { PROTOCOL path }
  195.      filepath    : string[79];                { FILE PATH }
  196.      scriptpath  : string[79];                { SCRIPT PATH }
  197.      reserved1   : array[1..40] of byte;      { RESERVED }
  198.  
  199.      bbsname     : string[80];                { BBS name }
  200.      bbsphone    : string[20];                { BBS phone number }
  201.      bbslocation : string[50];                { BBS location }
  202.      sysopname   : string[30];                { SysOp's full name or alias }
  203.      multinode   : boolean;                   { System is Multinode? }
  204.      bulletprefix: string[8];                 { default bulletin prefix }
  205.      highbitinfo : boolean;                   { High-bit in user info? }
  206.      nodecheck   : byte;                      { NodeCheck threshold (s) }
  207.      nodetask    : boolean;                   { node from TASK environment }
  208.                                               {   if -Nnn not specified }
  209.      hiddenPW    : boolean;                   { Passwords are hidden? }
  210.                                               { 1. Always verify passwords
  211.                                               {    against user.pwcrc
  212.                                               { 2. TRUE  user.pwtext='' }
  213.                                               { 3. FALSE check user.pwcrc }
  214.                                               {    if crc(input)=user.pwcrc }
  215.                                               {    then set user.pwtext=pw }
  216.                                               { 4. If changing pw, always }
  217.                                               {    update CRC field -- VERY }
  218.                                               {    important! }
  219.      reserved2   : array[1..4] of byte;       { RESERVED }
  220.      localtimeout: boolean;                   { local timeout logoff? }
  221.      sysoppw     : string[20];                { SysOp PW }
  222.      timeoutbell,                             { minutes before timeout bell }
  223.      timeout,                                 { minutes before timeout logoff }
  224.      backsysoplogs,                           { days to keep SYSOP##.LOG }
  225.      slogtype    : byte;                      { SysOp log type
  226.                                                    0 - File
  227.                                                    1 - Printer
  228.                                                    2 - Both }
  229.      stripclog,                               { strip colors from SysOp log? }
  230.      compressmsgs,                            { compress msg area numbers? }
  231.      compressfiles : boolean;                 { compress file area numbers? }
  232.      slogstyle    : byte;                     { SysOp log style
  233.                                                   0 - FrontDoor
  234.                                                   1 - Binkley }
  235.      reserved2a : array[1..2] of byte;        { RESERVED }
  236.  
  237.      { The following two variables are used for scan record calculation--
  238.      these determine how much space to reserve for each users scan records.
  239.  
  240.          * The resvfileareas/resvmsgareas are the actual values that are
  241.            currently reserved.  THESE TWO VARIABLES SHOULD BE USED FOR ALL
  242.            CALCULATIONS DEALING WITH SCAN RECORDS!  Telegard can only
  243.            support up to resv...areas*8, DO NOT ADD MORE AREAS THAN THIS!
  244.  
  245.      NEITHER VARIABLE SHOULD BE CHANGED BY EXTERNAL UTILITIES!!! }
  246.  
  247.      resvfileareas,                            { Reserved number of areas }
  248.      resvmsgareas  : word;                     { DO NOT CHANGE! }
  249.  
  250.      reserved3    : array[1..92] of byte;     { RESERVED }
  251.  
  252.      audiolowtime,                            { allowed audio hours }
  253.      audiohitime  : word;
  254.      monoscreen,                              { Monochrome screen }
  255.      useems,                                  { use EMS for overlay }
  256.      usebios,                                 { Use BIOS for local video output }
  257.      cgasnow      : boolean;                  { Suppress snow on CGA systems }
  258.      screensize,                              { screen size
  259.                                                    0 - Default/Auto
  260.                                                    1 - 25
  261.                                                    2 - 28 (VGA)
  262.                                                    3 - 43/50 (EGA/VGA) lines }
  263.      wfcblanktime : byte;                     { minutes to blank WFC menu screen }
  264.      printerport  : byte;                     { printer port (1-3) }
  265.      openfiledelay,                           { OpenFile delay b/w attempts }
  266.      openfileatt,                             { OpenFile attempts }
  267.      openfiletimeout,                         { OpenFile timeout message }
  268.      openfileabort : byte;                    { OpenFile timed abort }
  269.      reserved4    : array[1..20] of byte;     { RESERVED }
  270.  
  271.      chatpagelen,                             { Page length in seconds }
  272.      chatattempts,                            { # of chat attempts }
  273.      sysopcolor,                              { SysOp chat colour }
  274.      usercolor    : byte;                     { User chat colour }
  275.      chatreason,                              { Ask for a chat reason? }
  276.      chattime     : boolean;                  { Refund chat time? }
  277.      externalchat : string[79];               { External chat command }
  278.      chatdoortype : byte;                     { Chat door file type:        }
  279.                                               {   0: none       3: WWIV     }
  280.                                               {   1: GAP        4: PcBoard  }
  281.                                               {   2: RBBS-PC                }
  282.      reserved5    : array[1..33] of byte;     { RESERVED }
  283.  
  284.      fseforcedcmd : string[40];               { FSE non-abortable command }
  285.                                               {   empty - use internal }
  286.      fsecmd       : string[40];               { FSE normal post command }
  287.      fsedoortype,                             { FSE door file type:         }
  288.                                               {   0: none       3: WWIV     }
  289.                                               {   1: GAP        4: PcBoard  }
  290.                                               {   2: RBBS-PC                }
  291.      swapshelltype: byte;                     { swap shell type: }
  292.                                               {   0: disk       2: XMS }
  293.                                               {   1: EMS               }
  294.      swaponarchive,                           { swap on archive command }
  295.      swapondoor,                              { swap on door command }
  296.      swapondosshell,                          { swap on DOS shell }
  297.      swaponevent,                             { swap on DOS Shell event }
  298.      swaponfse,                               { swap on full-screen editor }
  299.      swaponsysbat,                            { swap on system batch files }
  300.      swaponxfer,                              { swap on file transfer }
  301.      swapshell    : boolean;                  { swap shell function enabled? }
  302.      envspace     : word;                     { DOS Environment Space }
  303.      reserved6    : array[1..48] of byte;     { RESERVED }
  304.  
  305.      timeallow    : intrange;                 { daily time }
  306.      callallow,                               { daily calls }
  307.      dlratio      : byterange;                { # ULs/# DLs ratios }
  308.      dlkratio     : intrange;                 { DL/UL KB ratios }
  309.      postratio,                               { post/call ratios }
  310.      dailyratio   : byterange;                { daily DL #files ratios }
  311.      dailykratio,                             { daily DL KB ratios }
  312.      timebankmax  : intrange;                 { timebank max limit }
  313.      timedeposit,                             { timebank daily deposit }
  314.      timewithdraw : byterange;                { timebank daily withdraw }
  315.  
  316.      ansitype,                                { ANSI Logon -
  317.                                                    0  Ask
  318.                                                    1  Detect
  319.                                                    2  Force NO
  320.                                                    3  Force YES }
  321.      lastcallers,                             { days of last callers }
  322.      maxlogontries,                           { tries for PW's at logon }
  323.      maxlogonmins : byte;                     { minutes allowed for logon }
  324.      allowalias,                              { allow aliases? (handles) }
  325.      datapw,                                  { data phone # password }
  326.      voicepw,                                 { voice phone # password }
  327.      localsec,                                { is local security ON? }
  328.      displaysec,                              { is local screen-security ON? }
  329.      globaltrap,                              { trap ALL USER'S activity? }
  330.      autochatopen,                            { auto open chat capture? }
  331.      languagefirst: boolean;                  { language selection first? }
  332.      reserved6a   : byte;
  333.      lcallinlogon : byte;                     { "Last Calls" list in logon? }
  334.      reserved7    : byte;                     { RESERVED }
  335.      offhooklocallogon,                       { phone off-hook for local? }
  336.      forcevoting,                             { logon voting mandatory? }
  337.      iemsi,                                   { allow IEMSI logons }
  338.      checkmulti   : boolean;                  { check for mutliple logons }
  339.      reserved8    : array[1..41] of byte;     { RESERVED }
  340.      logonmenu,                               { logon menu to start users on }
  341.      watcharea,                               { area for pw attempt warnings }
  342.      inquiryarea  : string[8];                { area for forgotten pw inquiry }
  343.      passdays     : word;                     { # of days to change password }
  344.      updatelocal  : boolean;                  { local calls in statistics }
  345.      timeleftbank : boolean;                  { timebank prompt w/no time? }
  346.      minbaud,                                 { minimum logon baudrate }
  347.      graphicsbaud : longint;                  { minimum graphics baudrate }
  348.      reserved9    : array[1..63] of byte;     { RESERVED }
  349.  
  350.      newapp       : string[36];               { new user letter to user }
  351.      opensystem,                              { allow new users? }
  352.      newiemsi     : boolean;                  { Allow IEMSI new user logons }
  353.      linelen,                                 { default video line length }
  354.      pagelen,                                 { default video page length }
  355.      datefmt,                                 { date format - 0 ASK }
  356.      scanphone    : byte;                     { Scan for duplicate phone #'s }
  357.                                               {    0-No, 1-Log, 2-Email&Log }
  358.      autopassword : boolean;                  { Allow auto-created pw's }
  359.      language     : string[8];                { Default language, ''  Ask }
  360.      ansi,                                    { ANSI               0  Ask }
  361.      avatar,                                  { Avatar             1  Yes }
  362.      clrscr,                                  { Clear Screen       2  No }
  363.      pause,                                   { Screen Pause }
  364.      hotkeys,                                 { Hotkeys }
  365.      fse          : byte;                     { Full Screen Editor }
  366.      mailaddress,                             { Ask for Mail Address }
  367.      gender,                                  {         Gender }
  368.      dataph,                                  {         Data Phone }
  369.      voiceph,                                 {         Voice Phone }
  370.      dob          : boolean;                  {         Date of Birth }
  371.      newuserlevel : char;                     { New User level }
  372.      flinput      : byte;                     { Full-line input   0 Ask }
  373.                                               {                   1 Yes }
  374.                                               {                   2 No }
  375.      countryinput : byte;                     { Country input   0 Ask }
  376.                                               {                 1 U.S. }
  377.                                               {                 2 Canada }
  378.                                               {                 3 Int'l }
  379.      killcolor    : boolean;                  { Strip colour from entry fields }
  380.      reserved10   : array[1..30] of byte;     { RESERVED }
  381.      crosspost    : acstring;                 { Cross post message }
  382.    
  383.      batchfileext : string[3];                { batch filename extension }
  384.      os2cmdfileext : string[3];               { cmd filename extension }
  385.      reserved11   : array[1..28] of byte;     { RESERVED }
  386.  
  387.      minspaceforpost: word;                   { minimum drive space to post }
  388.      emaillist,                               { allow email user listing? }
  389.      smartquote,                              { use smartquote features? }
  390.      quickquote    : boolean;                 { use quickquote features? }
  391.      ccmail,                                  { carbon copy messages }
  392.      creq,                                    { request confirm receipt }
  393.      fileattach,                              { attach file - non-netmail }
  394.      normpubpost,                             { post public messages }
  395.      normprivpost,                            { post private messages }
  396.      normnetpost,                             { post netmail messages }
  397.      nopostratio,                             { no post/call ratio }
  398.      anonpubread,                             { see who posted public anon }
  399.      anonprivread,                            { see who posted private anon }
  400.      anonpubpost,                             { post anon public messages }
  401.      anonprivpost  : acstring;                { post anon private messages }
  402.      netconfirm,                              { honour confirmation request }
  403.      msguploads,                              { allow upload of messages }
  404.      nodelookup    : boolean;                 { allow nodelist lookup }
  405.      fileattachnet : acstring;                { attach file - netmail }
  406.      antiqueUUCP   : boolean;                 { antique UUCP; UUCP in header,
  407.                                                    TO: in message }
  408.      writescanlog  : string[40];              { path to ECHOMAIL.JAM/NETMAIL.JAM }
  409.      checkfsesave,                            { check fse save }
  410.      addREtoreply  : boolean;                 { add RE: to replies }
  411.      quotewarning,                            { quote % for warning }
  412.      quotemaximum  : byte;                    { quote % to deny save }
  413.      reserved13    : array[1..12] of byte;    { RESERVED }
  414.  
  415.      sop,                                     { SysOp }
  416.      csop,                                    { Co-SysOp }
  417.      spw           : acstring;                { SysOp PW at logon }
  418.  
  419.      wfc           : array[1..15] of byte;    { WFC Menu Colours }
  420.      heartbeat     : boolean;                 { WFC "Heartbeat" }
  421.      reserved14    : array[1..25] of byte;    { RESERVED }
  422.  
  423.      qwkpktname,                              { packet name }
  424.      qwkwelcomefile,                          { BBS welcome file }
  425.      qwknewsfile,                             { BBS news file }
  426.      qwkgoodbyefile: string[8];               { BBS goodbye file }
  427.      qwklocaldlpath,                          { local QWK download path }
  428.      qwklocalulpath : string[40];             { local REP upload path }
  429.      reserved15   : array[1..41] of byte;     { RESERVED }
  430.      qwkmaxmsgs   : word;                     { max messages to DL (0=unlim) }
  431.      qwkarc       : string[3];                { default archive }
  432.      qwkextctrl   : boolean;                  { extended CONTROL.DAT info }
  433.      qwknewsgen   : string[60];               { news program }
  434.      qwkfilesgen  : string[60];               { new files program }
  435.      qwknews,                                 { include news       0 Ask }
  436.      qwkwelcome,                              { include welcome    1 Yes }
  437.      qwkgoodbye,                              { include goodbye    2 No  }
  438.      qwknewfiles,                             { include new files list }
  439.      qwksession   : byte;                     { include session texts }
  440.  
  441.      reserved16   : array[1..53] of byte;     { RESERVED }
  442.  
  443.      seeunavail   : acstring;                 { see unavailable files ACS }
  444.      highbitdesc  : boolean;                  { allow high-bit in desc? }
  445.      ularea       : string[8];                { default UL area }
  446.      showulname   : boolean;                  { Show upload name }
  447.      reserved16a  : array[1..41] of byte;     { RESERVED }
  448.      filetest     : byte;                     { file upload test type }
  449.                                               {    0 : none }
  450.                                               {    1 : archive integrity }
  451.                                               {    2 : upload processor }
  452.      filepwacs    : acstring;                 { acs for users to add pw }
  453.      truncdesc    : boolean;                  { truncate file_id/testinfo }
  454.                                               {   imported descriptions }
  455.      drive_tblupd : byte;                     { CD-ROM drive table update }
  456.                                               {     0 : every call }
  457.                                               { 1-254 : once every n hours }
  458.                                               {   255 : never }
  459.      searchdup,                               { search for dupe filenames }
  460.      globaldl,                                { global downloads }
  461.      allowdldesc,                             { allow description download }
  462.      importfileid,                            { import file descriptions }
  463.      nodupeext,                               { no check of extension on dupe files }
  464.      cdlabelupd   : boolean;                  { CD-ROM label auto update paths - Global Toggle }
  465.      unlistfp,                                { file points for unlisted DLs }
  466.      ulrefund,                                { percent time refund for ULs }
  467.      dlchecktype  : byte;                     { DL checking (0=off,1=UL/DL,2=points) }
  468.      maxintemp,                               { max KB allowed in TEMP\ARC\ }
  469.      minspaceul,                              { minimum KB drive space left to upload }
  470.      ulfpkbyte,                               { UL K-bytes per file point }
  471.      ulfpforfile,                             { UL # points assigned to file }
  472.      ulfpforuser  : word;                     { UL # points assigned to user }
  473.      sysopularea  : string[8];                { file area for SysOp uploads }
  474.      seeunval,                                { see unvalidated files }
  475.      dlunval,                                 { DL unvalidated files }
  476.      ulvalreq     : acstring;                 { UL validated not-required }
  477.      virusscanner : string[80];               { Virus Scanner Command }
  478.      passederrlvl : byte;                     { Passed Scanner Errorlevel }
  479.      gifspectype  : byte;                     { Gifspec type   0 Last line }
  480.                                               {                1 Before* }
  481.                                               { * old method, desc is }
  482.                                               { truncated if necessary }
  483.      useTESTINFO  : boolean;                  { import TESTINFO.DAT -- if }
  484.                                               { virus scanner creates it }
  485.      testpath     : string[40];               { path to TESTINFO.DAT }
  486.      textview     : boolean;                  { allow text w/archive view }
  487.      pausebefore  : boolean;                  { pause list before next dir }
  488.      dlunavail    : acstring;                 { dl unavailable (failed) files }
  489.      reserved17   : array[1..1536] of byte;   { RESERVED }
  490.   end;
  491.  
  492.   systemrec=            { SYSTEM.DAT : System operational variables }
  493.   record
  494.      usereditlvl,                             { type of user editor }
  495.                                               {    0..2 - Short..Long }
  496.      curwindow    : byte;                     { type of SysOp window }
  497.      istopwindow  : boolean;                  { SysOp window on top? }
  498.      callernum    : longint;                  { total number of callers }
  499.      windowon     : boolean;                  { is SysOp window on? }
  500.      reserved     : array[1..400] of byte;    { RESERVED }
  501.   end;
  502.  
  503. {*****************************************************************************}
  504. {* ------------------------ USER DATA STRUCTURES --------------------------- *}
  505. {*****************************************************************************}
  506.  
  507.   userstat=             { USERS.DAT status flags }
  508.   (
  509.      lockedout,                               { if locked out }
  510.      udeleted,                                { if deleted }
  511.      trapactivity,                            { if trapping users activity }
  512.      trapseparate,                            { if trap to separate TRAP file }
  513.      chatauto,                                { if auto chat trapping }
  514.      chatseparate,                            { if separate chat file to trap to }
  515.      slogseparate,                            { if separate SysOp log }
  516.      alert                                    { alert SysOp when user logs on }
  517.   );
  518.   userstatus = set of userstat;
  519.  
  520.   userflag=             { USERS.DAT user flags }
  521.   (
  522.      newusermsg,                              { sent newuser message }
  523.      clsmsg,                                  { clear screen before messages }
  524.      flinput,                                 { full line input }
  525.      hotkey,                                  { menu hotkeys active }
  526.      pause,                                   { pause }
  527.      novice,                                  { user is at novice help level }
  528.      hiddenlog,                               { not displayed in call/online listings }
  529.      hiddenlist                               { not displayed in user listings }
  530.   );
  531.   userflags = set of userflag;
  532.  
  533.   userrec=              { USERS.DAT : User account records }
  534.   record
  535.      name,                                    { user name }
  536.      realname   : string[36];                 { real name }
  537.      street,                                  { mailing address }
  538.      location   : string[30];                 { city, province }
  539.      postalcode : string[10];                 { postal code }
  540.      voiceph,                                 { voice phone # }
  541.      dataph     : string[20];                 { data phone # }
  542.  
  543.      pwtext     : string[20];                 { user password }
  544.  
  545.      { DEVELOPERS NOTE:  The pwtext field *may* be empty.  Please observe
  546.      the following when updating passwords:
  547.  
  548.         1. All password input is UPPERCASE
  549.         2. If ConfigRec.HiddenPW = TRUE, then only the CRC32 of the password
  550.            is stored in the user record (userrec.crcpw).
  551.         3. If ConfigRec.HiddenPW = FALSE, both the CRC32 and the actual
  552.            password are stored in the user record.
  553.        *4. When checking input passwords against the file, only the CRC32
  554.            value should be tested (the pwtext may or may not be correct).
  555.            If ConfigRec.HiddenPW = FALSE, and the pwtext field is EMPTY,
  556.            then after a correct password the field will be automatically
  557.            updated.  If ConfigRec.HiddenPW = TRUE, the pwtext will *not* be
  558.            updated (this is obvious).
  559.        *5. Passwords should *only* be displayed (pwtext) if the CRC32 of
  560.            the pwtext field *matches* the pwcrc field.  Otherwise, the
  561.            pwtext field is likely incorrect.  When changing passwords, the
  562.            user should be prompted only, not shown their previous password.
  563.      }
  564.  
  565.      lastdate   : unixtime;                   { laston date/time }
  566.      firstdate,                               { firston date }
  567.      pwdate,                                  { last date of pw change }
  568.      birthdate  : datestring;                 { birth date }
  569.      gender     : char;                       { gender - M/F }
  570.      subdate,                                 { subscription started }
  571.      expiredate : datestring;                 { subscription expires }
  572.      expireto   : char;                       { expire to level A..Z,
  573.                                                   !=Delete }
  574.      comment    : string[40];                 { SysOp comment on User }
  575.      notes      : array[1..3] of              { SysOp definable variables }
  576.                   string[40];
  577.      lockfile   : string[8];                  { lockout msg to print }
  578.  
  579.      pwcrc      : longint;                    { CRC-32 of user password }
  580.  
  581.      reserved1  : array[1..14] of byte;       { RESERVED }
  582.      ugraphics  : byte;                       { user graphics protocol }
  583.                                               {   0 : TTY - no fallback }
  584.                                               {   1 : ANSI   }
  585.                                               {   2 : Avatar }
  586.                                               {   3 : RIP    }
  587.      fallback   : byte;                       { 2nd fallback protocol }
  588.                                               {   1 : ANSI   }
  589.                                               {   2 : Avatar }
  590.                                               {   3 : RIP    }
  591.                                               { 3rd TTY }
  592.      linelen,                                 { line length (# cols) }
  593.      pagelen    : byte;                       { page length (# rows) }
  594.      flags      : userflags;                  { flags (see above) }
  595.      status     : userstatus;                 { status (see above) }
  596.      reserved2  : byte;                       { RESERVED }
  597.  
  598.      sl         : byte;                       { SL }
  599.      ac         : uflags;                     { user flags }
  600.      aflags1,                                 { Access flags - Set 1 }
  601.      aflags2    : acrqs;                      { Access flags - Set 2 }
  602.      userID     : longint;                    { unique User-ID - THIS VALUE
  603.                                                 SHOULD NOT BE CHANGED BY
  604.                                                 ANY PROGRAM }
  605.      level      : char;                       { current validation level }
  606.      datefmt    : byte;                       { Date Format }
  607.                                               {   0 - MM/DD/YY }
  608.                                               {   1 - DD/MM/YY }
  609.                                               {   2 - YY/MM/DD }
  610.      reserved7  : char;                       { RESERVED }
  611.      macroptr   : longint;                    { pointer for MACROS.DAT
  612.                                                   -1 = none }
  613.      votedate   : unixtime;                   { last vote }
  614.      reserved3  : array[1..13] of byte;       { RESERVED }
  615.  
  616.      sigptr     : longint;                    { pointer for SIGS.DAT
  617.                                                   -1 = none }
  618.      lastgroup  : char;                       { last group 1 (main) }
  619.      lastmsg,                                 { last message area # }
  620.      pubpost,                                 { # public posts }
  621.      privpost,                                { # private posts }
  622.      netpost    : word;                       { # netmail posts }
  623.      mailbox    : string[36];                 { mailbox status
  624.                                                   ''        Open/Normal
  625.                                                   'CLOSED'  Closed
  626.                                                   Username  Forwarded to... }
  627.      credit,                                  { Netmail points (credit) }
  628.      debit      : longint;                    { Netmail points (debit) }
  629.      fsetype    : byte;                       { FSE usage (0=never,1=always,2=ask) }
  630.  
  631.      reserved4  : array[1..32] of byte;       { RESERVED }
  632.  
  633.      qwkarc     : string[3];                  { QWK default archiver }
  634.      qwkfromyou,                              { bundle from user }
  635.      qwkbwctrl,                               { create BW control file }
  636.      qwknews,                                 { include news }
  637.      qwkwelcome,                              { include welcome }
  638.      qwkgoodbye,                              { include goodbye }
  639.      qwknewfiles,                             { include new files list }
  640.      qwkpointer,                              { include pointer file }
  641.      qwksession : boolean;                    { include session listing }
  642.      reserved5  : array[1..22] of byte;       { RESERVED }
  643.  
  644.      lastfgroup : char;                       { last group 2 (file) }
  645.      defprotocol: char;                       { default protocol (A-Z) }
  646.                                               {   ! Select at download time }
  647.      lastfile,                                { last file area # }
  648.      uploads,                                 { amount ULed (files) }
  649.      downloads,                               { amount DLed (files) }
  650.      todaydl    : word;                       { amount DLed today (files) }
  651.      uk,                                      { amount ULed (kbytes) }
  652.      dk,                                      { amount DLed (kbytes) }
  653.      todaydk,                                 { amount DLed today (kbytes) }
  654.      filepoints : longint;                    { file points remaining }
  655.  
  656.      totaltime  : longint;                    { total time on system }
  657.      timebank,                                { # mins in Time Bank }
  658.      totalcalls : word;                       { total calls to system }
  659.      tltoday,                                 { time left today }
  660.      tbtoday    : integer;                    { bank activity +/- time }
  661.      todaycalls,                              { calls to system today }
  662.      illegal    : byte;                       { illegal logons }
  663.      vote       : array[1..numvoteqs]         { voting information }
  664.                      of byte;
  665.      language   : string[8];                  { language }
  666.      reserved6  : byte;                       { RESERVED}
  667.   end;
  668.  
  669.   useridxrec=           { USERS.IDX : Sorted names listing }
  670.   record
  671.      name   : string[36];                     { user name/handle }
  672.      number : integer;                        { user record # }
  673.                                               {    -1 = Deleted }
  674.   end;
  675.  
  676.   IDidxrec=             { USERID.IDX : Sorted ID listing }
  677.   record
  678.      userID : longint;                        { User-ID from user record }
  679.      number : integer;                        { user record # }
  680.                                               {    -1 = Deleted }
  681.   end;
  682.  
  683. {*****************************************************************************}
  684. {* ------------------------ AREA DATA STRUCTURES --------------------------- *}
  685. {*****************************************************************************}
  686.  
  687.   areaidxrec=           { FAREAS.IDX/MAREAS.IDX: Area index records }
  688.   record
  689.      name   : string[8];                      { area filename }
  690.      number : integer;                        { area record # }
  691.                                               {    -1 = Deleted }
  692.   end;
  693.  
  694.   { 
  695.      FSCAN.DAT/MSCAN.DAT: Area scan records
  696.    
  697.      The area scan records are a sequential bitplane; the offset to any 
  698.      given user is (userid-1)*(systat.resv...areas).  The bitplane is then 
  699.      stored in systat.resv...areas sequential bytes.  So, to find the msg 
  700.      scan records for userid N, the following is done:
  701.   
  702.         open MSCAN.DAT;
  703.         if (N-1)*(systat.resvmsgareas) < filesize
  704.            seek (N-1)*(systat.resvmsgareas);
  705.            read bitplane,systat.resvmsgareas;
  706.         else
  707.            // record does not exist
  708.         endif
  709.         close MSCAN.DAT
  710.       
  711.      NOTE: The user may not have any scan records stored if they are a new 
  712.      user and have not successfully completed a full login.
  713.   }
  714.  
  715. {*****************************************************************************}
  716. {* ---------------------- FILE AREA DATA STRUCTURES ------------------------ *}
  717. {*****************************************************************************}
  718.  
  719.   fareaflags=           { FAREAS.DAT status flags }
  720.   (
  721.      fbnoratio,                               { < No Ratio > active }
  722.      fbvisible,                               { Visible to users w/o access }
  723.      fbdrvltrcdlbl,                           { translate file path letter }
  724.                                               { on bootup based on CDROM }
  725.                                               { labels in CDROM drives and }
  726.                                               { area CDROM label }
  727.      fbcdrom,                                 { CD-ROM/read-only media }
  728.      fbusegifspecs                            { whether to use GifSpecs }
  729.   );
  730.  
  731.   { Telegard can only support up to resv...areas*8 areas -- do not attempt
  732.     to allocate more areas -- Telegard will not see them, and subsequently
  733.     not use them!  If utility authors hit the maximum number of areas
  734.     they should present a warning that the SysOp must adjust the internal
  735.     maximum (Telegard supports up to 32678 areas)--utilities should *not*
  736.     do this otherwise the indexing will be damaged! }
  737.  
  738.   farearec=             { FAREAS.DAT : File area records }
  739.   record
  740.      desc        : string[40];                 { area description }
  741.      filename,                                 { filename }
  742.      infofile    : string[8];                  { info filename }
  743.      path        : string[40];                 { path }
  744.      arctype     : string[3];                  { archive (''=inactive) }
  745.      reserved1   : byte;                       { RESERVED }
  746.      fstatus     : set of fareaflags;          { file area status }
  747.      sysopacs,                                 { SysOp access }
  748.      listacs,                                  { list/view access }
  749.      nameacs,                                  { see uploader name access }
  750.      ulacs,                                    { upload access }
  751.      dlacs       : acstring;                   { download access }
  752.      scantype    : byte;                       { scan type  0 = Default ON
  753.                                                             1 = Default OFF
  754.                                                             2 = Always }
  755.      cdlabel     : string[11];                 { CD-ROM label }
  756.      createdate  : unixtime;                   { area creation date }
  757.      filepath    : string[40];                 { *.FA? storage path }
  758.      primaryfs,                                { primary file sorting order }
  759.      secondaryfs : shortint;                   { secondary " " }
  760.  
  761.      reserved2  : array[1..40] of byte;       { RESERVED }
  762.   end;
  763.  
  764.   { Extra notes on QFILES.IDX:
  765.      1) To delete a record, toggle the 'deleted' flag
  766.      2) To insert a record, ensure there is no OTHER matching filename &
  767.         filearea that is *not* deleted (if it is deleted, IGNORE IT) --
  768.         if one exists, then do not add another record, otherwise append to
  769.         the end
  770.      3) Read DEVELnnn.DOC for further information on the index!
  771.   }
  772.  
  773.   fileidxstat = (
  774.      fnDeleted                                { index is deleted? }
  775.   );
  776.  
  777.   fileidxrec=           { QFILES.IDX: File index record }
  778.   record
  779.      filename   : string[12];                 { filename [key] }
  780.      filearea   : longint;                    { filearea [key] }
  781.      status     : set of fileidxstat;         { status bits }
  782.   end;
  783.  
  784.   fbstat=               { *.FA status flags }
  785.   (
  786.      freedl,                                  { if file is free }
  787.      notime,                                  { if file is time check free }
  788.      validated,                               { if file is validated }
  789.      available,                               { if file is available - will }
  790.                                               {    be toggled FALSE only }
  791.                                               {    if failed by filescan }
  792.      offline,                                 { if file is offline }
  793.      hatch                                    { if file hatched via SDS }
  794.   );
  795.  
  796.   fbrec=                { *.FA : File records }
  797.   record
  798.      filename    : string[12];                { filename }
  799.      descofs     : longint;                   { offset of file desc }
  800.      desclength  : word;                      { length of description }
  801.                                               {  - does not include 13 }
  802.                                               {    byte filename ID }
  803.      size        : longint;                   { length of file (bytes) }
  804.      uldate,                                  { date uploaded }
  805.      filedate,                                { date on file }
  806.      dldate      : unixtime;                  { date last downloaded }
  807.      filestatus  : set of fbstat;             { file status }
  808.      filepoints,                              { points }
  809.      downloads   : word;                      { number downloads }
  810.      uploader    : string[36];                { uploader's name }
  811.      passwordCRC : longint;                   { CRC of password to dl }
  812.      reserved1   : array[1..12] of byte;      { RESERVED }
  813.   end;
  814.  
  815.  { The description is stored in a continuous character file--the
  816.    description for a file can be found by searching to the description
  817.    offset and reading a 13 byte signature, then the description of
  818.    the appropriate length.  If the 13 byte signature does NOT match the
  819.    filename field, then the description is invalid }
  820.  
  821.   driverec=             { DRIVES.DAT : CDROM/Network label storage }
  822.   record
  823.      update    : unixtime;                    { last update }
  824.      disktype  : array[0..25] of byte;        { drive type }
  825.                                               { 0-2: None, Floppy, HD }
  826.                                               {  3 - CDROM }
  827.                                               {  4 - Network }
  828.      disklabel : array[0..25] of string[11];  { drive labels }
  829.   end;
  830.  
  831.   queuerec=             { *.QQQ transfer queue record }
  832.   record
  833.      filename   : string[12];                 { filename }
  834.      filearea   : longint;                    { file area # }
  835.      descofs    : longint;                    { desc offset in *.QQD }
  836.      desclength : word;                       { desc length }
  837.      path       : string[55];                 { path of file }
  838.      points     : integer;                    { # file points }
  839.      filesize   : longint;                    { filesize (bytes) }
  840.      freeratio,                               { file is FREE ratio }
  841.      freetime   : boolean;                    { file is FREE time }
  842.      readonly   : boolean;                    { file on read-only media }
  843.   end;
  844.  
  845. {*****************************************************************************}
  846. {* -------------------- MESSAGE AREA DATA STRUCTURES ----------------------- *}
  847. {*****************************************************************************}
  848.  
  849.   mareaflags=           { MAREAS.DAT status flags }
  850.   (
  851.      mbrealname,                              { real names are forced }
  852.      mbvisible,                               { visible to users w/o access }
  853.      mbansi,                                  { filter ANSI }
  854.      mb8bit,                                  { filter 8-bit }
  855.      mbstrip,                                 { strip center/title codes }
  856.      mbaddtear,                               { add tear/origin lines }
  857.      mbnopubstat,                             { messages not added to user }
  858.                                               {   public post total - i.e. }
  859.                                               {   will not calculate in PCR }
  860.      mbnocredit,                              { Netmail credit not used }
  861.      mbinternet,                              { Internet (UUCP) handling }
  862.      mbfattach,                               { allow file attaches }
  863.      mbstripcolour,                           { strip TG colour codes }
  864.      mbareasubj                               { add AREA: to subject line }
  865.   );
  866.  
  867.   {
  868.      WARNINGS:
  869.       1) Telegard can only support up to resv...areas*8 areas -- do not
  870.          attempt to allocate more areas -- Telegard will not see them, and
  871.          subsequently not use them!  If utility authors hit the maximum
  872.          number of areas they should present a warning that the SysOp must
  873.          adjust the internal maximum (Telegard supports up to 32678
  874.          areas)--utilities should *not* do this otherwise the indexing will
  875.          be damaged!
  876.       2) If you add, delete or reposition any areas, you *must* update the
  877.          scan records appropriately.  If you need assistance, please ask.
  878.   }
  879.  
  880.   marearec=             { MAREAS.DAT : Message area records }
  881.   record
  882.      name,                                    { message area description }
  883.      msgpath    : string[40];                 { messages pathname }
  884.      filename,                                { data filenames }
  885.      infofile   : string[8];                  { area info filename }
  886.      readacs,                                 { read access }
  887.      postacs,                                 { post access }
  888.      sysopacs,                                { SysOp access }
  889.      netacs     : acstring;                   { network access }
  890.      maxmsgs,                                 { max message count }
  891.      maxdays    : word;                       { max days to keep messages }
  892.      mstatus    : set of mareaflags;          { status }
  893.      mbformat,                                { message area format }
  894.      mbtype,                                  { message area type }
  895.      anonymous,                               { anonymous type }
  896.      mbpost     : byte;                       { message area posting type }
  897.      origin     : string[50];                 { origin line }
  898.      kludge_color,                            { color of kludge line }
  899.      quote_color,                             { color of quoted line }
  900.      tear_color,                              { color of tear line }
  901.      origin_color,                            { color of origin line }
  902.      addr,                                    { network addr (0:AKA) }
  903.      scantype   : byte;                       { scan type  0 = Default ON
  904.                                                            1 = Default OFF
  905.                                                            2 = Mandatory }
  906.      createdate : unixtime;                   { area creation date }
  907.      qwkindex   : longint;                    { QWK-permanent index }
  908.      text_color : byte;                       { color of text line }
  909.      anontrack  : byte;                       { anonymous tracking }
  910.      sigtype    : byte;                       { signature usage }
  911.      reserved   : array[1..38] of byte;       { RESERVED }
  912.   end;
  913.  
  914.   qwkidxrec=            { QWK.IDX : QWK message area index }
  915.   record
  916.      areanum : integer;                       { QWK area number }
  917.      areatag : string[8];                     { message area filename }
  918.   end;
  919.  
  920.   qptrrec=              { packetid.QPT : QWK lastread pointer record }
  921.   record
  922.      areanum  : integer;                      { QWK area number }
  923.      lastread : longint;                      { last read pointer }
  924.   end;
  925.  
  926. {*****************************************************************************}
  927. {* ----------------------- OTHER DATA STRUCTURES --------------------------- *}
  928. {*****************************************************************************}
  929.  
  930.   menuflag=            { Menu header status flags }
  931.   (
  932.      clrscrbefore,                            { C: clrscr before menu? }
  933.      dontcenter,                              { D: don't center titles! }
  934.      forcefullline,                           { F: force full line input }
  935.      nomenuprompt,                            { N: no menu prompt }
  936.      forcepause,                              { P: force pause before menu? }
  937.      autotime,                                { T: auto time display? }
  938.      dontcentersub,                           { S: don't center subtitles! }
  939.      forcekey                                 { K: force key input }
  940.   );
  941.   menuflagset= set of menuflag;
  942.  
  943.   menuflag2=            { Extended menu header status flags }
  944.   (
  945.      notrailingcr,                            { R: no CR after prompt }
  946.      noleadingcr                              { L: no CR before prompt }
  947.   );
  948.   menuflag2set= set of menuflag2;
  949.  
  950.   menurec=              { *.MNU : Menu header }
  951.   record
  952.      menutitle : array[1..3] of               { menu header }
  953.                        string[100];
  954.      dispfile,                                { help file displayed }
  955.                                               {   ''       Generic }
  956.      helpfile  : string[12];                  { tutorial help file }
  957.                                               {   ''       Generic }
  958.                                               {   '*OFF*'  Disabled }
  959.      prompt    : string[120];                 { menu prompt }
  960.      menuacs   : acstring;                    { access requirements }
  961.      password  : string[15];                  { password required }
  962.      fallback  : string[8];                   { fallback menu }
  963.      helplevel,                               { forced help level for menu }
  964.      columns   : byte;                        { generic menu: # of columns }
  965.      colours   : array[1..6] of byte;         { generic menu: colours }
  966.      menuflags : menuflagset;                 { menu status flags }
  967.      global    : boolean;                     { load global menu }
  968.      menuflag2 : menuflag2set;                { menu extended status flags }
  969.      reserved1 : byte;                        { RESERVED }
  970.      nodestat  : string[36];                  { Who's Online Status }
  971.      reserved2 : array[1..10] of byte;        { RESERVED }
  972.   end;
  973.  
  974.   commandrec=           { *.MNU : Command records }
  975.   record
  976.      ldesc     : string[70];                   { long description }
  977.      sdesc     : string[35];                   { short description }
  978.      reserved  : string[15];                   { RESERVED }
  979.      keys      : string[14];                   { execute keys }
  980.                                                {   'AUTOEXEC' = Exec. Menu Display }
  981.                                                {   'FIRSTCMD' = Exec. Menu Loaded }
  982.                                                {   'SUBHEADER' = Subheader }
  983.                                                {   'ENTER' = <ENTER> }
  984.                                                {   'SPACE' = <SPACEBAR> }
  985.                                                {   'ESC' = <ESC> }
  986.                                                {   'TAB' = <TAB> }
  987.      acs       : acstring;                     { access requirements }
  988.      cmdtype   : string[2];                    { command type }
  989.      options   : string[50];                   { command options }
  990.      viewtype  : byte;                         { display of command }
  991.                                                {    0  ACS dependent }
  992.                                                {    1  Always visbile }
  993.                                                {    2  Always hidden }
  994.   end;
  995.  
  996. {*---------------------------------------------------------------------------*}
  997.  
  998.   bbslistrec=           { *.BBS : BBS Listings }
  999.   record
  1000.      phone          : string[20];             { BBS Phone Number }
  1001.      name,                                    { BBS Name }
  1002.      sysop          : string[30];             { BBS SysOp Name }
  1003.      description    : string[30];             { Other Description }
  1004.      speed          : string[4];              { Speed }
  1005.      software       : string[8];              { Software }
  1006.      firstdate,                               { First date added }
  1007.      lastedit       : unixtime;               { Last date edited }
  1008.      editor         : string[36];             { entry editor }
  1009.   end;
  1010.  
  1011. {*---------------------------------------------------------------------------*}
  1012.  
  1013.   archiverec=           { ARCHIVE.DAT : Archiver Setup }
  1014.   record
  1015.      active      : boolean;                   { is this format active? }
  1016.      extension   : string[3];                 { archive extension }
  1017.      description,                             { archiver description }
  1018.      compress,                                { pack archive command }
  1019.      decompress,                              { unpack archive command }
  1020.      test,                                    { test archive command }
  1021.      view,                                    { view archive command }
  1022.                                               {   ''=internal (if avail) }
  1023.      comment     : string[50];                { comment archive command }
  1024.      success     : byte;                      { success errorlevel }
  1025.      viewcapture : boolean;                   { redirect external viewer }
  1026.      reserved    : array[1..34] of byte;      { RESERVED }
  1027.   end;
  1028.  
  1029. {*---------------------------------------------------------------------------*}
  1030.  
  1031.   { GROUPS.DAT contains two group records -- the main groups, and the file
  1032.   groups, stored sequentially in the file (one confrec after another) }
  1033.  
  1034.   confrec=              { GROUPS.DAT : Group data }
  1035.   array['@'..'Z'] of
  1036.   record
  1037.      acs      : acstring;                     { ACS requirement }
  1038.      name     : string[40];                   { name of conference }
  1039.      visible  : boolean;                      { visible w/o ACS }
  1040.      reserved : array[1..20] of byte;         { RESERVED }
  1041.   end;
  1042.  
  1043. {*---------------------------------------------------------------------------*}
  1044.  
  1045.   eventflags=           { EVENTS.DAT status flags }
  1046.   (
  1047.      active,                                  { event is active }
  1048.      busyduring,                              { phone off-hook during event }
  1049.      monthly,                                 { event is executed monthly }
  1050.      forced                                   { event is forced }
  1051.   );
  1052.  
  1053.   eventrec=             { EVENTS.DAT : Scheduled event records }
  1054.   array[0..maxevents] of
  1055.      record
  1056.      flags    : set of eventflags;            { status flags }
  1057.      desc     : string[30];                   { description }
  1058.      etype    : char;                         { event type:
  1059.                                                  A:ACS,
  1060.                                                  C:Chat,
  1061.                                                  E:External,
  1062.                                                  O:OS }
  1063.      execdata : string[40];                   { event data:
  1064.                                                  ACS:  ACS command
  1065.                                                  OS:   OS command
  1066.                                                  Exit: ERRORLEVEL for exit }
  1067.      exectime,                                { execution time (minutes) }
  1068.      duration : word;                         { event duration (minutes) }
  1069.      execdays : byte;                         { monthly: day (1-28)
  1070.                                                   daily: days (bitwise) }
  1071.      lastexec : unixtime;                     { date event last executed }
  1072.      execnode : word;                         { affected nodes (0=all) }
  1073.   end;
  1074.  
  1075. {*---------------------------------------------------------------------------*}
  1076.  
  1077.   historyrec =          { HISTORY.DAT : History logs }
  1078.   record
  1079.      date      : datestring;                  { history date }
  1080.      userbaud  : array[0..25] of word;        { logon BPS rates   }
  1081.                                               {    0 - Local   11 - 19200  }
  1082.                                               {    1 - 300     12 - 21600  }
  1083.                                               {    2 - 1200    13 - 24000  }
  1084.                                               {    3 - 1275    14 - 26400  }
  1085.                                               {    4 - 2400    15 - 28800  }
  1086.                                               {    5 - 4800    16 - 31200  }
  1087.                                               {    6 - 7200    17 - 33600  }
  1088.                                               {    7 - 9600    18 - 38400  }
  1089.                                               {    8 - 12000   19 - 57600  }
  1090.                                               {    9 - 14400   20 - 64000  }
  1091.                                               {   10 - 16800   21 - 115200 }
  1092.      active,                                  { % activity }
  1093.      calls,                                   { # of calls }
  1094.      newusers,                                { # of new users }
  1095.      pubpost,                                 { # of public posts }
  1096.      privpost,                                { # of private posts }
  1097.      netpost,                                 { # of netmail posts }
  1098.      criterr,                                 { # of critical errors }
  1099.      uploads,                                 { # of uploads }
  1100.      downloads : word;                        { # of downloads }
  1101.      uk,                                      { amount ULed in KB }
  1102.      dk        : longint;                     { amount DLed in KB }
  1103.      reserved  : array[1..16] of byte;        { RESERVED }
  1104.   end;
  1105.  
  1106. {*---------------------------------------------------------------------------*}
  1107.  
  1108.   iemsirec=             { IEMSI.DAT : IEMSI connection record }
  1109.   record
  1110.      realname,                                { User's Real Name }
  1111.      handle       : string[36];               { User's Handle }
  1112.      location     : string[30];               { User's Location }
  1113.      dataph,                                  { User's Data Phone # }
  1114.      voiceph,                                 { User's Voice Phone # }
  1115.      password     : string[20];               { User's Password }
  1116.      birthdate    : unixtime;                 { User's Birthdate }
  1117.      linelen,                                 { Screen Width }
  1118.      pagelen      : byte;                     { Screen Length }
  1119.      screentype   : byte;
  1120.      protocols    : string[10];               { Protocol to use }
  1121.                                               {    DZA* DirectZAP Zmodem
  1122.                                                    ZAP* ZedZap Zmodem -> 8K
  1123.                                                    ZMO  Zmodem -> 1K (Z)
  1124.                                                    SLK* SEAlink
  1125.                                                    KER* Kermit }
  1126.      capabilities : string[25];               { System Capabilities }
  1127.                                               {    CHT*    IEMSI chats
  1128.                                                    MNU*    Image Downloading
  1129.                                                    TAB*    TAB support
  1130.                                                    ASCII8* 8-bit ASCII supprt }
  1131.      requests     : string[40];               { Requests }
  1132.                                               {    NEWS    Bulletins, news, etc.
  1133.                                                    MAIL*   Logon - Mail Check
  1134.                                                    FILE*   Logon - File Check
  1135.                                                    HOT     Hot-Keys
  1136.                                                    CLR     Screen clearing
  1137.                                                    HUSH*   Do not disturb
  1138.                                                    MORE    Page pausing
  1139.                                                    FSED    Full-screen editor }
  1140.      software     : string[70];               { Terminal Software }
  1141.   end;
  1142.  
  1143.   {
  1144.     *These items are are currently not supported in Telegard because they
  1145.     are things which were provided for systems with these capabilities.  They
  1146.     are listed here for convenience and so that utility authors can make
  1147.     use of them if neccessary.  Some of these options may be used in
  1148.     future versions of Telegard.
  1149.  
  1150.     (Z)The protocol that is selected by having the ZMO flag is protocol Z.
  1151.     If that protocol does not exist, it is not selected.  Protocol Z should
  1152.     be ZMODEM, otherwise the wrong protocol may be selected!
  1153.   }
  1154.  
  1155. {*---------------------------------------------------------------------------*}
  1156.  
  1157.   languagerec=          { LANGUAGE.DAT : Language records }
  1158.   record
  1159.      filename   : string[8];                  { language filename }
  1160.      desc       : string[30];                 { language description }
  1161.      acs        : acstring;                   { language ACS }
  1162.      textpath,                                { primary text path }
  1163.      menuspath  : string[75];                 { primary menus path }
  1164.                                               {   '' = use default }
  1165.      checktext  : boolean;                    { if primary path <> '' }
  1166.      checkmenus : boolean;                    {   and file not found, check }
  1167.                                               {   default path? }
  1168.   end;
  1169.  
  1170. {*---------------------------------------------------------------------------*}
  1171.  
  1172.   lcallers=             { LASTON.DAT : Last callers records }
  1173.   record
  1174.      caller     : longint;                    { system caller number }
  1175.      realname,                                { real name of caller }
  1176.      handle     : string[36];                 { user name of caller }
  1177.      location   : string[30];                 { location of caller }
  1178.      logonspeed : longint;                    { logon speed }
  1179.      logontime  : unixtime;                   { logon time }
  1180.      newuser,                                 { was newuser? }
  1181.      reserved1,                               { RESERVED }
  1182.      hidden     : boolean;                    { hidden from display? }
  1183.      node       : byte;                       { node }
  1184.      logofftime : unixtime;                   { logoff time }
  1185.      uploads,                                 { number of ul/dl }
  1186.      downloads  : word;
  1187.      uk,                                      { number of ul/dl kB }
  1188.      dk         : longint;
  1189.      reserved2  : array[1..8] of byte;        { RESERVED }
  1190.   end;
  1191.  
  1192. {*---------------------------------------------------------------------------*}
  1193.  
  1194.   levelsrec=            { LEVELS.DAT : Membership/validation levels }
  1195.   record
  1196.      desc      : string[50];                  { Description }
  1197.      sl        : byte;                        { SL level }
  1198.      flags1,                                  { Access flags - Set 1 }
  1199.      flags2    : acrqs;                       { Access flags - Set 2 }
  1200.      ac        : uflags;                      { Restriction flags }
  1201.      addfp,                                   { Bonus FilePoints (added) }
  1202.      addcredit,                               { Bonus NetCredits (added) }
  1203.      addtb,                                   { Bonus Timebank (added) }
  1204.      expireday : word;                        { Expire in ## days
  1205.                                                    0 = Never }
  1206.      tolevel   : char;                        { Expire to level A..Z,
  1207.                                                    ! = Delete }
  1208.      upgradefn : string[8];                   { upgrade: email fn to user }
  1209.      dngradefn : string[8];                   { dngrade: email fn to user }
  1210.      reserved  : array[1..7] of byte;         { RESERVED }
  1211.   end;
  1212.  
  1213. {*---------------------------------------------------------------------------*}
  1214.  
  1215.   macrorec=             { MACROS.DAT : Keyboard macro records }
  1216.   record
  1217.      userid : longint;                        { user-ID - from user record }
  1218.                                               {   checked to verify that }
  1219.                                               {   macro pointers are to }
  1220.                                               {   the correct macros }
  1221.      smacro : array[1..4] of string[240];     { stored keystrokes }
  1222.   end;
  1223.  
  1224. {*---------------------------------------------------------------------------*}
  1225.  
  1226.   modemflags=           { MODEM.DAT/MODEMxxx.DAT status flags }
  1227.   (
  1228.      xonxoff,                                 { XON/XOFF (software) flowctl }
  1229.      ctsrts,                                  { CTS/RTS (hardware) flowctl }
  1230.      dtrdrop,                                 { drop DTR to hang up modem }
  1231.      fossilhot,                               { FOSSIL active during DOS }
  1232.      int14                                    { INT 14 driven (no fossil) }
  1233.   );
  1234.  
  1235.   modemrec=             { MODEM.DAT/MODEMxxx.DAT : Modem configuration }
  1236.   record
  1237.      desc         : string[50];               { modem reference description }
  1238.      comport      : byte;                     { COM port number }
  1239.      waitbaud,                                { modem bps rate }
  1240.      lockedbaud   : longint;                  { locked bps rate }
  1241.                                               {    0 = Not Locked }
  1242.      init         : string[80];               { initialization command }
  1243.      answer,                                  { answer command }
  1244.      hangup,                                  { hangup command }
  1245.      offhook      : string[40];               { phone off-hook command }
  1246.      code_ok,                                 { OK result code }
  1247.      code_error,                              { ERROR result code }
  1248.      code_ring,                               { RING result code }
  1249.      code_nocarrier,                          { NO CARRIER result code }
  1250.      code_arq     : string[16];               { error correction string }
  1251.      code_connect : array[1..25] of           { connect strings }
  1252.                        string[16];            {                11 - 19200  }
  1253.                                               {    1 - 300     12 - 21600  }
  1254.                                               {    2 - 1200    13 - 24000  }
  1255.                                               {    3 - 1275    14 - 26400  }
  1256.                                               {    4 - 2400    15 - 28800  }
  1257.                                               {    5 - 4800    16 - 31200  }
  1258.                                               {    6 - 7200    17 - 33600  }
  1259.                                               {    7 - 9600    18 - 38400  }
  1260.                                               {    8 - 12000   19 - 57600  }
  1261.                                               {    9 - 14400   20 - 64000  }
  1262.                                               {   10 - 16800   21 - 115200 }
  1263.      reinittime,                              { inactivity re-initialization }
  1264.      delay_cmd,                               { delay after cmd (1/10th) }
  1265.      delay_answer,                            { answer delay (1/10th) }
  1266.      delay_dtr    : byte;                     { delay for DTR drop (1/10th) }
  1267.      flags        : set of modemflags;        { status flags (see above) }
  1268.      irq          : byte;                     { IRQ for non-standard port }
  1269.      address      : string[4];                { base I/O address for port }
  1270.      ansrings,                                { # rings before answering }
  1271.      ansreset     : byte;                     { seconds before counter reset }
  1272.      reserved     : array[1..67] of byte;     { RESERVED }
  1273.   end;
  1274.  
  1275. {*---------------------------------------------------------------------------*}
  1276.  
  1277.   netflags=             { NETWORK.DAT status flags }
  1278.   (
  1279.      nstrip,                                  { strip message codes? }
  1280.      naddtear,                                { add tear/origin lines? }
  1281.      nholduser,                               { hold all non-SysOp NetMail? }
  1282.      nhold,                                   { def NetMail to "hold"? }
  1283.      ncrash,                                  { def NetMail to "crash"? }
  1284.      nkill,                                   { def NetMail to "kill/sent"? }
  1285.      nstripcolour                             { strip colour codes? }
  1286.   );
  1287.  
  1288.   netaddress=           { NETWORK.DAT : Net address }
  1289.   record
  1290.      zone,net,node,point : word;              { (zone:net/node.point) }
  1291.   end;
  1292.  
  1293.   netaddrrec=           { NETWORK.DAT : Node information }
  1294.   record
  1295.      addr     : netaddress;                   { (zone:net/node.point) }
  1296.      akazone,                                 { aka matching zone:net }
  1297.      akanet   : word;                         { if net=0, match zone only }
  1298.      replynet : string[8];                    { areaname of replies for aka }
  1299.      RESERVED : array[1..18] of byte;         { RESERVED }
  1300.   end;
  1301.  
  1302.   networkrec=           { NETWORK.DAT : Network information }
  1303.   record
  1304.      netaddr      : array[1..20] of           { network addresses }
  1305.                        netaddrrec;
  1306.      origin       : string[50];               { origin line }
  1307.      kludge_color : byte;                     { color of kludge line }
  1308.      quote_color  : byte;                     { color of quoted text }
  1309.      tear_color   : byte;                     { color of tear line }
  1310.      origin_color : byte;                     { color of origin line }
  1311.      flags        : set of netflags;          { status flags }
  1312.      readacs,                                 { Default read ACS }
  1313.      postacs      : acstring;                 { Default post ACS }
  1314.      text_color,                              { color of text line }
  1315.      areaformat,                              { Default area format }
  1316.      areascan,                                { Default scan type }
  1317.      defaddr      : byte;                     { Default address }
  1318.      reserved1    : array[1..37] of byte;     { RESERVED }
  1319.      nodepath     : string[40];               { nodelist path }
  1320.      nodelisttype : byte;                     { Nodelist type
  1321.                                                    0 : None
  1322.                                                    1 : Version 6
  1323.                                                    2 : Version 7
  1324.                                                    3 : FrontDoor }
  1325.      UUCPgate     : netaddress;               { (zone:net/node.point) }
  1326.      sysopacs     : acstring;                 { Default sysop ACS }
  1327.      reserved2    : array[1..26] of byte;     { RESERVED }
  1328.   end;
  1329.  
  1330. {*---------------------------------------------------------------------------*}
  1331.  
  1332.   whosonflags=          { NODES.DAT : Who's Online status flags }
  1333.   (
  1334.      ishidden,                               { user is hidden }
  1335.      isquiet                                 { user not to be disturbed }
  1336.   );
  1337.  
  1338.   nodesrec=             { NODES.DAT : Multi-Node setup }
  1339.   record
  1340.      active      : boolean;                   { node can accept calls }
  1341.      logonbegin,                              { logon starts (0-1440) }
  1342.      logonend    : word;                      { logon ends (0-1440) }
  1343.      logonacs    : acstring;                  { access to logon }
  1344.      logonbps    : longint;                   { minimum logon bps }
  1345.      nodephone   : string[20];                { node phone number }
  1346.      reserved1   : array[1..45] of byte;      { RESERVED }
  1347.  
  1348.      realname,                                { realname }
  1349.      handle      : string[36];                { handle }
  1350.      location    : string[30];                { location }
  1351.      logontime   : unixtime;                  { logon time }
  1352.      statusid    : byte;                      { 0 - waiting for call }
  1353.                                               { 1 - unavailable (offline/down) }
  1354.                                               { 2 - event }
  1355.                                               { 3 - CONNECTED }
  1356.                                               { 4 - waiting for reset }
  1357.      status      : string[36];                { status }
  1358.      bpsrate     : longint;                   { bps rate }
  1359.      userid      : longint;                   { user-ID }
  1360.      flags       : set of whosonflags;        { status }
  1361.  
  1362.      reserved2   : array[1..45] of byte;      { RESERVED }
  1363.   end;
  1364.  
  1365. {*---------------------------------------------------------------------------*}
  1366.  
  1367.   protrec=              { PROTOCOL.DAT : File transfer protocols }
  1368.   record
  1369.      desc     : string[25];                   { description }
  1370.      active,                                  { active? }
  1371.      batch    : boolean;                      { batch? (=filelist) }
  1372.      acs      : acstring;                     { access control }
  1373.      ulcmd,                                   { UL command line }
  1374.      dlcmd    : string[60];                   { DL command line }
  1375.      ulcode,                                  { UL result code }
  1376.      dlcode   : array [1..3] of string[6];    { DL result code }
  1377.      envcmd   : string[60];                   { environment command }
  1378.      templog  : string[25];                   { temporary log file }
  1379.      flist    : string[5];                    { DL file list }
  1380.      logpf,                                   { log - word # (filename) }
  1381.      logpr    : byte;                         { log - word # (result) }
  1382.      success  : boolean;                      { results = success? }
  1383.      bidirec  : boolean;                      { bi-directional? }
  1384.   end;
  1385.  
  1386. {*---------------------------------------------------------------------------*}
  1387.  
  1388.   shortmsgrec=          { SHORTMSG.DAT/INODEnnn.DAT : Logon/Node Receipts }
  1389.   record
  1390.      userid   : longint;                      { to user id (0=deleted) }
  1391.      msg      : string[155];                  { message to user }
  1392.      msgid    : byte;                         { msgid - INTERNAL USE }
  1393.                                               { should *always* be 0 }
  1394.                                               { if set by external utils }
  1395.      written  : unixtime;                     { date written to file }
  1396.   end;
  1397.  
  1398. {*---------------------------------------------------------------------------*}
  1399.  
  1400.   sigsrec=              { SIGS.DAT : Message signature records }
  1401.   record
  1402.      userid : longint;                        { user-ID - from user record }
  1403.                                               {   checked to verify that }
  1404.                                               {   signature pointers are to }
  1405.                                               {   the correct signatures }
  1406.      short  : string[78];                     { short signature - one line }
  1407.      long   : string[240];                    { long signature < four lines }
  1408.   end;
  1409.  
  1410. {*---------------------------------------------------------------------------*}
  1411.  
  1412.   smacrorec =           { SMACROS.DAT : SysOp Macros }
  1413.   record
  1414.      macro : array[1..10] of string[120];    { SysOp macros F1..F10 }
  1415.   end;
  1416.  
  1417. {*---------------------------------------------------------------------------*}
  1418.  
  1419.   timelogrec=           { TIMELOG.DAT : Daily/hourly usage tracking }
  1420.   record
  1421.      startdate      : unixtime;               { date graph started }
  1422.      busyperhour    : array[0..23] of word;   { busy per hour }
  1423.      busyperday     : array[0..6] of          { busy per dow, 20 minute }
  1424.                         array[0..71] of word; {    intervals }
  1425.   end;
  1426.  
  1427. {*---------------------------------------------------------------------------*}
  1428.  
  1429.   voterec=              { VOTING.DAT : Voting records }
  1430.   record
  1431.      active    : boolean;                     { active? }
  1432.      question  : string[75];                  { voting question }
  1433.      initdate  : longint;                     { initialization date }
  1434.      voteacs,                                 { voting acs }
  1435.      addacs    : acstring;                    { add answer acs }
  1436.      numusers  : word;                        { # user's answering question }
  1437.      numans    : byte;                        { # of active answers }
  1438.      answer    : array[0..numvoteas] of
  1439.                     record
  1440.                        desc   : string[60];   { answer description }
  1441.                        numres : word;         { # votes for this answer }
  1442.                     end;
  1443.   end;
  1444.  
  1445. {*****************************************************************************}
  1446. {* ---------------------- EXTERNAL DATA STRUCTURES ------------------------- *}
  1447. {*****************************************************************************}
  1448.  
  1449.  {
  1450.     The following structures are all derived from external sources and are
  1451.     not internal to Telegard 3.0 (i.e. the same format listed below is used
  1452.     for all other compatible products using the same specifications).
  1453.  
  1454.     For more information on the structures which are listed below, please
  1455.     refer to the DEVEL309.DOC documentation, which contains contact
  1456.     information and further reference listings for these structures.
  1457.  }
  1458.  
  1459. {*****************************************************************************}
  1460. {* ------------ NODELIST FILE STRUCTURES ("VERSION 6" FORMAT) -------------- *}
  1461. {*****************************************************************************}
  1462.  
  1463.   nodeflags=            { NODELIST.DAT status flags }
  1464.   (
  1465.      hub,                                     { node is a net hub }
  1466.      host,                                    { node is a net host }
  1467.      region,                                  { node is region coord }
  1468.      zone,                                    { node is a zone coord }
  1469.      cm                                       { runs continuous mail }
  1470.   );
  1471.  
  1472.   modemtypes=           { NODELIST.DAT modem type flags }
  1473.   (
  1474.      hst,                                     { node uses a USRobotics HST modem }
  1475.      pep,                                     { node uses a Telebit PEP modem }
  1476.      v32,                                     { node uses a V.32 modem }
  1477.      v32b,                                    { node uses a V.32bis modem }
  1478.      h96                                      { node uses a Hayes Express96 modem }
  1479.   );
  1480.  
  1481.   nodedatarec=          { NODELIST.DAT : Version 6 nodelist data }
  1482.   record
  1483.      net:integer;                             { net number }
  1484.      node:integer;                            { node number }
  1485.      cost:integer;                            { cost per minute to call }
  1486.      name:array[0..33] of char;               { node name }
  1487.      phone:array[0..39] of char;              { phone number }
  1488.      city:array[0..29] of char;               { city and state }
  1489.      password:array[0..7] of byte;            { password }
  1490.      realcost:integer;                        { phone company's charge }
  1491.      hubnode:integer;                         { node # of this node's hub (0=none) }
  1492.      rate:byte;                               { actual bps rate divided by 300 }
  1493.      modem:set of modemtypes;                 { modem type codes }
  1494.      flags:set of nodeflags;                  { set of flags }
  1495.      res:array[1..3] of byte;                 { RESERVED }
  1496.   end;
  1497.  
  1498.   nodeindexrec=         { NODELIST.IDX : Version 6 nodelist index }
  1499.   record
  1500.      node : integer;                          { node number }
  1501.      net  : integer;                          { net number }
  1502.   end;
  1503.  
  1504. {*****************************************************************************}
  1505. {* ------------ NODELIST FILE STRUCTURES ("VERSION 7" FORMAT) -------------- *}
  1506. {*****************************************************************************}
  1507.  
  1508.   node7flags=            { NODELIST.DAT Version 7 status flags }
  1509.   (
  1510.      ishub,                                   { node is a net hub }
  1511.      ishost,                                  { node is a net host }
  1512.      isregion,                                { node is region coord }
  1513.      isgate,                                  { node is a zone gateway }
  1514.      iscm,                                    { runs continuous mail }
  1515.      res1,res2,res3,res4,res5,                { RESERVED }
  1516.      res6,res7,
  1517.      ispoint                                  { node is a point }
  1518.   );
  1519.  
  1520.   node7datarec=          { NODELIST.DAT : Version 7 nodelist data }
  1521.   record
  1522.      zone,net,node:integer;                   { node address }
  1523.      hubnode:integer;                         { hub node address }
  1524.      callcost,                                { Cost of call }
  1525.      msgfee    : word;                        { Cost to user }
  1526.      flags     : set of node7flags;           { nodelist flags }
  1527.      modem     : byte;                        { RESERVED }
  1528.      phlen,                                   { Phone # length }
  1529.      pwlen,                                   { PW length }
  1530.      boardlen,                                { Board name length }
  1531.      sysoplen,                                { SysOp name length }
  1532.      citylen,                                 { City length }
  1533.      packlen   : byte;                        { Pack total length }
  1534.      baudrate  : byte;                        { bps rate divided by 300 }
  1535.      { ... data ... }
  1536.      data      : array[1..160] of byte;       { packed data - length packlen }
  1537.      { full length = phlen + pwlen + packlen }
  1538.   end;
  1539.  
  1540. {*****************************************************************************}
  1541. {* ------------------- QWK OFFLINE MAIL FILE STRUCTURES -------------------- *}
  1542. {*****************************************************************************}
  1543.  
  1544.   qdatrec=              { MESSAGES.DAT : Message file header record }
  1545.   record
  1546.      status:char;                             { message status flag:             }
  1547.                                               { ' ' = public, unread             }
  1548.                                               { '-' = public, read               }
  1549.                                               { '+' = private, unread            }
  1550.                                               { '*' = private, read              }
  1551.                                               { '~' = comment to SysOp, unread   }
  1552.                                               { '`' = comment to SysOp, read     }
  1553.                                               { '%' = password protected, unread }
  1554.                                               { '^' = password protected, read   }
  1555.                                               { '!' = group password, unread     }
  1556.                                               { '#' = group password, read       }
  1557.                                               { '$' = group password to all      }
  1558.      number:array[1..7] of char;              { message number }
  1559.      date:array[1..8] of char;                { date (MM-DD-YY) }
  1560.      time:array[1..5] of char;                { time (HH:MM) }
  1561.      msgto:array[1..25] of char;              { To (uppercase) }
  1562.      msgfrom:array[1..25] of char;            { From (uppercase) }
  1563.      subject:array[1..25] of char;            { Subject }
  1564.      password:array[1..12] of char;           { password }
  1565.      reference:array[1..8] of char;           { reference message number }
  1566.      blocks:array[1..6] of char;              { # of blocks in message,  }
  1567.                                               {   including header block }
  1568.      active:byte;                             { $E1=active, $E2=to be deleted }
  1569.      areanum:word;                            { QWK area number }
  1570.      res:array[1..2] of byte;                 { NOT USED }
  1571.      tagline:char;                            { contains network tagline:     }
  1572.                                               { '*' = network tagline present }
  1573.                                               { ' ' = no tagline present      }
  1574.   end;
  1575.  
  1576.   qndxrec=              { *.NDX : Message area index record }
  1577.   record
  1578.      recnum:longint;                          { record number in MESSAGES.DAT,    }
  1579.                                               {   stored in Microsoft MKS$ format }
  1580.      areanum:byte;                            { QWK area number (unused) }
  1581.   end;
  1582.  
  1583. {****************************************************************************}
  1584. {* --------------------------- JAM STRUCTURES ----------------------------- *}
  1585. {****************************************************************************}
  1586.  
  1587.   jaminforec =          { *.JHR: JAM message area header - first record }
  1588.   record
  1589.      signature   : array[1..4]                { message Signature }
  1590.                       of char;                { <J><A><M> followed by <NUL> }
  1591.      datecreated,                             { creation Date }
  1592.      modifycount,                             { modification counter }
  1593.      activemsgs,                              { active Messages }
  1594.      passwordCRC,                             { CRC of password, -1 = none }
  1595.      basemsgnum  : longint;                   { lowest number in index }
  1596.      reserved    : array[1..1000]             { reserved by JAM authors }
  1597.                       of char;
  1598.   end;
  1599.  
  1600.   jammsgattr =          { JAM message area attributes }
  1601.   (
  1602.      jlocal,                                  { local }
  1603.      jintransit,                              { in-transit }
  1604.      jprivate,                                { private }
  1605.      jread,                                   { read by receiver }
  1606.      jsent,                                   { sent }
  1607.      jkillsent,                               { kill msg/sent }
  1608.      jarchivesent,                            { archive msg/sent }
  1609.      jhold,                                   { hold }
  1610.      jcrash,                                  { crash }
  1611.      jimmediate,                              { immediate }
  1612.      jdirect,                                 { direct }
  1613.      jgate,                                   { gate }
  1614.      jfilereq,                                { file requests }
  1615.      jfileattach,                             { files attached }
  1616.      jtruncfiles,                             { truncate (0 len) sent files }
  1617.      jkillfiles,                              { kill sent files }
  1618.      jreceiptreq,                             { receipt requested }
  1619.      jconfirmreq,                             { confirmation of receipt }
  1620.      jorphan,                                 { orphaned message }
  1621.      jencrypt,                                { encrypted message* }
  1622.      jcompress,                               { compressed message* }
  1623.      jescaped,                                { escaped message* }
  1624.      jforcepickup,                            { force pickup }
  1625.      jtypelocal,                              { local only }
  1626.      jtypeecho,                               { for echo dist'n }
  1627.      jtypenet,                                { for netmail dist'n }
  1628.      jRESERVED,                               { 0x04000000L }
  1629.      jRESERVED1,                              { 0x08000000L }
  1630.      jRESERVED2,                              { 0x10000000L }
  1631.      jnomsgdisplay,                           { no message display }
  1632.      jlocked,                                 { locked message }
  1633.      jdeleted                                 { deleted message }
  1634.   );
  1635.  
  1636.   jamhdrrec =           { *.JHR: JAM message headers }
  1637.   record
  1638.      signature   : array[1..4]                { message signature }
  1639.                       of char;                { <J><A><M> followed by <NUL> }
  1640.      revision,                                { JAM revision level }
  1641.      reserved1   : word;                      { reserved by JAM authors }
  1642.      subfieldlen,                             { length of subfields }
  1643.      timesread,                               { # times message read }
  1644.      msgidCRC,                                { CRC-32 of MSGID line }
  1645.      replyCRC,                                { CRC-32 of REPLY line }
  1646.      replyto,                                 { reply to # }
  1647.      reply1st,                                { 1st reply number }
  1648.      replynext   : longint;                   { reply next }
  1649.      date,                                    { date written }
  1650.      datercvd,                                { date received }
  1651.      dateproc    : unixtime;                  { date processed (tosser/scanner) }
  1652.      msgnum      : longint;                   { message number }
  1653.      attribute   : set of jammsgattr;         { attributes }
  1654.      reserved2,                               { reserved by JAM authors }
  1655.      textoffset,                              { offset of text in *.JDT file }
  1656.      textlen,                                 { length of text }
  1657.      passwordCRC,                             { CRC-32 of password }
  1658.      cost        : longint;                   { cost of message }
  1659.   end;
  1660.  
  1661.   jamsubfieldrec =      { *.JHR: subfield records }
  1662.   record
  1663.      fieldid,                                 { subfield ID }
  1664.      reserved1   : word;                      { reserved by JAM authors }
  1665.      datalen     : longint;                   { length of buffer }
  1666.   end;
  1667.  
  1668.   jamindexrec =         { *.JDX: JAM quick index }
  1669.   record
  1670.      userCRC,                                 { CRC-32 of receipients name (lower) }
  1671.      hdroffset   : longint;                   { offset to jamhdrrec }
  1672.   end;
  1673.  
  1674.   jamreadrec =          { *.JLR: JAM last read storage }
  1675.   record
  1676.      userCRC,                                 { CRC-32 of users name (lower) }
  1677.      userID,                                  { unique user-ID }
  1678.      lastread,                                { last read pointer }
  1679.      highread    : longint;                   { high read pointer }
  1680.   end;
  1681.  
  1682. {****************************************************************************}
  1683. {* ------------------------- SQUISH STRUCTURES ---------------------------- *}
  1684. {****************************************************************************}
  1685.  
  1686.  sqarearec =            { *.SQD: Squish message area header - first record }
  1687.  record
  1688.     len_sqarea,                               { length of this structure }
  1689.     reserved   : word;                        { RESERVED }
  1690.     nummsgs,                                  { number of messages }
  1691.     highmsg,                                  { highest message (=nummsgs) }
  1692.     keepmsgs,                                 { # of messages to keep }
  1693.     hwmsgid,                                  { High water message msg-ID # }
  1694.     lastmsgid  : longint;                     { Last message msg-ID # }
  1695.     basename   : array[1..80] of char;        { basename for Squishfile }
  1696.     beginframe,                               { offset to first message header }
  1697.     lastframe,                                { offset to last message header }
  1698.     freeframe,                                { offset to first FREE header }
  1699.     lastfreeframe,                            { offset to last FREE header }
  1700.     endframe,                                 { offset of end of file }
  1701.     maxmsgs    : longint;                     { maximum number of messages }
  1702.     keepdays   : word;                        { days to keep messages }
  1703.     sqhdrsize  : word;                        { size of header record }
  1704.     reserved2  : array[1..124] of byte;       { RESERVED }
  1705.    end;
  1706.  
  1707.  sqhdrrec =             { *.SQD: Message header }
  1708.  record
  1709.     sqid,                                     { squish ID - $AFAE4453 }
  1710.     nextmsg,                                  { offset to last message }
  1711.     prevmsg,                                  { offset to previous message }
  1712.     framelength,                              { length of header & message }
  1713.     msglength,                                { length of message }
  1714.     ctrllength : longint;                     { length of control information }
  1715.     headertype,                               { Header type
  1716.                                                    Message = 0
  1717.                                                    Free    = 1 }
  1718.     reserved    : word;                       { RESERVED }
  1719.   end;
  1720.  
  1721.   sqshmsgattr =         { Squish Message Attributes }
  1722.   (
  1723.      sprivate,                                { private }
  1724.      scrash,                                  { crash }
  1725.      sread,                                   { read by receiver }
  1726.      ssent,                                   { sent }
  1727.      sfileattach,                             { files attached }
  1728.      sintransit,                              { in-transit }
  1729.      sorphan,                                 { orphaned message }
  1730.      skillsent,                               { kill msg/sent }
  1731.      slocal,                                  { local }
  1732.      shold,                                   { hold }
  1733.      sreserved,                               { reserved }
  1734.      sfilereq,                                { file requests }
  1735.      sreceiptreq,                             { receipt requested }
  1736.      sconfirmreq,                             { confirmation of receipt }
  1737.      saudit,                                  { audit trail requested }
  1738.      supdate,                                 { update request }
  1739.      sscanned,                                { echomail scanned }
  1740.      smsgid,                                  { valid msgid? }
  1741.      sres1,  sres2,  sres3,  sres4,           { reserved }
  1742.      sres5,  sres6,  sres7,  sres8,
  1743.      sres9,  sres10, sres11, sres12,
  1744.      sres13, sres14
  1745.   );
  1746.  
  1747.  sqxmsgrec =            { *.SQD: Message Info Header }
  1748.  record
  1749.     attribute   : set of sqshmsgattr;         { Message attributes }
  1750.     msgfrom     : array[1..36] of char;       { Message from - NUL terminated }
  1751.     msgto       : array[1..36] of char;       { Message to - NUL terminated }
  1752.     subject     : array[1..72] of char;       { Message subject - NUL terminated }
  1753.     origaddr,                                 { Origin/Destination addresses }
  1754.     destaddr    : record
  1755.                      zone, net,
  1756.                      node, point : word;
  1757.                   end;
  1758.     origdate,                                 { Original date (utc) }
  1759.     msgdate     : bitmapdate;                 { Arrival (system) date (utc) }
  1760.     utcoffset   : word;                       { Minutes offset of UTC }
  1761.     replyto     : longint;                    { Reply-to msg-ID # }
  1762.     replies     : array[1..9] of              { Replies msg-ID # }
  1763.                      longint;
  1764.     msgid       : longint;                    { Message ID }
  1765.     rawdate     : array[1..20] of char;       { ASCII date - NUL terminated }
  1766.  end;
  1767.  
  1768.  sqindexrec =           { *.SQI: Squish Message Index }
  1769.  record
  1770.     msgptr,                                   { offset of sqfhdr record }
  1771.     msgid,                                    { msg-ID # }
  1772.     hash   : longint;                         { hash of 'to' name }
  1773.  end;
  1774.  
  1775.  sqreadrec =            { *.SQL: Squish Last Read Index }
  1776.  record
  1777.     msgid : longint;                          { msg-ID # }
  1778.  end;
  1779.  
  1780. {****************************************************************************}
  1781. {* ------------------------ TESTINFO.DAT FORMAT --------------------------- *}
  1782. {****************************************************************************}
  1783.  
  1784.  testinfofilerec =      { TESTINFO.DAT: individual file record }
  1785.  record
  1786.     sfx,                                      { is self-extracting file? }
  1787.     exists     : boolean;                     { file exists }
  1788.     full_path,                                { full file path }
  1789.     path       : string[60];                  { file path }
  1790.     drive      : string[2];                   { file drive (incl colon) }
  1791.     name       : string[8];                   { filename (raw) }
  1792.     ext,                                      { extension }
  1793.     filetype   : string[3];                   { file type* }
  1794.     date       : longint;                     { file date_time (packed) }
  1795.     size       : longint;                     { file size }
  1796.  end;
  1797.  
  1798.  testinforec =          { TESTINFO.DAT }
  1799.  record
  1800.     processed,                                { record has been processed }
  1801.     desc_vendinfo,                            { vendinfo.diz description }
  1802.     desc_import,                              { import descriptions? }
  1803.     addtofdb,                                 { add file to file database }
  1804.     file_conv,                                { file converted? }
  1805.     user_ansi,                                { detected ansi }
  1806.     user_avatar,                              { detected avatar }
  1807.     user_carrier,                             { carrier detected last check }
  1808.     bbsprocessed     : boolean;               { processed by BBS? }
  1809.     reserved1        : array[1..8] of byte;   { RESERVED }
  1810.     check_count,                              { update/check count }
  1811.     bbs_type,                                 { BBS type ( TG3.0 = 6 ) }
  1812.     user_comport,                             { user com port }
  1813.     exit_level,                               { exit level for test }
  1814.     revision         : byte;                  { testinfo.dat revision level }
  1815.     reserved2        : array[1..9] of byte;   { RESERVED }
  1816.     test_datetime    : longint;               { testing date/time }
  1817.     reserved3        : array[1..40] of byte;  { RESERVED }
  1818.     thd_options,                              { THDPRO command line options }
  1819.     bbs_path,                                 { path to BBS data files }
  1820.     creator,                                  { TESTINFO.DAT creator }
  1821.     thd_log          : string[60];            { THDPRO log path }
  1822.     reserved4        : array[1..183] of byte; { RESERVED }
  1823.     ver_major,                                { creator - major version }
  1824.     ver_minor        : string[2];             { creator - minor version }
  1825.     thd_session      : string[3];             { THDPRO session number }
  1826.     desc_filename    : string[12];            { description file filename }
  1827.     reserved5        : array[1..39] of byte;  { RESERVED }
  1828.     file_original,                            { original file information }
  1829.     file_finished    : testinfofilerec;       { finished file information }
  1830.     reserved6        : array[1..10] of byte;  { RESERVED }
  1831.     desc_length      : integer;               { length fo description }
  1832.     desc             : array[1..1500] of      { description }
  1833.                           char;
  1834.  end;
  1835.  
  1836.