home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
prog
/
c
/
afixsrc.lha
/
Paragon.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-06-02
|
9KB
|
402 lines
#ifndef EXEC_EXEC_H
#include <proto/exec.h>
#include <exec/exec.h>
#endif
#ifndef TIME_H
#include <time.h>
#endif
#define PARAGON_H
/*
Paragon BBS header file (C)1989 by Jon Radoff and Eric Drewry
This version has been updated for Paragon 1.1.
All rights released for use in any software
*/
#define MAXMSGBASE 128 /* Max number of message bases allowed */
#define MAXUDBASE 40 /* Max number of file areas */
#define MAXNODES 9 /* Max number of BBS nodes */
#define FNAME "Paragon.CON" /* The configuration file */
#define INXSIZE 90
#define PATHSIZE 64
/*----------------------------------------------------------------------*
* Paragon Nodelist
*-----------------------------------------------------------------------*/
struct paralist { /* Nodelist data file */
short int type;
short int zone;
short int net;
short int node;
short int rnet;
short int rnode;
short int baud;
short int cost;
short int route;
char bbsname[50];
char bbsloc[30];
char bbsnumber[20];
char password[10];
short int flags;
char res1;
char res2;
char res3;
char res4;
};
struct paradex { /* Nodelist index file */
short int type;
short int zone;
short int net;
long position;
char realloc[30];
char location[50];
};
/*----------------------------------------------------------------------*
Paragon.CON structure (configuration)
*-----------------------------------------------------------------------*/
/* Paragon 2.00 Beta 8 config structure */
struct fig
{
char defpath[PATHSIZE];
char mailpath[PATHSIZE];
char msgpath[MAXMSGBASE][PATHSIZE];
char msgname[MAXMSGBASE][32];
char udpath[MAXUDBASE][PATHSIZE];
char udname[MAXUDBASE][32];
short int msgno[MAXMSGBASE];
short int lomsgno[MAXMSGBASE];
short int himsgno[MAXMSGBASE];
char outpath[PATHSIZE];
char txtpath[PATHSIZE];
short int fiena;
short int fionhour;
short int fioffhour;
short int fionmin;
short int fioffmin;
short int mail;
short int ulist;
short int outena;
short int nm;
short int sm;
short int fm;
short int callspd[16];
short int idlemin[16];
short int ptena;
short int onhour;
short int offhour;
char bbsname[64];
char chateng[80];
char chatret[80];
short int subop[MAXMSGBASE+MAXUDBASE];
long syscalls;
short int bdcktp;
char iden[4];
short int defbaud;
long points;
short int log;
char newspath[PATHSIZE];
short int msglevel[MAXMSGBASE];
short int udlevel[MAXUDBASE];
short int minpc[16];
short int minpd[16];
short int onmin;
short int offmin;
char color;
char junk_text[15];
short int smdiss;
char netpath[PATHSIZE];
short int net;
short int node;
short int basetype[MAXMSGBASE];
char tele[16];
char echo[64];
char prefix[20];
char suffix[10];
short int delay;
short int uplevel;
short int himsgsent[MAXMSGBASE];
char listpath[PATHSIZE];
char sysop[22];
short int seenby;
char mprompt[30];
short int binkley;
short int zone;
short int prn;
short int chat;
char xpath[PATHSIZE];
short int graphics;
short int d_msgmask[16][8];
short int d_udmask[16][4];
short int d_wmsgmask[16][8];
short int d_wudmask[16][4];
short int d_privs[16][7];
long d_credits[16];
short int d_ratio[16];
short int dev_mask[MAXUDBASE];
char devices[16][10];
short int ul_return;
short int ul_perm;
short int ul_perm_max;
char data[PATHSIZE];
short int lockbaud;
short int rts;
char laston[22];
short int default_chat;
short int default_privacy;
char tagname[MAXMSGBASE][16];
short int msg_sig[MAXMSGBASE];
short int file_sig[MAXMSGBASE];
short int config_version;
char YooHoo[100];
long minspace;
short int openfiles;
short int remote;
char waiting[PATHSIZE];
short int def_brat[16];
char helppath[PATHSIZE];
char menupath[PATHSIZE];
short int pal_mode;
short int f_status[MAXUDBASE];
short int threadhi[MAXMSGBASE];
short int f_menu[MAXUDBASE];
short int m_menu[MAXMSGBASE];
long freebyte[16];
short int maxdlm;
char remote_dos_code[20];
char msg_dl_path[PATHSIZE];
short int msg_benefit;
short int timeout;
short int guest_on;
short int log_level;
short int calls_today;
short int d_msg_limit[16];
char macros[10][80];
short int last_call;
short int bulletins_on;
char uptmppath[PATHSIZE];
short int AREXX;
short int check_integrity[MAXUDBASE];
char serial_device[MAXNODES][30];
char serial_unit[MAXNODES];
short int total_nodes;
short int total_in_doors;
short int msglock[MAXMSGBASE];
short int fillock[MAXUDBASE];
short int mislock[20];
short int newumsg[20];
short int newsmsg[20];
char freqpath[PATHSIZE];
} config;
struct fil
{
short int level; /* Access level to read file */
char filesname[14]; /* Name of file */
char free_spc[34]; /* free space */
short int numdls; /* number of downloads */
unsigned short int createdate; /* Creation date */
unsigned short int createtime; /* Creation time */
short int comtype;
long bytesize;
char des1[82];
char des2[82];
char upusername[22];
short int free_dl;
short int unvalidated;
unsigned short int last_dl_date;
char free[2];
};
struct usr
{
short int level;
char username[22];
long byteup;
long bytedown;
long freebyte;
char password[14];
short int numcalls;
short int lastdate;
short int lasttime;
short int callstd;
short int dlmode_nls;
short int minleft;
short int comtype;
short int col;
long bytesent;
long byterec;
char tele[14];
long points;
short int himsgread[MAXMSGBASE];
short int msg_limit;
char address[40];
char city[30];
char state[3];
char zip[8];
char dlmode_arc;
long credits;
short int msgmask[8];
short int udmask[4];
short int moreflag;
short int u_version;
short int mmask[8];
short int fmask[4];
short int wmsgmask[8];
short int wudmask[4];
short int privs[7];
short int helplevel;
short int protocol;
char screenclears;
char unused;
short int graphics;
short int ratio;
short int ucallpd;
short int uminpd;
short int uminpc;
short int lastfile;
short int brat;
short int msg_entered;
char hotkeys;
};
struct FileIndex
{
char filesname[14];
unsigned short int createdate;
unsigned short int level;
unsigned short int area;
unsigned short int count;
unsigned short int imark;
};
struct mailw
{
short int base;
short int num;
} mailwait;
/*----------------------------------------------------------------------*
Message header (standard fido message)
*-----------------------------------------------------------------------*/
extern struct msg {
char fromuser[36];
char touser[36];
char subject[72];
char datetime[20];
short int timesread;
short int desnode;
short int orignode;
short int cost;
short int orignet;
short int desnet;
char fill[8];
short int replyto;
int private : 1;
int crash : 1;
int recd : 1;
int sent : 1;
int fileatt : 1;
int intransit : 1;
int orphan : 1;
int killsent : 1;
int local : 1;
int hfpick : 1;
int unused : 1;
int filereq : 1;
int retrecreq : 1;
int isretrec : 1;
int auditreq : 1;
int fileupreq : 1;
short int nextreply;
};
/*----------------------------------------------------------------------*
Menu file structure - new for V1.1
*-----------------------------------------------------------------------*/
struct _Menu {
short int page; /* Page number */
short int menutype; /* 0=general, 1=file, 2=message */
short int unused1;
short int unused2;
short int unused3;
char default_menu[16];
char access_menu[16][16];
char commands_active[60]; /* ascii 33 to 90 are used */
char commands_function[60]; /* see menubit.h */
char commands_minsec[60]; /* Min access */
char commands_maxsec[60]; /* Max access */
char commands_priv[60]; /* Priv req'd to use command */
char commands_sparam[60][50];
short int commands_iparam[60];
char prompt[40];
} Menu;
/*
(*1): The MAXMSGBASE is not an error for this structure.
(*2): If this value equals 0, it the program accessing this record
should set it's value equal to files.createdate
*/
struct Command_Msg
{
struct Message Command_Msg;
short int from_node; /* What node # is this? */
short int command; /* Command sent */
short int par1; /* Integer parameter #1 */
short int par2; /* Integer parameter #2 */
long lpar; /* Long parameter */
char string1[100]; /* String parameter #1 */
char string2[100]; /* String parameter #2 */
short int cursig; /* Current sig */
struct fig *con_ptr; /* Config file pointer */
struct fil *fil_ptr; /* File record pointer */
struct usr *usr_ptr; /* User record pointer */
struct FileIndex *findex; /* Ptr to file index */
short total_indexed; /* Total files indexed */
long *quoteloc; /* Ptr to quote index */
short qcount; /* Number of quotes */
short locked[20]; /* Internal locks */
char free_space[100]; /* Free */
};
void PFTime(unsigned short *Time)
{
unsigned long amigatime;
struct tm *systime;
time(&amigatime);
systime=localtime(&amigatime);
*Time=systime->tm_sec/2;
*Time+=systime->tm_min<<6;
*Time=systime->tm_hour<<11;
}
void PFDate(unsigned short *Date)
{
unsigned long amigatime;
struct tm *systime;
time(&amigatime);
systime=localtime(&amigatime);
*Date=systime->tm_mday;
*Date+=(systime->tm_mon+1)<<5;
*Date+=(systime->tm_year-80)<<9;
}