monetary.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Header file for monetary value formatting functions.
  2. Copyright (C) 1996-2016 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _MONETARY_H
  16. #define _MONETARY_H 1
  17. #include <features.h>
  18. /* Get needed types. */
  19. #define __need_size_t
  20. #include <stddef.h>
  21. #include <bits/types.h>
  22. #ifndef __ssize_t_defined
  23. typedef __ssize_t ssize_t;
  24. # define __ssize_t_defined
  25. #endif
  26. __BEGIN_DECLS
  27. /* Formatting a monetary value according to the current locale. */
  28. extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
  29. const char *__restrict __format, ...)
  30. __THROW __attribute_format_strfmon__ (3, 4);
  31. #ifdef __USE_XOPEN2K8
  32. # include <xlocale.h>
  33. /* Formatting a monetary value according to the given locale. */
  34. extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
  35. __locale_t __loc,
  36. const char *__restrict __format, ...)
  37. __THROW __attribute_format_strfmon__ (4, 5);
  38. #endif
  39. #ifdef __LDBL_COMPAT
  40. # include <bits/monetary-ldbl.h>
  41. #endif
  42. __END_DECLS
  43. #endif /* monetary.h */