Module Name: src Committed By: maya Date: Sat Apr 17 06:14:15 UTC 2021
Modified Files: src/usr.bin/w: pr_time.c w.c Log Message: Remove SCCS workarounds. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/w/pr_time.c cvs rdiff -u -r1.90 -r1.91 src/usr.bin/w/w.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/w/pr_time.c diff -u src/usr.bin/w/pr_time.c:1.18 src/usr.bin/w/pr_time.c:1.19 --- src/usr.bin/w/pr_time.c:1.18 Wed Aug 17 13:48:11 2011 +++ src/usr.bin/w/pr_time.c Sat Apr 17 06:14:15 2021 @@ -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 @@ __RCSID("$NetBSD: pr_time.c,v 1.18 2011/ /* * 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 @@ pr_attime(time_t *started, time_t *now) /* 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'; Index: src/usr.bin/w/w.c diff -u src/usr.bin/w/w.c:1.90 src/usr.bin/w/w.c:1.91 --- src/usr.bin/w/w.c:1.90 Sat Aug 1 17:53:38 2020 +++ src/usr.bin/w/w.c Sat Apr 17 06:14:15 2021 @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #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 @@ pr_header(time_t *nowp, int nusers) /* * 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);