summaryrefslogtreecommitdiff
path: root/usr.bin/printf/printf.c
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2003-06-25 09:54:15 +0000
committerdsl <dsl@NetBSD.org>2003-06-25 09:54:15 +0000
commit0ac8c637fd3f033fb477c5d20d92190307cfd886 (patch)
treee46d64e35577fede74dc850c1920879507295821 /usr.bin/printf/printf.c
parent04e58308a311cacf491deaa2ea15df302ec3a698 (diff)
Remove getopt() loop, IEEE 1003.1 doesn't say that printf(1) should conform
to the "Utility Syntax Guidlines". Fixes PR 21970.
Diffstat (limited to 'usr.bin/printf/printf.c')
-rw-r--r--usr.bin/printf/printf.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index f000fa6c0df..f29205508f7 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: printf.c,v 1.26 2003/02/24 14:42:27 dsl Exp $ */
+/* $NetBSD: printf.c,v 1.27 2003/06/25 09:54:15 dsl Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -45,7 +45,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)printf.c 8.2 (Berkeley) 3/22/95";
#else
-__RCSID("$NetBSD: printf.c,v 1.26 2003/02/24 14:42:27 dsl Exp $");
+__RCSID("$NetBSD: printf.c,v 1.27 2003/06/25 09:54:15 dsl Exp $");
#endif
#endif /* not lint */
@@ -136,6 +136,12 @@ int main(int argc, char *argv[])
(void)setlocale (LC_ALL, "");
#endif
+/*
+ * IEEE 1003.1 (2003) doesn't say that printf(1) should conform to the
+ * "Utility Syntax Guidlines".
+ * It just says: Options: None.
+ */
+#if 0
while ((ch = getopt(argc, argv, "")) != -1) {
switch (ch) {
case '?':
@@ -146,6 +152,7 @@ int main(int argc, char *argv[])
}
argc -= optind;
argv += optind;
+#endif
if (argc < 1) {
usage();