From: Jan-Simon Pendry Date: Mon, 4 Apr 1994 20:40:29 +0000 (-0800) Subject: prettiness police X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/9d206f8762b5791882d1a9273697a04dbf7678ef prettiness police SCCS-vsn: usr.bin/w/pr_time.c 8.2 --- diff --git a/usr/src/usr.bin/w/pr_time.c b/usr/src/usr.bin/w/pr_time.c index 51bd86cee9..d94697e41e 100644 --- a/usr/src/usr.bin/w/pr_time.c +++ b/usr/src/usr.bin/w/pr_time.c @@ -1,12 +1,12 @@ /*- - * Copyright (c) 1990, 1993 + * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * * %sccs.include.redist.c% */ #ifndef lint -static char sccsid[] = "@(#)pr_time.c 8.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) %G%"; #endif /* not lint */ #include @@ -23,7 +23,7 @@ static char sccsid[] = "@(#)pr_time.c 8.1 (Berkeley) %G%"; * Print the time since the user logged in. * * Note: SCCS forces the bizarre string manipulation, things like - * 8.1 get replaced in the source code. + * 8.2 get replaced in the source code. */ void pr_attime(started, now) @@ -43,14 +43,12 @@ pr_attime(started, now) /* If not today, use day-hour-am/pm. */ else if (*now / SECSPERDAY != *started / SECSPERDAY) { - (void)strcpy(fmt, "%a%%%p"); - fmt[3] = 'I'; + (void)strcpy(fmt, __CONCAT("%a%", "I%p")); } /* Default is hh:mm{am,pm}. */ else { - (void)strcpy(fmt, "%l:%%%p"); - fmt[4] = 'M'; + (void)strcpy(fmt, __CONCAT("%l:%", "M%p")); } (void)strftime(buf, sizeof(buf), fmt, tp);