Making the best CLI programs - Programming On Unix
Users browsing this thread: 6 Guest(s)
|
|||
(15-10-2021, 12:49 PM)freem Wrote: This tool (sorry z3bra) also seems to only support power of two units, not power of 10 ones (unit(1) might be able to do that, though, not sure). Haha no problem. That's not like I take it personally. I wrote this tool because I didn't find it convenient to fireup bc(1) everytime a tool didn't display file size/bandwidth properly. For arguments, I use arg.h, a simple macro-based flag parser. It only supports short flags, which is more than enough to me. It's fairly simple to understand and use, and doesn't clutter the code. See it in action here: safe.c:386. |
|||