|
|
BSD 4.3
#include "parms.h"
#include "structs.h"
#include "dump.h"
#ifdef RCSIDENT
static char rcsid[] = "$Header: /var/lib/cvsd/repos/CSRG/43BSD/contrib/notes/src/loadproto1.c,v 1.1.1.1 2018/04/24 16:12:54 root Exp $";
#endif RCSIDENT
/*
* load notes and responses in protocol 1
*
* Ray Essick March 1984
*/
ldnote1 (io, whofrom, extensive, lockit, infile)
struct io_f *io; /* notesfile */
char *whofrom; /* sending system */
FILE * infile; /* incoming stream */
{
struct note_f note; /* note descriptor */
initnote (¬e); /* zero fields */
while (fgets (line, sizeof line, infile) != NULL)
{
if ((varno = rfcparse (line, ¬enanmes)) == -1)/* wierd */
continue; /* ignore it */
field = index (line, ':'); /* find data */
field++; /* skip colon */
field++; /* skip space */
switch (varno)
{
case NOTE_TITLE:
case NOTE_AUTHOR:
case NOTE_AUTHOR_UID:
case NOTE_ID:
case NOTE_WRITTEN:
case NOTE_RECEIVED:
case NOTE_MODIFIED:
case NOTE_FROMSYS:
case NOTE_STATUS:
case NOTE_LENGTH:
default: /* strange */
}
}
}
ldresp1 (io, whofrom, extensive, lockit, infile)
struct io_f *io; /* notesfile */
char *whofrom; /* sending system */
FILE * infile; /* incoming stream */
{
while (fgets (line, sizeof line, infile) != NULL)
{
if ((varno = rfcparse (line, ¬enanmes)) == -1)/* wierd */
continue; /* ignore it */
field = index (line, ':'); /* find data */
field++; /* skip colon */
field++; /* skip space */
switch (varno)
{
case RESP_TITLE: /* ignored */
case RESP_PARENT:
case RESP_AUTHOR:
case RESP_AUTHOR_UID:
case RESP_ID:
case RESP_WRITTEN:
case RESP_RECEIVED:
case RESP_FROMSYS:
case RESP_STATUS:
case RESP_LENGTH:
default: /* strange */
}
}
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.