projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
v7.local.c
diff --git
a/usr/src/usr.bin/mail/v7.local.c
b/usr/src/usr.bin/mail/v7.local.c
index
a88c670
..
c624950
100644
(file)
--- a/
usr/src/usr.bin/mail/v7.local.c
+++ b/
usr/src/usr.bin/mail/v7.local.c
@@
-1,12
+1,12
@@
/*
/*
- * Copyright (c) 1980
Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1980
, 1993
+ *
The Regents of the University of California.
All rights reserved.
*
* %sccs.include.redist.c%
*/
#ifndef lint
*
* %sccs.include.redist.c%
*/
#ifndef lint
-static char sccsid[] = "@(#)v7.local.c
5.10
(Berkeley) %G%";
+static char sccsid[] = "@(#)v7.local.c
8.1
(Berkeley) %G%";
#endif /* not lint */
/*
#endif /* not lint */
/*
@@
-18,33
+18,35
@@
static char sccsid[] = "@(#)v7.local.c 5.10 (Berkeley) %G%";
*/
#include "rcv.h"
*/
#include "rcv.h"
+#include <fcntl.h>
+#include "extern.h"
/*
* Locate the user's mailbox file (ie, the place where new, unread
* mail is queued).
*/
/*
* Locate the user's mailbox file (ie, the place where new, unread
* mail is queued).
*/
+void
findmail(user, buf)
findmail(user, buf)
- char *user;
- char *buf;
+ char *user, *buf;
{
{
-
- strcpy(copy(_PATH_MAILDIR, buf), user);
+ (void)sprintf(buf, "%s/%s", _PATH_MAILDIR, user);
}
/*
* Get rid of the queued mail.
*/
}
/*
* Get rid of the queued mail.
*/
+void
demail()
{
demail()
{
- if (value("keep") != NOSTR || r
emove
(mailname) < 0)
+ if (value("keep") != NOSTR || r
m
(mailname) < 0)
close(creat(mailname, 0600));
}
/*
* Discover user login name.
*/
close(creat(mailname, 0600));
}
/*
* Discover user login name.
*/
-char*
+char
*
username()
{
char *np;
username()
{
char *np;