2.5-18.1
[jlayton/glibc.git] / stdlib / strfmon.c
1 /* Formatting a monetary value according to the current locale.
2    Copyright (C) 1996-2001, 2002, 2003, 2004, 2006
3    Free Software Foundation, Inc.
4    This file is part of the GNU C Library.
5    Contributed by Ulrich Drepper <drepper@cygnus.com>
6    and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
7
8    The GNU C Library is free software; you can redistribute it and/or
9    modify it under the terms of the GNU Lesser General Public
10    License as published by the Free Software Foundation; either
11    version 2.1 of the License, or (at your option) any later version.
12
13    The GNU C Library is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    Lesser General Public License for more details.
17
18    You should have received a copy of the GNU Lesser General Public
19    License along with the GNU C Library; if not, write to the Free
20    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21    02111-1307 USA.  */
22
23 #include <monetary.h>
24 #include <stdarg.h>
25 #include <locale/localeinfo.h>
26 #include <math_ldbl_opt.h>
27
28 ssize_t
29 __strfmon (char *s, size_t maxsize, const char *format, ...)
30 {
31   va_list ap;
32
33   va_start (ap, format);
34
35   ssize_t res = __vstrfmon_l (s, maxsize, _NL_CURRENT_LOCALE, format, ap);
36
37   va_end (ap);
38
39   return res;
40 }
41 ldbl_strong_alias (__strfmon, strfmon)