diff options
author | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-11-23 17:35:46 +0000 |
---|---|---|
committer | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-11-23 17:35:46 +0000 |
commit | 95d35d1a8dd18aceb7d1af74f38128eb9232964a (patch) | |
tree | 4a565114eb7d39f5d33a2542d009927ecf021e3f /mpfr.h | |
parent | 29cf68c84dc49e80be5bd9316345eddbdfb07bc6 (diff) | |
download | mpfr-95d35d1a8dd18aceb7d1af74f38128eb9232964a.tar.gz |
Makefile.am: add mpfr_printf-like functions
mpfr.h: add mpfr_printf-like functions
printf.c: printf, sprintf, snprintf, asprintf and 'v' variants
vasprintf.c: vasprintf functions used by its likes
mpfr.texi: add description for printf family functions
tests/Makefile.am: add test for printf
tests/tprintf.c: tests for printf-like functions
acinclude.m4: define HAVE_LOCALE_H
mpfr-impl.h: define MPFR_DECIMAL_POINT even if no locale.h
strtofr.c: remove locale.h inclusion (done by mpfr-impl.h )
tests/tests.c: use HAVE_LOCALE_H
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4993 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr.h')
-rw-r--r-- | mpfr.h | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -39,6 +39,11 @@ MPFR_VERSION_NUM(MPFR_VERSION_MAJOR,MPFR_VERSION_MINOR,MPFR_VERSION_PATCHLEVEL) # include <gmp.h> #endif +/* Try to include stdarg.h */ +#ifdef HAVE_STDARG +# include <stdarg.h> +#endif + /* Check if stdio.h is included or if the user wants FILE */ #if defined (_GMP_H_HAVE_FILE) || defined (MPFR_USE_FILE) # define _MPFR_H_HAVE_FILE 1 @@ -328,6 +333,29 @@ __MPFR_DECLSPEC size_t mpfr_out_str _MPFR_PROTO ((FILE*, int, size_t, mpfr_srcptr, mpfr_rnd_t)); #endif +#ifdef HAVE_STDARG +#ifdef _MPFR_H_HAVE_FILE +__MPFR_DECLSPEC int mpfr_printf _MPFR_PROTO ((__gmp_const char*, ...)); +__MPFR_DECLSPEC int mpfr_fprintf _MPFR_PROTO ((FILE*, __gmp_const char*, + ...)); +__MPFR_DECLSPEC int mpfr_vprintf _MPFR_PROTO ((__gmp_const char*, va_list)); +__MPFR_DECLSPEC int mpfr_vfprintf _MPFR_PROTO ((FILE*, __gmp_const char*, + va_list)); +#endif /* _MPFR_H_HAVE_FILE */ +__MPFR_DECLSPEC int mpfr_asprintf _MPFR_PROTO ((char**, __gmp_const char*, + ...)); +__MPFR_DECLSPEC int mpfr_vasprintf _MPFR_PROTO ((char**, __gmp_const char*, + va_list)); +__MPFR_DECLSPEC int mpfr_sprintf _MPFR_PROTO ((char*, __gmp_const char*, + ...)); +__MPFR_DECLSPEC int mpfr_vsprintf _MPFR_PROTO ((char*, __gmp_const char*, + va_list)); +__MPFR_DECLSPEC int mpfr_snprintf _MPFR_PROTO ((char*, size_t, + __gmp_const char*, ...)); +__MPFR_DECLSPEC int mpfr_vsnprintf _MPFR_PROTO ((char*, size_t, + __gmp_const char*, va_list)); +#endif /* HAVE_STDARG */ + __MPFR_DECLSPEC int mpfr_pow _MPFR_PROTO ((mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)); __MPFR_DECLSPEC int mpfr_pow_si _MPFR_PROTO ((mpfr_ptr, mpfr_srcptr, |