aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-10-09 07:53:14 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-10-09 07:53:14 +0000
commita7ec6793d0b5a6bbdc577b92ea76c45c175587c1 (patch)
treebd2ec7f74ce3ae8a399d46d637e74f453eb06ff0
parentffa9f0f4836c913c8e5440da4740a9233b5a9d5c (diff)
Notes
-rw-r--r--usr.bin/calendar/calendar.12
-rw-r--r--usr.bin/calendar/calendar.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/calendar/calendar.1 b/usr.bin/calendar/calendar.1
index c397193ba45e9..1ffa5e51a9402 100644
--- a/usr.bin/calendar/calendar.1
+++ b/usr.bin/calendar/calendar.1
@@ -42,7 +42,7 @@
.Op Fl a
.Sh DESCRIPTION
.Nm Calendar
-checks the $HOME directory for a file named
+checks the current directory for a file named
.Pa calendar
and displays lines that begin with either today's date
or tomorrow's.
diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c
index deb4cfc482270..7302dfbf7ec5c 100644
--- a/usr.bin/calendar/calendar.c
+++ b/usr.bin/calendar/calendar.c
@@ -80,7 +80,6 @@ main(argc, argv)
{
extern int optind;
int ch;
- char *s;
while ((ch = getopt(argc, argv, "-a")) != EOF)
switch (ch) {
@@ -111,11 +110,8 @@ main(argc, argv)
cal();
(void)seteuid(0);
}
- else {
- if ((s = getenv("HOME")) != NULL)
- chdir(s);
+ else
cal();
- }
exit(0);
}
@@ -289,7 +285,7 @@ opencal()
if (!freopen("calendar", "r", stdin)) {
if (doall)
return (NULL);
- errx(1, "no calendar file.");
+ errx(1, "no calendar file in current directory.");
}
if (pipe(pdes) < 0)
return (NULL);