Category : BBS Programs+Doors
Archive   : RVR20C-2.ZIP
Filename : R-MAP2.H

 
Output of file : R-MAP2.H contained in archive : RVR20C-2.ZIP
/***********************************************************************
* rOverBoard BBS *
* ** DEFINITIONS (2) ** *
* Copyright (c) 1987 - 1991 FreeLance Programming. All rights reserved.*
***********************************************************************/

union FTIME
{ /* Format for all but msg dates */
struct ftime ttime; /* ftime is TS:5 MM:6 HH:5 DD:5 MM:4 YY:7 */
unsigned long llong; /* year = high order bits, TS = secs/2 = low */
};

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct CONNECT_TABLE
{
char string[16]; /* Text of the modem CONNECT string */
char uart_code; /* BAUD code of computer-2-modem link */
char baud_code; /* BAUD code of CONNECT speed */
};
/* BAUD codes are: */
/* */
/* 0: N/A 1: 300 2: 1200 3: 2400 */
/* 4: 4800 5: 9600 6: 19200 7: 38400 */

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct ACCESS_MASK /* Length = 90 */
{
unsigned int g_access; /* See R-CONST2.H */
unsigned int g_access2; /* See R-CONST2.H */
char a_access[64]; /* See R-CONST2.H */
unsigned int time_limit; /* dflt # of minutes / day */
unsigned int cr_limit; /* can spend x cred/day */
unsigned int keep_days; /* last_call + keep_days = delete date */
unsigned int max_bought_time; /* Max # mins / day that can be bought */
char d_access[8]; /* bit-mapped door access switches */
unsigned int user_level; /* for editing convenience */
char filler[4];
};

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct USER_REC /* Length = 400 */
{
char alias[25], city_state[25], psw[10];
char will_chat, lines, width, help_level;
union FTIME first_call, last_call, last_new_files_check;
unsigned times_called, time_today;
unsigned k_uploaded, k_up_today;
unsigned k_downloaded, k_down_today;
unsigned num_uploaded, n_up_today;
unsigned num_downloaded, n_down_today;
unsigned num_entered, n_entered_today;
unsigned num_read, n_read_today;
unsigned num_dropped_carriers, num_timeouts;
int msg_area_last, last_msg_read[64], flags;
unsigned long a_table, a_table2;
long credits;
unsigned int credits_used_today;
union FTIME keep_til_date;
struct ACCESS_MASK access_mask;
unsigned int extra_time;
char misc_data[25];
char filler2[25];
};
/* If keep_til_date is greater than keep_days */
/* + today, it is not changed when the user */
/* logs on. Otherwise, keep_til_date becomes */
/* today + keep_days at each subsequent logon */

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct EVENT /* Length = 8 */
{
char e_number, e_day;
unsigned long e_time; /* In timer ticks from midnight */
char filler; /* Not used */
char on_off; /* Enable/Disable indicator */
};

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct SETUP /* Length = 16384 */
{
union FTIME versionstamp; /* date/timestamp of structure changes */
union FTIME msgstamp; /* Date/time msgs last updated */

int beep_t, beep_l; /* Bell control (0 = inaudible) */
long cr_per_user; /* Initial cr setting for new users */
char num_bulletins; /* # of bullet##.scr's present (0-99) */
char help_level; /* Initial help level for new users */
char scr_attr[10]; /* Screen color table */

char sysop_name[25]; /* Alternate Sysop alias */
char stat_text[2][41]; /* Text to display in STATS menu */

char c_parm[81]; /* "Chat" Header */
char m_parm[81]; /* "Msg-2-User" Header */
char ec_parm[81]; /* "Chat" Trailer */

char scr_path[65]; /* Path for .SCR files */
char m_path[65]; /* Path for MSGxx.xxx files */
char m_a_type[64]; /* msg area type(s) */
char m_a_descs[64][61]; /* Msg area descriptions */
signed char cr_per_msg[64]; /* Credits / New Message in Area */
char max_keep_days[64]; /* Dflt days to keep new msgs */
char keep_received[64]; /* Dflt days to keep RCVD msgs */

char f_paths[64][65]; /* File area paths */
char f_a_type[64]; /* file " " - see R-CONST2.H */
char f_a_descs[64][61]; /* File area descriptions */
signed char cr_per_up[64]; /* Credits / K of Upload in Area */
signed char cr_per_down[64]; /* Credits / K of Download in Area */
char up_time_back[64]; /* % upload time restored */
char down_time_back[64]; /* % download time restored */

unsigned int log_level; /* Bit-mapped log switches */
unsigned int num_callers; /* Total # of upgraded callers */
unsigned int num_new_users; /* Total # of new users */

char minutes_per_cr; /* CR cost for each minute bought */
char credits_per_min; /* CRs gained for each minute sold */

unsigned int num_messages[65]; /* Total # of msgs / area (65=all) */
unsigned int num_files[65]; /* Total # of files / area (65=all) */
unsigned long num_calls; /* Total # of calls */

struct ACCESS_MASK MASKS[10]; /* 10 default access masks */
struct EVENT EVENTS[48]; /* Event table */

unsigned int port[MAX_MODEMS]; /* Address of comm ports */
char irq[MAX_MODEMS]; /* IRQ of comm ports */

char m_parms[MAX_MODEMS][41]; /* Modem Init Strings 1 - 4 [ANSWER] */
char m_parms2[MAX_MODEMS][41]; /* Modem Init Strings 1 - 4 [ORIGINATE] */

struct CONNECT_TABLE CONNECT[MAX_MODEMS][15]; /* Connect strings 1 - 4 */

char ascii_translate[128]; /* translate table for extended ascii */

char com_port[MAX_MODEMS]; /* COMx: values for each modem (1-4) */

char logoff_delay[MAX_MODEMS]; /* # seconds to pause b4 dropping carrier */

int num_doors; /* # of DOOR programs available */
int upload_space; /* Min. k free to allow uploads */

unsigned int other_doors; /* bit mapped switches for 'hidden' doors */

char default_extension[4]; /* Default file extension (ie., "ZIP") */

char filler[210]; /* reserved */

/* NOTE! Due to internal limitations, this structure is highly
unlikely to grow beyond 16k anytime in the near future. */

};

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct FILEHASH /* Length = 25 bytes */
{
char area; /* Area file is in */
char flags; /* See R-CONST2.H */
char name[13]; /* File Name */
unsigned short date; /* 1/2 of FTIME struct */
unsigned long size; /* File size (in bytes) */
unsigned long data_pos; /* Offset to start of FILE_INFO in BBSFILES.DAT */
};

