diff options
author | nsz <nsz@port70.net> | 2012-03-26 13:47:31 +0200 |
---|---|---|
committer | nsz <nsz@port70.net> | 2012-03-26 13:47:31 +0200 |
commit | e68a4633e01e1a9ef41fa6dbc39d1d93dca130d3 (patch) | |
tree | 6e774ea5863925c49b6da15b25adc20d1ec192b4 /src | |
parent | c5ec5b2ce93bd87eb3dbf966d8bf279089f8a35d (diff) | |
parent | a9014ac1b9bc813a21752cd40e0a73441860e6e6 (diff) | |
download | musl-e68a4633e01e1a9ef41fa6dbc39d1d93dca130d3.tar.gz musl-e68a4633e01e1a9ef41fa6dbc39d1d93dca130d3.tar.bz2 musl-e68a4633e01e1a9ef41fa6dbc39d1d93dca130d3.tar.xz musl-e68a4633e01e1a9ef41fa6dbc39d1d93dca130d3.zip |
Merge branch 'master' of git://git.etalabs.net/musl
Diffstat (limited to 'src')
-rw-r--r-- | src/locale/strfmon.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/locale/strfmon.c b/src/locale/strfmon.c index 66bee482..81dfe38f 100644 --- a/src/locale/strfmon.c +++ b/src/locale/strfmon.c @@ -3,16 +3,15 @@ #include <stdarg.h> #include <monetary.h> #include <errno.h> +#include <stdarg.h> -ssize_t strfmon(char *s, size_t n, const char *fmt, ...) +static ssize_t vstrfmon_l(char *s, size_t n, locale_t loc, const char *fmt, va_list ap) { size_t l; double x; int fill, nogrp, negpar, nosym, left, intl; int lp, rp, w, fw; char *s0=s; - va_list ap; - va_start(ap, fmt); for (; n && *fmt; ) { if (*fmt != '%') { literal: @@ -75,3 +74,28 @@ ssize_t strfmon(char *s, size_t n, const char *fmt, ...) } return s-s0; } + +ssize_t strfmon_l(char *s, size_t n, locale_t loc, const char *fmt, ...) +{ + va_list ap; + ssize_t ret; + + va_start(ap, fmt); + ret = vstrfmon_l(s, n, loc, fmt, ap); + va_end(ap); + + return ret; +} + + +ssize_t strfmon(char *s, size_t n, const char *fmt, ...) +{ + va_list ap; + ssize_t ret; + + va_start(ap, fmt); + ret = vstrfmon_l(s, n, 0, fmt, ap); + va_end(ap); + + return ret; +} |