130160Sbostic /* 230160Sbostic * Copyright (c) 1986 Regents of the University of California. 330160Sbostic * All rights reserved. The Berkeley software License Agreement 430160Sbostic * specifies the terms and conditions for redistribution. 530160Sbostic * 630160Sbostic * @(#)bug.h 1.1 (Berkeley) 11/25/86 730160Sbostic */ 830160Sbostic 930160Sbostic #define BUGS_HOME "owner-bugs@ucbvax.BERKELEY.EDU" 1030160Sbostic #define BUGS_ID "bugs" 1130160Sbostic #define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs@ucbvax.BERKELEY.EDU" 1230160Sbostic 1330160Sbostic /* 1430160Sbostic * the METOO definition has the bugfiler exit with an error (-1) status 1530160Sbostic * if there's a problem. Sendmail then mails off a copy of the problem 1630160Sbostic * mail to "owner-bugs". This is great if you would have otherwise lost 1730160Sbostic * the bug report. It's not so great if you get a whole bunch of mail 1830160Sbostic * that you really don't want. 1930160Sbostic */ 2030160Sbostic #define METOO 2130160Sbostic 2230160Sbostic /* files */ 23*30894Sbostic #define ACK_FILE "bug:ack" /* acknowledge file */ 24*30894Sbostic #define DIST_FILE "bug:redist" /* redistribution file */ 2530160Sbostic #define ERROR_FILE "log" /* error file */ 2630160Sbostic #define LOCK_FILE "bug:lock" /* lock file name */ 2730160Sbostic #define SUMMARY_FILE "summary" /* summary file */ 2830160Sbostic #define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */ 2930160Sbostic 3030160Sbostic /* permissions */ 3130160Sbostic #define DIR_MODE 0750 /* directory creation mode */ 3230160Sbostic #define FILE_MODE 0644 /* file creation mode */ 3330160Sbostic 3430160Sbostic #define CHN (char *)NULL /* null arg string */ 3530160Sbostic #define COMMENT '#' /* comment in redist file */ 3630160Sbostic #define EOS (char)NULL /* end of string */ 3730160Sbostic #define ERR -1 /* error return */ 3830160Sbostic #define MAXLINELEN 200 /* max line length in message */ 3930160Sbostic #define NO 0 /* no/false */ 4030160Sbostic #define OK 0 /* okay return */ 4130160Sbostic #define YES 1 /* yes/true */ 4230160Sbostic 4330160Sbostic typedef struct { 4430160Sbostic short found, /* line number if found */ 4530160Sbostic redist; /* if part of redist headers */ 4630160Sbostic int (*valid)(); /* validation routine */ 4730160Sbostic short len; /* length of tag */ 4830160Sbostic char *tag, /* leading tag */ 4930160Sbostic *line; /* actual line */ 5030160Sbostic } HEADER; 51*30894Sbostic extern HEADER mailhead[]; 5230160Sbostic 5330160Sbostic #define DATE_TAG 0 /* "Date:" offset */ 5430160Sbostic #define FROM_TAG 1 /* "From " offset */ 5530160Sbostic #define CFROM_TAG 2 /* "From:" offset */ 5630160Sbostic #define INDX_TAG 3 /* "Index:" offset */ 5730160Sbostic #define MSG_TAG 4 /* "Message-Id:" offset */ 5830160Sbostic #define RPLY_TAG 5 /* "Reply-To:" offset */ 5930160Sbostic #define RET_TAG 6 /* "Return-Path:" offset */ 6030160Sbostic #define SUBJ_TAG 7 /* "Subject:" offset */ 6130160Sbostic #define TO_TAG 8 /* "To:" offset */ 6230160Sbostic 6330160Sbostic /* so sizeof doesn't return 0 */ 6430160Sbostic #include <sys/param.h> 65*30894Sbostic #include <sys/dir.h> 66*30894Sbostic extern char bfr[MAXBSIZE], /* general I/O buffer */ 67*30894Sbostic dir[MAXNAMLEN], /* subject and folder */ 68*30894Sbostic folder[MAXNAMLEN], 69*30894Sbostic tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */ 70