1: #include "parms.h"
2: #include "structs.h"
3:
4: #ifdef RCSIDENT
5: static char rcsid[] = "$Header: preptxt.c,v 1.7 85/01/18 15:35:18 notes Rel $";
6: #endif RCSIDENT
7:
8: /*
9: * preptxt()
10: * put the standard headers and text into the specified file
11: *
12: * Original coding: Ray Essick December 1981
13: */
14:
15: preptxt (io, zfile, author, date, where, title)
16: struct io_f *io;
17: FILE * zfile;
18: struct auth_f *author;
19: struct when_f *date;
20: struct daddr_f *where;
21: char *title;
22: {
23: char buf[DATELEN + 6]; /* formatted date */
24: char auth[NAMESZ + SYSSZ + 2]; /* formatted author */
25: int linecount;
26: char ttl[TITLEN + 1]; /* title + \0 */
27: int i;
28:
29: sprdate (date, buf); /* format the date */
30: if (!strcmp (author -> aname, "Anonymous"))
31: strcpy (auth, "Anonymous");
32: else
33: {
34: #ifdef USERHOST
35: sprintf (auth, "%s@%s", author -> aname, author -> asystem);
36: #else
37: sprintf (auth, "%s!%s", author -> asystem, author -> aname);
38: #endif USERHOST
39: }
40:
41: #ifdef notdef
42: fprintf (zfile, "/**** %s:%s / %s / %s ****/\n",
43: System, io -> nf, auth, buf);
44: linecount = 1; /* 1 line saved */
45: #else
46: /*
47: * A more verbose but prettier header
48: */
49: fprintf (zfile, "/* Written %s by %s in %s:%s */\n",
50: buf, auth, System, io -> nf);
51: linecount = 1;
52: if (title)
53: {
54: fprintf (zfile, "/* ---------- \"%s\" ---------- */\n", title);
55: linecount++; /* 1 more line saved */
56: }
57: #endif
58:
59: linecount += pageout (io, where, zfile); /* write to the file */
60:
61: #ifdef notdef
62: fprintf (zfile, "/* ---------- */\n"); /* a trailer */
63: #else
64: /*
65: * prettier stuff; goes together with a prettier header message
66: * done above.
67: */
68: fprintf (zfile, "/* End of text from %s:%s */\n", System, io -> nf);
69: #endif
70:
71: linecount++; /* count trailer */
72: return linecount;
73: }
Defined functions
Defined variables
rcsid
defined in line
5;
never used