strfmon.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Formatting a monetary value according to the current locale.
  2. Copyright (C) 1996-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. Contributed by Ulrich Drepper <drepper@cygnus.com>
  5. and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
  6. The GNU C Library is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Lesser General Public
  8. License as published by the Free Software Foundation; either
  9. version 2.1 of the License, or (at your option) any later version.
  10. The GNU C Library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with the GNU C Library; if not, see
  16. <http://www.gnu.org/licenses/>. */
  17. #include <monetary.h>
  18. #include <stdarg.h>
  19. #include <locale/localeinfo.h>
  20. #include <math_ldbl_opt.h>
  21. ssize_t
  22. __strfmon (char *s, size_t maxsize, const char *format, ...)
  23. {
  24. va_list ap;
  25. va_start (ap, format);
  26. ssize_t res = __vstrfmon_l_internal (s, maxsize, _NL_CURRENT_LOCALE,
  27. format, ap, 0);
  28. va_end (ap);
  29. return res;
  30. }
  31. ldbl_strong_alias (__strfmon, strfmon)