Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin/base64: modernize the demo program #115

Closed
aklomp opened this issue Nov 3, 2022 · 0 comments
Closed

bin/base64: modernize the demo program #115

aklomp opened this issue Nov 3, 2022 · 0 comments
Assignees

Comments

@aklomp
Copy link
Owner

aklomp commented Nov 3, 2022

The library has long contained a demo program, bin/base64.c, that gives a working demonstration of how the library could be used. The program intentionally mimics the behavior of GNU Coreutils base64.

This program is pretty old and is not as polished or well-written as it could be. Improve it in the following ways:

  • Use stdbool types for returning success/fail from functions.
  • Add more comments to explain what is going on.
  • Add proper command line options parsing, and add a help function.
  • Default to printing encoded output in 76-char columns, like GNU Coreutils base64 does.
  • Print all error messages to stderr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant