From 2b91a983a59a99866e392fbddcc7b8ea75dcd707 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sun, 8 Oct 1995 14:15:20 +0000 Subject: [PATCH] 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. --- usr.bin/calendar/calendar.1 | 2 +- usr.bin/calendar/calendar.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.bin/calendar/calendar.1 b/usr.bin/calendar/calendar.1 index c397193ba45e..1ffa5e51a940 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 deb4cfc48227..6f84a2a5f9b7 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); }