Module Name: src
Committed By: christos
Date: Sun Aug 28 08:24:42 UTC 2011
Modified Files:
src/usr.bin/time: Makefile time.c
Log Message:
use strpct from libutil.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/time/Makefile
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/time/time.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/time/Makefile
diff -u src/usr.bin/time/Makefile:1.8 src/usr.bin/time/Makefile:1.9
--- src/usr.bin/time/Makefile:1.8 Wed Aug 17 09:29:39 2011
+++ src/usr.bin/time/Makefile Sun Aug 28 04:24:42 2011
@@ -1,15 +1,16 @@
-# $NetBSD: Makefile,v 1.8 2011/08/17 13:29:39 christos Exp $
+# $NetBSD: Makefile,v 1.9 2011/08/28 08:24:42 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
.include <bsd.own.mk>
CPPFLAGS+= -DNOT_CSH
CPPFLAGS+= -I. -I${NETBSDSRCDIR}/bin
-SRCS= time.c strpct.c xtime.c
+SRCS= time.c xtime.c
PROG= time
-COPTS.strpct.c += -Wno-format-nonliteral
-
.PATH: ${NETBSDSRCDIR}/bin/csh
+LDADD+=-lutil
+DPADD+=${LIBUTIL}
+
.include <bsd.prog.mk>
Index: src/usr.bin/time/time.c
diff -u src/usr.bin/time/time.c:1.19 src/usr.bin/time/time.c:1.20
--- src/usr.bin/time/time.c:1.19 Mon Jul 21 10:19:26 2008
+++ src/usr.bin/time/time.c Sun Aug 28 04:24:42 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: time.c,v 1.19 2008/07/21 14:19:26 lukem Exp $ */
+/* $NetBSD: time.c,v 1.20 2011/08/28 08:24:42 christos Exp $ */
/*
* Copyright (c) 1987, 1988, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: time.c,v 1.19 2008/07/21 14:19:26 lukem Exp $");
+__RCSID("$NetBSD: time.c,v 1.20 2011/08/28 08:24:42 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -56,8 +56,7 @@
#include "ext.h"
-int main(int, char **);
-static void usage(void);
+__dead static void usage(void);
static void prl(long, const char *);
static void prtv(const char *, const char *, const struct timeval *,
const char *);
@@ -174,7 +173,7 @@
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: %s [-clp] utility [argument ...]\n",