summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/Makefile.inc1
-rw-r--r--lib/libc/stdlib/strfmon.319
2 files changed, 19 insertions, 1 deletions
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc
index 7fdb6e4..75204f5 100644
--- a/lib/libc/stdlib/Makefile.inc
+++ b/lib/libc/stdlib/Makefile.inc
@@ -42,6 +42,7 @@ MLINKS+=rand.3 rand_r.3 rand.3 srand.3 rand.3 sranddev.3
MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \
random.3 srandomdev.3
MLINKS+=radixsort.3 sradixsort.3
+MLINKS+=strfmon.3 strfmon_l.3
MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3
MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3
diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3
index 7a54f22..7934b52 100644
--- a/lib/libc/stdlib/strfmon.3
+++ b/lib/libc/stdlib/strfmon.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 12, 2002
+.Dd June 25, 2012
.Dt STRFMON 3
.Os
.Sh NAME
@@ -36,6 +36,8 @@
.In monetary.h
.Ft ssize_t
.Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..."
+.Ft ssize_t
+.Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..."
.Sh DESCRIPTION
The
.Fn strfmon
@@ -47,6 +49,12 @@ No more than
.Fa maxsize
bytes are placed into the array.
.Pp
+The
+.Fn strfmon_l
+function does the same as
+.Fn strfmon
+but takes an explicit locale rather than using the current locale.
+.Pp
The format string is composed of zero or more directives:
ordinary characters (not
.Cm % ) ,
@@ -129,6 +137,11 @@ the contents of the array are indeterminate,
and
.Va errno
is set to indicate the error.
+.Pp
+The
+.Fn strfmon_l
+function returns the same values as
+.Fn strfmon .
.Sh ERRORS
The
.Fn strfmon
@@ -149,6 +162,10 @@ The
function
conforms to
.St -p1003.1-2001 .
+The
+.Fn strfmon_l
+function conforms to
+.St -p1003.1-2008 .
.Sh AUTHORS
.An -nosplit
The
OpenPOWER on IntegriCloud