diff options
author | Mark McLoughlin <mark@skynet.ie> | 2001-11-18 17:03:33 +0000 |
---|---|---|
committer | Mark McLoughlin <mmclouglin@src.gnome.org> | 2001-11-18 17:03:33 +0000 |
commit | dbc004bc126258455d66170e8518f8d623b0067c (patch) | |
tree | e3494d0e72c08a6c5b80ab659bf915a9ffaa4267 /gobject/glib-mkenums.in | |
parent | 6425f5453d7054fc6e21af6fe7037d8053002b59 (diff) | |
download | glib-dbc004bc126258455d66170e8518f8d623b0067c.tar.gz |
allow the enums name to not be on the same line as the trailing '}'.
2001-11-16 Mark McLoughlin <mark@skynet.ie>
* glib-mkenums.in: allow the enums name to not be on the same
line as the trailing '}'. (#64714)
Diffstat (limited to 'gobject/glib-mkenums.in')
-rwxr-xr-x | gobject/glib-mkenums.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in index e58f90772..c0e31ca0d 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -27,6 +27,7 @@ sub parse_trigraph { sub parse_entries { my $file = shift; my $file_name = shift; + my $looking_for_name = 0; while (<$file>) { @@ -46,6 +47,13 @@ sub parse_entries { next if m@^\s*$@; # print STDERR "xxx $_\n"; + + if ($looking_for_name) { + if (/^\s*(\w+)/) { + $enumname = $1; + return 1; + } + } # Handle include files if (/^\#include\s*<([^>]*)>/ ) { @@ -74,6 +82,12 @@ sub parse_entries { return 1; } + if (/^\s*\}/) { + $enumindex++; + $looking_for_name = 1; + next; + } + if (m@^\s* (\w+)\s* # name (?:=( # value |