130160Sbostic /* 2*33416Sbostic * Copyright (c) 1986, 1987 Regents of the University of California. 3*33416Sbostic * All rights reserved. 430160Sbostic * 5*33416Sbostic * Redistribution and use in source and binary forms are permitted 6*33416Sbostic * provided that this notice is preserved and that due credit is given 7*33416Sbostic * to the University of California at Berkeley. The name of the University 8*33416Sbostic * may not be used to endorse or promote products derived from this 9*33416Sbostic * software without specific prior written permission. This software 10*33416Sbostic * is provided ``as is'' without express or implied warranty. 11*33416Sbostic * 12*33416Sbostic * @(#)bug.h 5.6 (Berkeley) 02/01/88 1330160Sbostic */ 1430160Sbostic 1532093Skarels #define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU" 1630160Sbostic #define BUGS_ID "bugs" 1732093Skarels #define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs" 1830160Sbostic 1930160Sbostic /* 2030160Sbostic * the METOO definition has the bugfiler exit with an error (-1) status 2131916Sbostic * if there's a problem. This causes sendmail to send off a copy of the 2231916Sbostic * report (as failed mail) to the "owner" of the mail alias that executed 2331916Sbostic * the bugfiler. This is great if you would have otherwise lost the bug 2431916Sbostic * report. It's not so great if you get a whole bunch of mail that you 2531916Sbostic * really don't want. 2630160Sbostic */ 2730160Sbostic #define METOO 2830160Sbostic 2930160Sbostic /* files */ 3030894Sbostic #define ACK_FILE "bug:ack" /* acknowledge file */ 3130894Sbostic #define DIST_FILE "bug:redist" /* redistribution file */ 3230160Sbostic #define ERROR_FILE "log" /* error file */ 3330160Sbostic #define LOCK_FILE "bug:lock" /* lock file name */ 3430160Sbostic #define SUMMARY_FILE "summary" /* summary file */ 3530160Sbostic #define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */ 3631916Sbostic #define TMP_DIR "errors" /* tmp directory */ 3730160Sbostic 3830160Sbostic #define CHN (char *)NULL /* null arg string */ 3930160Sbostic #define COMMENT '#' /* comment in redist file */ 4030160Sbostic #define EOS (char)NULL /* end of string */ 4130160Sbostic #define ERR -1 /* error return */ 4230160Sbostic #define MAXLINELEN 200 /* max line length in message */ 4330160Sbostic #define NO 0 /* no/false */ 4430160Sbostic #define OK 0 /* okay return */ 4530160Sbostic #define YES 1 /* yes/true */ 4630160Sbostic 4730160Sbostic typedef struct { 4830160Sbostic short found, /* line number if found */ 4930160Sbostic redist; /* if part of redist headers */ 5030160Sbostic int (*valid)(); /* validation routine */ 5130160Sbostic short len; /* length of tag */ 5230160Sbostic char *tag, /* leading tag */ 5330160Sbostic *line; /* actual line */ 5430160Sbostic } HEADER; 5530894Sbostic extern HEADER mailhead[]; 5630160Sbostic 5730160Sbostic #define DATE_TAG 0 /* "Date:" offset */ 5830160Sbostic #define FROM_TAG 1 /* "From " offset */ 5930160Sbostic #define CFROM_TAG 2 /* "From:" offset */ 6030160Sbostic #define INDX_TAG 3 /* "Index:" offset */ 6130160Sbostic #define MSG_TAG 4 /* "Message-Id:" offset */ 6230160Sbostic #define RPLY_TAG 5 /* "Reply-To:" offset */ 6330160Sbostic #define RET_TAG 6 /* "Return-Path:" offset */ 6430160Sbostic #define SUBJ_TAG 7 /* "Subject:" offset */ 6530160Sbostic #define TO_TAG 8 /* "To:" offset */ 6632093Skarels #define APPAR_TO_TAG 9 /* "Apparently-To:" offset */ 6730160Sbostic 6830160Sbostic /* so sizeof doesn't return 0 */ 6930160Sbostic #include <sys/param.h> 7030894Sbostic #include <sys/dir.h> 7130894Sbostic extern char bfr[MAXBSIZE], /* general I/O buffer */ 7230894Sbostic dir[MAXNAMLEN], /* subject and folder */ 7330894Sbostic folder[MAXNAMLEN], 7430894Sbostic tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */ 75