home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / afixsrc.lha / Paragon.h < prev    next >
C/C++ Source or Header  |  1990-06-02  |  9KB  |  402 lines

  1. #ifndef EXEC_EXEC_H
  2. #include <proto/exec.h>
  3. #include <exec/exec.h>
  4. #endif
  5. #ifndef TIME_H
  6. #include <time.h>
  7. #endif
  8.  
  9. #define PARAGON_H
  10.  
  11. /*
  12.  
  13. Paragon BBS header file (C)1989 by Jon Radoff and Eric Drewry
  14.  
  15. This version has been updated for Paragon 1.1.
  16.  
  17. All rights released for use in any software
  18.  
  19. */
  20.  
  21. #define MAXMSGBASE 128 /* Max number of message bases allowed */
  22. #define MAXUDBASE 40 /* Max number of file areas */
  23. #define MAXNODES 9 /* Max number of BBS nodes */
  24. #define FNAME "Paragon.CON" /* The configuration file */
  25. #define INXSIZE 90
  26. #define PATHSIZE 64
  27.  
  28. /*----------------------------------------------------------------------*
  29. * Paragon Nodelist
  30. *-----------------------------------------------------------------------*/
  31.  
  32. struct paralist  {  /* Nodelist data file */
  33.    short int type;
  34.    short int zone;
  35.    short int net;
  36.    short int node;
  37.    short int rnet;
  38.    short int rnode;
  39.    short int baud;
  40.    short int cost;
  41.    short int route;
  42.    char bbsname[50];
  43.    char bbsloc[30];
  44.    char bbsnumber[20];
  45.    char password[10];
  46.    short int flags;
  47.    char res1;
  48.    char res2;
  49.    char res3;
  50.    char res4;
  51. };
  52.  
  53. struct paradex  { /* Nodelist index file */
  54.    short int type;
  55.    short int zone;
  56.    short int net;
  57.    long position;
  58.    char realloc[30];
  59.    char location[50];
  60. };
  61.  
  62. /*----------------------------------------------------------------------*
  63.  
  64.                       Paragon.CON structure (configuration)
  65.  
  66. *-----------------------------------------------------------------------*/
  67. /* Paragon 2.00 Beta 8 config structure */
  68.  
  69. struct fig
  70. {
  71.     char defpath[PATHSIZE];
  72.     char mailpath[PATHSIZE];
  73.     char msgpath[MAXMSGBASE][PATHSIZE];
  74.     char msgname[MAXMSGBASE][32];
  75.     char udpath[MAXUDBASE][PATHSIZE];
  76.     char udname[MAXUDBASE][32];
  77.     short int msgno[MAXMSGBASE];
  78.     short int lomsgno[MAXMSGBASE];
  79.     short int himsgno[MAXMSGBASE];
  80.     char outpath[PATHSIZE];
  81.     char txtpath[PATHSIZE];
  82.     short int fiena;
  83.     short int fionhour;
  84.     short int fioffhour;
  85.     short int fionmin;
  86.     short int fioffmin;
  87.     short int mail;
  88.     short int ulist;
  89.     short int outena;
  90.     short int nm;
  91.     short int sm;
  92.     short int fm;
  93.     short int callspd[16];
  94.     short int idlemin[16];
  95.     short int ptena;
  96.     short int onhour;
  97.     short int offhour;
  98.     char bbsname[64];
  99.     char chateng[80];
  100.     char chatret[80];
  101.     short int subop[MAXMSGBASE+MAXUDBASE];
  102.     long syscalls;
  103.     short int bdcktp;
  104.     char iden[4];
  105.     short int defbaud;
  106.     long points;
  107.     short int log;
  108.     char newspath[PATHSIZE];
  109.     short int msglevel[MAXMSGBASE];
  110.     short int udlevel[MAXUDBASE];
  111.     short int minpc[16];
  112.     short int minpd[16];
  113.     short int onmin;
  114.     short int offmin;
  115.     char color;
  116.     char junk_text[15];
  117.     short int smdiss;
  118.     char netpath[PATHSIZE];
  119.     short int net;
  120.     short int node;
  121.     short int basetype[MAXMSGBASE];
  122.     char tele[16];
  123.     char echo[64];
  124.     char prefix[20];
  125.     char suffix[10];
  126.     short int delay;
  127.     short int uplevel;
  128.     short int himsgsent[MAXMSGBASE];
  129.     char listpath[PATHSIZE];
  130.     char sysop[22];
  131.     short int seenby;
  132.     char mprompt[30];
  133.     short int binkley;
  134.     short int zone;
  135.     short int prn;
  136.     short int chat;
  137.     char xpath[PATHSIZE];
  138.     short int graphics;
  139.     short int d_msgmask[16][8];
  140.     short int d_udmask[16][4];
  141.     short int d_wmsgmask[16][8];
  142.     short int d_wudmask[16][4];
  143.     short int d_privs[16][7];
  144.     long d_credits[16];
  145.     short int d_ratio[16];
  146.     short int dev_mask[MAXUDBASE];
  147.     char devices[16][10];
  148.     short int ul_return;
  149.     short int ul_perm;
  150.     short int ul_perm_max;
  151.     char data[PATHSIZE];
  152.     short int lockbaud;
  153.     short int rts;
  154.     char laston[22];
  155.     short int default_chat;
  156.     short int default_privacy;
  157.     char tagname[MAXMSGBASE][16];
  158.     short int msg_sig[MAXMSGBASE];
  159.     short int file_sig[MAXMSGBASE];
  160.     short int config_version;
  161.     char YooHoo[100];
  162.     long minspace;
  163.     short int openfiles;
  164.     short int remote;
  165.     char waiting[PATHSIZE];
  166.     short int def_brat[16];
  167.     char helppath[PATHSIZE];
  168.     char menupath[PATHSIZE];
  169.     short int pal_mode;
  170.     short int f_status[MAXUDBASE];
  171.     short int threadhi[MAXMSGBASE];
  172.     short int f_menu[MAXUDBASE];
  173.     short int m_menu[MAXMSGBASE];
  174.     long freebyte[16];
  175.     short int maxdlm;
  176.     char remote_dos_code[20];
  177.     char msg_dl_path[PATHSIZE];
  178.     short int msg_benefit;
  179.     short int timeout;
  180.     short int guest_on;
  181.     short int log_level;
  182.     short int calls_today;
  183.     short int d_msg_limit[16];
  184.     char macros[10][80];
  185.     short int last_call;
  186.     short int bulletins_on;
  187.     char uptmppath[PATHSIZE];
  188.     short int AREXX;
  189.     short int check_integrity[MAXUDBASE];
  190.     char serial_device[MAXNODES][30];
  191.     char serial_unit[MAXNODES];
  192.     short int total_nodes;
  193.     short int total_in_doors;
  194.     short int msglock[MAXMSGBASE];
  195.     short int fillock[MAXUDBASE];
  196.     short int mislock[20];
  197.     short int newumsg[20];
  198.     short int newsmsg[20];
  199.     char freqpath[PATHSIZE];
  200. } config;
  201.  
  202. struct fil
  203. {
  204.     short int level; /* Access level to read file */
  205.     char filesname[14]; /* Name of file */
  206.     char free_spc[34]; /* free space */
  207.     short int numdls; /* number of downloads */
  208.     unsigned short int createdate; /* Creation date */
  209.     unsigned short int createtime; /* Creation time */
  210.     short int comtype;
  211.     long bytesize;
  212.     char des1[82];
  213.     char des2[82];
  214.     char upusername[22];
  215.     short int free_dl;
  216.     short int unvalidated;
  217.     unsigned short int last_dl_date;
  218.     char free[2];
  219. };
  220.  
  221. struct usr
  222. {
  223.     short int level;
  224.     char username[22];
  225.     long byteup;
  226.     long bytedown;
  227.     long freebyte;
  228.     char password[14];
  229.     short int numcalls;
  230.     short int lastdate;
  231.     short int lasttime;
  232.     short int callstd;
  233.     short int dlmode_nls;
  234.     short int minleft;
  235.     short int comtype;
  236.     short int col;
  237.     long bytesent;
  238.     long byterec;
  239.     char tele[14];
  240.     long points;
  241.     short int himsgread[MAXMSGBASE];
  242.     short int msg_limit;
  243.     char address[40];
  244.     char city[30];
  245.     char state[3];
  246.     char zip[8];
  247.     char dlmode_arc;
  248.     long credits;
  249.     short int msgmask[8];
  250.     short int udmask[4];
  251.     short int moreflag;
  252.     short int u_version;
  253.     short int mmask[8];
  254.     short int fmask[4];
  255.     short int wmsgmask[8];
  256.     short int wudmask[4];
  257.     short int privs[7];
  258.     short int helplevel;
  259.     short int protocol;
  260.     char screenclears;
  261.     char unused;
  262.     short int graphics;
  263.     short int ratio;
  264.     short int ucallpd;
  265.     short int uminpd;
  266.     short int uminpc;
  267.     short int lastfile;
  268.     short int brat;
  269.     short int msg_entered;
  270.     char hotkeys;
  271. };
  272.  
  273. struct FileIndex
  274. {
  275.     char filesname[14];
  276.     unsigned short int createdate;
  277.     unsigned short int level;
  278.     unsigned short int area;
  279.     unsigned short int count;
  280.     unsigned short int imark;
  281. };
  282.  
  283. struct mailw
  284. {
  285.     short int base;
  286.     short int num;
  287. } mailwait;
  288.  
  289. /*----------------------------------------------------------------------*
  290.  
  291.                      Message header (standard fido message)
  292.  
  293. *-----------------------------------------------------------------------*/
  294.  
  295. extern struct msg {
  296. char fromuser[36];
  297. char touser[36];
  298. char subject[72];
  299. char datetime[20];
  300. short int timesread;
  301. short int desnode;
  302. short int orignode;
  303. short int cost;
  304. short int orignet;
  305. short int desnet;
  306. char fill[8];
  307. short int replyto;
  308. int private : 1;
  309. int crash : 1;
  310. int recd : 1;
  311. int sent : 1;
  312. int fileatt : 1;
  313. int intransit : 1;
  314. int orphan : 1;
  315. int killsent : 1;
  316. int local : 1;
  317. int hfpick : 1;
  318. int unused : 1;
  319. int filereq : 1;
  320. int retrecreq : 1;
  321. int isretrec : 1;
  322. int auditreq : 1;
  323. int fileupreq : 1;
  324. short int nextreply;
  325. };
  326.  
  327. /*----------------------------------------------------------------------*
  328.  
  329.                       Menu file structure - new for V1.1
  330.  
  331. *-----------------------------------------------------------------------*/
  332.  
  333. struct _Menu {
  334.     short int page; /* Page number */
  335.     short int menutype; /* 0=general, 1=file, 2=message */
  336.     short int unused1;
  337.     short int unused2;
  338.     short int unused3;
  339.     char default_menu[16];
  340.     char access_menu[16][16];
  341.     char commands_active[60]; /* ascii 33 to 90 are used */
  342.     char commands_function[60]; /* see menubit.h */
  343.     char commands_minsec[60]; /* Min access */
  344.     char commands_maxsec[60]; /* Max access */
  345.     char commands_priv[60]; /* Priv req'd to use command */
  346.     char commands_sparam[60][50];
  347.     short int commands_iparam[60];
  348.     char prompt[40];
  349.     } Menu;
  350.  
  351. /*
  352.  
  353. (*1): The MAXMSGBASE is not an error for this structure.
  354. (*2): If this value equals 0, it the program accessing this record
  355.       should set it's value equal to files.createdate
  356.  
  357. */
  358.  
  359. struct Command_Msg
  360. {
  361.     struct Message Command_Msg;
  362.     short int from_node;             /* What node # is this? */
  363.     short int command;               /* Command sent         */
  364.     short int par1;                  /* Integer parameter #1 */
  365.     short int par2;                  /* Integer parameter #2 */
  366.     long lpar;                       /* Long parameter       */
  367.     char string1[100];               /* String parameter #1  */
  368.     char string2[100];               /* String parameter #2  */
  369.     short int cursig;                /* Current sig          */
  370.     struct fig *con_ptr;             /* Config file pointer  */
  371.     struct fil *fil_ptr;             /* File record pointer  */
  372.     struct usr *usr_ptr;             /* User record pointer  */
  373.     struct FileIndex *findex;        /* Ptr to file index    */
  374.     short total_indexed;             /* Total files indexed  */
  375.     long *quoteloc;                  /* Ptr to quote index   */
  376.     short qcount;                    /* Number of quotes     */
  377.     short locked[20];                /* Internal locks       */
  378.     char free_space[100];            /* Free                 */
  379. };
  380.  
  381. void PFTime(unsigned short *Time)
  382. {
  383.     unsigned long amigatime;
  384.     struct tm *systime;
  385.     time(&amigatime);
  386.     systime=localtime(&amigatime);
  387.     *Time=systime->tm_sec/2;
  388.     *Time+=systime->tm_min<<6;
  389.     *Time=systime->tm_hour<<11;
  390. }
  391.  
  392. void PFDate(unsigned short *Date)
  393. {
  394.     unsigned long amigatime;
  395.     struct tm *systime;
  396.     
  397.     time(&amigatime);
  398.     systime=localtime(&amigatime);
  399.     *Date=systime->tm_mday;
  400.     *Date+=(systime->tm_mon+1)<<5;
  401.     *Date+=(systime->tm_year-80)<<9;
  402. }