/* About BBSFILES.IDX:

The first 1024 bytes of this file are reserved, and used as follows:

unsigned long first_file_in_area[64];
unsigned long last_file_in_area[64];
struct TOP_20_TABLE
{
unsigned num_times;
unsigned long offset; (Points to entry in BBSFILES.DAT)
} uploads[20], downloads[20];
char not_used[272];

The remainder of the file consists of 0 or more blocks of:

struct FILEHASH hash_array[200];

The last block will be padded with \x00's, if necessary. */

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct MSG_INDEX /* Length = 128 */
{
char msg_from[25]; /* Alias of sender */
char msg_to[25]; /* Alias of recipient */
char msg_subject[40]; /* Subject text */
unsigned times_read; /* # times the msg has been read */
unsigned priv_flag; /* flags - see R-CONST2.H */
char date_time_stamp[7]; /* date/time as YMDHMS. */
char keep_til_date[7]; /* date msg will be deleted */
int comment_to; /* # of msg this is a comment to, or 0 */
char filler[14]; /* not used */
unsigned long msg_dat; /* offset of 1st msg "fragment" */
};

/* About MSGxx.IDX files:

There is one message index file for each active message area. Each
file is a series of MSG_INDEX records, one for each message (from 1 -
however many msgs are in that area). Deleted messages are indicated by
msg_from[0] == '\0'. The msg_dat value is the offset of the first msg
segment in the .DAT file, which contains the text of the message(s).
It is invalid if the message has been deleted, as that portion of the
.DAT file may have been reused by a subsequent message. */

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct MSG_DATA /* Length = 128 bytes */
{
char del_byte; /* = 00h if fragment deleted */
char slot_count; /* # trailing 128 byte recs in fragment + 1 */
unsigned long msg_dat; /* offset of next fragment or NULL */
char msg_text[122]; /* 1st 122 bytes of text in fragment */
};


