scanf has too many annoying behaviors so we are replacing it.
E.g., Pavel was unhappy about %* specs not being counted in the
return value and was having to add 'dummy' variables all over.
I myself am unhappy about how you can put a \n at the end of a pattern
giving the false sense that you want it to match a newline when in
fact there's no guarantee of that at all, or that, in ANY pattern with
characters after the last % spec that you'll have any idea whether
those characters were reached or not (hence the need for all of these
%c-at-the-end bullshit patterns)
But worst of all, you cannot count on E_RANGE errors being raised when
they're needed because there's disagreement about when that should
happen, putting this in the realm of undefined behavior (hence certain
vendors putting deprecation warnings on %d and all of the other integer
conversions)
So.., fuck it. We write our own function from the ground up that does
what we need (and very little more) and will thence be completely
portable (knock wood).
Well okay, it still relies on strtoimax() continuing to behave sensibly.
We'll see how that goes.
--wrog
this subphase: Do all of the int(32_t)->Num retypings.
!(- use C99-like macros for printf)
!(- use [u]int*_t types (autoconf can verify they exist))
- abstract Num and Objid out
- default to 64 bit integers
!(- un-pointerify floating-point numbers (makes no sense on modern hardware))
this subphase: Fix all of the printf/scanf format strings.
!(- use C99-like macros for printf)
!(- use [u]int*_t types (autoconf can verify they exist))
- abstract Num and Objid out
- default to 64 bit integers
!(- un-pointerify floating-point numbers (makes no sense on modern hardware))
- - from james
Kenny's fixes to get it to load Minimal.db and JHCore. (1)
(evidently Kenny found two PRI*N goofs in db_file.c --wrog)