diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2009-04-13 16:51:25 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2009-04-13 16:51:25 +0200 |
commit | d7972803147a99fe2b1fddaac44bd32cf3aed6d3 (patch) | |
tree | 6eee584ff81572f979395dd40e402f745a2aedd2 /scanf | |
parent | d74cb5ff45b0aa9efb48d20791c13804796dc9e8 (diff) | |
download | gmp-d7972803147a99fe2b1fddaac44bd32cf3aed6d3.tar.gz |
Try simpler variant of scan().
Diffstat (limited to 'scanf')
-rw-r--r-- | scanf/sscanffuns.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/scanf/sscanffuns.c b/scanf/sscanffuns.c index 4ccc30096..2f7dfcae5 100644 --- a/scanf/sscanffuns.c +++ b/scanf/sscanffuns.c @@ -4,7 +4,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright 2001, 2002, 2003, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,6 +27,20 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include "gmp-impl.h" +#if 1 +static int +scan (const char **sp, const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start(ap, fmt); + ret = vsscanf(*sp, fmt, ap); + va_end(ap); + + return ret; +} +#else static int scan (const char **sp, const char *fmt, ...) { @@ -44,6 +58,7 @@ scan (const char **sp, const char *fmt, ...) return ret; } +#endif static void step (const char **sp, int n) |