summaryrefslogtreecommitdiff
path: root/scanf
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-12-07 23:52:59 +0100
committerKevin Ryde <user42@zip.com.au>2003-12-07 23:52:59 +0100
commit5e8cedbd90a138621d02daf6021de02eba1a3426 (patch)
treeb6d59a0d9694372f505c59b5148a3d076424f67d /scanf
parent667009594f09faced0cbd8547e22357e75f5a8aa (diff)
downloadgmp-5e8cedbd90a138621d02daf6021de02eba1a3426.tar.gz
Revert this:
* scanf/sscanffuns.c (scan): Take varargs per gmp_doscan_scan_t, to avoid any possible problems with a varargs call to a fixargs function. vsscanf is not available everywhere, need another approach.
Diffstat (limited to 'scanf')
-rw-r--r--scanf/sscanffuns.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/scanf/sscanffuns.c b/scanf/sscanffuns.c
index f5dff8385..9152c1cc9 100644
--- a/scanf/sscanffuns.c
+++ b/scanf/sscanffuns.c
@@ -27,37 +27,11 @@ MA 02111-1307, USA. */
#include "gmp.h"
#include "gmp-impl.h"
-#if HAVE_STDARG
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
static int
-#if HAVE_STDARG
-scan (const char **sp, const char *fmt, ...)
-#else
-scan (va_alist)
- va_dcl
-#endif
+scan (const char **sp, const char *fmt, void *p1, void *p2)
{
- va_list ap;
- int ret;
-#if HAVE_STDARG
- va_start (ap, fmt);
-#else
- const char **sp;
- const char *fmt;
- va_start (ap);
- sp = va_arg (ap, const char **);
- fmt = va_arg (ap, const char *);
-#endif
-
- ret = vsscanf (*sp, fmt, ap);
-
- va_end (ap);
- return ret;
+ return sscanf (*sp, fmt, p1, p2);
}
static void