mesg mined mkfifo \
mount mt netconf nice acknm nohup \
nonamed od paste patch \
- ping postinstall poweroff pr prep printf printroot \
+ ping postinstall poweroff pr prep printroot \
profile progressbar pr_routes ps pwd pwdauth \
ramdisk rarpd rawspeed rcp rdate readclock \
reboot remsync rev rget rlogin \
+++ /dev/null
-# $NetBSD: Makefile,v 1.9 2004/10/30 19:28:35 christos Exp $
-# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
-
-PROG= printf
-
-.include <bsd.prog.mk>
2012/10/17 12:00:00,usr.bin/nvi
2010/05/14 17:28:23,usr.bin/newgrp
2012/10/17 12:00:00,usr.bin/passwd
+2012/10/17 12:00:00,usr.bin/printf
2010/02/19 16:35:27,usr.bin/sed
2010/05/27 08:40:19,usr.bin/seq
2012/10/17 12:00:00,usr.bin/sort
\
nbperf newgrp nvi \
passwd \
- \
+ printf \
\
\
sed seq \
--- /dev/null
+# $NetBSD: Makefile,v 1.11 2011/08/16 10:37:21 christos Exp $
+# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
+
+PROG= printf
+
+COPTS.printf.c = -Wno-format-nonliteral
+
+.include <bsd.prog.mk>
-.\" $NetBSD: printf.1,v 1.22 2008/09/01 09:20:41 dholland Exp $
+.\" $NetBSD: printf.1,v 1.24 2010/04/05 21:24:14 joerg Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.Ar argument
is printed in the style
.Sm off
-.Pf [\-]d Cm \&. No ddd Cm e No \\*(Pmdd
+.Pf [\-]d Cm \&. No ddd Cm e No \*(Pmdd
.Sm on
where there
is one digit before the decimal point and the number after is equal to
Characters from the string
.Ar argument
are printed with backslash-escape sequences expanded.
-.br
+.Pp
The following additional backslash-escape sequences are supported:
.Bl -tag -width Ds
.It Cm \ec
-/* $NetBSD: printf.c,v 1.33.8.1 2009/10/14 18:37:30 sborrill Exp $ */
+/* $NetBSD: printf.c,v 1.35 2011/03/15 23:11:49 christos Exp $ */
/*
* Copyright (c) 1989, 1993
*/
#include <sys/cdefs.h>
+#ifndef lint
+#if !defined(BUILTIN) && !defined(SHELL)
+__COPYRIGHT("@(#) Copyright (c) 1989, 1993\
+ The Regents of the University of California. All rights reserved.");
+#endif
+#endif
+
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)printf.c 8.2 (Berkeley) 3/22/95";
+#else
+__RCSID("$NetBSD: printf.c,v 1.35 2011/03/15 23:11:49 christos Exp $");
+#endif
+#endif /* not lint */
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <inttypes.h>
#ifdef __GNUC__
#define ESCAPE '\e'
error = printf(f, func); \
}
-#if 0
#define APF(cpp, f, func) { \
if (fieldwidth != -1) { \
if (precision != -1) \
else \
error = asprintf(cpp, f, func); \
}
-#endif
#ifdef main
int main(int, char *[]);
format = *argv;
gargv = ++argv;
-#define SKIP1 "#-+ 0"
+#define SKIP1 "#-+ 0'"
#define SKIP2 "0123456789"
do {
/*
t[b_length] = 0;
/* Get printf to calculate the lengths */
*fmt = 's';
- abort();
-/* APF(&a, start, t); */
+ APF(&a, start, t);
if (error == -1)
goto out;
b_fmt = a;
return *(cp+1);
errno = 0;
- val = strtol(cp, &ep, 0);
+ val = strtoimax(cp, &ep, 0);
check_conversion(cp, ep);
return val;
}
}
errno = 0;
- val = strtoul(cp, &ep, 0);
+ val = strtoumax(cp, &ep, 0);
check_conversion(cp, ep);
return val;
}