On further thought, always search for calendar files in the caller's home
directory when called directly (this was already done for calendar -a, by definition). Old behavior is still available by setting "CALENDAR_DIR=.".
This commit is contained in:
parent
9720571221
commit
e7f10875fa
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: calendar.c,v 1.31 2004/11/29 17:03:43 jwise Exp $ */
|
||||
/* $NetBSD: calendar.c,v 1.32 2004/11/29 18:25:14 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)calendar.c 8.4 (Berkeley) 1/7/95";
|
||||
#endif
|
||||
__RCSID("$NetBSD: calendar.c,v 1.31 2004/11/29 17:03:43 jwise Exp $");
|
||||
__RCSID("$NetBSD: calendar.c,v 1.32 2004/11/29 18:25:14 jwise Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -171,7 +171,8 @@ main(argc, argv)
|
|||
if(!chdir(caldir))
|
||||
cal();
|
||||
} else {
|
||||
cal();
|
||||
if (((pw = getpwuid(geteuid())) != NULL) && !chdir(pw->pw_dir))
|
||||
cal();
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue