Commit graph

12 commits

Author SHA1 Message Date
Roger Crew
0c534fb806 dbio_scanf -> dbio_scxnf
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
2025-09-30 23:03:42 -07:00
H. Peter Anvin
495cd63da7 Propagate Num everywhere (3b / Type handling cleanup)
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))
2025-09-30 23:03:42 -07:00
H. Peter Anvin
9246b306aa Propagate PRI*N,SCN*N everywhere (3b / Type handling cleanup)
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)
2025-09-30 23:03:42 -07:00
Roger Crew
2aa5ab682e mark nonreturning functions
we can now remove useless "NOTREACHED" and post-panic() control flow
2025-09-30 23:03:40 -07:00
Roger Crew
90813ffba6 mark unused parameters and variables 2025-09-30 23:03:40 -07:00
Roger Crew
32dd7127d5 function prototype and missing header fixes 2025-09-13 14:53:30 -07:00
Roger Crew
dc99267723 mark fall throughs 2025-09-03 22:11:59 -07:00
Roger Crew
bd0aa66cf0 cvs log keep PARC entries only
All of the Sourceforge-era log entries are in git
so there's no point to having them repeated in the files.
2024-12-30 03:02:52 -08:00
nop
c8db442950 Merge UNSAFE_OPTS (ref fixups); fix Log tag placement to fit CVS whims 1998-12-14 13:17:26 +00:00
nop
4e8941e8c2 Merge UNSAFE_OPTS (r5) after extensive testing. 1997-07-07 03:24:53 +00:00
nop
9cf5366eb0 GNU Indent normalization 1997-03-03 04:18:21 +00:00
nop
a515162931 Initial revision 1997-03-03 03:44:59 +00:00