monetary.h 1.8 KB

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