This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / libexec / bugfiler / bug.h
CommitLineData
15637ed4
RG
1/*
2 * Copyright (c) 1986, 1987 Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
18d560e0
RG
33 * from: @(#)bug.h 5.10 (Berkeley) 2/25/91
34 * $Id$
15637ed4
RG
35 */
36
37#ifndef BUGS_HOME
38#define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU"
39#endif /* BUGS_HOME */
40#define BUGS_ID "bugs"
41
42/*
43 * the METOO definition has the bugfiler exit with an error (-1) status
44 * if there's a problem. This causes sendmail to send off a copy of the
45 * report (as failed mail) to the "owner" of the mail alias that executed
46 * the bugfiler. This is great if you would have otherwise lost the bug
47 * report. It's not so great if you get a whole bunch of mail that you
48 * really don't want.
49 */
50#define METOO
51
52/* files */
53#define ACK_FILE "bug:ack" /* acknowledge file */
54#define DIST_FILE "bug:redist" /* redistribution file */
55#define ERROR_FILE "log" /* error file */
56#define LOCK_FILE "bug:lock" /* lock file name */
57#define SUMMARY_FILE "summary" /* summary file */
58#define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */
59#define TMP_DIR "errors" /* tmp directory */
60
61#define CHN (char *)NULL /* null arg string */
62#define COMMENT '#' /* comment in redist file */
63#define EOS (char)NULL /* end of string */
64#define ERR -1 /* error return */
65#define MAXLINELEN 200 /* max line length in message */
66#define NO 0 /* no/false */
67#define OK 0 /* okay return */
68#define YES 1 /* yes/true */
69
70typedef struct {
71 short found, /* line number if found */
72 redist; /* if part of redist headers */
73 int (*valid)(); /* validation routine */
74 short len; /* length of tag */
75 char *tag, /* leading tag */
76 *line; /* actual line */
77} HEADER;
78extern HEADER mailhead[];
79
80#define DATE_TAG 0 /* "Date:" offset */
81#define FROM_TAG 1 /* "From " offset */
82#define CFROM_TAG 2 /* "From:" offset */
83#define INDX_TAG 3 /* "Index:" offset */
84#define MSG_TAG 4 /* "Message-Id:" offset */
85#define RPLY_TAG 5 /* "Reply-To:" offset */
86#define RET_TAG 6 /* "Return-Path:" offset */
87#define SUBJ_TAG 7 /* "Subject:" offset */
88#define TO_TAG 8 /* "To:" offset */
89#define APPAR_TO_TAG 9 /* "Apparently-To:" offset */
90
91/* so sizeof doesn't return 0 */
92extern char bfr[MAXBSIZE], /* general I/O buffer */
93 dir[MAXNAMLEN], /* subject and folder */
94 folder[MAXNAMLEN],
95 tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */