|
|
1.1 root 1: /* SBBSDEFS.H */
2:
3: /* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
4:
5: /************************************************************/
6: /* Constants, macros, and typedefs for use ONLY with SBBS */
7: /************************************************************/
8:
9: #ifndef _SBBSDEFS_H
10: #define _SBBSDEFS_H
11:
12: #include "gen_defs.h"
13: #include "nodedefs.h"
14: #include <time.h>
15:
16: /*************/
17: /* Constants */
18: /*************/
19:
20: #define VERSION "2.30" /* Version: Major.minor */
1.1.1.2 ! root 21: #define REVISION 'C'
! 22: #define BETA " beta" /* Space if non-beta, " �eta" otherwise */
! 23:
! 24: #define Y2K_2DIGIT_WINDOW 70
1.1 root 25:
26: /************/
27: /* Maximums */
28: /************/
29:
30: #define MAX_NODES 250
31:
32: #ifdef __FLAT__
33: #define MAX_FILES 10000 /* Maximum number of files per dir */
34: #define MAX_SYSMAIL 50000 /* Maximum number of total emails in system */
35: #else
36: #define MAX_FILES 1000 /* Maximum number of files per dir */
37: #define MAX_SYSMAIL 5000 /* Maximum number of total emails in system */
38: #endif
39: #define MAX_USERXFER 500 /* Maximum number of dest. users of usrxfer */
40:
41:
42: #define LEN_DIR 63 /* Maximum length of directory paths */
43: #define LEN_CMD 63 /* Maximum length of command lines */
44:
45: /* Lengths of various strings */
46: #define LEN_GSNAME 15 /* Group/Lib short name */
47: #define LEN_GLNAME 40 /* Group/Lib long name */
48: #define LEN_SSNAME 25 /* Sub/Dir short name */
49: #define LEN_SLNAME 40 /* Sub/Dir long name */
50:
51: /* User Questions */
52: #define UQ_ALIASES (1L<<0) /* Ask for alias */
53: #define UQ_LOCATION (1L<<1) /* Ask for location */
54: #define UQ_ADDRESS (1L<<2) /* Ask for address */
55: #define UQ_PHONE (1L<<3) /* Ask for phone number */
56: #define UQ_HANDLE (1L<<4) /* Ask for chat handle */
57: #define UQ_DUPHAND (1L<<5) /* Search for duplicate handles */
58: #define UQ_SEX (1L<<6) /* Ask for sex :) */
59: #define UQ_BIRTH (1L<<7) /* Ask for birth date */
60: #define UQ_COMP (1L<<8) /* Ask for computer type */
61: #define UQ_MC_COMP (1L<<9) /* Multiple choice computer type */
62: #define UQ_REALNAME (1L<<10) /* Ask for real name */
63: #define UQ_DUPREAL (1L<<11) /* Search for duplicate real names */
64: #define UQ_COMPANY (1L<<12) /* Ask for company name */
65: #define UQ_NOEXASC (1L<<13) /* Don't allow ex-ASCII in user text */
66: #define UQ_CMDSHELL (1L<<14) /* Ask for command shell */
67: #define UQ_XEDIT (1L<<15) /* Ask for external editor */
68: #define UQ_NODEF (1L<<16) /* Don't ask for default settings */
69: #define UQ_NOCOMMAS (1L<<17) /* Do not require commas in location */
70:
71:
72: /* Different bits in sys_misc */
73: #define SM_CLOSED (1L<<0) /* System is clsoed to New Users */
74: #define SM_SYSSTAT (1L<<1) /* Sysops activity included in statistics */
75: #define SM_NOBEEP (1L<<2) /* No beep sound locally */
76: #define SM_PWEDIT (1L<<3) /* Allow users to change their passwords */
77: #define SM_TIMED_EX (1L<<4) /* Timed event must run exclusively */
78: #define SM_ANON_EM (1L<<5) /* Allow anonymous e-mail */
79: #define SM_LISTLOC (1L<<6) /* Use location of caller in user lists */
80: #define SM_WILDCAT (1L<<7) /* Expand Wildcat color codes in messages */
81: #define SM_PCBOARD (1L<<8) /* Expand PCBoard color codes in messages */
82: #define SM_WWIV (1L<<9) /* Expand WWIV color codes in messages */
83: #define SM_CELERITY (1L<<10) /* Expand Celerity color codes in messages */
84: #define SM_RENEGADE (1L<<11) /* Expand Renegade color codes in messages */
85: #define SM_ECHO_PW (1L<<12) /* Echo passwords locally */
86: #define SM_REQ_PW (1L<<13) /* Require passwords locally */
87: #define SM_L_SYSOP (1L<<14) /* Allow local sysop logon/commands */
88: #define SM_R_SYSOP (1L<<15) /* Allow remote sysop logon/commands */
89: #define SM_QUOTE_EM (1L<<16) /* Allow quoting of e-mail */
90: #define SM_EURODATE (1L<<17) /* Europian date format (DD/MM/YY) */
91: #define SM_MILITARY (1L<<18) /* Military time format */
92: #define SM_TIMEBANK (1L<<19) /* Allow time bank functions */
93: #define SM_FILE_EM (1L<<20) /* Allow file attachments in E-mail */
94: #define SM_SHRTPAGE (1L<<21) /* Short sysop page */
95: #define SM_TIME_EXP (1L<<22) /* Set to expired values if out-of-time */
96: #define SM_FASTMAIL (1L<<23) /* Fast e-mail storage mode */
97: #define SM_QVALKEYS (1L<<24) /* Quick validation keys enabled */
98: #define SM_ERRALARM (1L<<25) /* Error beeps on */
99: #define SM_FWDTONET (1L<<26) /* Allow forwarding of e-mail to netmail */
100: #define SM_DELREADM (1L<<27) /* Delete read mail automatically */
101: #define SM_NOCDTCVT (1L<<28) /* No credit to minute conversions allowed */
102: #define SM_DELEMAIL (1L<<29) /* Physically remove deleted e-mail immed. */
103: #define SM_USRVDELM (1L<<30) /* Users can see deleted msgs */
104: #define SM_SYSVDELM (1L<<31) /* Sysops can see deleted msgs */
105:
106: /* Different bits in node_misc */
107: #define NM_ANSALARM (1<<0) /* Alarm locally on answer */
108: #define NM_WFCSCRN (1<<1) /* Wait for call screen */
109: #define NM_WFCMSGS (1<<2) /* Include total messages/files on WFC */
110: #define NM_LCL_EDIT (1<<3) /* Use local editor to create messages */
111: #define NM_EMSOVL (1<<4) /* Use expanded memory of overlays */
112: #define NM_WINOS2 (1<<5) /* Use Windows/OS2 time slice API call */
113: #define NM_INT28 (1<<6) /* Make int 28 DOS idle calls */
114: #define NM_NODV (1<<7) /* Don't detect and use DESQview API */
115: #define NM_NO_NUM (1<<8) /* Don't allow logons by user number */
116: #define NM_LOGON_R (1<<9) /* Allow logons by user real name */
117: #define NM_LOGON_P (1<<10) /* Secure logons (always ask for password) */
118: #define NM_NO_LKBRD (1<<11) /* No local keyboard (at all) */
119: #define NM_SYSPW (1<<12) /* Protect WFC keys and Alt keys with SY: */
120: #define NM_NO_INACT (1<<13) /* No local inactivity alert/logoff */
121: #define NM_NOBEEP (1<<14) /* Don't beep locally */
122: #define NM_LOWPRIO (1<<15) /* Always use low priority input */
123: #define NM_7BITONLY (1L<<16) /* Except 7-bit input only (E71 terminals) */
124: #define NM_RESETVID (1L<<17) /* Reset video mode between callers? */
125:
126: /* Miscellaneous Modem Settings (mdm_misc) */
127: #define MDM_CTS (1<<0) /* Use hardware send flow control */
128: #define MDM_RTS (1<<1) /* Use hardware recv flow control */
129: #define MDM_STAYHIGH (1<<2) /* Stay at highest DTE rate */
130: #define MDM_CALLERID (1<<3) /* Supports Caller ID */
131: #define MDM_DUMB (1<<4) /* Just watch DCD for answer - dumb modem */
132: #define MDM_NODTR (1<<5) /* Don't drop DTR for hang-up */
133: #define MDM_KNOWNRES (1<<6) /* Allow known result codes only */
134: #define MDM_VERBAL (1<<7) /* Use verbal result codes */
135:
136: /* Bit values for level_misc[x] */
137: #define LEVEL_EXPTOLVL (1<<0) /* Expire to level_expireto[x] */
138: #define LEVEL_EXPTOVAL (1<<1) /* Expire to val[level_expireto[x]] */
139:
140: /* Bit values for prot[x].misc */
141: #define PROT_DSZLOG (1<<0) /* Supports DSZ Log */
142:
143: /* Bit values in netmail_misc */
144:
145: #define NMAIL_ALLOW (1<<0) /* Allow NetMail */
146: #define NMAIL_CRASH (1<<1) /* Default netmail to crash */
147: #define NMAIL_HOLD (1<<2) /* Default netmail to hold */
148: #define NMAIL_KILL (1<<3) /* Default netmail to kill after sent */
149: #define NMAIL_ALIAS (1<<4) /* Use Aliases in NetMail */
150: #define NMAIL_FILE (1<<5) /* Allow file attachments */
151: #define NMAIL_DIRECT (1<<6) /* Default netmail to direct */
152:
153: /* Attribute bits for fido msg header */
154: #define FIDO_PRIVATE (1<<0) /* Private message */
155: #define FIDO_CRASH (1<<1) /* Crash-mail (send immediately) */
156: #define FIDO_RECV (1<<2) /* Received successfully */
157: #define FIDO_SENT (1<<3) /* Sent successfully */
158: #define FIDO_FILE (1<<4) /* File attached */
159: #define FIDO_INTRANS (1<<5) /* In transit */
160: #define FIDO_ORPHAN (1<<6) /* Orphan */
161: #define FIDO_KILLSENT (1<<7) /* Kill it after sending it */
162: #define FIDO_LOCAL (1<<8) /* Created locally - on this system */
163: #define FIDO_HOLD (1<<9) /* Hold - don't send it yet */
164: #define FIDO_FREQ (1<<11) /* File request */
165: #define FIDO_RRREQ (1<<12) /* Return receipt request */
166: #define FIDO_RR (1<<13) /* This is a return receipt */
167: #define FIDO_AUDIT (1<<14) /* Audit request */
168: #define FIDO_FUPREQ (1<<15) /* File update request */
169:
170: /* Bit values for sub[x].misc */
171: #define SUB_NSCAN (1L<<0) /* Scan this sub-board for new msgs */
172: #define SUB_YSCAN (1L<<1) /* Scan for new messages to you only */
173: #define SUB_SSCAN (1L<<2) /* Scan this sub-board for msgs to you */
174: #define SUB_QNET (1L<<3) /* Sub-board is netted via QWK network */
175: #define SUB_PNET (1L<<4) /* Sub-board is netted via PostLink */
176: #define SUB_FIDO (1L<<5) /* Sub-board is netted via FidoNet */
177: #define SUB_PRIV (1L<<6) /* Allow private posts on sub */
178: #define SUB_PONLY (1L<<7) /* Private posts only */
179: #define SUB_ANON (1L<<8) /* Allow anonymous posts on sub */
180: #define SUB_AONLY (1L<<9) /* Anonymous only */
181: #define SUB_NAME (1L<<10) /* Must use real names */
182: #define SUB_DEL (1L<<11) /* Allow users to delete messages */
183: #define SUB_DELLAST (1L<<12) /* Allow users to delete last msg only */
184: #define SUB_FORCED (1L<<13) /* Sub-board is forced scanning */
185: #define SUB_NOTAG (1L<<14) /* Don't add tag or origin lines */
186: #define SUB_TOUSER (1L<<15) /* Prompt for to user on posts */
187: #define SUB_ASCII (1L<<16) /* ASCII characters only */
188: #define SUB_QUOTE (1L<<17) /* Allow online quoting */
189: #define SUB_NSDEF (1L<<18) /* New-Scan on by default */
190: #define SUB_INET (1L<<19) /* Sub-board is netted via Internet */
191: #define SUB_FAST (1L<<20) /* Fast storage mode */
192: #define SUB_KILL (1L<<21) /* Kill read messages automatically */
193: #define SUB_KILLP (1L<<22) /* Kill read pvt messages automatically */
194: #define SUB_SYSPERM (1L<<23) /* Sysop messages are permament */
195: #define SUB_GATE (1L<<24) /* Gateway between Network types */
196: #define SUB_LZH (1L<<25) /* Use LZH compression for msgs */
197: #define SUB_SSDEF (1L<<26) /* Default ON for Scan for Your msgs */
198: #define SUB_HYPER (1L<<27) /* Hyper allocation */
199:
200: /* Bit values for dir[x].misc */
201: #define DIR_FCHK (1L<<0) /* Check for file existance */
202: #define DIR_RATE (1L<<1) /* Force uploads to be rated G,R, or X */
203: #define DIR_MULT (1L<<2) /* Ask for multi-disk numbering */
204: #define DIR_DUPES (1L<<3) /* Search this dir for upload dupes */
205: #define DIR_FREE (1L<<4) /* Free downloads */
206: #define DIR_TFREE (1L<<5) /* Time to download is free */
207: #define DIR_CDTUL (1L<<6) /* Credit Uploads */
208: #define DIR_CDTDL (1L<<7) /* Credit Downloads */
209: #define DIR_ANON (1L<<8) /* Anonymous uploads */
210: #define DIR_AONLY (1L<<9) /* Anonymous only */
211: #define DIR_ULDATE (1L<<10) /* Include upload date in listing */
212: #define DIR_DIZ (1L<<11) /* FILE_ID.DIZ and DESC.SDI support */
213: #define DIR_NOSCAN (1L<<12) /* Don't new-scan this directory */
214: #define DIR_NOAUTO (1L<<13) /* Don't auto-add this directory */
215: #define DIR_ULTIME (1L<<14) /* Deduct time during uploads */
216: #define DIR_CDTMIN (1L<<15) /* Give uploader minutes instead of cdt */
217: #define DIR_SINCEDL (1L<<16) /* Purge based on days since last dl */
218: #define DIR_MOVENEW (1L<<17) /* Files marked as new when moved */
219:
220: /* Bit values for file_t.misc */
221: #define FM_EXTDESC (1<<0) /* Extended description exists */
222: #define FM_ANON (1<<1) /* Anonymous upload */
223:
224: enum { /* errormsg() codes */
225: ERR_OPEN /* opening a file */
226: ,ERR_CLOSE /* close a file */
227: ,ERR_FDOPEN /* associating a stream with fd */
228: ,ERR_READ /* reading from file */
229: ,ERR_WRITE /* writing to file */
230: ,ERR_REMOVE /* removing a file */
231: ,ERR_ALLOC /* allocating memory */
232: ,ERR_CHK /* checking */
233: ,ERR_LEN /* file length */
234: ,ERR_EXEC /* executing */
235: ,ERR_CHDIR /* changing directory */
236: ,ERR_CREATE /* creating */
237: ,ERR_LOCK /* locking */
238: ,ERR_UNLOCK /* unlocking */
239: };
240:
241: enum { /* Values for dir[x].sort */
242: SORT_NAME_A /* Sort by filename, ascending */
243: ,SORT_NAME_D /* Sort by filename, descending */
244: ,SORT_DATE_A /* Sort by upload date, ascending */
245: ,SORT_DATE_D /* Sort by upload date, descending */
246: };
247:
248: enum {
249: clr_mnehigh
250: ,clr_mnelow
251: ,clr_mnecmd
252: ,clr_inputline
253: ,clr_err
254: ,clr_nodenum
255: ,clr_nodeuser
256: ,clr_nodestatus
257: ,clr_filename
258: ,clr_filecdt
259: ,clr_filedesc
260: ,clr_filelsthdrbox
261: ,clr_filelstline
262: ,clr_chatlocal
263: ,clr_chatremote
264: ,clr_multichat
265: ,TOTAL_COLORS };
266:
267: enum { /* Values for xtrn_t.type */
268: XTRN_NONE /* No data file needed */
269: ,XTRN_SBBS /* Synchronet external */
270: ,XTRN_WWIV /* WWIV external */
271: ,XTRN_GAP /* Gap door */
272: ,XTRN_RBBS /* RBBS, QBBS, or Remote Access */
273: ,XTRN_WILDCAT /* Wildcat */
274: ,XTRN_PCBOARD /* PCBoard */
275: ,XTRN_SPITFIRE /* SpitFire */
276: ,XTRN_UTI /* UTI Doors - MegaMail */
277: ,XTRN_SR /* Solar Realms */
278: ,XTRN_RBBS1 /* DORINFO1.DEF always */
279: ,XTRN_TRIBBS /* TRIBBS.SYS */
280: };
281:
282: enum { /* Values for xtrn_t.event */
283: EVENT_NONE /* Only accessible by menu */
284: ,EVENT_LOGON /* Execute during logon sequence */
285: ,EVENT_LOGOFF /* Execute during logoff sequence */
286: ,EVENT_NEWUSER /* Execute during newuser app. */
287: ,EVENT_BIRTHDAY /* Execute on birthday */
288: };
289:
290: /* Misc bits for event_t.misc */
291: #define EVENT_EXCL (1L<<0) /* Exclusive */
292: #define EVENT_FORCE (1L<<1) /* Force users off-line for event */
293:
294: /* Mode bits for QWK stuff */
295: #define A_EXPAND (1<<0) /* Expand to ANSI sequences */
296: #define A_LEAVE (1<<1) /* Leave in */
297: #define A_STRIP (1<<2) /* Strip out */
298:
299: /* Bits in xtrn_t.misc */
300: #define MULTIUSER (1L<<0) /* allow multi simultaneous users */
301: #define ANSI (1L<<1) /* user must have ANSI, same as ^^^ */
302: #define IO_INTS (1L<<2) /* Intercept I/O interrupts */
303: #define MODUSERDAT (1L<<3) /* Program can modify user data */
304: #define WWIVCOLOR (1L<<4) /* Program uses WWIV color codes */
305: #define EVENTONLY (1L<<5) /* Program executes as event only */
306: #define STARTUPDIR (1L<<6) /* Create drop file in start-up dir */
307: #define REALNAME (1L<<7) /* Use real name in drop file */
308: #define SWAP (1L<<8) /* Swap for this door */
309: #define FREETIME (1L<<9) /* Free time while in this door */
310: #define QUICKBBS (1L<<10) /* QuickBBS style editor */
311: #define EXPANDLF (1L<<11) /* Expand LF to CRLF editor */
312: #define QUOTEALL (1L<<12) /* Automatically quote all of msg */
313: #define QUOTENONE (1L<<13) /* Automatically quote none of msg */
314:
315: /* Bits in user.qwk */
316: #define QWK_FILES (1L<<0) /* Include new files list */
317: #define QWK_EMAIL (1L<<1) /* Include unread e-mail */
318: #define QWK_ALLMAIL (1L<<2) /* Include ALL e-mail */
319: #define QWK_DELMAIL (1L<<3) /* Delete e-mail after download */
320: #define QWK_BYSELF (1L<<4) /* Include messages from self */
321: #define QWK_UNUSED (1L<<5) /* Currently unused */
322: #define QWK_EXPCTLA (1L<<6) /* Expand ctrl-a codes to ascii */
323: #define QWK_RETCTLA (1L<<7) /* Retain ctrl-a codes */
324: #define QWK_ATTACH (1L<<8) /* Include file attachments */
325: #define QWK_NOINDEX (1L<<9) /* Do not create index files in QWK */
326: #define QWK_TZ (1L<<10) /* Include "@TZ" time zone in msgs */
327: #define QWK_VIA (1L<<11) /* Include "@VIA" seen-bys in msgs */
328: #define QWK_NOCTRL (1L<<12) /* No extraneous control files */
329:
330: #define INVALID_DIR 0xffff /* Invalid directory value */
331: #define INVALID_SUB 0xffff /* Invalid sub-board value */
332:
333: #define KEY_BUFSIZE 1024 /* Size of keyboard input buffer */
334: #define SAVE_LINES 4 /* Maximum number of lines to save */
335: #define LINE_BUFSIZE 512 /* Size of line output buffer */
336:
337:
338: #define TABSIZE 4 /* Tab Size */
339:
340: #define SWAP_NONE 0x80 /* Allow no swapping for executables */
341:
342: #define DSTSDABLEN 50 /* Length of DSTS.DAB file */
343:
344: /* Console I/O Bits (console) */
345: #define CON_R_ECHO (1<<0) /* Echo remotely */
346: #define CON_R_ECHOX (1<<1) /* Echo X's to remote user */
347: #define CON_R_INPUT (1<<2) /* Accept input remotely */
348: #define CON_L_ECHO (1<<3) /* Echo locally */
349: #define CON_L_ECHOX (1<<4) /* Echo X's locally */
350: #define CON_L_INPUT (1<<5) /* Accept input locally */
351: #define CON_RAW_IN (1<<8) /* Raw input mode - no editing capabilities */
352: #define CON_ECHO_OFF (1<<10)/* Remote & Local echo disabled for ML/MF */
353: #define CON_UPARROW (1<<11)/* Up arrow hit - move up one line */
354:
355: /* Number of milliseconds */
356: #define DELAY_HANGUP 250 /* Delay before modem drops carrier */
357: #define DELAY_MDMTLD 500 /* Delay to give each ~ in modem strings */
358: #define DELAY_SPIN 10 /* Delay for the spinning cursor */
359: #define DELAY_AUTOHG 1500 /* Delay for auto-hangup (xfer) */
360:
361: #define SEC_LOGON 1800 /* 30 minutes allowed to logon */
362: #define SEC_BILLING 90 /* under 2 minutes per billing call */
363: #define SEC_OK 5 /* Attempt to get an OK response from modem */
364: #define SEC_ANSI 5 /* Attempt to get a valid ANSI response */
365: #define SEC_ANSWER 30 /* Retries to get an answer code from modem */
366: #define SEC_CID 10 /* Ten second pause for caller ID */
367: #define SEC_RING 6 /* Maximum seconds between rings */
368:
1.1.1.2 ! root 369: #define LOOP_NOPEN 50 /* Retries before file access denied */
! 370: #define LOOP_NODEDAB 50 /* Retries on NODE.DAB locking/unlocking */
1.1 root 371:
372: /* String lengths */
373: #define LEN_ALIAS 25 /* User alias */
374: #define LEN_NAME 25 /* User name */
375: #define LEN_HANDLE 8 /* User chat handle */
376: #define LEN_NOTE 30 /* User note */
377: #define LEN_COMP 30 /* User computer description */
378: #define LEN_COMMENT 60 /* User comment */
379: #define LEN_NETMAIL 60 /* NetMail forwarding address */
380: #define LEN_PASS 8 /* User password */
381: #define LEN_PHONE 12 /* User phone number */
382: #define LEN_BIRTH 8 /* Birthday in MM/DD/YY format */
383: #define LEN_ADDRESS 30 /* User address */
384: #define LEN_LOCATION 30 /* Location (City, State) */
385: #define LEN_ZIPCODE 10 /* Zip/Postal code */
386: #define LEN_MODEM 8 /* User modem type description */
387: #define LEN_FDESC 58 /* File description */
388: #define LEN_FCDT 9 /* 9 digits for file credit values */
389: #define LEN_TITLE 70 /* Message title */
390: #define LEN_MAIN_CMD 40 /* Storage in user.dat for custom commands */
391: #define LEN_XFER_CMD 40
392: #define LEN_SCAN_CMD 40
393: #define LEN_MAIL_CMD 40
394: #define LEN_CID 25 /* Caller ID (phone number) */
395: #define LEN_ARSTR 40 /* Max length of Access Requirement string */
396: #define LEN_CHATACTCMD 9 /* Chat action command */
397: #define LEN_CHATACTOUT 65 /* Chat action output string */
398:
399: /****************************************************************************/
400: /* This is a list of offsets into the USER.DAT file for different variables */
401: /* that are stored (for each user) */
402: /****************************************************************************/
403: #define U_ALIAS 0 /* Offset to alias */
404: #define U_NAME (U_ALIAS+LEN_ALIAS) /* Offset to name */
405: #define U_HANDLE (U_NAME+LEN_NAME)
406: #define U_NOTE (U_HANDLE+LEN_HANDLE+2)
407: #define U_COMP (U_NOTE+LEN_NOTE)
408: #define U_COMMENT (U_COMP+LEN_COMP+2)
409:
410: #define U_NETMAIL (U_COMMENT+LEN_COMMENT+2)
411:
412: #define U_ADDRESS (U_NETMAIL+LEN_NETMAIL+2)
413: #define U_LOCATION (U_ADDRESS+LEN_ADDRESS)
414: #define U_ZIPCODE (U_LOCATION+LEN_LOCATION)
415:
416: #define U_PASS (U_ZIPCODE+LEN_ZIPCODE+2)
417: #define U_PHONE (U_PASS+8) /* Offset to phone-number */
418: #define U_BIRTH (U_PHONE+12) /* Offset to users birthday */
419: #define U_MODEM (U_BIRTH+8)
420: #define U_LASTON (U_MODEM+8)
421: #define U_FIRSTON (U_LASTON+8)
422: #define U_EXPIRE (U_FIRSTON+8)
423: #define U_PWMOD (U_EXPIRE+8)
424:
425: #define U_LOGONS (U_PWMOD+8+2)
426: #define U_LTODAY (U_LOGONS+5)
427: #define U_TIMEON (U_LTODAY+5)
428: #define U_TEXTRA (U_TIMEON+5)
429: #define U_TTODAY (U_TEXTRA+5)
430: #define U_TLAST (U_TTODAY+5)
431: #define U_POSTS (U_TLAST+5)
432: #define U_EMAILS (U_POSTS+5)
433: #define U_FBACKS (U_EMAILS+5)
434: #define U_ETODAY (U_FBACKS+5)
435: #define U_PTODAY (U_ETODAY+5)
436:
437: #define U_ULB (U_PTODAY+5+2)
438: #define U_ULS (U_ULB+10)
439: #define U_DLB (U_ULS+5)
440: #define U_DLS (U_DLB+10)
441: #define U_CDT (U_DLS+5)
442: #define U_MIN (U_CDT+10)
443:
444: #define U_LEVEL (U_MIN+10+2) /* Offset to Security Level */
445: #define U_FLAGS1 (U_LEVEL+2) /* Offset to Flags */
446: #define U_TL (U_FLAGS1+8) /* Offset to unused field */
447: #define U_FLAGS2 (U_TL+2)
448: #define U_EXEMPT (U_FLAGS2+8)
449: #define U_REST (U_EXEMPT+8)
450: #define U_ROWS (U_REST+8+2) /* Number of Rows on user's monitor */
451: #define U_SEX (U_ROWS+2) /* Sex, Del, ANSI, color etc. */
452: #define U_MISC (U_SEX+1) /* Miscellaneous flags in 8byte hex */
453: #define U_OLDXEDIT (U_MISC+8) /* External editor (Version 1 method) */
454: #define U_LEECH (U_OLDXEDIT+2) /* two hex digits - leech attempt count */
455: #define U_CURSUB (U_LEECH+2) /* Current sub (internal code) */
456: #define U_CURDIR (U_CURSUB+8) /* Current dir (internal code) */
457: #define U_CMDSET (U_CURDIR+8) /* unused */
458: #define U_MAIN_CMD (U_CMDSET+2+2) /* unused */
459: #define U_XFER_CMD (U_MAIN_CMD+LEN_MAIN_CMD) /* unused */
460: #define U_SCAN_CMD (U_XFER_CMD+LEN_XFER_CMD+2) /* unused */
461: #define U_MAIL_CMD (U_SCAN_CMD+LEN_SCAN_CMD) /* unused */
462: #define U_FREECDT (U_MAIL_CMD+LEN_MAIL_CMD+2)
463: #define U_FLAGS3 (U_FREECDT+10) /* Flag set #3 */
464: #define U_FLAGS4 (U_FLAGS3+8) /* Flag set #4 */
465: #define U_XEDIT (U_FLAGS4+8) /* External editor (code) */
466: #define U_SHELL (U_XEDIT+8) /* Command shell (code) */
467: #define U_QWK (U_SHELL+8) /* QWK settings */
468: #define U_TMPEXT (U_QWK+8) /* QWK extension */
469: #define U_CHAT (U_TMPEXT+3) /* Chat settings */
470: #define U_NS_TIME (U_CHAT+8) /* New-file scan date/time */
471: #define U_PROT (U_NS_TIME+8) /* Default transfer protocol */
472: #define U_UNUSED (U_PROT+1)
473: #define U_LEN (U_UNUSED+28+2)
474:
475: /****************************************************************************/
476: /* Offsets into DIR .DAT file for different fields for each file */
477: /****************************************************************************/
478: #define F_CDT 0 /* Offset in DIR#.DAT file for cdts */
479: #define F_DESC (F_CDT+LEN_FCDT)/* Description */
480: #define F_ULER (F_DESC+LEN_FDESC+2) /* Uploader */
481: #define F_TIMESDLED (F_ULER+30+2) /* Number of times downloaded */
482: #define F_OPENCOUNT (F_TIMESDLED+5+2)
483: #define F_MISC (F_OPENCOUNT+3+2)
484: #define F_ALTPATH (F_MISC+1) /* Two hex digit alternate path */
485: #define F_LEN (F_ALTPATH+2+2) /* Total length of all fdat in file */
486:
487: #define F_IXBSIZE 22 /* Length of each index entry */
488:
489:
490: #define SIF_MAXBUF 0x7000 /* Maximum buffer size of SIF data */
491:
492: /* NOTE: Do not change the values of the following block of defines! */
493:
494: #define DELETED (1L<<0) /* Bit values for user.misc */
495: #define ANSI (1L<<1) /* Supports ANSI terminal emulation */
496: #define COLOR (1L<<2) /* Send color codes */
497: #define RIP (1L<<3) /* Supports RIP terminal emulation */
498: #define UPAUSE (1L<<4) /* Pause on every screen full */
499: #define SPIN (1L<<5) /* Spinning cursor - Same as K_SPIN */
500: #define INACTIVE (1L<<6) /* Inactive user slot */
501: #define EXPERT (1L<<7) /* Expert menu mode */
502: #define ANFSCAN (1L<<8) /* Auto New file scan */
503: #define CLRSCRN (1L<<9) /* Clear screen before each message */
504: #define QUIET (1L<<10) /* Quiet mode upon logon */
505: #define BATCHFLAG (1L<<11) /* File list allow batch dl flags */
506: #define NETMAIL (1L<<12) /* Forward e-mail to fidonet addr */
507: #define CURSUB (1L<<13) /* Remember current sub-board/dir */
508: #define ASK_NSCAN (1L<<14) /* Ask for newscanning upon logon */
509: #define NO_EXASCII (1L<<15) /* Don't send extended ASCII */
510: #define ASK_SSCAN (1L<<16) /* Ask for messages to you at logon */
511: #define AUTOTERM (1L<<17) /* Autodetect terminal type */
512: #define COLDKEYS (1L<<18) /* No hot-keys */
513: #define EXTDESC (1L<<19) /* Extended file descriptions */
514: #define AUTOHANG (1L<<20) /* Auto-hang-up after transfer */
515: #define WIP (1L<<21) /* Supports WIP terminal emulation */
516:
517: #define CLREOL 256 /* Character to erase to end of line */
518: #define HIGH 8 /* High intensity for curatr */
519:
520: /* Online status (online) */
521: #define ON_LOCAL 1 /* Online locally */
522: #define ON_REMOTE 2 /* Online remotely */
523: #define ON_XFER 3 /* Online remotely - transferring file */
524: #define ON_WFC 4 /* Online waiting for a call */
525:
526: /* Varios SYSTEM parameters for sys_status */
527: #define SS_LOGOPEN (1L<<0) /* Node's Log file is open */
528: #define SS_INITIAL (1L<<1) /* The bbs data has been initialized. */
529: #define SS_TMPSYSOP (1L<<2) /* Temporary Sysop Status */
530: #define SS_USERON (1L<<3) /* A User is logged on to the BBS */
531: #define SS_LCHAT (1L<<4) /* Local chat in progress */
532: #define SS_CAP (1L<<5) /* Capture is on */
533: #define SS_ANSCAP (1L<<6) /* Capture ANSI codes too */
534: #define SS_FINPUT (1L<<7) /* Using file for input */
535: #define SS_COMISR (1L<<8) /* Com port ISR is installed */
536: #define SS_DAILY (1L<<9) /* Execute System Daily Event on logoff */
537: #define SS_INUEDIT (1L<<10) /* Inside Alt-Useredit section */
538: #define SS_ABORT (1L<<11) /* Global abort input or output flag */
539: #define SS_SYSPAGE (1L<<12) /* Paging sysop */
540: #define SS_SYSALERT (1L<<13) /* Notify sysop when users hangs up */
541: #define SS_GURUCHAT (1L<<14) /* Guru chat in progress */
542: #define SS_NODEDAB (1L<<15) /* NODE.DAB operations are okay */
543: #define SS_EVENT (1L<<16) /* Time shortened due to upcoming event */
544: #define SS_PAUSEON (1L<<17) /* Pause on, overriding user default */
545: #define SS_PAUSEOFF (1L<<18) /* Pause off, overriding user default */
546: #define SS_IN_CTRLP (1L<<19) /* Inside ctrl-p send node message func */
547: #define SS_NEWUSER (1L<<20) /* New User online */
548: #define SS_MDMDEBUG (1L<<21) /* Modem debug output */
549: #define SS_NEST_PF (1L<<22) /* Nested in printfile function */
550: #define SS_DCDHIGH (1L<<23) /* Assume DCD is high always */
551: #define SS_SPLITP (1L<<24) /* Split-screen private chat */
552: #define SS_NEWDAY (1L<<25) /* Date changed while online */
553:
554: /* Bits in 'mode' for getkey and getstr */
555: #define K_UPPER (1L<<0) /* Converts all letters to upper case */
556: #define K_UPRLWR (1L<<1) /* Upper/Lower case automatically */
557: #define K_NUMBER (1L<<2) /* Allow numbers only */
558: #define K_WRAP (1L<<3) /* Allows word wrap */
559: #define K_MSG (1L<<4) /* Allows ANSI, ^N ^A ^G */
560: #define K_SPIN (1L<<5) /* Spinning cursor (same as SPIN) */
561: #define K_LINE (1L<<6) /* Input line (inverse color) */
562: #define K_EDIT (1L<<7) /* Edit string passed */
563: #define K_CHAT (1L<<8) /* In chat multi-chat */
564: #define K_NOCRLF (1L<<9) /* Don't print CRLF after string input */
565: #define K_ALPHA (1L<<10) /* Only allow alphabetic characters */
566: #define K_GETSTR (1L<<11) /* getkey called from getstr() */
567: #define K_LOWPRIO (1L<<12) /* low priority input */
568: #define K_NOEXASC (1L<<13) /* No extended ASCII allowed */
569: #define K_E71DETECT (1L<<14) /* Detect E-7-1 terminal type */
570: #define K_AUTODEL (1L<<15) /* Auto-delete text (used with K_EDIT) */
571: #define K_COLD (1L<<16) /* Possible cold key mode */
572: #define K_NOECHO (1L<<17) /* Don't echo input */
573:
574: /* Bits in 'mode' for putmsg and printfile */
575: #define P_NOABORT (1<<0) /* Disallows abortion of a message */
576: #define P_SAVEATR (1<<1) /* Save the new current attributres after */
577: /* msg has printed. */
578: #define P_NOATCODES (1<<2) /* Don't allow @ codes */
579: #define P_OPENCLOSE (1<<3) /* Open and close the file */
580:
581: /* Bits in 'mode' for listfiles */
582: #define FL_ULTIME (1<<0) /* List files by upload time */
583: #define FL_DLTIME (1<<1) /* List files by download time */
584: #define FL_NO_HDR (1<<2) /* Don't list directory header */
585: #define FL_FINDDESC (1<<3) /* Find text in description */
586: #define FL_EXFIND (1<<4) /* Find text in description - extended info */
587: #define FL_VIEW (1<<5) /* View ZIP/ARC/GIF etc. info */
588:
589: /* Bits in the mode of writemsg and email() */
590: #define WM_EXTDESC (1<<0) /* Writing extended file description */
591: #define WM_EMAIL (1<<1) /* Writing e-mail */
592: #define WM_NETMAIL (1<<2) /* Writing NetMail */
593: #define WM_ANON (1<<3) /* Writing anonymous message */
594: #define WM_FILE (1<<4) /* Attaching a file to the message */
595: #define WM_NOTOP (1<<5) /* Don't add top because we need top line */
596: #define WM_QUOTE (1<<6) /* Quote file available */
597: #define WM_QWKNET (1<<7) /* Writing QWK NetMail (25 char title) */
598: #define WM_PRIVATE (1<<8) /* Private (for creating MSGINF file) */
599:
600: /* Bits in the mode of loadposts() */
601: #define LP_BYSELF (1<<0) /* Include messages sent by self */
602: #define LP_OTHERS (1<<1) /* Include messages sent to others */
603: #define LP_UNREAD (1<<2) /* Un-read messages only */
604: #define LP_PRIVATE (1<<3) /* Include all private messages */
605: #define LP_REP (1<<4) /* Packing REP packet */
606:
607: /* Bits in the mode of loadmail() */
608: #define LM_UNREAD (1<<0) /* Include un-read mail only */
609: #define LM_QWK (1<<1) /* Loading for a QWK packet */
610:
611: enum { /* readmail and delmailidx which types */
612: MAIL_YOUR /* mail sent to you */
613: ,MAIL_SENT /* mail you have sent */
614: ,MAIL_ANY /* mail sent to or from you */
615: ,MAIL_ALL /* all mail (ignores usernumber arg) */
616: };
617:
618: #if 0
619: /* Message mode bits */
620: #define MSG_PERM 1 /* Permanent - non-purgable message (post) */
621: #define MSG_FORWARD 1 /* Forwarded message (mail) */
622: #define MSG_ANON 2 /* Anonymous message */
623: #define MSG_PRIVATE 4 /* Private posted message */
624: #define MSG_READ 8 /* Private post has been read */
625: #define MSG_FILE 16 /* File attached */
626:
627: #endif
628:
629: /* Bits in the mode of external() */
630: #define EX_CC (1<<0) /* Use command.com to load other process */
631: #define EX_OUTR (1<<1) /* Copy DOS output to remote */
632: #define EX_OUTL (1<<2) /* Use _lputc() for local DOS output */
633: #define EX_INR (1<<3) /* Trap int 16h keyboard input requests */
634: #define EX_WWIV (1<<4) /* Expand WWIV color codes to ANSI sequence */
635: #define EX_SWAP (1<<5) /* Swap out for this external */
636: #define EX_OS2 (1<<6) /* Executing an OS/2 pgm from SBBS4OS2 */
637: #define EX_POPEN (1<<7) /* Leave COM port open */
638:
639: #define OS2_POPEN (1<<0) /* Leave COM port open */
640:
641: enum { /* Values for 'mode' in listfileinfo */
642: FI_INFO /* Just list file information */
643: ,FI_REMOVE /* Remove/Move/Edit file information */
644: ,FI_DOWNLOAD /* Download files */
645: ,FI_OLD /* Search/Remove files not downloaded since */
646: ,FI_OLDUL /* Search/Remove files uploaded before */
647: ,FI_OFFLINE /* Search/Remove files not online */
648: ,FI_USERXFER /* User Xfer Download */
649: ,FI_CLOSE /* Close any open records */
650: };
651:
652: #define L_LOGON 1 /* Logon List maintenance */
653: #define LOL_SIZE 81 /* Length of each logon list entry */
654:
655: #define CHAT_ECHO (1<<0) /* Multinode chat echo */
656: #define CHAT_ACTION (1<<1) /* Chat actions */
657: #define CHAT_NOPAGE (1<<2) /* Can't be paged */
658: #define CHAT_NOACT (1<<3) /* No activity alerts */
659: #define CHAT_SPLITP (1<<4) /* Split screen private chat */
660:
661: /* Bits in mode of scanposts() function */
662: #define SCAN_CONST (1<<0) /* Continuous message scanning */
663: #define SCAN_NEW (1<<1) /* New scanning */
664: #define SCAN_BACK (1<<2) /* Scan the last message if no new */
665: #define SCAN_TOYOU (1<<3) /* Scan for messages to you */
666: #define SCAN_FIND (1<<4) /* Scan for text in messages */
667: #define SCAN_UNREAD (1<<5) /* Find un-read messages to you */
668:
669: /* Bits in misc of chan_t */
670: #define CHAN_PW (1<<0) /* Can be password protected */
671: #define CHAN_GURU (1<<1) /* Guru joins empty channel */
672:
673: enum { /* Values of mode for userlist function */
674: UL_ALL /* List all users in userlist */
675: ,UL_SUB /* List all users with access to cursub */
676: ,UL_DIR /* List all users with access to curdir */
677: };
678:
679:
680: #define BO_LEN 16 /* BACKOUT.DAB record length */
681:
682: #define BO_OPENFILE 0 /* Backout types */
683:
684:
685: /**********/
686: /* Macros */
687: /**********/
688:
689: #define CRLF { outchar(CR); outchar(LF); }
690: #define SYSOP (useron.level>=90 || sys_status & SS_TMPSYSOP)
691: #define REALSYSOP (useron.level>=90)
692: #define FLAG(x) (long)(1L<<(x-'A'))
693: #define CLS outchar(FF)
694: #define WHERE __LINE__,__FILE__
695: #define SAVELINE { slatr[slcnt]=latr; \
696: sprintf(slbuf[slcnt<SAVE_LINES ? slcnt++ : slcnt] \
697: ,"%.*s",lbuflen,lbuf); \
698: lbuflen=0; }
699: #define RESTORELINE { lbuflen=0; attr(slatr[--slcnt]); \
700: bputs(slbuf[slcnt]); \
701: curatr=lclatr(-1); }
702: #define RIOSYNC(x) { if(online==ON_REMOTE) riosync(x); }
703: #define SYNC { getnodedat(node_num,&thisnode,0); \
704: RIOSYNC(0); \
705: nodesync(); }
706: #define ASYNC { getnodedat(node_num,&thisnode,0); \
707: RIOSYNC(1); \
708: nodesync(); }
709: #define DCDHIGH (sys_status&SS_DCDHIGH || rioctl(IOSTATE)&DCD)
710: #define ANSI_SAVE() bputs("\x1b[s")
711: #define ANSI_RESTORE() bputs("\x1b[u")
712: #define GOTOXY(x,y) bprintf("\x1b[%d;%dH",y,x)
1.1.1.2 ! root 713: #define TM_YEAR(yy) ((yy)%100)
1.1 root 714:
715: extern long crc32tbl[];
716: #define ucrc32(ch,crc) (crc32tbl[(crc^ch)&0xff]^(crc>>8))
717:
718: #ifdef __FLAT__
719: #define TEXTWINDOW window(1,1,80,node_scrnlen-1)
720: #define STATUSLINE window(1,node_scrnlen,80,node_scrnlen)
721: #else
722: #define TEXTWINDOW
723: #define STATUSLINE
724: #endif
725:
726: #define ucrc32(ch,crc) (crc32tbl[(crc^ch)&0xff]^(crc>>8))
727:
728: #ifdef __WATCOMC__
729:
730: #if !defined(__COLORS)
731: #define __COLORS
732:
733: enum COLORS {
734: BLACK, /* dark colors */
735: BLUE,
736: GREEN,
737: CYAN,
738: RED,
739: MAGENTA,
740: BROWN,
741: LIGHTGRAY,
742: DARKGRAY, /* light colors */
743: LIGHTBLUE,
744: LIGHTGREEN,
745: LIGHTCYAN,
746: LIGHTRED,
747: LIGHTMAGENTA,
748: YELLOW,
749: WHITE
750: };
751: #endif
752:
753: #define BLINK 128 /* blink bit */
754:
755: #define ffblk find_t
756: #define findfirst(x,y,z) _dos_findfirst(x,z,y)
757: #define findnext(x) _dos_findnext(x)
758: #endif
759:
760: #if DEBUG /* if DEBUG, call function */
761: #define DLOG(where,txt) dlog(where,txt)
762: #else /* else, do nothing - function isn't even valid */
763: #define DLOG(where,txt)
764: #endif
765:
766:
767: /********************/
768: /* Type Definitions */
769: /********************/
770:
771: typedef struct { /* Users information */
772: ushort number, /* Number */
773: uls, /* Number of uploads */
774: dls, /* Number of downloads */
775: posts, /* Number of posts */
776: emails, /* Number of emails */
777: fbacks, /* Number of emails sent to sysop */
778: etoday, /* Emails today */
779: ptoday, /* Posts today */
780: timeon, /* Total time on */
781: textra, /* Extra time for today */
782: logons, /* Total logons */
783: ttoday, /* Time on today */
784: tlast, /* Time on last call */
785: ltoday, /* Logons today */
786: xedit, /* External editor (1 based) */
787: shell; /* Command shell */
788: uchar level, /* Security level */
789: sex, /* Sex - M or F */
790: rows, /* Rows of text */
791: prot, /* Default transfer protocol */
792: alias[LEN_ALIAS+1], /* Alias */
793: name[LEN_NAME+1], /* Name - Real */
794: handle[LEN_HANDLE+1], /* Chat handle */
795: comp[LEN_COMP+1], /* Computer type */
796: note[LEN_NOTE+1], /* Public notice about this user */
797: address[LEN_ADDRESS+1], /* Street Address */
798: location[LEN_LOCATION+1], /* Location of user */
799: zipcode[LEN_ZIPCODE+1], /* Zip/Postal code */
800: pass[LEN_PASS+1], /* Password - not case sensitive */
801: birth[LEN_BIRTH+1], /* Birthday in MM/DD/YY format */
802: phone[LEN_PHONE+1], /* Phone number xxx-xxx-xxxx format */
803: modem[LEN_MODEM+1], /* Modem type - 8 chars max */
804: netmail[LEN_NETMAIL+1], /* NetMail forwarding address */
805: leech, /* Leech attempt counter */
806: tmpext[4], /* QWK Packet extension */
807: comment[LEN_COMMENT+1], /* Private comment about user */
808: cursub[9], /* Current sub-board internal code */
809: curdir[9]; /* Current directory internal code */
810: ulong misc, /* Misc. bits - ANSI, Deleted etc. */
811: qwk, /* QWK settings */
812: chat, /* Chat defaults */
813: flags1, /* Flag set #1 */
814: flags2, /* Flag set #2 */
815: flags3, /* Flag set #3 */
816: flags4, /* Flag set #4 */
817: exempt, /* Exemption Flags */
818: rest, /* Restriction Flags */
819: ulb, /* Total bytes uploaded */
820: dlb, /* Total bytes downloaded */
821: cdt, /* Credits */
822: min, /* Minutes */
823: freecdt; /* Free credits (renewed daily) */
824: time_t firston, /* Date/Time first called */
825: laston, /* Last logoff date/time */
826: expire, /* Expiration date */
827: pwmod, /* Password last modified */
828: ns_time; /* Date/Time of last new file scan */
829: } user_t;
830:
831: typedef struct { /* File (transfers) Data */
832: uchar name[13], /* Name of file FILENAME.EXT */
833: desc[LEN_FDESC+1], /* Uploader's Description */
834: uler[LEN_ALIAS+1], /* User who uploaded */
835: opencount, /* Times record is currently open */
836: path[LEN_DIR+1]; /* Alternate DOS path */
837: time_t date, /* File date/time */
838: dateuled, /* Date/Time (Unix) Uploaded */
839: datedled; /* Date/Time (Unix) Last downloaded */
840: ushort dir, /* Directory file is in */
841: altpath,
842: timesdled, /* Total times downloaded */
843: timetodl; /* How long transfer time */
844: long datoffset, /* Offset into .DAT file */
845: size, /* Size of file */
846: misc; /* Miscellaneous bits */
847: ulong cdt; /* Credit value for this file */
848: } file_t;
849:
850: typedef struct { /* Mail data (taken from index) */
851: ulong offset, /* Offset to header (in bytes) */
852: number, /* Number of message */
853: time; /* Time imported */
854: ushort to, /* To user # */
855: from, /* From user # */
856: subj, /* CRC-16 of subject */
857: attr; /* Attributes */
858: } mail_t;
859:
860: typedef struct { /* System/Node Statistics */
861: ulong logons, /* Total Logons on System */
862: ltoday, /* Total Logons Today */
863: timeon, /* Total Time on System */
864: ttoday, /* Total Time Today */
865: uls, /* Total Uploads Today */
866: ulb, /* Total Upload Bytes Today */
867: dls, /* Total Downloads Today */
868: dlb, /* Total Download Bytes Today */
869: ptoday, /* Total Posts Today */
870: etoday, /* Total Emails Today */
871: ftoday; /* Total Feedbacks Today */
872: ushort nusers; /* Total New Users Today */
873: } stats_t;
874:
875: typedef struct { /* FidoNet address */
876: ushort zone, /* Zone */
877: net, /* Network */
878: node, /* Node */
879: point; /* Point */
880: } faddr_t;
881:
882: typedef struct { /* Message sub board info */
883: uchar
884: #ifdef SCFG
885: lname[LEN_SLNAME+1], /* Short name - used for prompts */
886: sname[LEN_SSNAME+1], /* Long name - used for listing */
887: ar[LEN_ARSTR+1], /* Access requirements */
888: read_ar[LEN_ARSTR+1], /* Read requirements */
889: post_ar[LEN_ARSTR+1], /* Post requirements */
890: op_ar[LEN_ARSTR+1], /* Operator requirements */
891: mod_ar[LEN_ARSTR+1], /* Moderated user requirements */
892: qwkname[11], /* QWK name - only 10 chars */
893: data_dir[LEN_DIR+1], /* Data file directory */
894: origline[51], /* Optional EchoMail origin line */
895: echomail_sem[LEN_DIR+1], /* EchoMail semaphore for this sub */
896: tagline[81], /* Optional QWK net tag line */
897: #else
898: *lname,
899: *sname,
900: *ar,
901: *read_ar,
902: *post_ar,
903: *op_ar,
904: *mod_ar,
905: *qwkname,
906: *data_dir,
907: *origline,
908: *echomail_sem,
909: *tagline,
910: #endif
911: code[9]; /* Eight character code */
912: #ifndef SBBS
913: uchar echopath[LEN_DIR+1]; /* EchoMail path */
914: #endif
915: ushort grp, /* Which group this sub belongs to */
916: ptridx, /* Index into pointer file */
917: qwkconf, /* QWK conference number */
918: maxage; /* Max age of messages (in days) */
919: ulong misc, /* Miscellaneous flags */
920: maxmsgs, /* Max number of messages allowed */
921: maxcrcs; /* Max number of CRCs to keep */
922: #ifdef SBBS
923: ulong ptr, /* Highest read message */
924: last; /* Last read message */
925: #endif
926: faddr_t faddr; /* FidoNet address */
927: } sub_t;
928:
929: typedef struct { /* Message group info */
930: uchar
931: #ifdef SCFG
932: lname[LEN_GLNAME+1], /* Short name */
933: sname[LEN_GSNAME+1], /* Long name */
934: ar[LEN_ARSTR+1]; /* Access requirements */
935:
936: #else
937: *lname,
938: *sname,
939: *ar;
940: #endif
941: } grp_t;
942:
943: typedef struct { /* Transfer Directory Info */
944: uchar /* Eight character code */
945: #ifdef SCFG
946: lname[LEN_SLNAME+1], /* Short name - used for prompts */
947: sname[LEN_SSNAME+1], /* Long name - used for listing */
948: ar[LEN_ARSTR+1], /* Access Requirements */
949: ul_ar[LEN_ARSTR+1], /* Upload Requirements */
950: dl_ar[LEN_ARSTR+1], /* Download Requirements */
951: ex_ar[LEN_ARSTR+1], /* Exemption Requirements (credits) */
952: op_ar[LEN_ARSTR+1], /* Operator Requirements */
953: path[LEN_DIR+1], /* Path to directory for files */
954: exts[41], /* Extensions allowed */
955: upload_sem[LEN_DIR+1], /* Upload semaphore file */
956: data_dir[LEN_DIR+1], /* Directory where data is stored */
957: #else
958: *lname,
959: *sname,
960: *ar,
961: *ul_ar,
962: *dl_ar,
963: *ex_ar,
964: *op_ar,
965: *path,
966: *exts,
967: *upload_sem,
968: *data_dir,
969: #endif
970: code[9],
971: seqdev, /* Sequential access device number */
972: sort; /* Sort type */
973: ushort maxfiles, /* Max number of files allowed */
974: maxage, /* Max age of files (in days) */
975: up_pct, /* Percentage of credits on uloads */
976: dn_pct, /* Percentage of credits on dloads */
977: lib; /* Which library this dir is in */
978: ulong misc; /* Miscellaneous bits */
979: } dir_t;
980:
981: typedef struct { /* Transfer Library Information */
982: uchar
983: #ifdef SCFG
984: lname[LEN_GLNAME+1], /* Short Name - used for prompts */
985: sname[LEN_GSNAME+1], /* Long Name - used for listings */
986: ar[LEN_ARSTR+1]; /* Access Requirements */
987: #else
988: *lname,
989: *sname,
990: *ar;
991: #endif
992: ushort offline_dir; /* Offline file directory */
993: } lib_t;
994:
995: typedef struct { /* Gfile Section Information */
996: uchar /* Eight character code */
997: #ifdef SCFG
998: name[41], /* Name of section */
999: ar[LEN_ARSTR+1], /* Access requirements */
1000: #else
1001: *name,
1002: *ar,
1003: #endif
1004: code[9];
1005: } txtsec_t;
1006:
1007: typedef struct { /* External Section Information */
1008: uchar
1009: #ifdef SCFG
1010: name[41], /* Name of section */
1011: ar[LEN_ARSTR+1], /* Access requirements */
1012: #else
1013: *name,
1014: *ar,
1015: #endif
1016: code[9]; /* Eight character code */
1017: } xtrnsec_t;
1018:
1019: typedef struct { /* Swappable executable */
1020: #ifdef SCFG
1021: uchar cmd[LEN_CMD+1]; /* Program name */
1022: #else
1023: uchar *cmd;
1024: #endif
1025: } swap_t;
1026:
1027: typedef struct { /* OS/2 executable */
1028: #ifdef SCFG
1029: uchar name[13]; /* Program name */
1030: #else
1031: uchar *name;
1032: #endif
1033: ulong misc; /* See OS2PGM_* */
1034:
1035: } os2pgm_t;
1036:
1037: typedef struct { /* External Program Information */
1038: uchar
1039: #ifdef SCFG
1040: name[41], /* Name of External */
1041: ar[LEN_ARSTR+1], /* Access Requirements */
1042: run_ar[LEN_ARSTR+1], /* Run Requirements */
1043: cmd[LEN_CMD+1], /* Command line */
1044: clean[LEN_CMD+1], /* Clean-up command line */
1045: path[LEN_DIR+1], /* Start-up path */
1046: #else
1047: *name,
1048: *ar,
1049: *run_ar,
1050: *cmd,
1051: *clean,
1052: *path,
1053: #endif
1054: type, /* What type of external program */
1055: event, /* Execute upon what event */
1056: textra, /* Extra time while in this program */
1057: maxtime, /* Maximum time allowed in this door */
1058: code[9]; /* Internal code for program */
1059: ushort sec; /* Section this program belongs to */
1060: ulong cost, /* Cost to run in credits */
1061: misc; /* Misc. bits - ANSI, DOS I/O etc. */
1062: } xtrn_t;
1063:
1064: typedef struct { /* External Page program info */
1065: #ifdef SCFG
1066: uchar cmd[LEN_CMD+1], /* Command line */
1067: ar[LEN_ARSTR+1]; /* ARS for this chat page */
1068: #else
1069: uchar *cmd,
1070: *ar;
1071: #endif
1072: ulong misc; /* Intercept I/O */
1073: } page_t;
1074:
1075:
1076: typedef struct { /* Chat action set */
1077: #ifdef SCFG
1078: uchar name[26]; /* Name of set */
1079: #else
1080: uchar *name;
1081: #endif
1082: } actset_t;
1083:
1084: typedef struct { /* Chat action info */
1085: #ifdef SCFG
1086: uchar cmd[LEN_CHATACTCMD+1], /* Command word */
1087: out[LEN_CHATACTOUT+1]; /* Output */
1088: #else
1089: uchar *cmd,
1090: *out;
1091: #endif
1092: ushort actset; /* Set this action belongs to */
1093: } chatact_t;
1094:
1095: typedef struct { /* Gurus */
1096: uchar
1097: #ifdef SCFG
1098: name[26],
1099: ar[LEN_ARSTR+1],
1100: #else
1101: *name,
1102: *ar,
1103: #endif
1104: code[9];
1105:
1106: } guru_t;
1107:
1108: typedef struct { /* Chat Channel Information */
1109: uchar
1110: #ifdef SCFG
1111: ar[LEN_ARSTR+1], /* Access requirements */
1112: name[26], /* Channel description */
1113: #else
1114: *ar,
1115: *name,
1116: #endif
1117: code[9];
1118: ushort actset, /* Set of actions used in this chan */
1119: guru; /* Guru file number */
1120: ulong cost, /* Cost to join */
1121: misc; /* Misc. bits CHAN_* definitions */
1122: } chan_t;
1123:
1124: typedef struct { /* Modem Result codes info */
1125: ushort code, /* Numeric Result Code */
1126: cps, /* Average Transfer CPS */
1127: rate; /* DCE Rate (Modem to Modem) */
1128: #ifdef SCFG
1129: uchar str[LEN_MODEM+1]; /* String to use for description */
1130: #else
1131: uchar *str;
1132: #endif
1133: } mdm_result_t;
1134:
1135: typedef struct { /* Transfer Protocol information */
1136: uchar mnemonic, /* Letter to select this protocol */
1137: #ifdef SCFG
1138: name[26], /* Name of protocol */
1139: ar[LEN_ARSTR+1], /* ARS */
1140: ulcmd[LEN_CMD+1], /* Upload command line */
1141: dlcmd[LEN_CMD+1], /* Download command line */
1142: batulcmd[LEN_CMD+1], /* Batch upload command line */
1143: batdlcmd[LEN_CMD+1], /* Batch download command line */
1144: blindcmd[LEN_CMD+1], /* Blind upload command line */
1145: bicmd[LEN_CMD+1]; /* Bidirectional command line */
1146: #else
1147: *ar,
1148: *name,
1149: *ulcmd,
1150: *dlcmd,
1151: *batulcmd,
1152: *batdlcmd,
1153: *blindcmd,
1154: *bicmd;
1155: #endif
1156: ulong misc; /* Miscellaneous bits */
1157: } prot_t;
1158:
1159: typedef struct { /* Extractable file types */
1160: uchar ext[4], /* Extension */
1161: #ifdef SCFG
1162: ar[LEN_ARSTR+1], /* Access Requirements */
1163: cmd[LEN_CMD+1]; /* Command line */
1164: #else
1165: *ar,
1166: *cmd;
1167: #endif
1168: } fextr_t;
1169:
1170: typedef struct { /* Compressable file types */
1171: uchar ext[4], /* Extension */
1172: #ifdef SCFG
1173: ar[LEN_ARSTR+1], /* Access Requirements */
1174: cmd[LEN_CMD+1]; /* Command line */
1175: #else
1176: *ar,
1177: *cmd;
1178: #endif
1179: } fcomp_t;
1180:
1181: typedef struct { /* Viewable file types */
1182: uchar ext[4], /* Extension */
1183: #ifdef SCFG
1184: ar[LEN_ARSTR+1], /* Access Requirements */
1185: cmd[LEN_CMD+1]; /* Command line */
1186: #else
1187: *ar,
1188: *cmd;
1189: #endif
1190: } fview_t;
1191:
1192: typedef struct { /* Testable file types */
1193: uchar ext[4], /* Extension */
1194: #ifdef SCFG
1195: ar[LEN_ARSTR+1], /* Access requirement */
1196: cmd[LEN_CMD+1], /* Command line */
1197: workstr[41]; /* String to display while working */
1198: #else
1199: *ar,
1200: *cmd,
1201: *workstr;
1202: #endif
1203: } ftest_t;
1204:
1205: typedef struct { /* Download events */
1206: uchar ext[4],
1207: #ifdef SCFG
1208: ar[LEN_ARSTR+1], /* Access requirement */
1209: cmd[LEN_CMD+1], /* Command line */
1210: workstr[41]; /* String to display while working */
1211: #else
1212: *ar,
1213: *cmd,
1214: *workstr;
1215: #endif
1216: } dlevent_t;
1217:
1218: typedef struct { /* External Editors */
1219: uchar
1220: #ifdef SCFG
1221: name[41], /* Name (description) */
1222: ar[LEN_ARSTR+1], /* Access Requirement */
1223: lcmd[LEN_CMD+1], /* Local command line */
1224: rcmd[LEN_CMD+1], /* Remote command line */
1225: #else
1226: *name,
1227: *ar,
1228: *lcmd,
1229: *rcmd,
1230: #endif
1231: code[9];
1232: ulong misc; /* Misc. bits */
1233: uchar type; /* Drop file type */
1234: } xedit_t;
1235:
1236:
1237: typedef struct { /* Generic Timed Event */
1238: uchar code[9], /* Internal code */
1239: days, /* Days to run event */
1240: #ifdef SCFG
1241: dir[LEN_DIR+1], /* Start-up directory */
1242: cmd[LEN_CMD+1]; /* Command line */
1243: #else
1244: *dir,
1245: *cmd;
1246: #endif
1247: ushort node, /* Node to execute event */
1248: time; /* Time to run event */
1249: ulong misc; /* Misc bits */
1250: #ifndef SCFG
1251: time_t last; /* Last time event ran */
1252: #endif
1253: } event_t;
1254:
1255: typedef struct { /* QWK Network Hub */
1256: uchar id[9], /* System ID of Hub */
1257: *mode, /* Mode for Ctrl-A codes for ea. sub */
1258: days, /* Days to call-out on */
1259: #ifdef SCFG
1260: call[LEN_CMD+1], /* Call-out command line to execute */
1261: pack[LEN_CMD+1], /* Packing command line */
1262: unpack[LEN_CMD+1]; /* Unpacking command line */
1263: #else
1264: *call,
1265: *pack,
1266: *unpack;
1267: #endif
1268: ushort time, /* Time to call-out */
1269: node, /* Node to do the call-out */
1270: freq, /* Frequency of call-outs */
1271: subs, /* Number Sub-boards carried */
1272: *sub, /* Number of local sub-board for ea. */
1273: *conf; /* Conference number of ea. */
1274: #ifndef SCFG
1275: time_t last; /* Last network attempt */
1276: #endif
1277: } qhub_t;
1278:
1279: typedef struct { /* PCRelay/PostLink Hub */
1280: uchar days, /* Days to call-out on */
1281: #ifdef SCFG
1282: name[11], /* Site Name of Hub */
1283: call[LEN_CMD+1]; /* Call-out command line to execute */
1284: #else
1285: *call;
1286: #endif
1287: ushort time, /* Time to call-out */
1288: node, /* Node to do the call-out */
1289: freq; /* Frequency of call-outs */
1290: #ifndef SCFG
1291: time_t last; /* Last network attempt */
1292: #endif
1293: } phub_t;
1294:
1295:
1296: typedef struct { /* FidoNet msg header */
1297: uchar from[36], /* From user */
1298: to[36], /* To user */
1299: subj[72], /* Message title */
1300: time[20]; /* Time in goof-ball ASCII format */
1301: short read, /* Times read */
1302: destnode, /* Destination node */
1303: orignode, /* Origin node */
1304: cost, /* Cost in pennies */
1305: orignet, /* Origin net */
1306: destnet, /* Destination net */
1307: destzone, /* Destination zone */
1308: origzone, /* Origin zone */
1309: destpoint, /* Destination point */
1310: origpoint, /* Origin point */
1311: re, /* Message number regarding */
1312: attr, /* Attributes - see FIDO_* */
1313: next; /* Next message number in stream */
1314: } fmsghdr_t;
1315:
1316:
1317: typedef struct { /* Command Shells */
1318: uchar
1319: #ifdef SCFG
1320: name[41], /* Name (description) */
1321: ar[LEN_ARSTR+1], /* Access Requirement */
1322: #else
1323: *name,
1324: *ar,
1325: #endif
1326: code[9];
1327: ulong misc;
1328: } shell_t;
1329:
1330: #endif /* Don't add anything after this #endif statement */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.