if no home directory, log into '/'; delete old #ifdef/notdef and
[unix-history] / usr / src / libexec / bugfiler / bug.h
CommitLineData
70c98dc6 1/*
aec2eff2
KB
2 * Copyright (c) 1986, 1987 Regents of the University of California.
3 * All rights reserved.
70c98dc6 4 *
aec2eff2 5 * Redistribution and use in source and binary forms are permitted
5e8b0e60
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
aec2eff2 16 *
5e8b0e60 17 * @(#)bug.h 5.7 (Berkeley) %G%
70c98dc6
KB
18 */
19
24213599 20#define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU"
70c98dc6 21#define BUGS_ID "bugs"
24213599 22#define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs"
70c98dc6
KB
23
24/*
25 * the METOO definition has the bugfiler exit with an error (-1) status
f16d4b82
KB
26 * if there's a problem. This causes sendmail to send off a copy of the
27 * report (as failed mail) to the "owner" of the mail alias that executed
28 * the bugfiler. This is great if you would have otherwise lost the bug
29 * report. It's not so great if you get a whole bunch of mail that you
30 * really don't want.
70c98dc6
KB
31 */
32#define METOO
33
70c98dc6 34/* files */
3dc98623
KB
35#define ACK_FILE "bug:ack" /* acknowledge file */
36#define DIST_FILE "bug:redist" /* redistribution file */
70c98dc6
KB
37#define ERROR_FILE "log" /* error file */
38#define LOCK_FILE "bug:lock" /* lock file name */
39#define SUMMARY_FILE "summary" /* summary file */
40#define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */
f16d4b82 41#define TMP_DIR "errors" /* tmp directory */
70c98dc6 42
70c98dc6
KB
43#define CHN (char *)NULL /* null arg string */
44#define COMMENT '#' /* comment in redist file */
45#define EOS (char)NULL /* end of string */
46#define ERR -1 /* error return */
47#define MAXLINELEN 200 /* max line length in message */
48#define NO 0 /* no/false */
49#define OK 0 /* okay return */
50#define YES 1 /* yes/true */
51
52typedef struct {
53 short found, /* line number if found */
54 redist; /* if part of redist headers */
55 int (*valid)(); /* validation routine */
56 short len; /* length of tag */
57 char *tag, /* leading tag */
58 *line; /* actual line */
59} HEADER;
3dc98623 60extern HEADER mailhead[];
70c98dc6
KB
61
62#define DATE_TAG 0 /* "Date:" offset */
63#define FROM_TAG 1 /* "From " offset */
64#define CFROM_TAG 2 /* "From:" offset */
65#define INDX_TAG 3 /* "Index:" offset */
66#define MSG_TAG 4 /* "Message-Id:" offset */
67#define RPLY_TAG 5 /* "Reply-To:" offset */
68#define RET_TAG 6 /* "Return-Path:" offset */
69#define SUBJ_TAG 7 /* "Subject:" offset */
70#define TO_TAG 8 /* "To:" offset */
24213599 71#define APPAR_TO_TAG 9 /* "Apparently-To:" offset */
70c98dc6
KB
72
73/* so sizeof doesn't return 0 */
74#include <sys/param.h>
3dc98623
KB
75#include <sys/dir.h>
76extern char bfr[MAXBSIZE], /* general I/O buffer */
77 dir[MAXNAMLEN], /* subject and folder */
78 folder[MAXNAMLEN],
79 tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */