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.
This commit is contained in:
Andrey A. Chernov 1995-10-08 14:15:20 +00:00
parent ab91e8eff2
commit 2b91a983a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11334
2 changed files with 2 additions and 6 deletions

View File

@ -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.

View File

@ -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);
}