mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 03:49:02 +00:00
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:
parent
ab91e8eff2
commit
2b91a983a5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11334
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user