version #2; -f flag, remove home_dir, redist per folder
[unix-history] / usr / src / libexec / bugfiler / bug.h
CommitLineData
70c98dc6
KB
1/*
2 * Copyright (c) 1986 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 *
6 * @(#)bug.h 1.1 (Berkeley) 11/25/86
7 */
8
9#define BUGS_HOME "owner-bugs@ucbvax.BERKELEY.EDU"
10#define BUGS_ID "bugs"
11#define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs@ucbvax.BERKELEY.EDU"
12
13/*
14 * the METOO definition has the bugfiler exit with an error (-1) status
15 * if there's a problem. Sendmail then mails off a copy of the problem
16 * mail to "owner-bugs". This is great if you would have otherwise lost
17 * the bug report. It's not so great if you get a whole bunch of mail
18 * that you really don't want.
19 */
20#define METOO
21
70c98dc6 22/* files */
3dc98623
KB
23#define ACK_FILE "bug:ack" /* acknowledge file */
24#define DIST_FILE "bug:redist" /* redistribution file */
70c98dc6
KB
25#define ERROR_FILE "log" /* error file */
26#define LOCK_FILE "bug:lock" /* lock file name */
27#define SUMMARY_FILE "summary" /* summary file */
28#define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */
70c98dc6
KB
29
30/* permissions */
31#define DIR_MODE 0750 /* directory creation mode */
32#define FILE_MODE 0644 /* file creation mode */
33
34#define CHN (char *)NULL /* null arg string */
35#define COMMENT '#' /* comment in redist file */
36#define EOS (char)NULL /* end of string */
37#define ERR -1 /* error return */
38#define MAXLINELEN 200 /* max line length in message */
39#define NO 0 /* no/false */
40#define OK 0 /* okay return */
41#define YES 1 /* yes/true */
42
43typedef struct {
44 short found, /* line number if found */
45 redist; /* if part of redist headers */
46 int (*valid)(); /* validation routine */
47 short len; /* length of tag */
48 char *tag, /* leading tag */
49 *line; /* actual line */
50} HEADER;
3dc98623 51extern HEADER mailhead[];
70c98dc6
KB
52
53#define DATE_TAG 0 /* "Date:" offset */
54#define FROM_TAG 1 /* "From " offset */
55#define CFROM_TAG 2 /* "From:" offset */
56#define INDX_TAG 3 /* "Index:" offset */
57#define MSG_TAG 4 /* "Message-Id:" offset */
58#define RPLY_TAG 5 /* "Reply-To:" offset */
59#define RET_TAG 6 /* "Return-Path:" offset */
60#define SUBJ_TAG 7 /* "Subject:" offset */
61#define TO_TAG 8 /* "To:" offset */
62
63/* so sizeof doesn't return 0 */
64#include <sys/param.h>
3dc98623
KB
65#include <sys/dir.h>
66extern char bfr[MAXBSIZE], /* general I/O buffer */
67 dir[MAXNAMLEN], /* subject and folder */
68 folder[MAXNAMLEN],
69 tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */