diff --git a/gobject/ChangeLog b/gobject/ChangeLog index c4f738b96..b4c2587b2 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,10 @@ +2009-03-01 Matthias Clasen + + Bug 556706 – Inconsistent help arguments -h, -? + + * glib-mkenums.in: Adjust help output, accept -?, capitalize. + Patch by Christian Dywan + 2009-02-17 Matthias Clasen * === Released 2.19.8 === diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in index 3c2912ed5..9bb5aa90c 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -133,30 +133,33 @@ sub version { exit 0; } sub usage { - print "Usage: glib-mkenums [options] [files...]\n"; - print " --fhead output file header\n"; - print " --fprod per input file production\n"; - print " --ftail output file trailer\n"; - print " --eprod per enum text (produced prior to value itarations)\n"; - print " --vhead value header, produced before iterating over enum values\n"; - print " --vprod value text, produced for each enum value\n"; - print " --vtail value tail, produced after iterating over enum values\n"; - print " --comments comment structure\n"; - print " --template file template file\n"; - print " -h, --help show this help message\n"; - print " -v, --version print version informations\n"; + print "Usage:\n"; + print " glib-mkenums [OPTION...] [FILES...]\n\n"; + print "Help Options:\n"; + print " -h, --help Show this help message\n\n"; + print "Utility Options:\n"; + print " --fhead Output file header\n"; + print " --fprod Per input file production\n"; + print " --ftail Output file trailer\n"; + print " --eprod Per enum text (produced prior to value itarations)\n"; + print " --vhead Value header, produced before iterating over enum values\n"; + print " --vprod Value text, produced for each enum value\n"; + print " --vtail Value tail, produced after iterating over enum values\n"; + print " --comments Comment structure\n"; + print " --template file Template file\n"; + print " -v, --version Print version informations\n\n"; print "Production text substitutions:\n"; - print " \@EnumName\@ PrefixTheXEnum\n"; - print " \@enum_name\@ prefix_the_xenum\n"; - print " \@ENUMNAME\@ PREFIX_THE_XENUM\n"; - print " \@ENUMSHORT\@ THE_XENUM\n"; - print " \@ENUMPREFIX\@ PREFIX\n"; - print " \@VALUENAME\@ PREFIX_THE_XVALUE\n"; - print " \@valuenick\@ the-xvalue\n"; - print " \@type\@ either enum or flags\n"; - print " \@Type\@ either Enum or Flags\n"; - print " \@TYPE\@ either ENUM or FLAGS\n"; - print " \@filename\@ name of current input file\n"; + print " \@EnumName\@ PrefixTheXEnum\n"; + print " \@enum_name\@ prefix_the_xenum\n"; + print " \@ENUMNAME\@ PREFIX_THE_XENUM\n"; + print " \@ENUMSHORT\@ THE_XENUM\n"; + print " \@ENUMPREFIX\@ PREFIX\n"; + print " \@VALUENAME\@ PREFIX_THE_XVALUE\n"; + print " \@valuenick\@ the-xvalue\n"; + print " \@type\@ either enum or flags\n"; + print " \@Type\@ either Enum or Flags\n"; + print " \@TYPE\@ either ENUM or FLAGS\n"; + print " \@filename\@ name of current input file\n"; exit 0; } @@ -220,17 +223,17 @@ if (!defined $ARGV[0]) { while ($_=$ARGV[0],/^-/) { shift; last if /^--$/; - if (/^--template$/) { read_template_file (shift); } - elsif (/^--fhead$/) { $fhead = $fhead . shift } - elsif (/^--fprod$/) { $fprod = $fprod . shift } - elsif (/^--ftail$/) { $ftail = $ftail . shift } - elsif (/^--eprod$/) { $eprod = $eprod . shift } - elsif (/^--vhead$/) { $vhead = $vhead . shift } - elsif (/^--vprod$/) { $vprod = $vprod . shift } - elsif (/^--vtail$/) { $vtail = $vtail . shift } - elsif (/^--comments$/) { $comment_tmpl = shift } - elsif (/^--help$/ || /^-h$/) { usage; } - elsif (/^--version$/ || /^-v$/) { version; } + if (/^--template$/) { read_template_file (shift); } + elsif (/^--fhead$/) { $fhead = $fhead . shift } + elsif (/^--fprod$/) { $fprod = $fprod . shift } + elsif (/^--ftail$/) { $ftail = $ftail . shift } + elsif (/^--eprod$/) { $eprod = $eprod . shift } + elsif (/^--vhead$/) { $vhead = $vhead . shift } + elsif (/^--vprod$/) { $vprod = $vprod . shift } + elsif (/^--vtail$/) { $vtail = $vtail . shift } + elsif (/^--comments$/) { $comment_tmpl = shift } + elsif (/^--help$/ || /^-h$/ || /^-h$/) { usage; } + elsif (/^--version$/ || /^-v$/) { version; } else { usage; } last if not defined($ARGV[0]); }