home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / netnwscd.sit / newslists.h < prev    next >
Text File  |  1990-10-16  |  1KB  |  45 lines

  1. /*
  2.  * newslists.h
  3.  * Copyright ⌐ Tom Bereiter, 1990
  4.  */
  5.  
  6. #define _H_newslists
  7.  
  8. #include "bits.h"
  9.  
  10. /* article thread in a group */
  11. #define THREADINC    16
  12. typedef struct art {
  13.     char *title;            /* article title */
  14.     int     re;                /* original missing ? */
  15.     int     refcnt;            /* number of open windows */
  16.     int  nthread;            /* number of threads in 'thread' */
  17.     int     tindex;            /* index into 'thread' */
  18.     unsigned int  *thread;    /* list of article numbers */
  19.     struct art *next;        /* next article */
  20.     struct art *prev;        /* previous article */
  21.     struct grp *gp;            /* back-pointer to group */
  22. } art_t;
  23.  
  24. /* current group list */
  25. typedef struct grp {
  26.     char        *gname;            /* ascii name of group */
  27.     long        first,last;        /* first and last valid article numbers */
  28.     long        unread;            /* number of unread */
  29.     bitmap_t    *bm;            /* bitmap of articles (first bit is 'first') */
  30.     art_t        *art_head;        /* list of unread articles */
  31.     int            flags;            /* (see below) */
  32.     int            subindex;        /* display order */
  33.     struct grp  *next;            /* if != NULL points to next subscribed group */
  34. } grp_t;
  35.  
  36. #define G_SUB        0x0001        /* group is on subscribed list */
  37. #define G_INACT        0x0002        /* group is inactive */
  38.  
  39. #define bmTOTAL(gp)        ((gp)->last - (gp)->first + 1)
  40.  
  41. extern grp_t *grps;                /* group list */
  42. extern long ngrps;                /* number of groups in group list */
  43. extern grp_t *grp_head;            /* head of subscribed list */
  44. extern long nsgrps;                /* number of subscribed groups */
  45.