home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume32 / xbbs / part06 / bbscdef.h next >
C/C++ Source or Header  |  1992-09-08  |  8KB  |  281 lines

  1. /*
  2.         bbscdef.h
  3.  
  4.         Global defines and storage definitions for use by
  5.         BBSc system.
  6.         Last modification date: Mar  21, 1990
  7.                   Version 7.91 and above!
  8.  
  9. */
  10.  
  11.  
  12.  
  13. /* --------------------------------------------------------------------- */
  14. #include <stdio.h>
  15. #define MAXLINE 82
  16. #define CPMEOF 0x1a
  17. #define TRUE      1
  18. #define FALSE     0
  19. #define ERROR    -1
  20. #define OK        1
  21. #define READ      0
  22. #define WRITE     1
  23. #define UPDATE    2
  24. #define STDIN     0
  25. #define STDOUT    1
  26. /* --------------------------------------------------------------------- */
  27.  
  28. #define ESC       0x1b
  29. #define CR        0x0d
  30. #define LF        0x0a
  31. #define BELL      0x07                  /* Avon calling */
  32. #define CRLF      "\r\n"                /* <cr><lf> */
  33. #define CTL_D     0x04                  /* <ctl-d> */
  34. #define CTL_K     0x0b                  /* <ctl-k> */
  35. #define CTL_X     0x18                  /* <ctl-x> */
  36.  
  37.  
  38. #define IF_MONITOR TRUE                 /* Set True if you want to monitor
  39.                                            the input/output on another
  40.                                            device                     */
  41. /*      defines used by the bbscfile.c routine     */
  42.  
  43. #define MSG1MAX 102             /* max. piece of message to put in 128 */
  44.                                 /*  byte chunk of msg file */
  45. #define MSGSECT 128             /* size of message sector */
  46.  
  47. /*                      end of defines used by the bbscfile.c routine */
  48. #define MESSAGES  "messages.bbs"        /* file name */
  49. #define HEADER    "header.bbs"
  50. #define MSGLOG    "messages.log"
  51. #define BBSMAIL   "/usr/spool/mail/bbsuser"             /* group mail */
  52. #define CROSSREF  "crossref.bbs"
  53. #define FILES     "files.bbs"
  54. #define TMPFILE   "/tmp/files"
  55. #define FLIST     "/tmp/flist"
  56. #define STDERR    "/tmp/error_out"
  57. #define SYSTTY    "/tmp/ttydev"
  58. char FOO[10];
  59. char TAR[50];
  60. char ZCAT[50];
  61. char ARC[50];
  62. char ZIP[50];
  63. char MONITOR[30];               /* Monitor device */
  64. char CONSOLE[30];               /* The main console */
  65. char WELCOME[50];       /* file name */
  66. char BULLETINS[50];     /* file name */
  67. char NEWUSER[50];       /* file name */
  68. char SYSTEM[50];        /* file name */
  69. char CALLERS[50];       /* file name */
  70. char LASTCALL[50];      /* file name */
  71. char USERS[50];         /* file name */
  72. char QUESTION[50];
  73. char LISTFILES[50];
  74. char ANSWER[50];
  75. char UNIXMSG[50];
  76. char DLMSG[50];         /* Download message */
  77. char HUMOR[50];         /* file name */
  78. char HELP[50];          /* file name */
  79. char HELPFILE[50];
  80. char HELPMSG[50];
  81. char USERPRIV[50];
  82. char MAINPRIV[50];
  83. char FILEPRIV[50];
  84. char ADDITN[50];
  85. char TODAY[99];
  86. char ORGPATH[50];
  87. char AREAS[50];
  88. char SIGS[50];
  89. char MSGS[50];
  90. char USRBBS[50];
  91. char RB[50];
  92. char SB[50];
  93. char RZ[50];
  94. char SZ[50];
  95. char CRCR[50];
  96. char CRCS[50];
  97. char YMDR[50];
  98. char YMDS[50];
  99. char YMS[50];
  100. char YMR[50];
  101. char KS[50];
  102. char KRA[50];
  103. char KRE[50];
  104. char SEAR[50];
  105. char SEAS[50];
  106. char SYSOP[30]; 
  107. char SHELL[30];
  108. int LOGTIME;    /* Login Time    */
  109. int RUNTIME;    /* Usage Time    */
  110. int WAITTIME;   /* Response Time */
  111. int NEWPRIV;
  112. int MAXPRIV;
  113. int MAXSEC;
  114. int MAXKBYTE;
  115.  
  116.  
  117.                                 /* global variables */
  118. char    portin();               /* in routine returns a character */
  119. char    *gb4sin();              /* returns pointer to character */
  120.  
  121. FILE    *inbuf ;                /* handy input buffer pointer */
  122. FILE    *otbuf ;                /* another handy buffer pointer */
  123. FILE    *itbuf ;                /* pointer used to read/write user file */
  124. FILE    *rdstatbuf;
  125. FILE    *wtstatbuf;
  126. FILE    *STDerr;
  127.  
  128. char    w_fname[25];            /* first name on signon */
  129. char    w_lname[25];            /* last  name on signon */
  130. char    w_password[13];         /* password   on signon */
  131. char    *passptr;               /* ptr to password */
  132.  
  133.                                 /* define user file fields */
  134. char    u_fname[25];
  135. char    u_lname[25];
  136. char    u_password[13];
  137. char    u_time1[12];            /* first time on system */
  138. char    u_date1[9];             /* first date on system */
  139. char    u_time2[12];            /* last  time on system */
  140. char    u_date2[9];             /* last  date on system */
  141. char    u_city[31];             /* city, state */
  142.  
  143. char    z_date[9];
  144. char    z_time[9];
  145.                                 /* define message file fields   */
  146. char    msg_no[12];             /* message number */
  147. char    msg_date[10];           /* date of message */
  148. char    msg_time[16];           /* time of message */
  149. char    msg_to[22];             /* who message is to */
  150. char    msg_from[22];           /* who message is from */
  151. char    msg_pass[12];           /* password */
  152. char    msg_subject[22];        /* what it's all about */
  153. #define MAX_MSG_LINES   99
  154. char    msg_text[(MAX_MSG_LINES * 74)+74];         /* text of message MAX_MSG_LINES lines */
  155.                                 /*  by 72 wide */
  156. char    msg_delete[3];          /* indicates msg status */
  157.                                 /*  0 = active */
  158.                                 /*  9 = deleted */
  159.                                 /*  5 = active private */
  160. char    pubpriv[2];             /* temporary message type */
  161.  
  162. char    z_mm[3];
  163. char    z_dd[3];
  164. char    z_yy[3];
  165. char    buf128[384];
  166.  
  167. char    l_m_base[3];
  168. char    l_f_base[3];
  169. char    xprt_a[2];
  170. char    tggl_a[2];
  171.  
  172. int     maxkbyte,
  173.         logtime,
  174.         runtime,
  175.         waittime,
  176.         newpriv;
  177. int     mon_handle;             /* Monitor Handle */
  178. int     debug;                  /* switch for debug mode */
  179. int     offline;                /* switch for offline mode */
  180. int     xpert;                  /* switch */
  181. int     toggle;                 /* switch for list mode */
  182. int     which_timer;
  183. int     char_in_passwd;         /* Number of characters in the password */
  184. int     if_monitor;
  185. int     in_the_buffer;
  186. int     active;                 /* indicates if logged on */
  187. int     statcnt;                /* count used for status routines */
  188. int     stop_that;              /* switch - true indicates ctl-K */
  189.                                 /*  or K received in portout routine */
  190.                                 /* date/time fields - used by bbsclock.c */
  191. /*
  192.  ****************** Start of Priv Table *********************
  193. */
  194. int     mpB,
  195.         mpK,
  196.         mpE,
  197.         mpG,
  198.         mpN,
  199.         mpQ,
  200.         mpR,
  201.         mpS,
  202.         mpW,
  203.         mpM,
  204.         mpX,
  205.         mpF,
  206.         mpC,
  207.         mpH,
  208.         mpT,
  209.         mpD,
  210.         mpY,
  211.         mpP,
  212.         mpA,
  213.         mpU,
  214.         mpCHAT,
  215.         mpQUEST,
  216.         mpMS,
  217.         mpRF,
  218.         mpCONF,
  219.     mpUSENET,
  220.         mpL,
  221.         mpZ;
  222. int     fpL,
  223.         fpU,
  224.         fpD,
  225.         fpM,
  226.         fpG,
  227.         fpR;
  228. /*
  229.  **************** End of Priv Table *******************
  230. */
  231. char    mm[3];
  232. char    dd[3];
  233. char    yy[3];
  234. char    month[20];              /* ie. January */
  235. char    day[3];                 /* dd */
  236. char    year[5];                /* 19yy */
  237. char    date[30];               /* ie. January 31, 1983 */ 
  238. char    week[20];               /* day of week Monday, Tuesday... */
  239. char    ttime[12];              /* time of day  HH:MM:SS xM */
  240.                                 /*          where x = A or P */
  241.  
  242. /*                      variables used by the bbscfile.c routine */
  243.  
  244. char    h_next_msg[10];         /* next avail. message # */
  245. char    h_date[10];             /* last update date of header file */
  246. char    h_act_msg[10];
  247. char    jnk[2];
  248. int     lnctx;
  249. int     chat_in_progress;
  250. int     stop_chat;
  251. int     h_act;
  252. int     h_next;                 /* next avail. message # in integer */
  253. long    xtable[1000];
  254. long    save_d_pos;
  255.  
  256. long    d_pos;
  257. long    old_long_date;
  258. long    new_long_date;
  259. long    xmm;
  260. long    xdd;
  261. long    xyy;
  262. char    f_pathname[99];
  263. char    u_pathname[99];
  264. char    m_pathname[99];
  265. char    c_pathname[99];
  266. char    area_name[80];
  267. char    f_pathtext[80];
  268.  
  269. /*                      end of variables used by bbscfile.c */
  270. /*         Variables used by xmodem.c               */
  271. char    x_filename[99];         /* filename */
  272. char    x_pathandfile[512];      /* the full string */
  273. char    who_am_i[99];
  274. char    who_am_I[99];
  275. char    f_lines[99][83];
  276. int     dir_priv[99];
  277.  
  278.                         /* end of globals */
  279.  
  280. /* end of program */
  281.