* Copyright (c) 1980 Regents of the University of California.
* All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
+ * %sccs.include.redist.c%
*
- * @(#)def.h 5.6 (Berkeley) %G%
+ * @(#)def.h 5.23 (Berkeley) %G%
*/
-#include <sys/param.h> /* includes <sys/types.h> */
-#include <sys/signal.h>
-#include <stdio.h>
-#include <sgtty.h>
-#include <ctype.h>
-#include <strings.h>
-#include "local.h"
-
/*
* Mail -- a mail program
*
* Author: Kurt Shoens (UCB) March 25, 1978
*/
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+
+#include <signal.h>
+#include <sgtty.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include "pathnames.h"
+
+#define APPEND /* New mail goes to end of mailbox */
#define ESCAPE '~' /* Default escape for sending */
#define NMLSIZE 1024 /* max names in a message list */
-#define PATHSIZE 1024 /* Size of pathnames throughout */
-#define NAMESIZE 32 /* Max size of user name */
+#define PATHSIZE MAXPATHLEN /* Size of pathnames throughout */
#define HSHSIZE 59 /* Hash size for aliases and vars */
-#define HDRFIELDS 3 /* Number of header fields */
#define LINESIZE BUFSIZ /* max readable line width */
#define STRINGSIZE ((unsigned) 128)/* Dynamic allocation units */
#define MAXARGC 1024 /* Maximum list of raw strings */
* The actual table is declared and initialized
* in lex.c
*/
-
struct cmd {
char *c_name; /* Name of command */
int (*c_func)(); /* Implementor of the command */
*/
struct header {
- char *h_to; /* Dynamic "To:" string */
- char *h_subject; /* Subject string */
- char *h_cc; /* Carbon copies string */
- char *h_bcc; /* Blind carbon copies */
- int h_seq; /* Sequence for optimization */
+ struct name *h_to; /* Dynamic "To:" string */
+ char *h_subject; /* Subject string */
+ struct name *h_cc; /* Carbon copies string */
+ struct name *h_bcc; /* Blind carbon copies */
+ struct name *h_smopts; /* Sendmail options */
};
/*
#define TOPEN 8 /* An '(' */
#define TCLOSE 9 /* A ')' */
#define TPLUS 10 /* A '+' */
+#define TERROR 11 /* A lexical error */
#define REGDEP 2 /* Maximum regret depth. */
#define STRINGLEN 1024 /* Maximum length of string token */
* for read/write.
*/
#define trunc(stream) ftruncate(fileno(stream), (long) ftell(stream))
-
-/*
- * Forward declarations of routine types to keep lint and cc happy.
- */
-
-FILE *Fdopen();
-FILE *collect();
-FILE *infix();
-FILE *mesedit();
-FILE *mespipe();
-FILE *popen();
-FILE *setinput();
-char **unpack();
-char *addto();
-char *arpafix();
-char *calloc();
-char *copy();
-char *copyin();
-char *detract();
-char *expand();
-char *gets();
-char *hfield();
-char *name1();
-char *nameof();
-char *nextword();
-char *getenv();
-char *getfilename();
-char *ishfield();
-char *malloc();
-char *netmap();
-char *netname();
-char *readtty();
-char *reedit();
-char *revarpa();
-char *rpair();
-char *salloc();
-char *savestr();
-char *skin();
-char *snarf();
-char *value();
-char *vcopy();
-char *yankword();
-off_t fsize();
-struct cmd *lex();
-struct grouphead *findgroup();
-struct name *cat();
-struct name *delname();
-struct name *elide();
-struct name *extract();
-struct name *gexpand();
-struct name *map();
-struct name *outof();
-struct name *put();
-struct name *usermap();
-struct name *verify();
-struct var *lookup();
-long transmit();
-int icequal();