summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-10-08 14:15:20 +0000
committerache <ache@FreeBSD.org>1995-10-08 14:15:20 +0000
commite257f78650356c0486c13104aba1e03201b70d4a (patch)
tree6821c1b29860ffa9a061eab81e44a120ab8c18a6 /usr.bin
parenteeedb17b1ae92fe0edad01844794aa83c6a1cebe (diff)
downloadFreeBSD-src-e257f78650356c0486c13104aba1e03201b70d4a.zip
FreeBSD-src-e257f78650356c0486c13104aba1e03201b70d4a.tar.gz
Remove hack inserted by me long time ago (cd $HOME for user-called case),
no other system do it and it can cause problem with multi-calendars for single user.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/calendar/calendar.12
-rw-r--r--usr.bin/calendar/calendar.c6
2 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/calendar/calendar.1 b/usr.bin/calendar/calendar.1
index c397193..1ffa5e5 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 deb4cfc..6f84a2a 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);
}
OpenPOWER on IntegriCloud