MMgr v2.3.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
praet_praefinitum.h File Reference

Every knob this module reads, what it takes when the caller did not set it, and the warning that says so. More...

Go to the source code of this file.

Macros

#define PRAET_CHANNELS
 Logical channels one context carries.
#define PRAET_UNSET_CHANNELS
#define PRAET_SETTLE_MICROS
 Microseconds the engine spends in its settle before it will take a transfer.
#define PRAET_UNSET_SETTLE_MICROS
#define PRAET_KEEPALIVE_MICROS
 Microseconds an active channel may go with no kick from the port before it reads stalled.
#define PRAET_UNSET_KEEPALIVE_MICROS
#define PRAET_RECOVERY
 Whether a stalled transfer can go back or come out scrubbed.
#define PRAET_UNSET_RECOVERY

Detailed Description

Every knob this module reads, what it takes when the caller did not set it, and the warning that says so.

Author
dstroy0 (Douglas Quigg) dquig.nosp@m.g123.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Date
2026-09-01
Note
A knob that quietly takes a default is how a build breaks in a way nobody traces back. Three knobs get set, two do not, the part misbehaves, and the compiler said nothing.
Nothing here stops the build. Every unset knob takes its default, raises a warning that names itself and the value it took, and leaves a flag behind. praet_iudex.h reads those flags at the end and stops once, with a list of what to go fix.
That order is essential. An #error halts its translation unit where it is. A build with four knobs unset reports one, gets a fix, and reports the next. That is four rounds to learn four facts that were all known on the first. A warning here and a stop at the end passes the whole basket over at once.
Nothing about it needs a build system. It is preprocessor directives. A bare gcc or clang on one file behaves the same way as any tree that drives them. A build that continues past an error reaches across translation units on top of this. That is a separate half of the same idea and not something this depends on.
#warning is a GNU and clang directive and is standard from C23. This library targets those two compilers and no others, and so it is available everywhere this builds.
Every message is a #warning directive, with no macro over _Pragma. GCC's warning pragma retains only the first string literal after it. A message written as adjacent literals arrives cut off at the first one. That still reads as a finished sentence and still passes a check written against its first words. A #warning takes the rest of the line and arrives whole.
Warning
A directive cannot come out of a macro expansion, and so this only works where the report sits at file scope. Every knob here does. The one report that fires from inside a macro is the boundary word answer at a declaration, and praet_ordo.h reaches that a different way.
No message interpolates a macro. Neither #warning nor the pragma expands one. A name in the middle of a message arrives as the name of the macro, and its value never appears.

Definition in file praet_praefinitum.h.