From 18efeb320b763e541a7dbf61a7da1cbe13ab2be9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 16 Apr 2012 16:03:45 -0400 Subject: new scanf implementation and corresponding integer parser/converter advantages over the old code: - correct results for floating point (old code was bogus) - wide/regular scanf separated so scanf does not pull in wide code - well-defined behavior on integers that overflow dest type - support for %[a-b] ranges with %[ (impl-defined by widely used) - no intermediate conversion of fmt string to wide string - cleaner, easier to share code with strto* functions - better standards conformance for corner cases the old code remains in the source tree, as the wide versions of the scanf-family functions are still using it. it will be removed when no longer needed. --- src/internal/intscan.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/internal/intscan.h (limited to 'src/internal/intscan.h') diff --git a/src/internal/intscan.h b/src/internal/intscan.h new file mode 100644 index 00000000..994c5e7d --- /dev/null +++ b/src/internal/intscan.h @@ -0,0 +1,8 @@ +#ifndef INTSCAN_H +#define INTSCAN_H + +#include + +unsigned long long __intscan(FILE *, unsigned, int, unsigned long long); + +#endif -- cgit v1.2.1