Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/w Remove SCCS workarounds. No binary change.
details: https://anonhg.NetBSD.org/src/rev/220250e4ec5f
branches: trunk
changeset: 961362:220250e4ec5f
user: maya <maya%NetBSD.org@localhost>
date: Sat Apr 17 06:14:15 2021 +0000
description:
Remove SCCS workarounds. No binary change.
diffstat:
usr.bin/w/pr_time.c | 15 ++++++---------
usr.bin/w/w.c | 9 +++------
2 files changed, 9 insertions(+), 15 deletions(-)
diffs (75 lines):
diff -r d115a218dbe7 -r 220250e4ec5f usr.bin/w/pr_time.c
--- a/usr.bin/w/pr_time.c Sat Apr 17 06:02:35 2021 +0000
+++ b/usr.bin/w/pr_time.c Sat Apr 17 06:14:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pr_time.c,v 1.18 2011/08/17 13:48:11 christos Exp $ */
+/* $NetBSD: pr_time.c,v 1.19 2021/04/17 06:14:15 maya Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94";
#else
-__RCSID("$NetBSD: pr_time.c,v 1.18 2011/08/17 13:48:11 christos Exp $");
+__RCSID("$NetBSD: pr_time.c,v 1.19 2021/04/17 06:14:15 maya Exp $");
#endif
#endif /* not lint */
@@ -51,9 +51,6 @@
/*
* pr_attime --
* Print the time since the user logged in.
- *
- * Note: SCCS forces the bizarre string manipulation, things like
- * %I% get replaced in the source code.
*/
void
pr_attime(time_t *started, time_t *now)
@@ -71,11 +68,11 @@
/* If more than a week, use day-month-year. */
(void)strftime(buf, sizeof(buf), "%d%b%y", tp);
} else if (tp->tm_yday != tnow_yday) {
- /* If not today, use day-hour-am/pm. Damn SCCS */
- (void)strftime(buf, sizeof(buf), "%a%" "I%p", tp);
+ /* If not today, use day-hour-am/pm. */
+ (void)strftime(buf, sizeof(buf), "%a%I%p", tp);
} else {
- /* Default is hh:mm{am,pm}. Damn SCCS */
- (void)strftime(buf, sizeof(buf), "%l:%" "M%p", tp);
+ /* Default is hh:mm{am,pm}. */
+ (void)strftime(buf, sizeof(buf), "%l:%M%p", tp);
}
buf[sizeof(buf) - 1] = '\0';
diff -r d115a218dbe7 -r 220250e4ec5f usr.bin/w/w.c
--- a/usr.bin/w/w.c Sat Apr 17 06:02:35 2021 +0000
+++ b/usr.bin/w/w.c Sat Apr 17 06:14:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: w.c,v 1.90 2020/08/01 17:53:38 kim Exp $ */
+/* $NetBSD: w.c,v 1.91 2021/04/17 06:14:15 maya Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)w.c 8.6 (Berkeley) 6/30/94";
#else
-__RCSID("$NetBSD: w.c,v 1.90 2020/08/01 17:53:38 kim Exp $");
+__RCSID("$NetBSD: w.c,v 1.91 2021/04/17 06:14:15 maya Exp $");
#endif
#endif /* not lint */
@@ -465,11 +465,8 @@
/*
* Print time of day.
- *
- * SCCS forces the string manipulation below, as it replaces
- * %, M, and % in a character string with the file name.
*/
- (void)strftime(buf, sizeof(buf), "%l:%" "M%p", localtime(nowp));
+ (void)strftime(buf, sizeof(buf), "%l:%M%p", localtime(nowp));
buf[sizeof(buf) - 1] = '\0';
(void)printf("%s ", buf);
Home |
Main Index |
Thread Index |
Old Index