1 // This may look like C code, but it is really -*- C++ -*- 2 3 // ------------------------------------------------------------------ 4 // The Goldware Library 5 // Copyright (C) 1989-1994 Peter Stewart & InterZone Software, inc. 6 // Copyright (C) 1990-1999 Odinn Sorensen 7 // ------------------------------------------------------------------ 8 // This library is free software; you can redistribute it and/or 9 // modify it under the terms of the GNU Library General Public 10 // License as published by the Free Software Foundation; either 11 // version 2 of the License, or (at your option) any later version. 12 // 13 // This library is distributed in the hope that it will be useful, 14 // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 // Library General Public License for more details. 17 // 18 // You should have received a copy of the GNU Library General Public 19 // License along with this program; if not, write to the Free 20 // Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 // MA 02111-1307, USA 22 // ------------------------------------------------------------------ 23 // $Id: gs_inter.h,v 1.2 2005/10/23 04:39:24 ssianky Exp $ 24 // ------------------------------------------------------------------ 25 // FD.SYS definitions for InterMail 2.2x 26 // ------------------------------------------------------------------ 27 28 #ifndef __gs_inter_h 29 #define __gs_inter_h 30 31 32 // ------------------------------------------------------------------ 33 34 #include <gftnall.h> 35 36 37 // ------------------------------------------------------------------ 38 39 #if defined(GOLD_CANPACK) 40 #pragma pack(1) 41 #endif 42 43 44 // ------------------------------------------------------------------ 45 46 typedef struct { 47 48 /* The logfile */ 49 50 char log[71]; 51 word loglevel; /* See --- Loglevels */ 52 53 /* Number manipulation */ 54 55 char prefix[31]; /* Always added */ 56 char hidden[10][31]; /* Strip these if they are in # */ 57 char postfix[31]; /* Always appended */ 58 59 /* Miscellaneous flags */ 60 61 long flags; /* See --- Miscellaneous flags */ 62 long flags_reserved; /* Reserved flags */ 63 word audio; /* See --- Audio flags */ 64 byte synchtimer; /* Number of seconds for sync */ 65 66 /* Errorlevels */ 67 68 byte crashexit; /* Mail exit */ 69 byte bbs300; 70 byte bbs1200; 71 byte bbs1275; 72 byte bbs2400; 73 byte bbs4800; 74 byte bbs9600; 75 byte bbs19200; 76 byte bbs38400; 77 78 /* Modem */ 79 80 word modembaud; /* 30=300, 24=2400, etc. */ 81 byte modemport; /* 1-255 (COM1=1, COM2=2, etc.) */ 82 byte modemdelay; /* 1/10 seconds delay / line sent */ 83 84 /* --- Messages */ 85 86 char b300msg[16]; 87 char b1200msg[16]; 88 char b1275msg[16]; 89 char b2400msg[16]; 90 char b4800msg[16]; 91 char b9600msg[16]; 92 char b19200msg[16]; 93 char b38400msg[16]; 94 char errormsg[16]; 95 char busymsg[16]; 96 char carriermsg[16]; 97 char okmsg[16]; 98 char ringmsg[16]; 99 char nodialmsg[16]; 100 char noanswmsg[16]; 101 char voicemsg[16]; 102 103 /* --- Commands */ 104 105 char escapestr[11]; 106 char offhookstr[11]; 107 char reconnectstr[11]; 108 char init1[50]; 109 char init2[50]; 110 char init3[50]; 111 char resetstr[50]; 112 char downstr[50]; 113 char hangupstr[11]; 114 char dialstr[11]; 115 116 /* --- Manual answer stuff */ 117 118 char modemanswer[11]; 119 byte answerdelay; 120 121 /* ------ Limited answer start and end times */ 122 123 byte begin_hour; 124 byte begin_minute; 125 byte end_hour; 126 byte end_minute; 127 128 /* Calling control */ 129 130 byte retrybusy; 131 byte retryresend; 132 byte retrydelay; 133 134 /* File request control */ 135 136 char reqlist[71]; /* List to scan for reqable dirs */ 137 char reqalias[71]; /* Magic filenames */ 138 char reqmessage[71]; /* Appended to FAILED REQUEST message */ 139 byte reqtype; /* Bit field */ 140 byte reqmaxfiles; /* Max number of files to send on 1 req*/ 141 word reqmaxtime; /* Maximum number of minutes for req*/ 142 word reqmaxsize; /* Maximum size (in KB) for req */ 143 word reqminbaud; /* Minimum baudrate for req */ 144 byte reqstarthr; /* Start time for file requests, can be*/ 145 byte reqstartmin; /* combined with the reqdays field. */ 146 byte reqendhr; 147 byte reqendmin; 148 byte reqdays; 149 150 /* File to send when human callers are let thru */ 151 152 char bbsname[11]; 153 char beforebbsbanner[71]; 154 155 /* Function keys from mailer menu */ 156 157 struct { 158 char cmd[61]; 159 char title[26]; 160 byte behavior; /* 1-Pause, 2-Process msg base */ 161 } key[24]; 162 163 /* Mailer colors */ 164 165 byte color[11]; 166 167 /* Number of days to keep entries in history files */ 168 169 byte keep_history; 170 171 /* FDServer password, if none given, server is INactive */ 172 173 char slavepwd[21]; 174 175 /* File displayed to users when system is in event for no callers */ 176 177 char ineventfile[71]; 178 179 /* File displayed when human callers are seen on mail-only system */ 180 181 char mailonlyfile[71]; 182 183 /* External programs to run on certain "wake-up" strings */ 184 185 struct { 186 char wakeupstr[40]; 187 byte errorlevel; 188 } externmail[10]; 189 190 /* RESERVED FIELD */ 191 192 /* --- Limited audio start and end times. If the below four bytes 193 are all zero (0), audio is enabled all the time */ 194 195 byte audio_begin_hour; 196 byte audio_begin_minute; 197 byte audio_end_hour; 198 byte audio_end_minute; 199 200 /* --- Minimum cost to process undialable */ 201 202 word min_undial_cost; 203 204 char RESERVERAT[886]; 205 char extrnreq [71]; 206 char modem_name[61]; /* modem name, for 'modem selection' */ 207 } _mailer; 208 209 210 /* Netmail folder behavior */ 211 212 #define RESTRICTED 0x00000001L 213 #define EXPORTOK 0x00000004L 214 #define USEXLATTABLES 0x00000008L 215 #define EDREADONLY 0x00000020L 216 217 /* Echomail flags */ 218 219 #define SAVEBAD 0x00000001L 220 221 typedef struct { 222 char path[65]; /* Path if "board==0", otherwise empty (65) */ 223 byte ftype; /* Folder type */ 224 char areatag[39]; /* Echomail area tag */ 225 byte origin; /* Default origin line, 0-19 */ 226 char title[41]; /* Title to appear on screen */ 227 byte useaka; /* AKA to use, 0==primary */ 228 word board; /* QuickBBS/RemoteAccess/WC board number */ 229 word upzone; /* Uplink zone */ 230 word upnet; /* Uplink net */ 231 word upnode; /* Uplink node */ 232 word uppoint; /* Uplink point */ 233 long behave; /* Behavior, see above */ 234 long hiwater; /* Highwater mark for echomail */ 235 long pwdcrc; /* CRC32 of password or -1L if unprotected */ 236 long userok; /* Users with initial access */ 237 long accflags; /* access flags, for network environment */ 238 char reserved[8]; /* for future expansion */ 239 } _eFOLDER; 240 241 #define MSGPRIVATE 0x0001 242 #define MSGCRASH 0x0002 243 #define MSGREAD 0x0004 244 #define MSGSENT 0x0008 245 #define MSGFILE 0x0010 246 #define MSGTRANSIT 0x0020 247 #define MSGORPHAN 0x0040 248 #define MSGKILL 0x0080 249 #define MSGLOCAL 0x0100 250 #define MSGHOLD 0x0200 251 #define MSGUNUSED 0x0400 252 #define MSGFREQ 0x0800 253 #define MSGRRREQ 0x1000 254 #define MSGISRR 0x2000 255 #define MSGAREQ 0x4000 256 #define MSGFUPDREQ 0x8000 257 258 typedef struct { 259 260 /* Macro keys */ 261 262 char macrokey[24][61]; /* F1-F12, Shift F1-F12 */ 263 264 /* Margin, default==60 */ 265 266 byte margin; 267 268 /* Default message status */ 269 270 word msgbits; 271 272 /* Miscellaneous settings */ 273 274 long flags; 275 276 /* Origin lines */ 277 278 char origin[20][61]; 279 280 /* Editor colors */ 281 282 byte color[15]; 283 284 /* Netmail folder flags */ 285 286 long netfolderflags; 287 288 /* Translation tables IN/OUT */ 289 290 byte translate_in[256]; 291 byte translate_out[256]; 292 293 /* Where RemoteAccess/QuickBBS message base files are */ 294 295 char qbase[71]; 296 char WCmain[71]; 297 298 /* RESERVED */ 299 300 char RESERVERAT[255]; 301 long echoflags; 302 _eFOLDER BBSnet; 303 _eFOLDER dupes; 304 _eFOLDER badecho; 305 char echolog[65]; 306 char IMEWork[71]; 307 308 } _editor; 309 310 typedef struct { 311 char systempath[71]; 312 char mailpath[71]; 313 char swap_path[71]; 314 char semaphore[71]; 315 char secfilespath[71]; 316 char infilepath[71]; 317 char packetpath[71]; 318 char nodelistpath[71]; 319 320 word countrycode; 321 322 ftn_addr aka[11]; 323 324 /* Timeout value for screen blanker in SECONDS (0-255) */ 325 326 long flags; 327 byte blackout_time; 328 329 /* User record */ 330 331 struct { 332 char name[37]; 333 long pwdcrc; /* Crc-32 of user password, -1L No pwd */ 334 dword flags; 335 } user[10]; 336 337 /* Protection of exits */ 338 339 dword exitpwdcrc; /* Password for DOS shell, exits, etc. */ 340 dword exitflags; /* Which flags should be protected */ 341 char filler[760]; /* contains domain stuff */ 342 char systemname[50]; /* site_info - system name */ 343 char systemloc[40]; /* site_info - location */ 344 char systemphone[24]; /* site_info - phone */ 345 char fill[6]; /* 6 loose bytes :) */ 346 char systemflags[20]; /* site_info - nodelist flags */ 347 char systemcountry[26]; /* site_info - country */ 348 char serial[14]; /* serial number */ 349 char outecho[66]; /* outbound echomail packets */ 350 char reserved[10]; /* reserved space */ 351 } _shared; 352 353 typedef struct { 354 char initstring[41]; /* Init string */ 355 word scrollsize; /* Max memory to use for buffer (in K) */ 356 byte emulation; /* 0=TTY, 1=ANSI, 2=VT52, 3=VT100 */ 357 byte protocol; /* Index in protocol list */ 358 char shiftkey[12][31]; /* Shift F1-F12 macro settings */ 359 char ctrlkey[12][31]; /* Ctrl F1-F12 macro settings */ 360 char downloadpath[60]; /* Default download path */ 361 char uploadpath[60]; /* Default upload path */ 362 byte translate_in[256]; /* Translation table - modem->screen */ 363 byte translate_out[256]; /* Translation table - screen->modem */ 364 byte retrywait; /* Seconds to wait before next dial.. */ 365 dword flags; /* Behavior, sounds, flashes.. etc. */ 366 dword directorypwd; /* CRC-32 of password to enter phoneDir*/ 367 char editor[60]; /* Invoked with Alt-I */ 368 char RESERVERAT[796]; /* Reserved space */ 369 ftn_addr newaka[21]; 370 } _terminal; 371 372 typedef struct { 373 char port; /* 0 LPT1, 1 LPT2, 2 LPT3, 3 COM1, 4 COM2 */ 374 char baud; /* 0 9600, 1 4800, 2 2400, 3 1200 */ 375 byte stopbits; /* 0x00 - 1, 0x01 - 2 */ 376 byte wordlength; /* 0x00 - 7, 0x01 - 8 */ 377 byte parity; /* 0x00 - Even, 0x01 - Odd, 0x02 - None */ 378 byte pagelen; 379 long behavior; 380 char init[71]; 381 char reset[71]; 382 char bold_on[31]; 383 char bold_off[31]; 384 char pr1RESERVED[62]; 385 char italic_on[31]; 386 char italic_off[31]; 387 byte pagewidth; /* Width in columns of a page */ 388 byte leftmargin; /* Left margin, ie. start printing at column*/ 389 byte footer; /* Footer margin, ie. leave nn lines */ 390 byte header; /* Header margin, ie. skip nn lines */ 391 byte translate_out[256]; /* Translation table - disk->printer */ 392 char pr2RESERVED[100]; 393 } _printer; 394 395 #define IM_THISREV 0x0100 396 397 struct _ctl { 398 char fingerprint[5]; /* Must contain "JoHo" */ 399 word sysrev; /* Must contain THISREV above */ 400 dword ctlcrc; /* CRC-32 of struct excluding the 1st 11 bytes */ 401 _mailer m; 402 _editor e; 403 _shared s; 404 _terminal t; 405 _printer p; 406 dword ctlcrc2; /* CRC-32 of all the above */ 407 }; 408 409 // Constant long bit values 410 411 #define RESTRICT 0x00000001L 412 #define ECHO_INFO 0x00000002L 413 #define EXPORT_OK 0x00000004L 414 #define USE_XLAT 0x00000008L 415 #define PRIVATE 0x00000010L 416 #define READONLY 0x00000020L 417 #define F_NETMAIL 0x08000000L 418 #define BOARDTYPE 0x10000000L 419 #define DELETED 0x20000000L /* Never written to disk */ 420 #define LOCAL 0x40000000L 421 #define ECHOMAIL 0x80000000L 422 423 #define F_MSG 0 424 #define F_HUDSON 1 425 #define F_WC35 2 426 #define F_PCB15 3 427 #define F_JAM 4 428 429 // Folder structure 430 431 typedef struct { 432 char path[65]; /* Path if "board==0", otherwise empty (65) */ 433 byte ftype; /* Folder type */ 434 char areatag[39]; /* Echomail area tag */ 435 byte origin; /* Default origin line, 0-19 */ 436 char title[41]; /* Title to appear on screen */ 437 byte useaka; /* AKA to use, 0==primary */ 438 word board; /* QuickBBS/RemoteAccess/WC conf number */ 439 word upzone; /* Uplink zone */ 440 word upnet; /* Uplink net */ 441 word upnode; /* Uplink node */ 442 word uppoint; /* Uplink point */ 443 long behave; /* Behavior, see above */ 444 long hiwater; /* Highwater mark for echomail */ 445 long pwdcrc; /* CRC32 of password or -1L if unprotected */ 446 long userok; /* Users with initial access */ 447 long accflags; /* access flags, for network environment */ 448 long timestamp; /* Time stamp for detecting msg base updates*/ 449 char reserved[4]; /* for future expansion */ 450 } FOLDER; 451 452 // The following struct was used in IM 2.00-2.25, file name FOLDER.CFG. 453 454 typedef struct { 455 char path[65]; /* Path if "board==0", otherwise empty (65) */ 456 char title[41]; /* Title to appear on screen */ 457 byte origin; /* Default origin line, 0-19 */ 458 long behave; /* Behavior, see above */ 459 long pwdcrc; /* CRC32 of password or -1L if unprotected */ 460 long userok; /* Users with initial access */ 461 byte useaka; /* AKA to use, 0==primary */ 462 word board; /* QuickBBS/RemoteAccess/WC board number */ 463 } OLDFOLDER; 464 465 466 // ------------------------------------------------------------------ 467 468 #if defined(GOLD_CANPACK) 469 #pragma pack() 470 #endif 471 472 473 // ------------------------------------------------------------------ 474 475 #endif 476 477 // ------------------------------------------------------------------ 478