home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / plstsrc / types.h < prev   
Encoding:
C/C++ Source or Header  |  1988-12-31  |  10.1 KB  |  295 lines

  1. /************************************************************************
  2. *************************************************************************
  3. ** NOTE:                                                               **
  4. **   This Module is part of the ATARI ST Implementation of Parselst    **
  5. **   It should NOT be used for general reference. Please read the com- **
  6. **   plete Disclaimer either at the TOP of PARSELST.C.                 **
  7. **   Peter Glasmacher at 1:143/9  Ph (408)985-1538                     **
  8. *************************************************************************
  9. *************************************************************************/
  10.  
  11. /*----------------------------------------------------------------------*
  12. *                              Nodelist Parser                          *
  13. *                                                                       *
  14. *              This module was originally written by Bob Hartman        *
  15. *                       Sysop of FidoNet node 1:132/101                 *
  16. *                                                                       *
  17. * Spark Software, 427-3 Amherst St, CS 2032, Suite 232, Nashua, NH 03061*
  18. *                                                                       *
  19. * This program source code is being released with the following         *
  20. * provisions:                                                           *
  21. *                                                                       *
  22. * 1.  You are  free to make  changes to this source  code for use on    *
  23. *     your own machine,  however,  altered source files may not be      *
  24. *     distributed without the consent of Spark Software.                *
  25. *                                                                       *
  26. * 2.  You may distribute "patches"  or  "diff" files for any changes    *
  27. *     that you have made, provided that the "patch" or "diff" files are *
  28. *     also sent to Spark Software for inclusion in future releases of   *
  29. *     the entire package.   A "diff" file for the source archives may   *
  30. *     also contain a compiled version,  provided it is  clearly marked  *
  31. *     as not  being created  from the original source code.             *
  32. *     No other  executable  versions may be  distributed without  the   *
  33. *     consent of Spark Software.                                        *
  34. *                                                                       *
  35. * 3.  You are free to include portions of this source code in any       *
  36. *     program you develop, providing:  a) Credit is given to Spark      *
  37. *     Software for any code that may is used, and  b) The resulting     *
  38. *     program is free to anyone wanting to use it, including commercial *
  39. *     and government users.                                             *
  40. *                                                                       *
  41. * 4.  There is  NO  technical support  available for dealing with this  *
  42. *     source code, or the accompanying executable files.  This source   *
  43. *     code  is provided as is, with no warranty expressed or implied    *
  44. *     (I hate legalease).   In other words, if you don't know what to   *
  45. *     do with it,  don't use it,  and if you are brave enough to use it,*
  46. *      you're on your own.                                              *
  47. *                                                                       *
  48. * Spark Software may be contacted by modem at (603) 888-8179            *
  49. * (node 1:132/101)                                                      *
  50. * on the public FidoNet network, or at the address given above.         *
  51. *                                                                       *
  52. *-----------------------------------------------------------------------*/
  53.  
  54. typedef struct SC {
  55.    int zone;
  56.    int net;
  57.    int node;
  58.    char *script;
  59.    struct SC *next;
  60. } SCTR, *SCTRP;
  61.  
  62. typedef struct PW {
  63.    int zone;
  64.    int net;
  65.    int node;
  66.    char *pw;
  67.    struct PW *next;
  68. } PWTR, *PWTRP;
  69.  
  70. typedef struct PH {
  71.    int zone;
  72.    int net;
  73.    int node;
  74.    char *num;
  75.    struct PH *next;
  76. } PHTR, *PHTRP;
  77.  
  78. typedef struct BD {
  79.    int zone;
  80.    int net;
  81.    int node;
  82.    int baud;
  83.    struct BD *next;
  84. } BDTR, *BDTRP;
  85.  
  86. typedef struct DL {
  87.    char *mstr;
  88.    int mlen;
  89.    char *pre;
  90.    char *post;
  91.    struct DL *next;
  92. } DLTR, *DLTRP;
  93.  
  94. typedef struct CO {
  95.    char *mstr;
  96.    int mlen;
  97.    int cost;
  98.    int baud;
  99.    struct CO *next;
  100. } COTR, *COTRP;
  101.  
  102. typedef struct FN {
  103.    char *fname;
  104.    int private;
  105.    struct FN *next;
  106. } FNLST, *FNLSTP;
  107.  
  108. typedef struct ET {
  109.    int zone;
  110.    int net;
  111.    int node;
  112.    char etype;
  113.    struct ET *next;
  114. } ETTR, *ETTRP;
  115.  
  116. typedef struct CM {
  117.    int zone;
  118.    int net;
  119.    int node;
  120.    struct CM *next;
  121. } CMTR, *CMTRP;
  122.  
  123.   struct _oldnode {
  124.     int number;                 /* node number */
  125.     int net;                    /* net number */
  126.     int cost;                   /* cost per minute to call */
  127.     int rate;                   /* baud rate */
  128.     char name[20];                      /* node name */
  129.     char phone[40];                     /* phone number */
  130.     char city[40];                      /* city and state */
  131.    };
  132.  
  133.   struct _node {
  134.     int  net;               /* net number */
  135.     int  number;           /* node number, */
  136.     int  cost;              /* cost per minute to call */
  137.     char name[34];         /* node name */
  138.     char phone[40];        /* phone number */
  139.     char city[30];         /* city and state, */
  140.  
  141.     char password[8];      /* warning, not necessarily null terminated */
  142.     int  realcost;            /* phone company's charge */
  143.     int  hubnode;          /* node # of this node's hub or 0 if none */
  144.     char rate;              /* actual baud rate divided by 300 */
  145.     char modem;                  /* modem type code (see below) */
  146.     unsigned int flags1;   /* set of flags (see below) */
  147.     int  reserved;         /* reserved */
  148.    };
  149.  
  150.  
  151. /*------------------------------------------------------------------------*/
  152. /* Values for the `flags1' field                                          */
  153. /*------------------------------------------------------------------------*/
  154. #define B_hub      0x0001  /* node is a net hub       0000 0000 0000 0001 */
  155. #define B_host     0x0002  /* node is a net host      0000 0000 0000 0010 */
  156. #define B_region   0x0004  /* node is region coord    0000 0000 0000 0100 */
  157. #define B_zone     0x0008  /* node is a zone coord    0000 0000 0000 1000 */
  158. #define B_CM       0x0010  /* runs continuous mail    0000 0000 0001 0000 */
  159. #define B_ores1    0x0020  /* reserved for Opus       0000 0000 0010 0000 */
  160. #define B_ores2    0x0040  /* reserved for Opus       0000 0000 0100 0000 */
  161. #define B_ores3    0x0080  /* reserved for Opus       0000 0000 1000 0000 */
  162. #define B_ores4    0x0100  /* reserved for Opus       0000 0001 0000 0000 */
  163. #define B_ores5    0x0200  /* reserved for Opus       0000 0010 0000 0000 */
  164. #define B_res1     0x0400  /* reserved for non-Opus   0000 0100 0000 0000 */
  165. #define B_res2     0x0800  /* reserved for non-Opus   0000 1000 0000 0000 */
  166. #define B_res3     0x1000  /* reserved for non-Opus   0001 0000 0000 0000 */
  167. #define B_res4     0x2000  /* reserved for non-Opus   0010 0000 0000 0000 */
  168. #define B_res5     0x4000  /* reserved for non-Opus   0100 0000 0000 0000 */
  169. #define B_res6     0x8000  /* reserved for non-Opus   1000 0000 0000 0000 */
  170.  
  171. /*------------------------------------------------------------------------*/
  172. /* Values for the `modem' field                                           */
  173. /*------------------------------------------------------------------------*/
  174. #define M_HST      0x01    /* node uses an HST                  0000 0001 */
  175. #define M_PEP      0x02    /* node uses a PEP modem             0000 0001 */
  176.  
  177. /*--------------------------------------------------------------------------*/
  178. /* Nodelist.Idx                                                             */
  179. /* (File is terminated by EOF)                                              */
  180. /*--------------------------------------------------------------------------*/
  181. struct _ndi {
  182.       int   node;          /* node number  */
  183.       int   net;           /* net number   */
  184. };
  185.  
  186. /* SEAdog NETLIST.DOG format */
  187. struct netls {
  188.    int netnum;
  189.    char netname[14];
  190.    char netcity[40];
  191.    int havehost;
  192.    int nethost;
  193.    int havegate;
  194.    int netgate;
  195.    long nodeptr;
  196.    int numnodes;
  197. };
  198.  
  199. /* SEAdog NODELIST.DOG format */
  200. struct nodels {
  201.    int nodenum;
  202.    char nodename[14];
  203.    char nodecity[40];
  204.    char nodephone[40];
  205.    int havehub;
  206.    int nodehub;
  207.    int nodecost;
  208.    int nodebaud;
  209. };
  210.  
  211. /* SEAdog INDEX.DOG format */
  212. struct nidxs {
  213.    int idxnet;
  214.    int idxnode;
  215.    long netlptr;
  216.    long nodelptr;
  217.    long idxspace;
  218. };
  219.  
  220. /* Things most nodelists don't contain, but Binkley likes to have */
  221. struct extrastuff {
  222.    char password[8];
  223.    unsigned int flags1;
  224.    char extra[6]; /* for future expansion */
  225. };
  226.  
  227. /* QuickBBS v2.01 QNL_IDX.BBS format */
  228. struct qidx {
  229.    int zone;
  230.    int net;
  231.    int node;
  232.    char nodetype;
  233. };
  234.  
  235. /* QuickBBS v2.01 QNL_DAT.BBS format */
  236. struct qdat {
  237.    char nodetype;
  238.    int zone;
  239.    int net;
  240.    int node;
  241.    char namesize;
  242.    char name[20];
  243.    char citysize;
  244.    char city[40];
  245.    char phonesize;
  246.    char phone[40];
  247.    char passwordsize;
  248.    char password[8];
  249.    unsigned int flags;
  250.    int baudrate;
  251.    int cost;
  252. };
  253.  
  254. /*----------------------------------------------------------------------*
  255. * STarNet Nodelist
  256. *-----------------------------------------------------------------------*/
  257. struct starlist  {
  258.    int type;
  259.    int zone;
  260.    int net;
  261.    int node;
  262.    int rnet;
  263.    int rnode;
  264.    int baud;
  265.    int cost;
  266.    int route;
  267.    char bbsname[50];
  268.    char bbsloc[30];
  269.    char bbsnumber[20];
  270.    char password[10];
  271.    int flags;
  272.    char res1;
  273.    char res2;
  274.    char res3;
  275.    char res4;
  276. };
  277.  
  278. struct dex  {
  279.    int type;
  280.    int zone;
  281.    int net;
  282.    long position;
  283.    char realloc[30];
  284.    char location[50];
  285. };
  286.  
  287. /* Used for low-level I/O routines */
  288. typedef struct {
  289.    char far *wbuff;
  290.    char far *wptr;
  291.    unsigned int wsize;
  292. } WBUFFER, *WBUFFPTR;
  293.  
  294.  
  295.