home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / RDQWKSRC.ZIP / READER.H < prev    next >
C/C++ Source or Header  |  1991-01-15  |  4KB  |  111 lines

  1. /*
  2.                                 READER.H
  3. */
  4.  
  5. #define SEP    '/'       /* File path separator */
  6. #define SEPDOS '\\'
  7. #define ERROR     1
  8. #define OK        0
  9. #define EOS       0       /* End of string */
  10.  
  11. #define CONFIG_FILE "read.cfg"
  12. #define WORK_DIR    "work"
  13. #define SCREENLINES  25
  14.  
  15. #define __LARGE__
  16. /*===== Size limits . & memory model dependances =========================*/
  17.  
  18. #ifdef __SMALL__
  19.  
  20. #define _SMALL_MODEL_
  21. #define MAXCONF       50   /* Increase if you need more conferences       */
  22. #define NAMCONF       15   /* Max name length                             */
  23. #define MYBUF      15000   /* MAX message len .(buffer ) RECEIVED MESSAGE */
  24. #define MAXSIZE    15000   /* MAX message len  (buffer ) SENDED   MESSAGE */
  25.                            /* (32000 = about 400 lines with 80 chars/line)*/
  26. #define VBUF       5144    /* I/O buffers for setvbuf()                   */
  27. #define MAXPATHS    127    /* File names                                  */
  28. #endif
  29.  
  30. #ifdef __LARGE__
  31.  
  32. #define _LARGE_MODEL_
  33. #define MAXCONF       50   /* Increase if you need more conferences       */
  34. #define NAMCONF       15   /* Max name length                             */
  35. #define MYBUF      32000   /* MAX message len .(buffer ) RECEIVED MESSAGE */
  36. #define MAXSIZE    32000   /* MAX message len  (buffer ) SENDED   MESSAGE */
  37.                            /* (32000 = about 400 lines with 80 chars/line)*/
  38. #define VBUF       10240   /* I/O buffers for setvbuf()                   */
  39. #define MAXPATHS    127    /* File names                                  */
  40. #endif
  41.  
  42. #ifndef _SMALL_MODEL_
  43. #ifndef _LARGE_MODEL_
  44. #error "Must compile in small or large memory model."
  45. #endif
  46. #endif
  47.  
  48. #ifndef __DISTRIB__
  49. #define __DISTRIB__ 1
  50. #endif
  51. /*------------------------------------------------------------------------*/
  52.  
  53. #define REPLY     0
  54. #define ENTER     1
  55.  
  56. #define YES 1
  57. #define NO  0
  58.  
  59.  
  60.  
  61. #ifndef BYTE_DECL
  62. typedef unsigned char byte ;
  63. #define BYTE_DECL
  64. #endif
  65.  
  66.  
  67. typedef struct MyIndex
  68.         {
  69.             int LastRead  ;    /* Last Message Read, Used once...            */
  70.             int MaxMsg    ;    /* Max Messages allowed in conf. (future use) */
  71.             int MsgNum    ;    /* Number of This message                     */
  72.             long Offset   ;    /* Offset in the Conference file              */
  73.             unsigned Size ;    /* Size of the message,whith Header           */
  74.         };
  75.  
  76. /* The last read field is only used in the first structure of the file ...   */
  77.  
  78. extern char *TagLine;      /* In Reader.C, program tagline. */
  79. extern char CurTag[];
  80.  
  81. extern char HomePath [];   /* Home directory for exe file & root of msg dirs */
  82. extern char MailPath [];   /* Where to look for new mail                     */
  83. extern char ReplyPath[];   /* Where to put replies                           */
  84. extern char WorkPath[] ;   /* Where to archive /unarchive mail               */
  85.  
  86. extern char CurBoard[] ;   /* name of the current board                      */
  87.  
  88. extern char Editor  [];    /* Name of the standard text editor               */
  89. extern char Archiver [];
  90. extern char UnArchiver[];
  91.  
  92. extern struct MyIndex Index ;
  93.  
  94. extern char ConfName[MAXCONF][NAMCONF]; /* Conference numbers & names      */
  95. extern int  CurConf ;     /* Name of the current Conference...             */
  96. extern int  TotMsg  ;     /* total messages in conf                        */
  97. extern int ReplyExist ;   /* Flag, true if there are replies not packed.   */
  98. extern int ansi       ;   /* ansi graphics or not                          */
  99. extern int IsEmpty    ;   /* Reader empty  or not                          */
  100. extern int HeadLetter ;   /* Automatic header                              */
  101.  
  102.  
  103. extern FILE *fidx,*fmsg;  /* Files opened for message and index            */
  104. extern int FilesOpen ;    /* Flag true if these files are opened           */
  105. extern byte *rbuf;        /* Buffer containing current message.            */
  106. extern char *txt[];       /* Language-dependant text messages ( general  ) */
  107. extern char *hlp[];       /* Language-dependant text messages ( help )     */
  108. extern char *Months[];    /* Language-dependant text messages (Dates  )    */
  109.  
  110. /*------------------------- fin de reader.h -------------------------------*/
  111.