Close

Design: Code and semantic cleanups

A project log for reprint: modern printf

reprint is printf redone with decades of hindsight, revamping the semantics and syntax to make a function worthy of Hello World.

analog-twoAnalog Two 08/10/2015 at 07:190 Comments

When specifying a pointer to data, the data may be packed in one of two ways: tightly backed (no padding) and C struct{} style padding. Originally I had separate functions for choosing which padding to use (e.g. reprintf_struct vs reprintf_packed) but adding some packing directive flags to the syntax makes these extra functions unnecessary.

The test program "checker" reads the test data in JSON format and tightly packs the data, which made testing this feature very straightforward.

Discussions