home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume23 / trn / part13 / threads.h < prev   
Encoding:
C/C++ Source or Header  |  1991-08-22  |  1.9 KB  |  102 lines

  1. /* $Header: threads.h,v 4.3.3.2 90/08/20 16:50:09 davison Trn $
  2. **
  3. ** $Log:    threads.h,v $
  4. ** Revision 4.3.3.2  90/08/20  16:50:09  davison
  5. ** Padded odd-boundaried arrays.  Upgraded database version #.
  6. ** 
  7. ** Revision 4.3.3.1  90/06/20  22:56:18  davison
  8. ** Initial Trn Release
  9. ** 
  10. */
  11.  
  12. #define DB_VERSION    2
  13.  
  14. typedef char        BYTE;
  15. typedef short        WORD;
  16. typedef long        LONG;
  17.  
  18. #define ROOT_ARTICLE    0x0001        /* article flag definitions */
  19. #define NEW_ARTICLE    0x0002        /* to avoid stat'ing new articles */
  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;
  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, children, siblings;
  81.     WORD root;
  82. } PACKED_ARTICLE;
  83.  
  84. typedef struct Total {
  85.     LONG first, last;
  86.     LONG string1;
  87.     LONG string2;
  88.     WORD root;
  89.     WORD article;
  90.     WORD subject;
  91.     WORD author;
  92.     WORD domain;
  93.     WORD pad_hack;
  94. } TOTAL;
  95.  
  96. typedef struct {
  97.     BYTE l[sizeof (LONG)];
  98.     BYTE w[sizeof (WORD)];
  99.     BYTE version;
  100.     BYTE pad_hack;
  101. } BMAP;
  102.