/* Copyright (C) 1987-1990 The GAP Development Company All Rights Reserved This source code is considered to be confidential information proprietary to The GAP Development Company. It is prohibited and punishable by law to use or duplicate any part of this information. This file is released as an aid for third party authors to write programs that utilize the GAP BBS files. GAP Development Company may alter any of these record structures at any time. Contains structures for the various files. This is a partial listing of GAPBBS.H. This file can be renamed to gapbbs.h to compile most programs that include the file. */ /*****************************************************/ /* GAPBBS.CNF Configuration File */ /* */ /* Each char [] field must be padded out with */ /* spaces and terminated with a NULL (0). */ /* */ /* Last Modified : 09/17/90 */ /*****************************************************/ struct GAP_CONFIG { char sysname [16]; // sysop name char syspas [13]; // sysop local password int sys_read; // level to read private mail int sys_edit; // level to edit msg headers int overwrite; // level to overwrite uploads int sys_level1; // level to view callers log int sys_level2; // level to view users int sys_level3; // level to view a file int sys_level4; // level to maintain user file int sys_level5; // level to exit to dos int sys_level5a; // level to execute dos funcs int sys_level6; // level to view other nodes int sys_level6a; // level to log off other node int sys_level7; // level to recover messages char answer [8]; // questionnaire answers file char caller [7]; // caller file char doors [9]; // doors.dat file char forumdat [9]; // name of forum (.DAT) file char entry_news [8]; // news file char exit_news [8]; // exit news file char pwrd [9]; // time / security file char fsec [9]; // files security file char msgs [9]; // messages file char new_welcome [8]; // new user welcome file char answer_regis [8]; // not used char remote [9]; // remote.sys file char tcan [9]; // trashcan file char users [9]; // users file char welcome [8]; // welcome file char uploads [26]; // upload directory char gen [26]; // general directory char maindir [26]; // main directory char help [26]; // help directory char loose_dir [26]; // directory where loose files are char dumb_modem [2]; // use true ring detect? char modem_init [45]; // initilization string char modem_off [43]; // off hook string int ringnum; // answer on ring x int modem_wait; // seconds to wait for carrier int connect_wait; // seconds to wait for connect char modem_reset [45]; // reset string char port [2]; // com port char speed [6]; // speed to open modem at char baud_300 [2]; // restrict Baud rates? char baud_start [6]; // restrict start time char baud_end [6]; // restrict end time char baud_rest [10]; // highest baud rate to restrict char lock_baud [2]; // lock in the baud rate char zstream [2]; // full flow zmodem uploads int menuA; // main menu security levels int menuB; int menuC; int menuD; int menuE; int menuF; int menuG; int menuH; int menuI; int menuJ; int menuK; int menuL; int menuM; int menuN; int menuO; int menuP; int menuQ; int menuR; int menuS; int menuT; int menuU; int menuV; int menuW; int menuX; int menuY; int menuZ; int menu_chat; // chat with other nodes int menu_open; // open a door int menu_who; // who's on other nodes int regis; // registration level int year_regis; // level for subscrip expired int viewG; // view/change stats int viewN; int viewL; int viewT; int viewX; int fileA; // file menu security levels int fileB; // browse text files int fileC; int fileD; int fileE; int fileF; // file menu security levels int fileG; int fileH; int fileI; int fileJ; int fileK; int fileL; int fileM; int fileN; int fileO; int fileP; int fileQ; int fileR; int fileS; int fileT; int fileU; int fileV; int fileW; int fileX; int fileY; int fileZ; int blts; // number of main bulletins int cnfs; // number of FORUMS int dirs; // number of directories int printer; // printer port char time_limit [2]; // enforce daily time limit char byte_cnt [2]; // enforce daily byte count char private_up [2]; // use private upload directory char dir_up [2]; // allow directory uploads char closed [2]; // closed board flag char handle [2]; // allow handles char chg_name [2]; // allow name changes char regis_chk [2]; // edit registration info char subscribe [2]; // enforce yearly registration int sub_days; // # of days in subscrip period char quick [2]; // allow quick logons char priv_mail [2]; // make all mail private? char board [51]; // board name char comment [51]; // comment prompt char twit [51]; // twit string with F8 char lockout [51]; // lock out string with F2 char loose_dir2 [26]; // directory where loose files are char dis_F5stat [2]; // Y = Disable Status during F5 shell char use_ems [2]; // Y/N to Use EMS during swap char swap_drive [2]; // Drive to use for swapping char no_syskey [2]; // Y = Disable local sysop keys char auto_mark [2]; // N = Dont allow auto file marking char F5_com [2]; // Use COMMAND.COM for F5 char dis_shstat [2]; // Y = Disable Status during external shell short ansi_time; // seconds to wait for Auto ANSI char stop_xfer [2]; // Y = stop xfers if event timer expires short upguard; // Event Guard time for Uploads short dorguard; // Event Guard time for Doors char nu1 [3]; // future implementation char nu2 [51]; // future implementation int node; // node number char events [2]; // use timed events char nu3 [6]; // event 1 time (config.event1) char nu4 [6]; // event 2 time (config.event2) int color; // default color 1 - 15 int free_space; // minimum free upload space int max_msgs; // maximum number of messages int maxlines; // maximum lines per messae char carbon [2]; // allow carbon copy messages char validate [2]; // validate messages "TO:" char esc [2]; // allow esc codes in messages char kill [2]; // allow killing of messages char f1 [61]; // function key macros char f2 [61]; char f3 [61]; char f4 [61]; char f5 [61]; char f6 [61]; char f7 [61]; char f8 [61]; char f9 [61]; char f10 [61]; char printer_tog; // write caller log to printer char bell_tog; // caller bells on/off char alarm_tog; // caller online bell char last_caller [31]; // name of last caller on long forums1; // default forums 1 - 30 long forums2; // default forums 31 - 60 long forums3; // default forums 61 - 90 int blanktime; // mins to wait before blank char show_freeup [2]; // show free upload space? char force_blts [2]; // force BLT menu at log on char file_cnt [2]; // enforce daily dwnload cnt int nu13; // not used int nu5; // old stuff, not used anymore int nu6; // int nu7; // int nu8; // char nu9 [2]; // char nu10 [2]; // int nu11; // char nu12 [2]; // char newquest [9]; // Name of NEWQUEST File char new_answer [9]; // Name of NEWQUEST Answer File char extdwncnt [2]; // extend dwnload cnt by upload char new_news [2]; // show news only if new? int keytime; // keyboard timeout delay char ext_protocol [2]; // use external protocols? char birthday [2]; // prompt for birthday char prot_letter [9]; // external protocol letters char enf_ratio [2]; // enforce up/down ratio? char ratio_how [2]; // enforce by Files or Bytes? char netbios [2]; // use NetBIOS for chat? char show_last [2]; // show last caller? int exttime; // factor to extend time for ups char quote [4]; // quote characters to use int port_irq; // IRQ for com port char port_base [5]; // Base address for com port char sysmail; // true if sysop has mail char show_stats [2]; // show user stats at log on char regis_urow; // Registration Window Upper Row char regis_ucol; // Registration Window Upper Col char last_urow; // Last Caller Window Upper Row char last_ucol; // Last Caller Window Upper Col char drive_urow; // Free Disk Window Upper Row char drive_ucol; // Free Disk Window Upper Col char drive_win; // true to show Free Disk Window char mail_urow; // New Mail Upper Row char mail_ucol; // New Mail Upper Col unsigned char drive_sayat; // Free Disk Window Say Color unsigned char regis_sayat; // Regis Window Say Color unsigned char regis_bd; // Regis Window Border Color unsigned char last_sayat; // Last Caller Window Say Color unsigned char last_bd; // Last Caller Window Border Color unsigned char last_tit; // Last Caller Window Title Color unsigned char mail_sayat; // New Mail Window Say Color char windows [8]; }; /*****************************************************/ /* USERS File Structure */ /* */ /* Each char [] field must be padded out with */ /* spaces and terminated with a NULL (0). */ /* */ /* Last Modified : 09/17/90 */ /*****************************************************/ The first record in the USER.DAT file is reserved by the ISAM functions. Its size is the same as the size of the following record structure. Currently this size is 652 bytes. The first user record begins after this reserved area. Deleted record space is used first before placing a new record at the end of the file. The key fields (fname and lname) and (level) and must NOT be changed. Doing so will cause corruption of the index and data files. struct USER { char fname [16]; // first name char lname [16]; // last name char handle [16]; // handle for MPART! char city [30]; // city, state char passwd [13]; // password char hphone [14]; // homephone char bphone [14]; // work/data phone char subscribe [9]; // subscription date int level; // security - up to 255 long timeson; // times on - over 2 billion char lastdate [9]; // last date on - mm/dd/yy char lasttime [6]; // last time on - hh:mm long ttlmins; // total mins on - 2+ billion int minutes; // # of minutes last call long uploads; // # of uploads - 2+ billion long downloads; // # of downloads - 2+ billion long ttlbytes; // total bytes downloaded long curbytes; // bytes downloaded this call char private; // allow on private nodes? char protocol [3]; // transfer protocol int page; // page length - to 23 char lastdir [9]; // date last looked at dir long lastmsg; // last message read - 99999 max long mesread; // total msgs read - 2+ billion long mesleft; // total messages left long forum_joined; // total forums joined long blts_read; // total bulletins read long doors_opened; // total doors opened int lastconf; // last forum in char expert; // novice = N, expert = Y char sysop; // sysop record, 1 = Y, 0 = N long upbytes; // total bytes uploaded int curdown; // total files downed today char birthdate [9]; // user's birthdate char comment [51]; // comment about user long forum1; // forum membership 1 - 30 long forum2; // forum membership 31 - 60 long forum3; // forum membership 61 - 90 long fmes [90]; // last message read each forum }; // 652 bytes /*****************************************************/ /* FORUM.DAT Structure */ /* */ /* Each char [] field must be padded out with */ /* spaces and terminated with a NULL (0). */ /* */ /* There is 1 record for each of the Forums. Up */ /* to 90 records. */ /* */ /* Last Modified : 05/12/90 */ /*****************************************************/ struct FORUM { char name [21]; // forum name char directory [31]; // forum dir path char gen_dir [31]; // forum gen dir path char up_dir [31]; // upload dir path char private_up [2]; // keep uploads private? char keep_up [2]; // keep uploads in forum? char auto_join [2]; // auto rejoin forum? char handle [2]; // allow handles? char priv_mail [2]; // make all mail private? char pub_mail [2]; // make all mail public? char subscrip [9]; // expired subscrip date char net_mail [2]; // is this a netmail forum? char sysop1 [31]; // # 1 sysop this forum char sysop2 [31]; // # 2 sysop this forum char main_dirs [2]; // include main board dirs? int bullets; // number of bulletins int dirs; // number of directories int security; // additional security int time; // additional time int sys1_level; // level for sysop 1 int sys2_level; // level for sysop 2 }; // 213 bytes /*****************************************************/ /* MSGS.DAT Header Structure */ /* */ /* Each message begins with this header record. */ /* It is first set to NULLS, and then filled */ /* with data. */ /* */ /* Last Modified : 09/17/90 */ /*****************************************************/ The ISAM header record (the 1st record in the DAT file) occupies the 1st 256 bytes of the file. This record is maintained by the ISAM functions and must not be modified in any way. The first message starts at offset 256 (where 0 is the first byte). The first 6 bytes of each message is reserved by the ISAM functions. The first 126 bytes after this reserved area consists of the following structure. The actual text of the messages starts immediately after the message header record. The text is NOT padded. Each line of text ends with a NULL (0). The total size of the message (not counting the 6 byte reserved area) can be determined by looking at the 1st two bytes IMMEDIATELY before the message header record. This number represents the size of the following structure plus the message text. For instance, if this number is 7B00 then the message text consists of 6 characters (including the terminating NULL). It is VERY dangerous to change any of the key fields in the mail header record. They should be left alone. Changing a key field will render that particular message useless and may cause further corruption of the index and data files. The key fields are : to, from, sub, and num. NOTE that there is only one index file. It holds the four separate indexes used by the mail system. struct MAIL // structure of the header rec { char del; // delete flag char to [32]; // left to whom (indexed) char from [32]; // left by whom (indexed) char sub [26]; // subject (thread - indexed) long num; // message number (indexed) long date; // date left long readdate; // date when it was read long refer; // refer to message number long activemess; // number of active messages char read; // has it been read by "to"? char type; // private, passwrd,open, etc char passwd [13]; // password if protected }; // 126 bytes /*****************************************************/ /* Record Structure For Caller Log */ /* */ /* Each field contains an extra character for a */ /* space. Any string being moved into a field */ /* must be 2 chars LESS than the actual width to */ /* accomodate the null and the space. The record */ /* is first set to spaces. */ /*****************************************************/ struct CALLOG // structure of caller's log { char dtstmp [10]; // Date of Event char dtime [7]; // Time of Event char code [5]; // Event Abbreviation char val [5]; // Error Code char ctm [4]; // Error Comment char num [8]; // Message No, Baud Rate ect char event [32]; // Comment - Name, ect char cr [2]; // Inserts C/R at end }; // 73 bytes /*****************************************************/ /* Record Structure For MESSNO.DAT */ /* */ /* Last Modified : 05/12/90 */ /*****************************************************/ struct MESSNO { long status; // multi-user status flags long highmain; // highest used message number long fhigh [90]; }; /*****************************************************/ /* Record Structure For EVENTS.DAT */ /* */ /* Last Modified : 09/17/90 */ /*****************************************************/ struct EVENTS { short num; // next scheduled event number to run char event_day [4]; // Day of the week for this event char event_time [6]; // time a day for this event char active [2]; // is this event active? (Y/N) char event_file [31]; // path to the event batch file }; // 45 bytes, 1 event