1: #include "parms.h"
2: #include "structs.h"
3: #include "dump.h"
4:
5: #ifdef RCSIDENT
6: static char rcsid[] = "$Header: loadproto1.c,v 1.7 85/01/18 15:43:15 notes Rel $";
7: #endif RCSIDENT
8:
9: /*
10: * load notes and responses in protocol 1
11: *
12: * Ray Essick March 1984
13: */
14:
15: ldnote1 (io, whofrom, extensive, lockit, infile)
16: struct io_f *io; /* notesfile */
17: char *whofrom; /* sending system */
18: FILE * infile; /* incoming stream */
19: {
20: struct note_f note; /* note descriptor */
21:
22: initnote (¬e); /* zero fields */
23:
24: while (fgets (line, sizeof line, infile) != NULL)
25: {
26: if ((varno = rfcparse (line, ¬enanmes)) == -1)/* wierd */
27: continue; /* ignore it */
28: field = index (line, ':'); /* find data */
29: field++; /* skip colon */
30: field++; /* skip space */
31: switch (varno)
32: {
33: case NOTE_TITLE:
34: case NOTE_AUTHOR:
35: case NOTE_AUTHOR_UID:
36: case NOTE_ID:
37: case NOTE_WRITTEN:
38: case NOTE_RECEIVED:
39: case NOTE_MODIFIED:
40: case NOTE_FROMSYS:
41: case NOTE_STATUS:
42: case NOTE_LENGTH:
43: default: /* strange */
44: }
45: }
46: }
47:
48:
49: ldresp1 (io, whofrom, extensive, lockit, infile)
50: struct io_f *io; /* notesfile */
51: char *whofrom; /* sending system */
52: FILE * infile; /* incoming stream */
53: {
54: while (fgets (line, sizeof line, infile) != NULL)
55: {
56: if ((varno = rfcparse (line, ¬enanmes)) == -1)/* wierd */
57: continue; /* ignore it */
58: field = index (line, ':'); /* find data */
59: field++; /* skip colon */
60: field++; /* skip space */
61: switch (varno)
62: {
63: case RESP_TITLE: /* ignored */
64: case RESP_PARENT:
65: case RESP_AUTHOR:
66: case RESP_AUTHOR_UID:
67: case RESP_ID:
68: case RESP_WRITTEN:
69: case RESP_RECEIVED:
70: case RESP_FROMSYS:
71: case RESP_STATUS:
72: case RESP_LENGTH:
73: default: /* strange */
74: }
75: }
76: }
Defined functions
Defined variables
rcsid
defined in line
6;
never used