diff options
Diffstat (limited to 'toys/other/base64.c')
-rw-r--r-- | toys/other/base64.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/toys/other/base64.c b/toys/other/base64.c index 22652fd0..e6c936b6 100644 --- a/toys/other/base64.c +++ b/toys/other/base64.c @@ -4,9 +4,9 @@ * * See https://tools.ietf.org/html/rfc4648 -// These optflags have to match. Todo: cleanup and collapse together? -USE_BASE64(NEWTOY(base64, "diw#<0=76[!dw]", TOYFLAG_USR|TOYFLAG_BIN)) -USE_BASE32(NEWTOY(base32, "diw#<0=76[!dw]", TOYFLAG_USR|TOYFLAG_BIN)) +// These optflags have to match. TODO: cleanup and collapse together? +USE_BASE64(NEWTOY(base64, "diw#<0=76[!dw]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LINEBUF)) +USE_BASE32(NEWTOY(base32, "diw#<0=76[!dw]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LINEBUF)) config BASE64 bool "base64" @@ -39,6 +39,7 @@ config BASE32 GLOBALS( long w; + unsigned total; unsigned n; // number of bits used in encoding. 5 for base32, 6 for base64 unsigned align; // number of bits to align to |