|
From: | Antonio Diaz Diaz |
Subject: | [Bayonne-devel] Command line argument parsing in Bayonne is non-standard |
Date: | Sun, 05 Aug 2007 19:35:06 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905 |
Hello, I am Antonio Diaz, maintainer of some GNU packages.I have noticed that Bayonne's code for parsing command line arguments lacks some features of POSIX and GNU standards. For example, short options can't be grouped, long option names have to be complete (unambiguous prefixes are rejected), etc.
I have written Arg_parser, a parser class for command line arguments that is both safe and easy to use. Arg_parser does not use the functions getopt nor getopt_long, and avoids all their inconvenients. For example, it does not use global variables, you no more have to maintain a long_options struct and a separated options string, etc.
At least four GNU programs are currently using Arg_parser, and I expect this number to grow soon.
Here https://savannah.nongnu.org/projects/arg-parser/ you can find a description of Arg_parser. If you like it, you may use it in Bayonne or any other project. If you need help switching to Arg_parser, I can send you a patch for bayonne2-2.3.2.
Regards, Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |