home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / filesbbs / dos / fmail142.exe / FMSTRUCT.ZIP / DELPHI.ZIP / FMSTRUCT.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1998-02-02  |  23.3 KB  |  913 lines

  1. (**********************************************************************)
  2. (**              Structure definitions for FMail v1.42g              **)
  3. (**                                                                  **)
  4. (** /*                                                               **)
  5. (**    FMSTRUCT.H                                                    **)
  6. (**                                                                  **)
  7. (**    File structures for FMail 1.42g                               **)
  8. (**    Copyright (C) 1998 Folkert J. Wijnstra. All rights reserved.  **)
  9. (**                                                                  **)
  10. (**    All information in this document is subject to change at any  **)
  11. (**    time without prior notice!                                    **)
  12. (**                                                                  **)
  13. (**    Strings are NUL terminated arrays of char type.               **)
  14. (**    Path names are \ terminated.                                  **)
  15. (** */                                                               **)
  16. (**                                                                  **)
  17. (**    Based on the C structures as published by Folkert Wijnstra.   **)
  18. (**    Converted to Delphi 3 by Eric Vaneberck                       **)
  19. (**                                                                  **)
  20. (**    Last update: 01 February 1998                                 **)
  21. (**********************************************************************)
  22.  
  23. unit FMSTRUCT;
  24. interface
  25. uses
  26. {$IFDEF WIN32}
  27.   Windows;
  28. {$ELSE}
  29.   Wintypes, WinProcs;
  30. {$ENDIF}
  31.  
  32. const
  33.   fhandle = signed int;
  34. const
  35.   u8 = unsigned char;
  36. const
  37.   uchar = unsigned char;
  38. const
  39.   schar = char;
  40. {$IFNDEF __32BIT__}
  41. const
  42.   u16 = unsigned int;
  43. const
  44.   s16 = signed int;
  45. {$ELSE}
  46. const
  47.   u16 = short unsigned int;
  48. const
  49.   s16 = short signed int;
  50. {$ENDIF}
  51. const
  52.   u32 = long unsigned int;
  53. const
  54.   s32 = long signed int;
  55. const
  56.   udef = unsigned int;
  57. const
  58.   sdef = signed int;
  59.  
  60. const
  61.   MAX_U32 = $FFFFFFFF;
  62.  
  63.  
  64.   (****************************************************************************************************)
  65.   (**                                  General constants and structures                              **)
  66.   (****************************************************************************************************)
  67.  
  68. type
  69.   archiverInfo = record
  70.     programName: Array[0..46-1] of UCHAR;
  71.     memRequired: U16;
  72.   end {archiverInfo};
  73.  
  74. type
  75.   = UCHAR PATHTYPE[48];
  76.  
  77. type
  78.   nodeNumType = record
  79.     zone: U16;
  80.     net: U16;
  81.     node: U16;
  82.     point: U16;
  83.   end {nodeNumType};
  84.  
  85. type
  86.   nodeFlagsTyp = record
  87.     1: UNSIGNED READONLY :;
  88. {= Bit 0 }
  89.     1: UNSIGNED WRITEONLY :;
  90. {= Bit 1 }
  91.     1: UNSIGNED LOCKED :;
  92. {= Bit 2 }
  93.     13: UNSIGNED RESERVED :;
  94.   end {nodeFlagsTyp};
  95. type
  96.   nodeNumXType = record
  97.     nodeNum: NODENUMTYPE;
  98.     flags: NODEFLAGSTYPE;
  99.   end {nodeNumXType};
  100.  
  101. type
  102.   nodeFakeType = record
  103.     nodeNum: NODENUMTYPE;
  104.     fakeNet: U16;
  105.   end {nodeFakeType};
  106.  
  107.  
  108. {+//********** File header structure***********/ }
  109.  
  110. const
  111.   DATATYPE_CF = $0102; {/* not used yet*/}
  112. const
  113.   DATATYPE_NO = $0202; {/* node file*/}
  114. const
  115.   DATATYPE_AD = $0401; {/* area file for echo mail defaults*/}
  116. const
  117.   DATATYPE_AE = $0402; {/* area file for echo mail*/}
  118.  
  119. type
  120.   headerType = record
  121.     versionString: Array[0..32-1] of UCHAR;
  122. {= Always starts with 'FMail' }
  123.     revNumber: U16;
  124. {= Is now 0x0100 }
  125. const
  126.   s = above*/;
  127.     headerSize: U16;
  128.     creationDate: S32;
  129.     lastModified: S32;
  130.     totalRecords: U16;
  131.     recordSize: U16;
  132.   end {headerType};
  133.  
  134.  
  135. {+// The structure below is used by the Areas File and (only partly) }
  136. {=by the Config File }
  137.  
  138. type
  139.   areaOptionsTyp = record
  140.     1: UNSIGNED ACTIVE :;
  141. {= Bit 0 }
  142.     1: UNSIGNED TINYSEENBY :;
  143. {= Bit 1 }
  144.     1: UNSIGNED SECURITY :;
  145. {= Bit 2 }
  146.     1: UNSIGNED :;
  147. {= Bit 3 }
  148.     1: UNSIGNED ALLOWPRIVATE:;
  149. {= Bit 4 }
  150.     1: UNSIGNED IMPSEENBY :;
  151. {= Bit 5 }
  152.     1: UNSIGNED CHECKSEENBY :;
  153. {= Bit 6 }
  154.     1: UNSIGNED :;
  155. {= Bit 7 }
  156.     1: UNSIGNED LOCAL :;
  157. {= Bit 8 }
  158.     1: UNSIGNED DISCONNECTED:;
  159. {= Bit 9 }
  160.     1: UNSIGNED _RESERVED :;
  161. {= Bit 10 }
  162.     1: UNSIGNED ALLOWAREAFIX:;
  163. {= Bit 11 }
  164.     1: UNSIGNED EXPORT2BBS :;
  165. {= Bit 12 }
  166.     1: UNSIGNED :;
  167. {= Bit 13 }
  168.     1: UNSIGNED ARRIVALDATE :;
  169. {= Bit 14 }
  170.     1: UNSIGNED SYSOPREAD :;
  171.   end {areaOptionsTyp};
  172.  
  173.   (****************************************************************************************************)
  174.   (**                                  the structure of FMAIL.CFG                                    **)
  175.   (****************************************************************************************************)
  176.  
  177. const
  178.   MAX_AKAS = 32;
  179. const
  180.   MAX_AKAS_F = 64;
  181. const
  182.   MAX_AKAS_OLD = 16;
  183. const
  184.   MAX_NA_OLD = 11;
  185. const
  186.   MAX_NETAKAS = 32;
  187. const
  188.   MAX_NETAKAS_F = 64;
  189. const
  190.   MAX_USERS = 16;
  191. const
  192.   MAX_UPLREQ = 32;
  193. const
  194.   MAX_MATCH = 16; {// not used yet}
  195.  
  196. const
  197.   LOG_NEVER = $0000;
  198. const
  199.   LOG_INBOUND = $0001;
  200. const
  201.   LOG_OUTBOUND = $0002;
  202. const
  203.   LOG_PKTINFO = $0004;
  204. const
  205.   LOG_XPKTINFO = $0008;
  206. const
  207.   LOG_UNEXPPWD = $0010;
  208. const
  209.   LOG_SENTRCVD = $0020;
  210. const
  211.   LOG_STATS = $0040;
  212. const
  213.   LOG_PACK = $0080;
  214. const
  215.   LOG_MSGBASE = $0100;
  216. const
  217.   LOG_ECHOEXP = $0200;
  218. const
  219.   LOG_NETIMP = $0400;
  220. const
  221.   LOG_NETEXP = $0800;
  222. const
  223.   LOG_OPENERR = $1000;
  224. const
  225.   LOG_EXEC = $2000;
  226. const
  227.   LOG_NOSCRN = $4000;
  228. const
  229.   LOG_ALWAYS = $8000;
  230. const
  231.   LOG_DEBUG = $8000;
  232.  
  233. type
  234.   = NODEFAKETYPE _AKALISTTYPE[MAX_AKAS_OLD];
  235. type
  236.   = NODEFAKETYPE AKALISTTYPE[MAX_AKAS_F];
  237.  
  238. type
  239.   genOptionsTyp = record
  240.     1: UNSIGNED USEEMS :;
  241. {= BIT 0 }
  242.     1: UNSIGNED CHECKBREAK :;
  243. {= BIT 1 }
  244.     1: UNSIGNED SWAP :;
  245. {= BIT 2 }
  246.     1: UNSIGNED SWAPEMS :;
  247. {= BIT 3 }
  248.     1: UNSIGNED SWAPXMS :;
  249. {= BIT 4 }
  250.     1: UNSIGNED LFN :;
  251. {= BIT 5 }
  252.     1: UNSIGNED MONOCHROME :;
  253. {= BIT 6 }
  254.     1: UNSIGNED COMMENTFFD :;
  255. {= BIT 7 }
  256.     1: UNSIGNED PTAREASBBS :;
  257. {= BIT 8 }
  258.     1: UNSIGNED COMMENTFRA :;
  259. {= BIT 9 }
  260.     1: UNSIGNED :;
  261. {= BIT 10 }
  262.     1: UNSIGNED INCBDRRA :;
  263. {= BIT 11 }
  264.     1: UNSIGNED :;
  265. {= BIT 12 }
  266.     1: UNSIGNED TIMESLICEFM :;
  267. {= BIT 13 }
  268.     1: UNSIGNED TIMESLICEFT :;
  269. {= BIT 14 }
  270.     1: UNSIGNED _RA2 :;
  271.   end {genOptionsTyp};
  272. type
  273.   mailOptionsTyp = record
  274.     1: UNSIGNED REMOVENETKLUDGES :;
  275. {= Bit 0 }
  276.     1: UNSIGNED ADDPOINTTOPATH :;
  277. {= Bit 1 }
  278.     1: UNSIGNED CHECKPKTDEST :;
  279. {= Bit 2 }
  280.     1: UNSIGNED NEVERARC060 :;
  281. {= Bit 3 }
  282.     1: UNSIGNED CREATESEMA :;
  283. {= Bit 4 }
  284.     1: UNSIGNED DAILYMAIL :;
  285. {= Bit 5 }
  286.     1: UNSIGNED WARNNEWMAIL :;
  287. {= bit 6 }
  288.     1: UNSIGNED KILLBADFATT :;
  289. {= Bit 7 }
  290.     1: UNSIGNED DUPDETECTION :;
  291. {= Bit 8 }
  292.     1: UNSIGNED IGNOREMSGID :;
  293. {= Bit 9 }
  294.     1: UNSIGNED ARCMAIL060 :;
  295. {= Bit 10 }
  296.     1: UNSIGNED EXTNAMES :;
  297. {= Bit 11 }
  298.     1: UNSIGNED PERSNETMAIL :;
  299. {= Bit 12 }
  300.     1: UNSIGNED PRIVATEIMPORT :;
  301. {= Bit 13 }
  302.     1: UNSIGNED KEEPEXPNETMAIL :;
  303. {= Bit 14 }
  304.     1: UNSIGNED KILLEMPTYNETMAIL :;
  305.   end {mailOptionsTyp};
  306. type
  307.   mbOptionsTyp = record
  308.     1: UNSIGNED SORTNEW :;
  309. {= bit 0 }
  310.     1: UNSIGNED SORTSUBJECT :;
  311. {= bit 1 }
  312.     1: UNSIGNED UPDATECHAINS :;
  313. {= bit 2 }
  314.     1: UNSIGNED RETEAR :;
  315. {= bit 3 }
  316.     1: UNSIGNED :;
  317. {= bit 4 }
  318.     1: UNSIGNED :;
  319. {= bit 5 }
  320.     1: UNSIGNED REMOVERE :;
  321. {= bit 6 }
  322.     1: UNSIGNED REMOVELFSR :;
  323. {= bit 7 }
  324.     1: UNSIGNED SCANALWAYS :;
  325. {= bit 8 }
  326.     1: UNSIGNED SCANUPDATE :;
  327. {= bit 9 }
  328.     1: UNSIGNED MULTILINE :;
  329. {= bit 10 }
  330.     1: UNSIGNED :;
  331. {= bit 11 }
  332.     1: UNSIGNED QUICKTOSS :;
  333. {= bit 12 }
  334.     1: UNSIGNED CHECKNETBOARD:;
  335. {= bit 13 }
  336.     1: UNSIGNED :;
  337. {= bit 14 }
  338.     1: UNSIGNED SYSOPIMPORT :;
  339.   end {mbOptionsTyp};
  340. type
  341.   mgrOptionsTyp = record
  342.     1: UNSIGNED KEEPREQUEST :;
  343. {= Bit 0 }
  344.     1: UNSIGNED KEEPRECEIPT :;
  345. {= Bit 1 }
  346.     1: UNSIGNED SENDUPLARLIST:;
  347. {= Bit 2 }
  348.     1: UNSIGNED :;
  349. {= Bit 3 }
  350.     1: UNSIGNED AUTODISCAREA :;
  351. {= Bit 4 }
  352.     1: UNSIGNED AUTODISCDEL :;
  353. {= Bit 5 has temp. no effect, rec is always deleted }
  354.     3: UNSIGNED :;
  355. {= Bit 6-8 }
  356.     1: UNSIGNED ALLOWADDALL :;
  357. {= Bit 9 }
  358.     1: UNSIGNED ALLOWACTIVE :;
  359. {= Bit 10 }
  360.     1: UNSIGNED ALLOWBCL :;
  361. {= Bit 11 }
  362.     1: UNSIGNED ALLOWPASSWORD:;
  363. {= Bit 12 }
  364.     1: UNSIGNED ALLOWPKTPWD :;
  365. {= Bit 13 }
  366.     1: UNSIGNED ALLOWNOTIFY :;
  367. {= Bit 14 }
  368.     1: UNSIGNED ALLOWCOMPR :;
  369.   end {mgrOptionsTyp};
  370.   IFDEF = mgrOptionsTyp;
  371.   0 = mgrOptionsTyp;
  372. type
  373.   defaultOptionsTyp = record
  374.     1: UNSIGNED ACTIVE :;
  375. {= Bit 0 }
  376.     1: UNSIGNED TINYSEENBY :;
  377. {= Bit 1 }
  378.     1: UNSIGNED SECURITY :;
  379. {= Bit 2 }
  380.     1: UNSIGNED :;
  381. {= Bit 3 }
  382.     1: UNSIGNED ALLOWPRIVATE:;
  383. {= Bit 4 }
  384.     1: UNSIGNED IMPSEENBY :;
  385. {= Bit 5 }
  386.     1: UNSIGNED CHECKSEENBY :;
  387. {= Bit 6 }
  388.     1: UNSIGNED :;
  389. {= Bit 7 }
  390.     1: UNSIGNED LOCAL :;
  391. {= Bit 8 }
  392.     1: UNSIGNED :;
  393. {= Bit 9 }
  394.     1: UNSIGNED PASSTHROUGH :;
  395. {= Bit 10 }
  396.     3: UNSIGNED :;
  397. {= Bit 11-13 }
  398.     1: UNSIGNED ARRIVALDATE :;
  399. {= Bit 14 }
  400.     1: UNSIGNED SYSOPREAD :;
  401.   end {defaultOptionsTyp};
  402.   ENDIF = defaultOptionsTyp;
  403. type
  404.   uplOptType = record
  405.     1: UNSIGNED ADDPLUSPREFIX :;
  406. {= BIT 0 }
  407.     3: UNSIGNED :;
  408.     1: UNSIGNED UNCONDITIONAL :;
  409. {= BIT 4 }
  410.     11: UNSIGNED :;
  411.   end {uplOptType};
  412.  
  413. type
  414.   userType = record
  415.     userName: Array[0..36-1] of UCHAR;
  416.     reserved: Array[0..28-1] of UCHAR;
  417.   end {userType};
  418.  
  419. type
  420.   uplinkReqType = record
  421.     node: NODENUMTYPE;
  422.     program: Array[0..9-1] of UCHAR;
  423.     password: Array[0..17-1] of UCHAR;
  424.     fileName: Array[0..13-1] of UCHAR;
  425.     fileType: UCHAR;
  426.     groups: U32;
  427.     originAka: UCHAR;
  428.     options: UPLOPTTYPE;
  429.     reserved: Array[0..9-1] of UCHAR;
  430.   end {uplinkReqType};
  431.  
  432. type
  433.   akaMatchNodeType = record
  434.     valid: U16;
  435.     zone: U16;
  436.     net: U16;
  437.     node: U16;
  438.   end {akaMatchNodeType};
  439.  
  440. type
  441.   akaMatchType = record
  442.     amNode: AKAMATCHNODETYPE;
  443.     aka: U16;
  444.   end {akaMatchType};
  445.  
  446. {+// ATTENTION: FMAIL.CFG does NOT use the new config file type yet (no header) !!!*/ }
  447.  
  448. type
  449.   configType = record
  450.     versionMajor: UCHAR;
  451.     versionMinor: UCHAR;
  452.     creationDate: S32;
  453.     key: U32;
  454.     reservedKey: U32;
  455.     relKey1: U32;
  456.     relKey2: U32;
  457.     reserved1: Array[0..20-1] of UCHAR;
  458.     maxForward: U16;
  459.     mgrOptions: MGROPTIONSTYPE;
  460.     _akaList: _AKALISTTYPE;
  461.     _netmailBoard: Array[0..MAX_NA_OLD-1] of U16;
  462.     _reservedNet: Array[0..16-MAX_NA_OLD-1] of U16;
  463.     genOptions: GENOPTIONSTYPE;
  464.     mbOptions: MBOPTIONSTYPE;
  465.     mailOptions: MAILOPTIONSTYPE;
  466.     maxPktSize: U16;
  467.     kDupRecs: U16;
  468.     mailer: U16;
  469.     bbsProgram: U16;
  470.     maxBundleSize: U16;
  471.     extraHandles: U16;
  472. {= 0-235 }
  473.     autoRenumber: U16;
  474.     bufSize: U16;
  475.     ftBufSize: U16;
  476.     allowedNumNetmail: U16;
  477.     logInfo: U16;
  478.     logStyle: U16;
  479.     activTimeOut: U16;
  480.     maxMsgSize: U16;
  481.     reserved2: Array[0..64-1] of UCHAR;
  482.     colorSet: U16;
  483.     sysopName: Array[0..36-1] of UCHAR;
  484.     defaultArc: U16;
  485.     _adiscDaysNode: U16;
  486.     _adiscDaysPoint: U16;
  487.     _adiscSizeNode: U16;
  488.     _adiscSizePoint: U16;
  489.     reserved3: Array[0..16-1] of UCHAR;
  490.     tearType: UCHAR;
  491.     tearLine: Array[0..25-1] of UCHAR;
  492.     summaryLogName: PATHTYPE;
  493.     recBoard: U16;
  494.     badBoard: U16;
  495.     dupBoard: U16;
  496.     topic1: Array[0..16-1] of UCHAR;
  497.     topic2: Array[0..16-1] of UCHAR;
  498.     bbsPath: PATHTYPE;
  499.     netPath: PATHTYPE;
  500.     sentPath: PATHTYPE;
  501.     rcvdPath: PATHTYPE;
  502.     inPath: PATHTYPE;
  503.     outPath: PATHTYPE;
  504.     securePath: PATHTYPE;
  505.     logName: PATHTYPE;
  506.     swapPath: PATHTYPE;
  507.     semaphorePath: PATHTYPE;
  508.     pmailPath: PATHTYPE;
  509.     areaMgrLogName: PATHTYPE;
  510.     autoRAPath: PATHTYPE;
  511.     autoFolderFdPath: PATHTYPE;
  512.     autoAreasBBSPath: PATHTYPE;
  513.     autoGoldEdAreasPath: PATHTYPE;
  514.     unArc: ARCHIVERINFO;
  515.     unZip: ARCHIVERINFO;
  516.     unLzh: ARCHIVERINFO;
  517.     unPak: ARCHIVERINFO;
  518.     unZoo: ARCHIVERINFO;
  519.     unArj: ARCHIVERINFO;
  520.     unSqz: ARCHIVERINFO;
  521.     GUS: ARCHIVERINFO;
  522.     arc: ARCHIVERINFO;
  523.     zip: ARCHIVERINFO;
  524.     lzh: ARCHIVERINFO;
  525.     pak: ARCHIVERINFO;
  526.     zoo: ARCHIVERINFO;
  527.     arj: ARCHIVERINFO;
  528.     sqz: ARCHIVERINFO;
  529.     customArc: ARCHIVERINFO;
  530.     autoFMail102Path: PATHTYPE;
  531.     reserved4: Array[0..35-1] of UCHAR;
  532.     _optionsAKA: Array[0..MAX_NA_OLD-1] of AREAOPTIONSTYPE;
  533.     _groupsQBBS: Array[0..MAX_NA_OLD-1] of UCHAR;
  534.     _templateSecQBBS: Array[0..MAX_NA_OLD-1] of U16;
  535.     _templateFlagsQBBS: Array[0..MAX_NA_OLD-1] of: Array[0..4-1] of UCHAR;
  536.     _attr2RA: Array[0..MAX_NA_OLD-1] of UCHAR;
  537.     _aliasesQBBS: Array[0..MAX_NA_OLD-1] of UCHAR;
  538.     _groupRA: Array[0..MAX_NA_OLD-1] of U16;
  539.     _altGroupRA: Array[0..MAX_NA_OLD-1] of: Array[0..3-1] of U16;
  540.     _qwkName: Array[0..MAX_NA_OLD-1] of: Array[0..13-1] of UCHAR;
  541.     _minAgeSBBS: Array[0..MAX_NA_OLD-1] of U16;
  542.     _daysRcvdAKA: Array[0..MAX_NA_OLD-1] of U16;
  543.     _replyStatSBBS: Array[0..MAX_NA_OLD-1] of UCHAR;
  544.     _attrSBBS: Array[0..MAX_NA_OLD-1] of U16;
  545.     groupDescr: Array[0..26-1] of: Array[0..27-1] of UCHAR;
  546.     reserved5: Array[0..9-1] of UCHAR;
  547.     _msgKindsRA: Array[0..MAX_NA_OLD-1] of UCHAR;
  548.     _attrRA: Array[0..MAX_NA_OLD-1] of UCHAR;
  549.     _readSecRA: Array[0..MAX_NA_OLD-1] of U16;
  550.     _readFlagsRA: Array[0..MAX_NA_OLD-1] of: Array[0..4-1] of UCHAR;
  551.     _writeSecRA: Array[0..MAX_NA_OLD-1] of U16;
  552.     _writeFlagsRA: Array[0..MAX_NA_OLD-1] of: Array[0..4-1] of UCHAR;
  553.     _sysopSecRA: Array[0..MAX_NA_OLD-1] of U16;
  554.     _sysopFlagsRA: Array[0..MAX_NA_OLD-1] of: Array[0..4-1] of UCHAR;
  555.     _daysAKA: Array[0..MAX_NA_OLD-1] of U16;
  556.     _msgsAKA: Array[0..MAX_NA_OLD-1] of U16;
  557.     _descrAKA: Array[0..MAX_NA_OLD-1] of: Array[0..51-1] of UCHAR;
  558.     users: Array[0..MAX_USERS-1] of USERTYPE;
  559.     akaMatch: Array[0..MAX_MATCH-1] of AKAMATCHTYPE;
  560.     MAX_MATCH-1] of: PUCHAR RESERVED6[992-10;
  561.     tossedAreasList: PATHTYPE;
  562.     sentEchoPath: PATHTYPE;
  563.     preUnarc: ARCHIVERINFO;
  564.     postUnarc: ARCHIVERINFO;
  565.     preArc: ARCHIVERINFO;
  566.     postArc: ARCHIVERINFO;
  567.     unUc2: ARCHIVERINFO;
  568.     unRar: ARCHIVERINFO;
  569.     unJar: ARCHIVERINFO;
  570.     resUnpack: Array[0..5-1] of ARCHIVERINFO;
  571.     uc2: ARCHIVERINFO;
  572.     rar: ARCHIVERINFO;
  573.     jar: ARCHIVERINFO;
  574.     resPack: Array[0..5-1] of ARCHIVERINFO;
  575.     uplinkReq: Array[0..MAX_UPLREQ+32-1] of UPLINKREQTYPE;
  576.     unArc32: ARCHIVERINFO;
  577.     unZip32: ARCHIVERINFO;
  578.     unLzh32: ARCHIVERINFO;
  579.     unPak32: ARCHIVERINFO;
  580.     unZoo32: ARCHIVERINFO;
  581.     unArj32: ARCHIVERINFO;
  582.     unSqz32: ARCHIVERINFO;
  583.     unUc232: ARCHIVERINFO;
  584.     unRar32: ARCHIVERINFO;
  585.     GUS32: ARCHIVERINFO;
  586.     unJar32: ARCHIVERINFO;
  587.     resUnpack32: Array[0..5-1] of ARCHIVERINFO;
  588.     preUnarc32: ARCHIVERINFO;
  589.     postUnarc32: ARCHIVERINFO;
  590.     arc32: ARCHIVERINFO;
  591.     zip32: ARCHIVERINFO;
  592.     lzh32: ARCHIVERINFO;
  593.     pak32: ARCHIVERINFO;
  594.     zoo32: ARCHIVERINFO;
  595.     arj32: ARCHIVERINFO;
  596.     sqz32: ARCHIVERINFO;
  597.     uc232: ARCHIVERINFO;
  598.     rar32: ARCHIVERINFO;
  599.     customArc32: ARCHIVERINFO;
  600.     jar32: ARCHIVERINFO;
  601.     resPack32: Array[0..5-1] of ARCHIVERINFO;
  602.     preArc32: ARCHIVERINFO;
  603.     postArc32: ARCHIVERINFO;
  604.     descrAKA: Array[0..MAX_NETAKAS-1] of: Array[0..51-1] of UCHAR;
  605.     qwkName: Array[0..MAX_NETAKAS-1] of: Array[0..13-1] of UCHAR;
  606.     optionsAKA: Array[0..MAX_NETAKAS-1] of AREAOPTIONSTYPE;
  607.     msgKindsRA: Array[0..MAX_NETAKAS-1] of UCHAR;
  608.     daysAKA: Array[0..MAX_NETAKAS-1] of U16;
  609.     msgsAKA: Array[0..MAX_NETAKAS-1] of U16;
  610.     groupsQBBS: Array[0..MAX_NETAKAS-1] of UCHAR;
  611.     attrRA: Array[0..MAX_NETAKAS-1] of UCHAR;
  612.     attr2RA: Array[0..MAX_NETAKAS-1] of UCHAR;
  613.     attrSBBS: Array[0..MAX_NETAKAS-1] of U16;
  614.     aliasesQBBS: Array[0..MAX_NETAKAS-1] of UCHAR;
  615.     groupRA: Array[0..MAX_NETAKAS-1] of U16;
  616.     altGroupRA: Array[0..MAX_NETAKAS-1] of: Array[0..3-1] of U16;
  617.     minAgeSBBS: Array[0..MAX_NETAKAS-1] of U16;
  618.     daysRcvdAKA: Array[0..MAX_NETAKAS-1] of U16;
  619.     replyStatSBBS: Array[0..MAX_NETAKAS-1] of UCHAR;
  620.     readSecRA: Array[0..MAX_NETAKAS-1] of U16;
  621.     readFlagsRA: Array[0..MAX_NETAKAS-1] of: Array[0..8-1] of UCHAR;
  622.     writeSecRA: Array[0..MAX_NETAKAS-1] of U16;
  623.     writeFlagsRA: Array[0..MAX_NETAKAS-1] of: Array[0..8-1] of UCHAR;
  624.     sysopSecRA: Array[0..MAX_NETAKAS-1] of U16;
  625.     sysopFlagsRA: Array[0..MAX_NETAKAS-1] of: Array[0..8-1] of UCHAR;
  626.     templateSecQBBS: Array[0..MAX_NETAKAS-1] of U16;
  627.     templateFlagsQBBS: Array[0..MAX_NETAKAS-1] of: Array[0..8-1] of UCHAR;
  628.     reserved7: Array[0..512-1] of UCHAR;
  629.     netmailBoard: Array[0..MAX_NETAKAS_F-1] of U16;
  630.     akaList: AKALISTTYPE;
  631.   end {configType};
  632.  
  633.  
  634.   (****************************************************************************************************)
  635.   (**                                           Area Manager                                         **)
  636.   (****************************************************************************************************)
  637.  
  638. {$IFDEF __FMAILX__ || defined(__32BIT__)}
  639. const
  640.   MAX_AREAS = 4096;
  641. {$ELSE}
  642. const
  643.   MAX_AREAS = 512;
  644. {$ENDIF}
  645.  
  646. const
  647.   MAX_FORWARD = 64;
  648. const
  649.   MAX_FORWARDOLD = 64;
  650. const
  651.   MAX_FORWARDDEF = 256; {// NOTE: this is a dummy. 'config.maxForward'}
  652. {/// contains the real size. 256 is the maximum. }
  653. const
  654.   MAX_FORWARD = config.maxForward;
  655. const
  656.   RAWECHO_SIZE = sizeof(rawEchoType);
  657.  
  658. const
  659.   MB_PATH_LEN_OLD = 19;
  660. const
  661.   MB_PATH_LEN = 61;
  662. const
  663.   ECHONAME_LEN_090 = 25;
  664. const
  665.   ECHONAME_LEN = 51;
  666. const
  667.   COMMENT_LEN = 51;
  668. const
  669.   ORGLINE_LEN = 59;
  670.  
  671. type
  672.   = UCHAR AREANAMETYPE[ECHONAME_LEN];
  673.  
  674. {+// NOTE: See above for the file header structure !!!*/ }
  675.  
  676. type
  677.   areaStatTyp = record
  678.     1: UNSIGNED TOSSEDTO :;
  679. {= BIT 0 }
  680.     15: UNSIGNED :;
  681.   end {areaStatTyp};
  682. type
  683.   rawEchoType = record
  684.     signature: U16;
  685. {= contains "AE" for echo areas in FMAIL.AR and }
  686. {+// "AD" for default settings in FMAIL.ARD*/ }
  687.     writeLevel: U16;
  688.     areaName: AREANAMETYPE;
  689.     comment: Array[0..COMMENT_LEN-1] of UCHAR;
  690.     options: AREAOPTIONSTYPE;
  691.     boardNumRA: U16;
  692.     msgBaseType: UCHAR;
  693.     msgBasePath: Array[0..MB_PATH_LEN-1] of UCHAR;
  694.     board: U16;
  695.     originLine: Array[0..ORGLINE_LEN-1] of UCHAR;
  696.     address: U16;
  697.     group: U32;
  698.     _alsoSeenBy: U16;
  699. {= obsolete: see the 32-bit alsoSeenBy below }
  700.     msgs: U16;
  701.     days: U16;
  702.     daysRcvd: U16;
  703. {+// old startposition of export[MAX_FORWARD]*/ }
  704.     readSecRA: U16;
  705.     flagsRdRA: Array[0..4-1] of UCHAR;
  706.     flagsRdNotRA: Array[0..4-1] of UCHAR;
  707.     writeSecRA: U16;
  708.     flagsWrRA: Array[0..4-1] of UCHAR;
  709.     flagsWrNotRA: Array[0..4-1] of UCHAR;
  710.     sysopSecRA: U16;
  711.     flagsSysRA: Array[0..4-1] of UCHAR;
  712.     flagsSysNotRA: Array[0..4-1] of UCHAR;
  713.     templateSecQBBS: U16;
  714.     flagsTemplateQBBS: Array[0..4-1] of UCHAR;
  715.     _internalUse: UCHAR;
  716.     netReplyBoardRA: U16;
  717.     boardTypeRA: UCHAR;
  718.     attrRA: UCHAR;
  719.     attr2RA: UCHAR;
  720.     groupRA: U16;
  721.     altGroupRA: Array[0..3-1] of U16;
  722.     msgKindsRA: UCHAR;
  723.     qwkName: Array[0..13-1] of UCHAR;
  724.     minAgeSBBS: U16;
  725.     attrSBBS: U16;
  726.     replyStatSBBS: UCHAR;
  727.     groupsQBBS: UCHAR;
  728.     aliasesQBBS: UCHAR;
  729.     lastMsgTossDat: U32;
  730.     lastMsgScanDat: U32;
  731.     alsoSeenBy: U32;
  732.     stat: AREASTATTYPE;
  733.     reserved: Array[0..180-1] of UCHAR;
  734.     export: Array[0..MAX_FORWARDDEF-1] of NODENUMXTYPE;
  735.   end {rawEchoType};
  736.  
  737.  
  738.   (****************************************************************************************************)
  739.   (**                                                Node manager                                    **)
  740.   (****************************************************************************************************)
  741.  
  742. {$IFDEF __32BIT__ || defined __FMAILX__}
  743. const
  744.   MAX_NODEMGR = 1024;
  745. {$ELSE}
  746. const
  747.   MAX_NODEMGR = 256;
  748. {$ENDIF}
  749.  
  750. const
  751.   PKTOUT_PATH_LEN = 53;
  752.  
  753. const
  754.   PKT_TYPE_2PLUS = 1;
  755. const
  756.   CAPABILITY = PKT_TYPE_2PLUS;
  757.  
  758. type
  759.   nodeOptionsType = record
  760.     1: UNSIGNED FIXDATE :;
  761. {= Bit 0 }
  762.     1: UNSIGNED TINYSEENBY :;
  763. {= Bit 1 }
  764.     1: UNSIGNED :;
  765. {= Bit 2 }
  766.     1: UNSIGNED IGNOREPWD :;
  767. {= Bit 3 }
  768.     1: UNSIGNED ACTIVE :;
  769. {= Bit 4 }
  770.     1: UNSIGNED :;
  771.     1: UNSIGNED ROUTETOPOINT:;
  772. {= Bit 6 }
  773.     1: UNSIGNED PACKNETMAIL :;
  774. {= Bit 7 }
  775.     1: UNSIGNED :;
  776. {= Bit 8 }
  777.     3: UNSIGNED :;
  778.     1: UNSIGNED FORWARDREQ :;
  779. {= Bit 12 }
  780.     1: UNSIGNED REMMAINT :;
  781. {= Bit 13 }
  782.     1: UNSIGNED ALLOWRESCAN :;
  783. {= Bit 14 }
  784.     1: UNSIGNED NOTIFY :;
  785.   end {nodeOptionsType};
  786.  
  787. type
  788.   nodeInfoTypeOld = record
  789.     }: = OLD !!!;
  790. {
  791.     node: NODENUMTYPE;
  792.     reserved1: Array[0..2-1] of UCHAR;
  793.     capability: U16;
  794.     archiver: U16;
  795.     options: NODEOPTIONSTYPE;
  796.     groups: U32;
  797.     outStatus: U16;
  798.     reserved2: Array[0..32-1] of UCHAR;
  799.     password: Array[0..18-1] of UCHAR;
  800.     packetPwd: Array[0..10-1] of UCHAR;
  801.     reserved: Array[0..2-1] of UCHAR;
  802.     viaNode: NODENUMTYPE;
  803.     sysopName: Array[0..36-1] of UCHAR;
  804.   end {nodeInfoTypeOld};
  805.  
  806. {+// NOTE: see above for the file header structure !!!*/ }
  807.  
  808. type
  809.   nodeInfoType = record
  810.     signature: U16;
  811. {= contains "ND" }
  812.     writeLevel: U16;
  813.     node: NODENUMTYPE;
  814.     viaNode: NODENUMTYPE;
  815.     capability: U16;
  816.     options: NODEOPTIONSTYPE;
  817.     archiver: U8;
  818.     reserved1: U8;
  819.     groups: U32;
  820.     outStatus: U16;
  821.     sysopName: Array[0..36-1] of UCHAR;
  822.     password: Array[0..18-1] of UCHAR;
  823.     packetPwd: Array[0..9-1] of UCHAR;
  824.     useAka: UCHAR;
  825.     lastMsgRcvdDat: U32;
  826.     lastMsgSentDat: U32;
  827.     lastNewBundleDat: U32;
  828.     pktOutPath: Array[0..PKTOUT_PATH_LEN-1] of UCHAR;
  829.     passiveDays: U16;
  830.     passiveSize: U16;
  831.     lastSentBCL: U32;
  832.     autoBCL: U16;
  833.     _lastNewBundleDat: U32;
  834.     reserved2: Array[0..17-1] of UCHAR;
  835.   end {nodeInfoType};
  836.  
  837.   (****************************************************************************************************)
  838.   (**                                        Pack Manager                                            **)
  839.   (****************************************************************************************************)
  840.  
  841. const
  842.   PACK_STR_SIZE = 64;
  843. const
  844.   MAX_PACK = 128;
  845.  
  846. type
  847.   = UCHAR PACKENTRYTYPE[PACK_STR_SIZE];
  848. type
  849.   = PACKENTRYTYPE PACKTYPE[MAX_PACK];
  850.  
  851.  
  852.   (****************************************************************************************************)
  853.   (**                                            FMAIL.BDE                                           **)
  854.   (****************************************************************************************************)
  855.  
  856. const
  857.   MAX_BAD_ECHOS = 50;
  858.  
  859. type
  860.   badEchoType = record
  861.     badEchoName: AREANAMETYPE;
  862.     srcNode: NODENUMTYPE;
  863.     destAka: S16;
  864.   end {badEchoType};
  865.  
  866.  
  867.  
  868. var
  869.   DLLLoaded: Boolean { is DLL (dynamically) loaded already? }
  870.     {$IFDEF WIN32} = False; {$ENDIF}
  871.  
  872. implementation
  873.  
  874. var
  875.   SaveExit: pointer;
  876.   DLLHandle: THandle;
  877. {$IFNDEF MSDOS}
  878.   ErrorMode: Integer;
  879. {$ENDIF}
  880.  
  881.   procedure NewExit; far;
  882.   begin
  883.     ExitProc := SaveExit;
  884.     FreeLibrary(DLLHandle)
  885.   end {NewExit};
  886.  
  887. procedure LoadDLL;
  888. begin
  889.   if DLLLoaded then Exit;
  890. {$IFNDEF MSDOS}
  891.   ErrorMode := SetErrorMode($8000{SEM_NoOpenFileErrorBox});
  892. {$ENDIF}
  893.   DLLHandle := LoadLibrary('FMSTRUCT.DLL');
  894.   if DLLHandle >= 32 then
  895.   begin
  896.     DLLLoaded := True;
  897.     SaveExit := ExitProc;
  898.     ExitProc := @NewExit;
  899.   end
  900.   else
  901.   begin
  902.     DLLLoaded := False;
  903.     { Error: FMSTRUCT.DLL could not be loaded !! }
  904.   end;
  905. {$IFNDEF MSDOS}
  906.   SetErrorMode(ErrorMode)
  907. {$ENDIF}
  908. end {LoadDLL};
  909.  
  910. begin
  911.   LoadDLL;
  912. end.
  913.