version 1.25, 2008/07/20 01:09:07 |
version 1.26, 2011/08/27 15:40:31 |
Line 62 __RCSID("$NetBSD$"); |
|
Line 62 __RCSID("$NetBSD$"); |
|
|
|
#include "pathnames.h" |
#include "pathnames.h" |
|
|
int deliver __P((int, char *, int)); |
static int deliver(int, char *, int); |
void logerr __P((int, const char *, ...)) |
__dead static void logerr(int, const char *, ...) __printflike(2, 3); |
__attribute__((__format__(__printf__, 2, 3))); |
static void logwarn(const char *, ...) __printflike(1, 2); |
void logwarn __P((const char *, ...)) |
static void notifybiff(char *); |
__attribute__((__format__(__printf__, 1, 2))); |
static int store(const char *); |
void notifybiff __P((char *)); |
__dead static void usage(void); |
int store __P((const char *)); |
|
void usage __P((void)); |
|
int main __P((int, char **)); |
|
|
|
int |
int |
main(argc, argv) |
main(int argc, char *argv[]) |
int argc; |
|
char **argv; |
|
{ |
{ |
struct passwd *pw; |
struct passwd *pw; |
int ch, fd, eval, lockfile = 0; |
int ch, fd, eval, lockfile = 0; |
Line 132 main(argc, argv) |
|
Line 127 main(argc, argv) |
|
exit (eval); |
exit (eval); |
} |
} |
|
|
int |
static int |
store(from) |
store(const char *from) |
const char *from; |
|
{ |
{ |
FILE *fp = NULL; /* XXX gcc */ |
FILE *fp = NULL; /* XXX gcc */ |
time_t tval; |
time_t tval; |
|
|
return(fd); |
return(fd); |
} |
} |
|
|
int |
static int |
deliver(fd, name, lockfile) |
deliver(int fd, char *name, int lockfile) |
int fd; |
|
char *name; |
|
int lockfile; |
|
{ |
{ |
struct stat sb; |
struct stat sb; |
struct passwd pwres, *pw; |
struct passwd pwres, *pw; |
|
|
} |
} |
|
|
void |
void |
notifybiff(msg) |
notifybiff(char *msg) |
char *msg; |
|
{ |
{ |
static struct sockaddr_in addr; |
static struct sockaddr_in addr; |
static int f = -1; |
static int f = -1; |
|
|
logwarn("sendto biff: %s", strerror(errno)); |
logwarn("sendto biff: %s", strerror(errno)); |
} |
} |
|
|
void |
static void |
usage() |
usage(void) |
{ |
{ |
logerr(EX_USAGE, "usage: mail.local [-l] [-f from] user ..."); |
logerr(EX_USAGE, "usage: mail.local [-l] [-f from] user ..."); |
} |
} |
|
|
void |
static void |
logerr(int status, const char *fmt, ...) |
logerr(int status, const char *fmt, ...) |
{ |
{ |
va_list ap; |
va_list ap; |
Line 330 logerr(int status, const char *fmt, ...) |
|
Line 320 logerr(int status, const char *fmt, ...) |
|
|
|
exit(status); |
exit(status); |
/* NOTREACHED */ |
/* NOTREACHED */ |
return; |
|
} |
} |
|
|
void |
static void |
logwarn(const char *fmt, ...) |
logwarn(const char *fmt, ...) |
{ |
{ |
va_list ap; |
va_list ap; |