1 //  This may look like C code, but it is really -*- C++ -*-
2 
3 //  ------------------------------------------------------------------
4 //  The Goldware Library
5 //  Copyright (C) 1990-1999 Odinn Sorensen
6 //  ------------------------------------------------------------------
7 //  This library is free software; you can redistribute it and/or
8 //  modify it under the terms of the GNU Library General Public
9 //  License as published by the Free Software Foundation; either
10 //  version 2 of the License, or (at your option) any later version.
11 //
12 //  This library is distributed in the hope that it will be useful,
13 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 //  Library General Public License for more details.
16 //
17 //  You should have received a copy of the GNU Library General Public
18 //  License along with this program; if not, write to the Free
19 //  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 //  MA 02111-1307, USA
21 //  ------------------------------------------------------------------
22 //  $Id: gs_pop.h,v 1.3 2005/10/21 02:31:39 ssianky Exp $
23 //  ------------------------------------------------------------------
24 //  Portal of Power configuration structures.
25 //  ------------------------------------------------------------------
26 
27 #ifndef __GS_POP_H
28 #define __GS_POP_H
29 
30 
31 //  ------------------------------------------------------------------
32 
33 #if defined(GOLD_CANPACK)
34 #pragma pack(1)
35 #endif
36 
37 //  ------------------------------------------------------------------
38 //  Pascal types
39 
40 typedef char      Char;
41 typedef uint8_t   Byte;
42 typedef uint8_t   Boolean;
43 typedef  int16_t  Integer;
44 typedef uint16_t  Word;
45 typedef  int32_t  LongInt;
46 
47 
48 //  ------------------------------------------------------------------
49 //  Misc. types
50 
51 typedef LongInt PopDate;
52 typedef LongInt PopTime;
53 typedef Byte ColorSet[62];
54 typedef Char PathStr[80];
55 
56 // All string types, very handy!
57 typedef char
58   S1[2],     S2[3],     S3[4],     S4[5],     S5[6],
59   S6[7],     S7[8],     S8[9],     S9[10],    S10[11],
60   S11[12],   S12[13],   S13[14],   S14[15],   S15[16],
61   S16[17],   S17[18],   S18[19],   S19[20],   S20[21],
62   S21[22],   S22[23],   S23[24],   S24[25],   S25[26],
63   S26[27],   S27[28],   S28[29],   S29[30],   S30[31],
64   S31[32],   S32[33],   S33[34],   S34[35],   S35[36],
65   S36[37],   S37[38],   S38[39],   S39[40],   S40[41],
66   S41[42],   S42[43],   S43[44],   S44[45],   S45[46],
67   S46[47],   S47[48],   S48[49],   S49[50],   S50[51],
68   S51[52],   S52[53],   S53[54],   S54[55],   S55[56],
69   S56[57],   S57[58],   S58[59],   S59[60],   S60[61],
70   S61[62],   S62[63],   S63[64],   S64[65],   S65[66],
71   S66[67],   S67[68],   S68[69],   S69[70],   S70[71],
72   S71[72],   S72[73],   S73[74],   S74[75],   S75[76],
73   S76[77],   S77[78],   S78[79],   S79[80],   S80[81],
74   S81[82],   S82[83],   S83[84],   S84[85],   S85[86],
75   S86[87],   S87[88],   S88[89],   S89[90],   S90[91],
76   S91[92],   S92[93],   S93[94],   S94[95],   S95[96],
77   S96[97],   S97[98],   S98[99],   S99[100],  S100[101],
78   S101[102], S102[103], S103[104], S104[105], S105[106],
79   S106[107], S107[108], S108[109], S109[110], S110[111],
80   S111[112], S112[113], S113[114], S114[115], S115[116],
81   S116[117], S117[118], S118[119], S119[120], S120[121],
82   S121[122], S122[123], S123[124], S124[125], S125[126],
83   S126[127], S127[128], S128[129], S129[130], S130[131],
84   S131[132], S132[133], S133[134], S134[135], S135[136],
85   S136[137], S137[138], S138[139], S139[140], S140[141],
86   S141[142], S142[143], S143[144], S144[145], S145[146],
87   S146[147], S147[148], S148[149], S149[150], S150[151],
88   S151[152], S152[153], S153[154], S154[155], S155[156],
89   S156[157], S157[158], S158[159], S159[160], S160[161],
90   S161[162], S162[163], S163[164], S164[165], S165[166],
91   S166[167], S167[168], S168[169], S169[170], S170[171],
92   S171[172], S172[173], S173[174], S174[175], S175[176],
93   S176[177], S177[178], S178[179], S179[180], S180[181],
94   S181[182], S182[183], S183[184], S184[185], S185[186],
95   S186[187], S187[188], S188[189], S189[190], S190[191],
96   S191[192], S192[193], S193[194], S194[195], S195[196],
97   S196[197], S197[198], S198[199], S199[200], S200[201],
98   S201[202], S202[203], S203[204], S204[205], S205[206],
99   S206[207], S207[208], S208[209], S209[210], S210[211],
100   S211[212], S212[213], S213[214], S214[215], S215[216],
101   S216[217], S217[218], S218[219], S219[220], S220[221],
102   S221[222], S222[223], S223[224], S224[225], S225[226],
103   S226[227], S227[228], S228[229], S229[230], S230[231],
104   S231[232], S232[233], S233[234], S234[235], S235[236],
105   S236[237], S237[238], S238[239], S239[240], S240[241],
106   S241[242], S242[243], S243[244], S244[245], S245[246],
107   S246[247], S247[248], S248[249], S249[250], S250[251],
108   S251[252], S252[253], S253[254], S254[255], S255[256];
109 
110 // Nodelist Types supported
111 typedef Byte NodeListType;
112 enum NodeListTypes {
113   NewNodelistType,
114   QBBSNodelistType,
115   RANodelistType,
116   Version7,
117   SBBSNodeListType
118 };
119 
120 
121 // A 4D FidoNet address
122 struct AddressType {
123   Integer Zone,
124           Net,
125           Node,
126           Point;
127 };
128 
129 typedef S50 SendToType[2];
130 
131 struct FunctionKeyType {
132   Byte  ErrorLevel;
133   S70   Description;
134 };
135 
136 #define MaxAddresses 16
137 
138 
139 //  ------------------------------------------------------------------
140 //  Contents : Configuration information.
141 //  FileName : PORTAL.CFG
142 //  Size     : 10240 bytes
143 //  Comments :
144 
145 enum NodeStatsT { nsUnknown, nsKnown, nsPassword };
146 enum ReqLimitsT { rlPrCall, rlPrDay };
147 
148 #define NodeStatT 3
149 #define ReqLimitT 2
150 
151 typedef struct ConfigT *ConfigP;
152 
153 struct ConfigT {
154   Byte              Version;
155   Byte              TaskNumber;
156   PathStr           SwapDir,
157                     Inbound,
158                     Outbound,
159                     Banner,
160                     DefaultMacro,
161                     Editor,
162                     LogfileName;
163   Byte              LogLevel;
164   Boolean           UseYearInLog;
165 
166   PathStr           NodeList;
167   NodeListType      NodelistTyp;
168 
169   Byte              MainAdrNum;
170   AddressType       Adresses[MaxAddresses];
171 
172   Integer           PointNet;
173   Boolean           UseFakeAddress;
174 
175   S20               Sysop;
176   S60               System;
177 
178   Boolean           SwapOnExec;
179 
180   PathStr           EnterBBSText,
181 
182                     DoingMailText,
183 
184                     PressESCText;
185 
186   Byte              MaxRinging;
187   PopTime           ZMHStart,
188                     ZMHEnd,
189                     CallTime,
190                     CallWidth;
191   Boolean           ConnectFastest;
192 
193   PopTime           OutReReadDelay;
194 
195   S20               FuncReqPwd;
196   Boolean           UseJanus;
197   Boolean           UseEMSI;
198   Boolean           FastCalls;
199   Boolean           KeepEmptyDirs;
200 
201   Byte              Filler[272];
202 
203   FunctionKeyType   FKey[2][10];
204   ColorSet          Color[4];
205 
206   struct {
207     Byte              BBSType;
208     PathStr           BBSPath;
209     PathStr           UserFile;
210     Word              MinBaud;
211     PathStr           MinBaudFile;
212     Byte              UserErrorLevel;
213     struct {
214       Char              Key;
215       S8                BatName;
216     } Multi[5];
217     Byte              Filler[64];
218   } BBS;
219 
220   struct {
221     Byte              CommPort;
222     Word              BaudRate;
223     S40               PreInit,
224                       Init,
225                       NoAnswer,
226                       Dial,
227                       Busy,
228                       HangUp,
229                       Answer;
230     PopTime           ReInit;
231 
232     S10               LockedBaud;
233 
234 
235     struct {
236       S10               ConStr;
237       Byte              ErrLvl;
238     } ExitStr[5];
239     struct {
240       Byte              Bit;
241       S40               Dial;
242       Boolean           DialOut;
243       Word              Baud;
244     } ModemType[8];
245     Byte              Filler[64];
246   } Modem;
247 
248   struct {
249     PopTime           BlankTime;
250     Boolean           ChkSnow,
251                       KeepOffScrMode,
252                       ScrMode,
253                       HardwareBlank,
254                       ExplodingWin;
255     Byte              Filler[32];
256   } Screen;
257 
258   struct {
259     PathStr           FileList,
260                       NewsList,
261                       Header,
262                       Footer,
263                       TopFile,
264                       StatFile;
265     Boolean           Adopt;
266     S40               AdoptComment;
267     Boolean           DupeCheck;
268     Boolean           Stat;
269     Boolean           IncludeTop;
270     Byte              Top;
271 
272     Boolean           DkDate;
273     Byte              NewsDays;
274 
275     Byte              Threshold;
276     Boolean           RemMissing,
277                       OkPortal,
278                       ZapZero,
279                       Touch;
280     S12               CrapFiles[10],
281                       ExcludeFiles[10],
282                       NoDupeCheck[10];
283     S12               NonAdoptFiles[10];
284     S3                NonAdoptAreas[10];
285     S3                PrivateAreas[11];
286     PathStr           DoBefore;
287     PathStr           DoAfter;
288     PathStr           DoPack;
289     PathStr           DupeReport;
290     S55               TXTFreq[4];
291     PathStr           OkBimodempath;
292     Byte              Filler[32];
293   } ListFiles;
294 
295   struct {
296     struct {
297       Word              MaxFiles;
298       PopTime           MaxTime;
299       LongInt           MaxBytes;
300     } Limit[NodeStatT][ReqLimitT];
301     Boolean           RspAsPkt;
302     Boolean           SkipAfterFirst;
303 
304 
305     Byte              Filler[63];
306   } Request;
307 
308   struct {
309     S50               AddToSeenBy;
310     Boolean           CheckZones;
311     PathStr           NetMailDir;
312     PathStr           Filler3;
313     Boolean           Secure;
314     PathStr           BadMsgs;
315     PathStr           SaveDupesDir;
316     Word              MaxDupes;
317     PathStr           EchoTossLog;
318     Boolean           StripCrash;
319     Boolean           SetAKASent;
320     Boolean           PvtEchoMail;
321     Boolean           SaveFwdMail;
322     PathStr           RouteFile;
323     Boolean           ForwardMail;
324     Boolean           KillFwdFiles;
325     PathStr           Filler2;
326     Boolean           OldExt;
327     Byte              DefaultPacker;
328     Byte              NetMailBoard;
329     Byte              Filler[128];
330   } MailScanner;
331 
332   struct {
333     PathStr           PreCmd;
334     PathStr           SecureDir;
335     Word              MsgAttribute;
336     Boolean           KillSent;
337     Boolean           MsgPrivate;
338     S72               Subject;
339     Byte              Filler[64];
340   } FwdFile;
341 
342   struct {
343     PathStr           DupeDir;
344     PathStr           HoldDir;
345     PathStr           BeforeMoving;
346 
347     Boolean           RequestMissing;
348 
349     Byte              Filler[64];
350   } Tick;
351 
352   struct {
353     S10               BiOverride[5];
354 
355 
356     Boolean           NoSendOverride;
357 
358 
359 
360     Word              MaxBaud;
361 
362     PathStr           BiModemPath;
363 
364     Byte              Filler[16];
365   } BiMail;
366 
367   struct {
368     PathStr           CostFileName;
369     S10               IntPrefix;
370     S10               OurPrefix;
371 
372     Boolean           UseFidoUserLst;
373     S5                MTypeStr[8];
374     Byte              Filler[64];
375   } NLCompiler;
376 
377   struct {
378     Boolean           CRSendsLF,
379                       DestructiveBS;
380     S40               ModemInit;
381     Byte              Filler[128];
382   } DumbTerm;
383 
384   struct {
385     Char              Key;
386     S8                Name;
387     Boolean           AskDLName;
388     S10               AutoStart;
389     PathStr           SendCmd;
390     PathStr           RecvCmd;
391   } ExtProt[5];
392 
393   struct {
394     Char              DLCntStart,
395 
396 
397                       DLCntStop;
398 
399 
400     Boolean           AdoptDefault,
401                       InsDLCnt,
402                       AddInbound;
403     Byte              FirstArea,
404                       LastArea;
405     Byte              DlCDigits;
406     Boolean           DlCZeroFill;
407     S50               ViewCMD;
408     Byte              Filler[11];
409   } AreaMan;
410 
411   struct {
412     S40               AddCmd,
413                       UnPackCmd,
414                       EraseCmd,
415                       TestCmd;
416   } Packer[7];
417 };
418 
419 
420 //  ------------------------------------------------------------------
421 //  Contents : Message Areas
422 //  FileName : PORTAL.ARE
423 //  Size     : 1024
424 //  Comments : **NOT USED YET**
425 
426 typedef struct AreasTypeT *AreasTypeP;
427 struct AreasTypeT {
428   PathStr           Directory;
429   S32               EchoNames[3];
430   S50               Origin;
431   SendToType        SendTo;
432   SendToType        SendOnly;
433   S20               ScramblePwd;
434   Boolean           StripSeenBy;
435   Boolean           Pvt2EMail;
436   Byte              Level,
437                     Keys;
438   Word              MaxScan;
439   PopDate           ScanDate;
440   Word              Scanned;
441   S40               Description;
442   Byte              AreaType;
443   Boolean           ImportSB;
444   Byte              UsedAka;      // 0 = Address[Config.MainAdrNum], otherwise Address[UsedAka]
445   Byte              Filler[513];
446 };
447 
448 
449 //  ------------------------------------------------------------------
450 //  Contents : Nodelist Segments - for Nodelist Compiler
451 //  FileName : PORTAL.NLS
452 //  Size     : 512 bytes
453 //  Comments : One record per used nodelist. Shared among all tasks
454 
455 typedef struct NodelistSegT *NodelistSegP;
456 struct NodelistSegT {
457   S8                NodeListName;
458   S8                DiffFileName;
459   Boolean           CheckCRC;
460   PathStr           NewNLPath;
461   SendToType        Include;
462   SendToType        Exclude;
463   Byte              Filler[209];
464 };
465 
466 
467 //  ------------------------------------------------------------------
468 
469 #if defined(GOLD_CANPACK)
470 #pragma pack()
471 #endif
472 
473 //  ------------------------------------------------------------------
474 
475 #endif
476 
477 //  ------------------------------------------------------------------
478 
479