1: /* $Header: head.h,v 4.3 85/05/01 11:38:31 lwall Exp $
   2:  *
   3:  * $Log:	head.h,v $
   4:  * Revision 4.3  85/05/01  11:38:31  lwall
   5:  * Baseline for release with 4.3bsd.
   6:  *
   7:  */
   8: 
   9: #define HEAD_FIRST 1
  10: 
  11: /* types of header lines (if only C really believed in enums)
  12:  * (These must stay in alphabetic order at least in the first letter.
  13:  * Within each letter it helps to arrange in increasing likelihood.)
  14:  */
  15: 
  16: #define PAST_HEADER 0   /* body */
  17: #define SOME_LINE   1   /* unrecognized */
  18: #define ARTID_LINE  2   /* article-i.d. */
  19: #define APPR_LINE   3   /* approved */
  20: #define DIST_LINE   4   /* distribution */
  21: #define DATE_LINE   5   /* date */
  22: #define RECEIVED_LINE   6   /* date-received */
  23: #define EXPIR_LINE  7   /* expires */
  24: #define FOLLOW_LINE 8   /* followup-to */
  25: #define FROM_LINE   9   /* from */
  26: #define KEYW_LINE   10  /* keywords */
  27: #define LINES_LINE  11  /* lines */
  28: #define MESSID_LINE 12  /* message-id */
  29: #define NFFR_LINE   13  /* nf-from */
  30: #define NFID_LINE   14  /* nf-id */
  31: #define NGS_LINE    15  /* newsgroups */
  32: #define ORG_LINE    16  /* organization */
  33: #define PATH_LINE   17  /* path */
  34: #define POSTED_LINE 18  /* posted */
  35: #define PVER_LINE   19  /* posting-version */
  36: #define REPLY_LINE  20  /* reply-to */
  37: #define REFS_LINE   21  /* references */
  38: #define RVER_LINE   22  /* relay-version */
  39: #define SENDER_LINE 23  /* sender */
  40: #define SUMRY_LINE  24  /* summary */
  41: #define SUBJ_LINE   25  /* subject */
  42: #define XREF_LINE   26  /* xref */
  43: 
  44: #define HEAD_LAST   27  /* one more than the last one above */
  45: 
  46: struct headtype {
  47:     char *ht_name;      /* header line identifier */
  48: #ifdef pdp11
  49:     short ht_minpos;
  50:     short ht_maxpos;
  51: #else
  52:     ART_POS ht_minpos;      /* pointer to beginning of line in article */
  53:     ART_POS ht_maxpos;      /* pointer to end of line in article */
  54: #endif
  55:     char ht_length;     /* could make these into nybbles but */
  56:     char ht_flags;      /* it wouldn't save space normally */
  57: };              /* due to alignment considerations */
  58: 
  59: #define HT_HIDE 1   /* -h on this line */
  60: #define HT_MAGIC 2  /* do any special processing on this line */
  61: 
  62: /* This array must stay in the same order as the list above */
  63: 
  64: #ifndef DOINIT
  65: EXT struct headtype htype[HEAD_LAST];
  66: #else
  67: struct headtype htype[HEAD_LAST] = {
  68:  /* name             minpos   maxpos  length   flag */
  69:     {"BODY",        0,  0,  4,  0       },
  70:     {"unrecognized",    0,  0,  12, 0       },
  71:     {"article-i.d.",    0,  0,  12, HT_HIDE     },
  72:     {"approved",    0,  0,  8,  HT_HIDE     },
  73:     {"distribution",    0,  0,  12, 0       },
  74:     {"date",        0,  0,  4,  0       },
  75:     {"date-received",   0,  0,  13, 0       },
  76:     {"expires",     0,  0,  7,  HT_HIDE|HT_MAGIC},
  77:     {"followup-to", 0,  0,  11, 0       },
  78:     {"from",        0,  0,  4,  0       },
  79:     {"keywords",    0,  0,  8,  0       },
  80:     {"lines",       0,  0,  5,  0       },
  81:     {"message-id",  0,  0,  10, 0       },
  82:     {"nf-from",     0,  0,  7,  HT_HIDE     },
  83:     {"nf-id",       0,  0,  5,  HT_HIDE     },
  84:     {"newsgroups",  0,  0,  10, HT_MAGIC|HT_HIDE},
  85:     {"organization",    0,  0,  12, 0       },
  86:     {"path",        0,  0,  4,  HT_HIDE     },
  87:     {"posted",      0,  0,  6,  HT_HIDE     },
  88:     {"posting-version", 0,  0,  15, HT_HIDE     },
  89:     {"reply-to",    0,  0,  8,  0       },
  90:     {"references",  0,  0,  10, 0       },
  91:     {"relay-version",   0,  0,  13, HT_HIDE     },
  92:     {"sender",      0,  0,  6,  0       },
  93:     {"summary",     0,  0,  7,  0       },
  94:     {"subject",     0,  0,  7,  HT_MAGIC    },
  95:     {"xref",        0,  0,  4,  HT_HIDE     }
  96: };
  97: #endif
  98: 
  99: #ifdef ASYNC_PARSE
 100: EXT ART_NUM parsed_art INIT(0);
 101: #endif
 102: 
 103: EXT char in_header INIT(0);     /* are we decoding the header? */
 104: 
 105: #ifdef CACHESUBJ
 106:     EXT char **subj_list INIT(Null(char **));
 107: #endif
 108: 
 109: void    head_init();
 110: int set_line_type();
 111: void    start_header();
 112: bool    parseline();
 113: #ifdef ASYNC_PARSE
 114:     int     parse_maybe();
 115: #endif
 116: char    *fetchsubj();
 117: char    *fetchlines();

Defined variables

htype defined in line 67; used 41 times
in_header defined in line 103; used 19 times
subj_list defined in line 106; used 23 times

Defined struct's

headtype defined in line 46; used 4 times

Defined macros

APPR_LINE defined in line 19; never used
ARTID_LINE defined in line 18; used 1 times
DATE_LINE defined in line 21; never used
DIST_LINE defined in line 20; used 1 times
EXPIR_LINE defined in line 23; used 2 times
FOLLOW_LINE defined in line 24; used 2 times
FROM_LINE defined in line 25; used 3 times
HEAD_FIRST defined in line 9; used 3 times
HEAD_LAST defined in line 44; used 7 times
HT_HIDE defined in line 59; used 16 times
HT_MAGIC defined in line 60; used 6 times
KEYW_LINE defined in line 26; never used
LINES_LINE defined in line 27; never used
MESSID_LINE defined in line 28; used 3 times
NFFR_LINE defined in line 29; never used
NFID_LINE defined in line 30; never used
ORG_LINE defined in line 32; never used
PAST_HEADER defined in line 16; used 10 times
PATH_LINE defined in line 33; used 3 times
POSTED_LINE defined in line 34; never used
PVER_LINE defined in line 35; never used
RECEIVED_LINE defined in line 22; never used
REFS_LINE defined in line 37; used 4 times
REPLY_LINE defined in line 36; used 5 times
RVER_LINE defined in line 38; used 1 times
SENDER_LINE defined in line 39; never used
SOME_LINE defined in line 17; used 3 times
SUBJ_LINE defined in line 41; used 3 times
SUMRY_LINE defined in line 40; never used
XREF_LINE defined in line 42; used 3 times

Usage of this include

Last modified: 1987-03-16
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2939
Valid CSS Valid XHTML 1.0 Strict