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 are permitted 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. 16 * 17 * @(#)bug.h 5.8 (Berkeley) 05/11/89 18 */ 19 20 #define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU" 21 #define BUGS_ID "bugs" 22 23 /* 24 * the METOO definition has the bugfiler exit with an error (-1) status 25 * if there's a problem. This causes sendmail to send off a copy of the 26 * report (as failed mail) to the "owner" of the mail alias that executed 27 * the bugfiler. This is great if you would have otherwise lost the bug 28 * report. It's not so great if you get a whole bunch of mail that you 29 * really don't want. 30 */ 31 #define METOO 32 33 /* files */ 34 #define ACK_FILE "bug:ack" /* acknowledge file */ 35 #define DIST_FILE "bug:redist" /* redistribution file */ 36 #define ERROR_FILE "log" /* error file */ 37 #define LOCK_FILE "bug:lock" /* lock file name */ 38 #define SUMMARY_FILE "summary" /* summary file */ 39 #define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */ 40 #define TMP_DIR "errors" /* tmp directory */ 41 42 #define CHN (char *)NULL /* null arg string */ 43 #define COMMENT '#' /* comment in redist file */ 44 #define EOS (char)NULL /* end of string */ 45 #define ERR -1 /* error return */ 46 #define MAXLINELEN 200 /* max line length in message */ 47 #define NO 0 /* no/false */ 48 #define OK 0 /* okay return */ 49 #define YES 1 /* yes/true */ 50 51 typedef struct { 52 short found, /* line number if found */ 53 redist; /* if part of redist headers */ 54 int (*valid)(); /* validation routine */ 55 short len; /* length of tag */ 56 char *tag, /* leading tag */ 57 *line; /* actual line */ 58 } HEADER; 59 extern HEADER mailhead[]; 60 61 #define DATE_TAG 0 /* "Date:" offset */ 62 #define FROM_TAG 1 /* "From " offset */ 63 #define CFROM_TAG 2 /* "From:" offset */ 64 #define INDX_TAG 3 /* "Index:" offset */ 65 #define MSG_TAG 4 /* "Message-Id:" offset */ 66 #define RPLY_TAG 5 /* "Reply-To:" offset */ 67 #define RET_TAG 6 /* "Return-Path:" offset */ 68 #define SUBJ_TAG 7 /* "Subject:" offset */ 69 #define TO_TAG 8 /* "To:" offset */ 70 #define APPAR_TO_TAG 9 /* "Apparently-To:" offset */ 71 72 /* so sizeof doesn't return 0 */ 73 #include <sys/param.h> 74 #include <sys/dir.h> 75 extern char bfr[MAXBSIZE], /* general I/O buffer */ 76 dir[MAXNAMLEN], /* subject and folder */ 77 folder[MAXNAMLEN], 78 tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */ 79