summaryrefslogtreecommitdiffstats
path: root/genchksum.txr
Commit message (Collapse)AuthorAgeFilesLines
* chksum: generate more with TXR.Kaz Kylheku2023-07-091-4/+35
| | | | | | | | * genchksum.txr, chksum.c: The declarations of the symbol variables, COBJ class handles, and most of the chksum_init function is also generated now. A comment is added explaining what parts of the file are generated, and what parts are scraped, and giving some advice to the maintainer.
* chksum: generate with TXR.Kaz Kylheku2023-07-091-0/+235
A giant macro that generates numerous functions and variables is hell for anyone who has to debug the code. The right approach is external code generation, where the result is a clean source file that is checked into the repository. * genchksum.txr: New file. * chksum.c: Now generated. (chksum_impl): Macro and its invocations removed. (sha1_stream_impl, sha1_stream, sha1_szmax_upd, sha1_buf, sha1_str, sha1, sha1_ops, sha1_begin, sha1_utf8_byte_callback, sha1_hash, sha1_end): These are directly defined again. (sha256_stream_impl, sha256_stream, sha256_szmax_upd, sha256_buf, sha256_str, sha256, sha256_ops, sha256_begin, sha256_utf8_byte_callback, sha256_hash, sha256_end): Likewise. generated by macro. md5_stream_impl, md5_stream, md5_szmax_upd, md5_buf, md5_str, md5, md5_ops, md5_begin, md5_utf8_byte_callback, md5_hash, md5_end): Likewise.