home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / mthreads / part01 / thread.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-20  |  2.0 KB  |  104 lines

  1. /* $Id: thread.h,v 3.0 1993/10/01 00:14:09 davison Trn $
  2. */
  3. /* The authors make no claims as to the fitness or correctness of this software
  4.  * for any use whatsoever, and it is provided as is. Any use of this software
  5.  * is at the user's own risk. 
  6.  */
  7.  
  8. #define DB_VERSION    2
  9.  
  10. typedef char        BYTE;
  11. typedef short        WORD;
  12. #ifndef __alpha
  13. typedef long        LONG;
  14. #else
  15. typedef int        LONG;
  16. #endif
  17.  
  18. #define ROOT_ARTICLE    0x0001        /* article flag definitions */
  19. #define HAS_XREFS    0x0004        /* article has an xref line */
  20.  
  21. typedef struct Article {
  22.     ART_NUM num;
  23.     char *id;
  24.     struct Domain *domain;
  25.     struct Subject *subject;
  26.     struct Author *author;
  27.     struct Article *parent, *children, *siblings;
  28.     struct Root *root;
  29.     struct Article *id_link;
  30.     time_t date;
  31.     WORD child_cnt;
  32.     WORD flags;
  33.     WORD seq;
  34. } ARTICLE;
  35.  
  36. typedef struct Domain {
  37.     char *name;
  38.     ARTICLE *ids;
  39.     struct Domain *link;
  40. } DOMAIN;
  41.  
  42. typedef struct Author {
  43.     struct Author *link;        /* this link MUST be first */
  44.     char *name;
  45.     WORD seq;
  46.     WORD count;
  47. } AUTHOR;
  48.  
  49. typedef struct Subject {
  50.     struct Subject *link;        /* this link MUST be first */
  51.     char *str;
  52.     WORD seq;
  53.     WORD count;
  54. } SUBJECT;
  55.  
  56. typedef struct Root {
  57.     struct Root *link;            /* this link MUST be first */
  58.     ARTICLE *articles;
  59.     SUBJECT *subjects;
  60.     ART_NUM root_num;
  61.     WORD thread_cnt;
  62.     WORD subject_cnt;
  63.     WORD seq;
  64. } ROOT;
  65.  
  66. typedef struct {
  67.     LONG root_num;
  68.     WORD articles;
  69.     WORD thread_cnt;
  70.     WORD subject_cnt;
  71.     WORD pad_hack;
  72. } PACKED_ROOT;
  73.  
  74. typedef struct {
  75.     LONG num;
  76.     LONG date;
  77.     WORD subject, author;
  78.     WORD flags;
  79.     WORD child_cnt;
  80.     WORD parent;
  81.     WORD padding;
  82.     WORD siblings;
  83.     WORD root;
  84. } PACKED_ARTICLE;
  85.  
  86. typedef struct Total {
  87.     LONG first, last;
  88.     LONG string1;
  89.     LONG string2;
  90.     WORD root;
  91.     WORD article;
  92.     WORD subject;
  93.     WORD author;
  94.     WORD domain;
  95.     WORD pad_hack;
  96. } TOTAL;
  97.  
  98. typedef struct {
  99.     BYTE l[sizeof (LONG)];
  100.     BYTE w[sizeof (WORD)];
  101.     BYTE version;
  102.     BYTE pad_hack;
  103. } BMAP;
  104.