/* About MSGxx.DAT files:

There is one message data file for each active message area. The
first 128 bytes of each file is reserved, and contains information
about the msg area, as:

##########;##########;#####;##########

where the four values (all ASCII values, zero-filled on the left,
separated by commas, and followed by spaces) are:

highest msg 'slot' (in .IDX file) used in area
first available msg 'fragment' in .DAT file
the number of messages in the area
the _real_ msg # of the msg in slot '0' of the .IDX file
(this value will be added to the apparent msg # to derive the
_actual_ msg #. It is not currently used.)

The remainder of the file is a series of records, as:

struct MSG_FRAGMENT
{
struct MSG_DATA hdr;
char other_data[#_bytes];
}

where #_bytes = ((hdr.slot_count - 1) * 128). hdr.slot_count can vary
from 1 to 7, meaning that from 0 - 6 "slots" follow th base record. If
the fragment has been deleted, the entire MSG_FRAGMENT record is available
for reuse. Deleted MSG_FRAGMENTS have hdr.del_byte == '\0'.

The message text consists of a null-terminated C-style string, broken
into pieces within the limits of each fragment. Each fragment contains
a pointer to the next fragment in the message, or NULL for the last one.
Note that each FRAGMENT is not null-terminated - only the last one in
each msg. Also, hdr.msg_dat is undefined for deleted fragments. */

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

struct DOOR_REC /* rOver's doorway record v1.0 (ROVER.SYS) */
{
int port; /* Serial port caller is using. (0, 1-4, or 9) */
unsigned base; /* Base address of active serial port */
unsigned caller_baud; /* Actual connect speed (300, 1200, etc.) */
unsigned serial_baud; /* Modem-to-serial-port speed (300, 1200, etc.) */

char IRQ; /* IRQ line of active serial port (0 - 15) */
char node; /* Number of the active node (0 - 4) */
char sysop_page; /* sysop page is Y=enabled, N=disabled */
char ascii_ok; /* Caller Y=can, N=cannot display extended ASCII */
char ansi_ok; /* Caller Y=can, N=cannot display ANSI graphics */
char parity_flag; /* Y = 7/E/1, N = 8/N/1 */
char filler[2]; /* reserved */

int *busy_flag; /* "critical section" flag for use by doors */

unsigned ems_segment; /* 64k EMS segment */

unsigned setup_page; /* EMS page # for SETUP structure (or -1) */
unsigned setup_handle; /* EMS handle for SETUP structure (or -1) */
unsigned user_page; /* EMS page # for USER_REC structure (or -1) */
unsigned user_handle; /* EMS handle for USER_REC structure (or -1) */

unsigned time_left; /* Time remaining in this call */
unsigned num_uploaded; /* # of files uploaded this call */
unsigned num_downloaded; /* # of files downloaded this call */
unsigned k_uploaded; /* size of files uploaded this call */
unsigned k_downloaded; /* size of files downloaded this call */

union FTIME last_call; /* Date of last call */
union FTIME last_new_files; /* Date of last new files check */

char far *buffer; /* Pointer to a usable 10k work buffer */
struct SETUP far *setup; /* Pointer to rOver's SETUP.DAT data */
struct USER_REC far *user_rec; /* Pointer to the user's record */

/* ---> To be expanded. More fields will be added, but NOTHING
already in place will be moved. Thus, all programs will
be upward compatible with new releases automatically <--- */
};

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/


  3 Responses to “Category : BBS Programs+Doors
Archive   : RVR20C-2.ZIP
Filename : R-MAP2.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/