Skip to content

Commit

Permalink
Fixes #32: Now using a convenient uniform gadget for the inner implem…
Browse files Browse the repository at this point in the history
…entation for all library functions. Also, this merits a version bump.

* Added: An `output_gadget_t` struct
* Added: Named constructor idioms for `output_gadget_t`, instead of the function wrappers we have before: For `putchar_()` output, buffer output, discarding/no output, and arbitrary function output.
* Implementation functions no longer need to maintain and pass around the parameters `buffer`, `maxlen`, `idx` - these are part of the uniform output gadget
* Implementation functions no longer need to increase the position within the output (`idx)`, nor return the increased value to their caller.
* No longer need a dummy buffer of size 1, anywhere.
  • Loading branch information
eyalroz committed Feb 21, 2022
1 parent 0dfd2dd commit 919ee0a
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 115 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(
LANGUAGES C
DESCRIPTION "Self-contained C implementation of printf, vprintf, sprintf and related functions"
HOMEPAGE_URL /~https://github.com/eyalroz/printf
VERSION 5.3.0
VERSION 6.0.0
)

option(BUILD_TESTS "Build test programs for the library" OFF)
Expand Down
Loading

0 comments on commit 919ee0a

Please sign in to comment.