cvs commit: src/usr.sbin/pkg_install/add main.c pkg_add.1
src/usr.sbin/pkg_install/create main.c pkg_create.1
src/usr.sbin/pkg_install/delete main.c pkg_delete.1
src/usr.sbin/pkg_install/info main.c pkg_info.1 ...
M. Warner Losh
imp at bsdimp.com
Fri Jun 6 14:28:41 UTC 2008
: It's not your call either. We have style(9), which says:
Thus quote he from the holy book of style, section nine, verses 127-134
: For consistency, getopt(3) should be used to parse options. Options
: should be sorted in the getopt(3) call and the switch statement,
: unless
: parts of the switch cascade. Elements in a switch statement that
: cascade
: should have a FALLTHROUGH comment. Numerical arguments should be
: checked
: for accuracy. Code that cannot be reached should have a
: NOTREACHED com-
: ment.
:
: There is nothing about getopt_long(3) being acceptable
: replacement/addition to the getopt(3).
Style(9) is about documenting the normative style of the project.
While we prefer people to use it, it isn't religious dogma.
getopt_long() is in the spirit of style(9) which is trying to say
"don't be a dumb-ass and write your own argument parsing routine."
Warner
More information about the cvs-src
mailing list