diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2014-01-19 14:35:25 +0100 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2014-01-19 14:35:25 +0100 |
commit | fae4e36024f08ed96cb79195935f637bdfc9875b (patch) | |
tree | 2c13895a0b54eb7b6d6a5f815b65891acff34961 /scanf | |
parent | cf6b3dd7ae4bd3ae91a2a23dcb40361ca2e52f98 (diff) | |
download | gmp-fae4e36024f08ed96cb79195935f637bdfc9875b.tar.gz |
Get rid of varargs code and references.
Diffstat (limited to 'scanf')
-rw-r--r-- | scanf/doscan.c | 7 | ||||
-rw-r--r-- | scanf/fscanf.c | 20 | ||||
-rw-r--r-- | scanf/scanf.c | 18 | ||||
-rw-r--r-- | scanf/sscanf.c | 20 | ||||
-rw-r--r-- | scanf/vfscanf.c | 7 | ||||
-rw-r--r-- | scanf/vscanf.c | 6 | ||||
-rw-r--r-- | scanf/vsscanf.c | 6 |
7 files changed, 1 insertions, 83 deletions
diff --git a/scanf/doscan.c b/scanf/doscan.c index 08422ceb9..a340b9b90 100644 --- a/scanf/doscan.c +++ b/scanf/doscan.c @@ -23,14 +23,9 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #define _GNU_SOURCE /* for DECIMAL_POINT in langinfo.h */ -#include "config.h" +#include "config.h" /* needed for the HAVE_, could also move gmp incls */ -#if HAVE_STDARG #include <stdarg.h> -#else -#include <varargs.h> -#endif - #include <ctype.h> #include <stddef.h> /* for ptrdiff_t */ #include <stdio.h> diff --git a/scanf/fscanf.c b/scanf/fscanf.c index acd6bbde3..54905d797 100644 --- a/scanf/fscanf.c +++ b/scanf/fscanf.c @@ -17,14 +17,7 @@ License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ -#include "config.h" - -#if HAVE_STDARG #include <stdarg.h> -#else -#include <varargs.h> -#endif - #include <stdio.h> #include "gmp.h" @@ -32,24 +25,11 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ int -#if HAVE_STDARG gmp_fscanf (FILE *fp, const char *fmt, ...) -#else -gmp_fscanf (va_alist) - va_dcl -#endif { va_list ap; int ret; -#if HAVE_STDARG va_start (ap, fmt); -#else - FILE *fp; - const char *fmt; - va_start (ap); - fp = va_arg (ap, FILE *); - fmt = va_arg (ap, const char *); -#endif ret = __gmp_doscan (&__gmp_fscanf_funs, fp, fmt, ap); va_end (ap); diff --git a/scanf/scanf.c b/scanf/scanf.c index 9797fdf8f..aa212725d 100644 --- a/scanf/scanf.c +++ b/scanf/scanf.c @@ -17,14 +17,7 @@ License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ -#include "config.h" - -#if HAVE_STDARG #include <stdarg.h> -#else -#include <varargs.h> -#endif - #include <stdio.h> #include "gmp.h" @@ -32,22 +25,11 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ int -#if HAVE_STDARG gmp_scanf (const char *fmt, ...) -#else -gmp_scanf (va_alist) - va_dcl -#endif { va_list ap; int ret; -#if HAVE_STDARG va_start (ap, fmt); -#else - const char *fmt; - va_start (ap); - fmt = va_arg (ap, const char *); -#endif ret = __gmp_doscan (&__gmp_fscanf_funs, stdin, fmt, ap); va_end (ap); diff --git a/scanf/sscanf.c b/scanf/sscanf.c index aeb31d06c..4de838856 100644 --- a/scanf/sscanf.c +++ b/scanf/sscanf.c @@ -17,14 +17,7 @@ License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ -#include "config.h" - -#if HAVE_STDARG #include <stdarg.h> -#else -#include <varargs.h> -#endif - #include <stdio.h> #include "gmp.h" @@ -32,24 +25,11 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ int -#if HAVE_STDARG gmp_sscanf (const char *s, const char *fmt, ...) -#else -gmp_sscanf (va_alist) - va_dcl -#endif { va_list ap; int ret; -#if HAVE_STDARG va_start (ap, fmt); -#else - const char *s; - const char *fmt; - va_start (ap); - s = va_arg (ap, const char *); - fmt = va_arg (ap, const char *); -#endif #if SSCANF_WRITABLE_INPUT /* let gmp_vsscanf handle the copying */ diff --git a/scanf/vfscanf.c b/scanf/vfscanf.c index 44685fe32..a17f8873d 100644 --- a/scanf/vfscanf.c +++ b/scanf/vfscanf.c @@ -17,14 +17,7 @@ License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ -#include "config.h" - -#if HAVE_STDARG #include <stdarg.h> -#else -#include <varargs.h> -#endif - #include <stdio.h> #include "gmp.h" diff --git a/scanf/vscanf.c b/scanf/vscanf.c index 5b7a964a6..242811c66 100644 --- a/scanf/vscanf.c +++ b/scanf/vscanf.c @@ -17,13 +17,7 @@ License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ -#include "config.h" - -#if HAVE_STDARG #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <stdio.h> diff --git a/scanf/vsscanf.c b/scanf/vsscanf.c index 80b31430f..a0f7aa60d 100644 --- a/scanf/vsscanf.c +++ b/scanf/vsscanf.c @@ -17,13 +17,7 @@ License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ -#include "config.h" - -#if HAVE_STDARG #include <stdarg.h> -#else -#include <varargs.h> -#endif #include <string.h> |