summaryrefslogtreecommitdiffstats
path: root/usr.bin/printf/printf.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-02-10 06:49:53 +0000
committerache <ache@FreeBSD.org>2001-02-10 06:49:53 +0000
commit1f66809615027cac4ac8cfafe2f5875107060cbf (patch)
treed9e50d9252798a567ca903a6a166d50dca38fee8 /usr.bin/printf/printf.c
parent772e4b2ef9865ff24f1902516c258301cc162d74 (diff)
downloadFreeBSD-src-1f66809615027cac4ac8cfafe2f5875107060cbf.zip
FreeBSD-src-1f66809615027cac4ac8cfafe2f5875107060cbf.tar.gz
Localize it (LC_NUMERIC)
Diffstat (limited to 'usr.bin/printf/printf.c')
-rw-r--r--usr.bin/printf/printf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index 4b01b4a..897a063 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -67,6 +67,10 @@ static const char rcsid[] =
#define warnx3(a, b, c) warnx(a, b, c)
#endif
+#ifndef BUILTIN
+#include <locale.h>
+#endif
+
#define PF(f, func) { \
char *b = NULL; \
if (fieldwidth) \
@@ -109,6 +113,9 @@ main(argc, argv)
int ch, end, fieldwidth, precision;
char convch, nextch, *format, *fmt, *start;
+#ifndef BUILTIN
+ (void) setlocale(LC_NUMERIC, "");
+#endif
while ((ch = getopt(argc, argv, "")) != -1)
switch (ch) {
case '?':
OpenPOWER on IntegriCloud