Re: [AD] al_parse_command_line()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, Dec 20, 2001 at 05:05:56PM +0100, Lo'oRiS il Kabukimono wrote:
> > - there is something called getopts which do that
> man getopts for me returns only a bash builtin... is that?

That uses it -- note that the manual is in multiple sections,
which are searched in a particular order; `getopt' is in more
than one section, so by default you only see the command in
section 1.  If you do:

    man 3 getopt

you'll see the C function.  "man 7 man" has a list of sections,
in my manual.

In terms of command line parsing, I don't find complicated
command lines useful -- these days people (especially in
Windows) expect to run programs without passing a command line.
For things like resolution settings, config files work much
better (and they're more permanent).  X has always had a
`standard' command line syntax, the idea being that all X apps can be
placed on a particular server (using --display), in a particular
location (using --geometry), and so on.  Again, I don't find
this very useful. :)  [Allegro doesn't support it AFAIK, and it
would be a real pain to do.]  Generally, I think the command
line should be for app-specific switches, and I find it annoying
when libraries use it themselves.

George



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/