home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / top2src.zip / TOPMAINT.ZIP / TOP.H next >
C/C++ Source or Header  |  1996-11-07  |  8KB  |  311 lines

  1.  
  2. #if defined(__OS2__) || defined(__WIN32__)
  3. #define XFAR
  4. #define XINT short int
  5. typedef struct _date
  6.     {
  7.     XINT          da_year;        /* Year - 1980 */
  8.     char          da_day;     /* Day of the month */
  9.     char          da_mon;     /* Month (1 = Jan) */
  10.     } XDATE;
  11. typedef enum
  12.     {
  13.     RK_UNREGISTERED,
  14.     RK_REGISTERED
  15.     } RKVALID;
  16. #else
  17. #define XFAR far
  18. #define XINT int
  19. #define LIBENTRY
  20. #define LIBDATA
  21. typedef struct date XDATE;
  22. #endif
  23.  
  24. #define MAXSTRLEN      255L
  25. #define MAXWORDS       (XINT) (MAXSTRLEN / 2)
  26. #define MAXOPENRETRIES 1024L
  27. #define MAXCHANSPECNODES 100
  28. #define MAXBIOQUES       100L
  29. #define BUSYCHANNEL    0xFFFFFFFFUL
  30. #define MAXCHANNEL     0xFFFFFFFEUL
  31.  
  32. #define PREF1_ECHOACTIONS   0x01
  33. #define PREF1_ECHOTALKTYP   0x02
  34. #define PREF1_ECHOTALKMSG   0x04
  35. #define PREF1_MSGSENT       0x08
  36. #define PREF1_ECHOGA        0x10
  37. #define PREF1_TALKMSGSENT   0x20
  38. #define PREF1_DUALWINDOW    0x40
  39. #define PREF1_BLKWHILETYP   0x80
  40.  
  41. #define PREF2_SINGLECHAR    0x01
  42. #define PREF2_CHANLISTED    0x02
  43. #define PREF2_ECHOOWNTEXT   0x04
  44. #define PREF2_ACTIONSOFF    0x08
  45.  
  46. typedef struct stringarray1_str
  47.     {
  48.     unsigned char XFAR string[11];
  49.     } stringarray1;
  50.  
  51. typedef struct stringarray2_str
  52.     {
  53.     unsigned char XFAR string[31];
  54.     } stringarray2;
  55.  
  56. typedef struct user_data_str
  57.     {
  58.     unsigned char realname[41];
  59.     unsigned char handle[31];
  60.     unsigned char unusedspace[61];
  61.     struct pers_act_typ
  62.         {
  63.         XINT          type;
  64.         unsigned char verb[11];
  65.         unsigned char response[61];
  66.         unsigned char singular[61];
  67.         unsigned char plural[61];
  68.         } persact[4];
  69.     XDATE         last_use;
  70.     XINT          gender;
  71.     char          datefmt;
  72.     char          timefmt;
  73.     unsigned char pref1;
  74.     unsigned char pref2;
  75.     unsigned char pref3;
  76.     unsigned char password[16];
  77.     unsigned char age;
  78.     unsigned char emessage[81];
  79.     unsigned char xmessage[81];
  80.     unsigned long cybercash;
  81.     unsigned XINT security;
  82.     unsigned char defchantopic[71];
  83.     char          donebio;
  84.     char reserved[2048 - 1185];
  85.     } user_data_typ;
  86.  
  87. typedef struct node_idx_str
  88.     {
  89.     unsigned XINT structlength;
  90.     unsigned char handle[31];
  91.     unsigned char realname[41];
  92.     unsigned XINT speed;
  93.     unsigned char location[31];
  94.     XINT          gender;
  95.     char          quiet;
  96.     unsigned XINT task;
  97.     time_t        lastaccess;
  98.     unsigned long channel;
  99.     char          channellisted;
  100.     unsigned XINT security;
  101.     char          actions;
  102.     } node_idx_typ;
  103.  
  104. typedef struct msg_str
  105.     {
  106.     unsigned XINT structlength;
  107.     XINT          type;
  108.     XINT          from;
  109.     XINT          doneto;
  110.     XINT          gender;
  111.     unsigned char handle[31];
  112.     unsigned char string[256]; /////////////Change To Dynamic!
  113.     unsigned long channel;
  114.     unsigned XINT minsec;  /* Minimum Security to recv msg. */
  115.     unsigned XINT maxsec;  /* Maximum Security to recv msg. */
  116.     long          data1;
  117.     } msg_typ;
  118.  
  119. /*//|typedef struct slots_stat_str
  120.     {
  121.     unsigned long pulls;
  122.     unsigned long spent;
  123.     unsigned long hits[10];
  124.     unsigned long totals[10];
  125.     } slots_stat_typ;*///|
  126.  
  127. typedef struct lang_text_str
  128.     {
  129.     unsigned char idtag[31];
  130.     XINT          length;
  131.     unsigned char XFAR *string; /* Points to a malloc()ed buffer in memory */
  132.     } lang_text_typ;
  133.  
  134. typedef struct bbsnodedata_str
  135.     {
  136.     unsigned char handle[31];
  137.     unsigned char realname[41];
  138.     XINT          node;
  139.     long          speed;
  140.     unsigned char location[31];
  141.     unsigned char statdesc[81];
  142.     char          quiet;
  143.     char          gender;
  144.     char          hidden;
  145.     unsigned XINT numcalls;
  146.     unsigned char infobyte;
  147.  
  148.     unsigned char attribs1;
  149.     unsigned XINT existbits;
  150.     } bbsnodedata_typ;
  151.  
  152. typedef struct editor_field_str
  153.     {
  154.     char enabled;
  155.     unsigned char inptype;
  156.     char noinput;
  157.     void *varbuffer;
  158.     unsigned char *title;
  159.     unsigned char *fmtstring;
  160.     XINT titlerow, titlecol;
  161.     XINT fieldrow, fieldcol;
  162.     unsigned char titleattrib;
  163.     unsigned char tihiltattrib;
  164.     unsigned char tidisattrib;
  165.     unsigned char normalattrib;
  166.     unsigned char highltattrib;
  167.     unsigned char bgchar;
  168.     unsigned XINT flags;
  169.     long minval, maxval;
  170.     XINT minlen, maxlen;
  171.     char (*verifyfunc)(void *fieldinf);
  172.     void (*noinputfunc)(unsigned char *buffer, void *fieldinf);
  173.     } editor_field_typ;
  174.  
  175. typedef struct channel_data_str
  176.     { // This is too memory consuming - strings need to be dynamic.
  177.     unsigned long channel;
  178.     unsigned char topic[71];
  179.     unsigned char joinaliases[31];
  180.     unsigned XINT minsec;
  181.     unsigned XINT maxsec;
  182.     unsigned XINT modsec;
  183.     char          listed;
  184.     } channel_data_typ;
  185.  
  186. typedef struct action_file_str
  187.     {
  188.     unsigned long datstart; /* Location of first action's data. */
  189.     unsigned long txtstart; /* Location of first action's text. */
  190.     unsigned char name[31];
  191.     unsigned XINT minsec;
  192.     unsigned XINT maxsec;
  193.     unsigned long minchannel;
  194.     unsigned long maxchannel;
  195.     unsigned long numactions;
  196.     } action_file_typ;
  197.  
  198. typedef struct action_data_str
  199.     {
  200.     char          type;   /* -1 = deleted */
  201.     unsigned char verb[11];
  202.     unsigned long textofs; /* From txtstart */
  203.     unsigned XINT responselen; /* 0 = N/A */
  204.     unsigned XINT singularlen; /* 0 = N/A */
  205.     unsigned XINT plurallen;  /* 0 = N/A */
  206.     } action_data_typ;
  207.  
  208. typedef struct action_ptr_str
  209.     {
  210.     unsigned char *responsetext;
  211.     unsigned char *singulartext;
  212.     unsigned char *pluraltext;
  213.     } action_ptr_typ;
  214.  
  215. typedef struct action_rec_str
  216.     {
  217.     action_data_typ data;
  218.     action_ptr_typ ptrs;
  219.     } action_rec_typ;
  220.  
  221. typedef struct chan_idx_str
  222.     {
  223.     unsigned XINT structlength;
  224.     unsigned long channum;
  225.     char          type;
  226.     XINT          usercount;
  227.     unsigned char topic[71];
  228.     XINT          modnode;
  229.     /* specnodes: banned for open channels, invited for closed. */
  230.     XINT          specnode[MAXCHANSPECNODES];
  231.     } chan_idx_typ;
  232.  
  233. typedef struct spawn_prog_str
  234.     {
  235.     unsigned char name[41];
  236.     unsigned char cmds[81];
  237.     unsigned char cmdline[129];
  238.     } spawn_prog_typ;
  239.  
  240. typedef struct censor_word_str
  241.     {
  242.     char wholeword;
  243.     XINT level;
  244.     char *word;
  245.     char *changeto;
  246.     } censor_word_typ;
  247.  
  248. typedef struct bio_ques_str
  249.     {
  250.     XINT number;
  251.     unsigned char field[31];
  252.     char resptype;
  253.     long minval;
  254.     long maxval;
  255.     } bio_ques_typ;
  256.  
  257. typedef struct bio_resp_str
  258.     {
  259.     unsigned char response[71];
  260.     unsigned char reserved[128 - 71];
  261.     } bio_resp_typ;
  262.  
  263. #define RA_HIDDEN    0x01
  264. #define RA_WANTCHAT  0x02
  265. #define RA_RESERVED  0x04
  266. #define RA_NODISTURB 0x08
  267. #define RA_READY     0x40
  268.  
  269. typedef struct RA_USERON_str
  270.     {
  271.     unsigned char name[36];      /*   0 */
  272.     unsigned char handle[36];    /*  36 */
  273.     unsigned char line;          /*  72 */
  274.     unsigned XINT baud;          /*  73 */
  275.     unsigned char city[26];      /*  75 */
  276.     unsigned char status;        /* 101 */
  277.     unsigned char attribute;     /* 102 */
  278.     unsigned char statdesc[11];  /* 103 */
  279.     unsigned char freespace[98]; /* 114 */
  280.     unsigned XINT numcalls;      /* 212 */ /* Total = 214 */
  281.     } RA_USERON_typ;
  282.  
  283. #define EZY_NODISTURB 0x01
  284.  
  285. typedef struct EZY_ONLINE_str
  286.     {
  287.     unsigned char name[36];
  288.     unsigned char alias[36];
  289.     unsigned char status;
  290.     unsigned char attribute;
  291.     long          baud;
  292.     unsigned char location[26];
  293.     } EZY_ONLINE_typ;
  294.  
  295. #define SBBS_INUSE        0x01
  296. #define SBBS_NODISTURB    0x02
  297. #define SBBS_WAITING      0x04
  298. #define SBBS_HIDDEN       0x08
  299.  
  300. typedef struct SBBS_USERON_str
  301.     {
  302.     unsigned char name[36];
  303.     unsigned char attribute;
  304.     unsigned char status;
  305.     unsigned XINT baud;
  306.     unsigned char city[26];
  307.     unsigned char infobyte;
  308.     unsigned char freespace[9];
  309.     } SBBS_USERON_typ;
  310.  
  311.