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.

* 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 Jan 24, 2022
1 parent 977ab81 commit ae6b699
Showing 1 changed file with 166 additions and 118 deletions.
Loading

0 comments on commit ae6b699

Please sign in to comment.