* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
"@(#) Copyright (c) 1980 Regents of the University of California.\n\
static char sccsid
[] = "@(#)prmail.c 5.1 (Berkeley) %G%";
struct passwd
*getpwuid();
register struct passwd
*pp
;
if (chdir("/usr/spool/mail") < 0) {
perror("/usr/spool/mail");
char *user
= getenv("USER");
printf("Who are you?\n");
if (stat(user
, &stb
) < 0) {
printf("No mail for %s.\n", user
);
if (access(user
, 4) < 0) {
printf("Mailbox for %s unreadable\n", user
);
printf(">>> %s <<<\n", user
);
sprintf(cmdbuf
, "more %s", user
);