After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 50074 - Command line option parsing API
Command line option parsing API
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
1.3.x
Other All
: High enhancement
: ---
Assigned To: Havoc Pennington
Havoc Pennington
: 105674 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2000-12-15 23:37 UTC by Havoc Pennington
Modified: 2011-02-18 16:09 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Example source of a solution (2.09 KB, text/x-c)
2001-02-07 14:52 UTC, Wouter van Kleunen
Details
a more recent attempt by anders carlsson (5.80 KB, application/x-gtar )
2004-06-11 02:38 UTC, Matthias Clasen
Details

Description Havoc Pennington 2000-12-15 23:37:39 UTC
Implement an option parser; Havoc has this half done
Comment 1 Havoc Pennington 2001-01-29 19:27:47 UTC
Setting all outstanding bugs against 1.3.x to be due for the 2.0.0 milestone;
will go through and move some of them to API freeze milestone and set milestone
to none for punted features.
Comment 2 Havoc Pennington 2001-01-29 19:29:15 UTC
Moving GLib bugs with API keyword to the API freeze milestone
Comment 3 Wouter van Kleunen 2001-02-07 14:52:05 UTC
Created attachment 216 [details]
Example source of a solution
Comment 4 Havoc Pennington 2001-02-15 21:28:46 UTC
Not going to happen for 2.0
Comment 5 Matthias Clasen 2001-09-06 08:37:23 UTC
I just looked up an old mail containing a proposal by Tim. Its here:

http://mail.gnome.org/archives/gtk-devel-list/2000-May/msg00084.html
Comment 6 Matthias Clasen 2001-09-06 09:16:40 UTC
And here is a newer draft from Havoc:

http://mail.gnome.org/archives/gtk-devel-list/2001-
February/msg00088.html
Comment 7 Matthias Clasen 2003-02-10 19:21:08 UTC
*** Bug 105674 has been marked as a duplicate of this bug. ***
Comment 8 Matthias Clasen 2004-06-11 02:38:01 UTC
Created attachment 28577 [details]
a more recent attempt by anders carlsson
Comment 9 Matthias Clasen 2004-06-15 00:36:29 UTC
In discussion with Anders, a few missing features of his current code came up:
- add G_OPTION_ARG_NOPARSE to allow apps to add help strings for options of  
  libs which they use and which don't support GOption
- add a way to use GOption without parsing --help options, e.g. to reimplement
  gtk_init() using GOption
- add pre- and post-parse hooks to GOptionGroup so that we can add 
  GOptionGroup *gtk_get_options() and let the app do the parsing. the post-parse
  hook of the option group would then do the work of gtk_init()
Comment 10 Matthias Clasen 2004-08-03 19:21:26 UTC
Committed to HEAD now.