1 /* relaynews-specific declarations */
2 
3 #define MINSHPTRS 30		/* initial value for sh_alloced */
4 
5 /* All the information needed to describe an article as it is processed. */
6 struct article {
7 	statust a_status;	/* article status bits */
8 	struct headers h;	/* strictly from headers in input */
9 	char *a_haccum;		/* accumulated output headers, if any */
10 	char *a_hnext;		/* -> first free byte in a_haccum */
11 	short a_hpalloced;	/* indices in a_hptrs */
12 	short a_hpused;		/* indices currently in use */
13 	char **a_hptrs;		/* -> array of ptrs to lines in a_haccum */
14 	unsigned a_hbytesleft;	/* in a_haccum */
15 	char *a_files; /* names for history, added in filing, from h.h_ngs */
16 	char *a_tmpf;		/* temp link name or first spool dir link */
17 	FILE *a_artf;		/* stream corresponding to a_tmpf */
18 	boolean a_unlink;	/* true iff a_tmpf should be unlinked at end */
19 	boolean a_filed;	/* true iff article has been filed */
20 	boolean a_xref;		/* true iff Xref: header generated yet */
21 	boolean a_blvmax;	/* true iff a_unread is to be believed */
22 	long a_charswritten;	/* into spool directory, for batcher */
23 	long a_unread;		/* bytes of article input yet unread */
24 	long a_id;		/* article id #, unique within this batch */
25 	boolean a_badhdr;	/* true iff non-header is before blank line */
26 };
27 
28 struct options {
29 	boolean	okrefusal;		/* okay to refuse articles? */
30 	char	*exclude;		/* site to exclude, for erik */
31 	boolean	histreject;		/* keep history of rejects? */
32 	long	staledays;		/* articles stale after this many days */
33 	boolean	genxref;		/* iff true, always generate Xref: */
34 	boolean	blvxref;		/* iff true, believe Xref: contents */
35 	char	*blvsite;		/* ... for this site only. */
36 	boolean	dupsokay;		/* iff true, allow duplicates ... */
37 	char	*dupsite;		/* ... from this site only. */
38 	const char	*currdir;
39 };
40 extern struct options opts;
41 
42 /* return name of at least one link, for printing in error messages, etc. */
43 #define spoolnm(art) ((art)->a_unlink? (art)->a_tmpf: (art)->a_files)
44 
45 #define CONTROL "control"		/* control message pseudo-ng. */
46 #define JUNK "junk"			/* lost+found pseudo-ng. */
47 
48 /* imports */
49 extern void artinit(register struct article *art);
50 extern void artfree(register struct article *art);
51 
52 /* munge */
53 extern void emitxref(register struct article *art);
54 extern void hdrdump(register struct article *art);
55 extern void hdrdigest(register struct article *art, register char *line, int hdrlen);
56 
57