Mercurial > hg > toybox
comparison lib/args.c @ 624:1e8b9acdafeb
Genericize llist code a bit: rename llist_free() to llist_traverse(), and no longer accept NULL as a synonym for free.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 15 Jul 2012 17:22:04 -0500 |
parents | c2f39708a4c4 |
children | 4d9fa8b8a300 |
comparison
equal
deleted
inserted
replaced
623:f51beec92738 | 624:1e8b9acdafeb |
---|---|
411 gof.minargs, letters[!(gof.minargs-1)]); | 411 gof.minargs, letters[!(gof.minargs-1)]); |
412 } | 412 } |
413 if (toys.optc>gof.maxargs) | 413 if (toys.optc>gof.maxargs) |
414 error_exit("Max %d argument%s", gof.maxargs, letters[!(gof.maxargs-1)]); | 414 error_exit("Max %d argument%s", gof.maxargs, letters[!(gof.maxargs-1)]); |
415 if (CFG_HELP) toys.exithelp = 0; | 415 if (CFG_HELP) toys.exithelp = 0; |
416 | |
417 if (CFG_TOYBOX_FREE) { | |
418 llist_traverse(gof.opts, free); | |
419 llist_traverse(gof.longopts, free); | |
420 } | |
416 } | 421 } |