1: #include    "dump.h"
   2: #include    <stdio.h>
   3: 
   4: #ifdef  RCSIDENT
   5: static char *RCSid = "$Header: parse.c,v 1.7 85/01/18 15:42:07 notes Rel $";
   6: #endif	RCSIDENT
   7: 
   8: /*
   9:  *	given a header line in the basic RFC-822 format,
  10:  *	this routine scans the name and determines a variable
  11:  *	name for it.
  12:  *
  13:  *	Ray Essick, March 1984
  14:  *		Stolen from the code I did for the BA 456 class....
  15:  */
  16: 
  17: rfcparse (line, varlist)
  18: char   *line;
  19: struct dump_f  *varlist;
  20: {
  21:     char    name[BUFSIZ];               /* hold name */
  22: 
  23:     if (sscanf (line, "%[^:]:", name) != 1)     /* get field name */
  24:     {
  25:     return (-1);                    /* bogus line */
  26:     }
  27: 
  28:     for (; varlist -> du_name[0]; varlist++)        /* empty string at end */
  29:     {
  30:     if (!strcmp (name, varlist -> du_name))     /* matched */
  31:         return (varlist -> du_number);      /* which is it */
  32:     }
  33:     return (-1);                    /* never reached */
  34: }

Defined functions

Defined variables

RCSid defined in line 5; never used
Last modified: 1985-01-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2044
Valid CSS Valid XHTML 1.0 Strict