commit | f7c1de35882f1f6eddada222efd798f0b66b6dcf | [log] [tgz] |
---|---|---|
author | Rob Landley <rob@landley.net> | Tue Feb 07 22:25:59 2012 -0600 |
committer | Rob Landley <rob@landley.net> | Tue Feb 07 22:25:59 2012 -0600 |
tree | 33b51ce5f525648763de62e453cde7a0f991f165 | |
parent | e0bd691bdf3f1ce19dcebfe46d830a0fc408e3d5 [diff] |
More cmp.c shrinkage. Abuse loopfiles() to handle both arguments, caching the first pass in globals. That eliminates get_fd() since loopfiles already knows how to handle "-" arg. Chop toybuf in half and use half for each file, eliminating malloc/free. main() becomes just a call to loopfiles(), which does all open/close.