Back to index

glibc  2.9
strfmon.c
Go to the documentation of this file.
00001 /* Formatting a monetary value according to the current locale.
00002    Copyright (C) 1996-2001, 2002, 2003, 2004, 2006
00003    Free Software Foundation, Inc.
00004    This file is part of the GNU C Library.
00005    Contributed by Ulrich Drepper <drepper@cygnus.com>
00006    and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
00007 
00008    The GNU C Library is free software; you can redistribute it and/or
00009    modify it under the terms of the GNU Lesser General Public
00010    License as published by the Free Software Foundation; either
00011    version 2.1 of the License, or (at your option) any later version.
00012 
00013    The GNU C Library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with the GNU C Library; if not, write to the Free
00020    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00021    02111-1307 USA.  */
00022 
00023 #include <monetary.h>
00024 #include <stdarg.h>
00025 #include <locale/localeinfo.h>
00026 #include <math_ldbl_opt.h>
00027 
00028 ssize_t
00029 __strfmon (char *s, size_t maxsize, const char *format, ...)
00030 {
00031   va_list ap;
00032 
00033   va_start (ap, format);
00034 
00035   ssize_t res = __vstrfmon_l (s, maxsize, _NL_CURRENT_LOCALE, format, ap);
00036 
00037   va_end (ap);
00038 
00039   return res;
00040 }
00041 ldbl_strong_alias (__strfmon, strfmon)