I vote for moving to getopt_long or the moral equivalent (I'm not familiar with GOptions).
The options for capinfos at least seem quite random. It would be very nice to be able to create some switches with meaningful names. Something that I could remember the meanings of when I read my scripts again a month later. :-)
-Andrew Feren
acferen@xxxxxxxxx
----- Original Message ----
> From: Guy Harris <guy@xxxxxxxxxxxx>
> To: wireshark-dev@xxxxxxxxxxxxx
> Sent: Monday, April 14, 2008 4:26:05 PM
> Subject: [Wireshark-dev] Switching to getopt_long() - or to g_option?
>
> bugzilla-daemon@xxxxxxxxxxxxx wrote:
>
> > --- Comment #1 from Andrew Feren 2008-04-14 11:35:31 GMT
> ---
> > The choice of -x for the commandline argument was arbitrary. I didn't see any
> > particular reasoning for the other switch choices so I started at z and worked
> > backwards until I found an unused letter.
>
> Should we switch from using getopt() to using getopt_long()? It's
> available in most Linux distributions (as it's in glibc), newer versions
> of most if not all *BSDs as well as Mac OS X, and newer versions of
> Solaris, and we could supply the glibc version on platforms that lack it
> (we're already supplying the glibc version of getopt() on Windows, which
> is probably the only platform we run on that lacks getopt()).
>
> That would let us have multi-character strings for options, and still
> support single-character aliases for the options we already support (and
> add single-character aliases for options we think would be frequently used).
>
> Or, alternatively, now that we've dropped support for GLib 1.2[.x], we
> could just use the GOptions command-line parser in GLib, although that
> would also require that we drop support for GLib 2.x prior to GLib 2.6.
> For Wireshark, that *might* let us use gtk_init_with_args() rather
> than gtk_init(), if we do the main argument parsing at the time we're
> calling gtk_init(), although we still have to do the "pre-parse" before
> calling gtk_init_with_args().
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>