Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/calendar On further thought, always search for calen...
details: https://anonhg.NetBSD.org/src/rev/6c8a1a13b4c1
branches: trunk
changeset: 571532:6c8a1a13b4c1
user: jwise <jwise%NetBSD.org@localhost>
date: Mon Nov 29 18:25:14 2004 +0000
description:
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=.".
diffstat:
usr.bin/calendar/calendar.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 8890f03d1c3f -r 6c8a1a13b4c1 usr.bin/calendar/calendar.c
--- a/usr.bin/calendar/calendar.c Mon Nov 29 17:58:07 2004 +0000
+++ b/usr.bin/calendar/calendar.c Mon Nov 29 18:25:14 2004 +0000
@@ -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 @@
#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 @@
if(!chdir(caldir))
cal();
} else {
- cal();
+ if (((pw = getpwuid(geteuid())) != NULL) && !chdir(pw->pw_dir))
+ cal();
}
exit(0);
}
Home |
Main Index |
Thread Index |
Old Index