home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / fish / telecom / uucp_442 / src / dnews / defs.h < prev    next >
C/C++ Source or Header  |  1990-12-27  |  1KB  |  56 lines

  1.  
  2. /*
  3.  *  DEFS.H
  4.  */
  5.  
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #include <time.h>
  10. #include "config.h"
  11.  
  12. #define arysize(ary)    (sizeof(ary)/sizeof((ary)[0]))
  13.  
  14. #define TMPBSIZE    2048
  15. #define FNHASHSIZE  64
  16. #define FNHASHMASK  (FNHASHSIZE-1)
  17.  
  18. #undef NULL
  19. #define NULL ((void *)0L)
  20.  
  21. #define CTRL(x) ((x) & 0x1F)
  22.  
  23. typedef struct Range {
  24.     struct Range   *Next;
  25.     short   SNo;
  26.     short   ENo;
  27. } Range;
  28.  
  29. typedef struct FNode {
  30.     struct FNode *Next;
  31.     long    MsgNo;
  32.     char    *Id;
  33. } FNode;
  34.  
  35. typedef struct NewsGroup {
  36.     struct NewsGroup *Next;
  37.     char    *Name;
  38.     short   Enabled;
  39.     short   Reserved;
  40.     short   MaxNo;    /*  last article    */
  41.     short   CurNo;    /*  current article */
  42.     short   PrevNo[8];    /*  previous article*/
  43.     Range   *RList;    /*  articles read   */
  44.     Range   *MList;    /*  articles marked */
  45.     Range   *KList;    /*  articles killed */
  46.     FNode   **IdBase;    /*  cached message IDs    */
  47.     FNode   **RefBase;    /*  cached References:    */
  48.  
  49.     void    *DispFd;    /*  XXX display descriptor  */
  50. } NGroup;
  51.  
  52. extern char TmpBuf[TMPBSIZE];
  53.  
  54. #include "dnews_protos.h"
  55.  
  56.