On Tue, Jan 06, 2009 at 12:11:09AM +0000, Miklos Vajna wrote: > +static int option_parse_no_empty(const struct option *opt, > + const char *arg, int unset) > +{ > + struct dir_struct *dir = opt->value; > + > + dir->hide_empty_directories = 1; > + > + return 0; > +} Should be option_parse_empty and deal with "unset" to know if `no-` was prefixed to it or not. > + { OPTION_CALLBACK, 0, "no-empty-directory", &dir, NULL, > + "do not list empty directories", This should be "empty-directory" and "list empty directories as well" I've not checked if you could also check more of the "unsets" things in your callbacks as well btw, but it looks like it could. -- ·O· Pierre Habouzit ··O madcoder@xxxxxxxxxx OOO http://www.madism.org
Attachment:
pgpt7O0SIpOAu.pgp
Description: PGP signature