Commit Graph

21 Commits

Author SHA1 Message Date
Ryan Lortie
47805f4e0c Bug 617947 - glib-mkenums: add @valuenum@ support
Add a @valuenum@ substitution that outputs the integer value of a
particular enum value.  The value is determined by using (sandboxed)
perl to evaluate C expression.  If evaluation fails then glib-mkenums
dies loudly.  Evaluation is only enabled if '@valuenum@' appears in the
template file, so existing users will not be affected.
2010-05-06 14:21:39 -05:00
Ryan Lortie
7aa71527e5 glib-mkenums: Fix support for comment templates
Currently, specifying a comment template in the template file results in
the given template being appended to the default (C-style) one rather
than replacing it.

This causes it to be replaced outright.

Bug 617940.
2010-05-06 13:27:26 -05:00
Mart Raudsepp
924f1bc528 Accept -? for glib-mkenums.
Commit 789e260638 tried to add support for -?, but there is a typo
and instead -h was added when already present instead of -? for one
of the cases.
It works without this corrections, because all unrecognized options
trigger usage showing as well, but this is more correct.

This was bug 556706 originally.
2009-09-22 11:22:44 +03:00
Christian Persch
6d1474e7f1 Add @basename@ substitution to glib-mkenums
Since @filename@ contains the full filename as given to the glib-mkenum
command, possibly including path elements (e.g. when using a non-srcdir
build), it is unsuitable to use in a #include statement in the generated
file if one wants to distribute it. This patch adds @basename@ which
expands to the base name of the input filename. Bug #587307.
2009-07-03 20:50:27 +02:00
Matthias Clasen
789e260638 Adjust help output, accept -?, capitalize. Patch by Christian Dywan
* glib-mkenums.in: Adjust help output, accept -?, capitalize.
        Patch by Christian Dywan


svn path=/trunk/; revision=7930
2009-03-01 15:40:07 +00:00
Kristian Rietveld
1289b6d165 introduce an ENUMPREFIX substitution.
2008-06-23  Kristian Rietveld  <kris@imendio.com>

	* gobject/glib-mkenums.in: introduce an ENUMPREFIX substitution.

	* gio/gioenumtypes.h.template: use @ENUMPREFIX@ instead of
	hard coding "G" as prefix.


svn path=/trunk/; revision=7096
2008-06-23 12:06:39 +00:00
Matthias Clasen
5c3887f500 Don't shift ARGV[0] to undefined. (#466557, Aidan Delaney)
2007-11-08  Matthias Clasen <mclasen@redhat.com>

        * glib-mkenums.in: Don't shift ARGV[0] to undefined.
        (#466557, Aidan Delaney)



svn path=/trunk/; revision=5827
2007-11-08 14:57:15 +00:00
Tim Janik
49eacae2a3 applied patch from David Necas which introduces an underscore_name option
Tue Oct 10 12:06:08 2006  Tim Janik  <timj@gtk.org>

        * glib-mkenums.in:
        * glib-mkenums.1: applied patch from David Necas which introduces
        an underscore_name option and fixes #358734.
2006-10-10 10:10:43 +00:00
Tim Janik
08e3a830fb fixed to print usage and version info on STDOUT (#322502).
Tue Aug 29 13:27:33 2006  Tim Janik  <timj@gtk.org>

        * glib-mkenums.in: fixed to print usage and version info on STDOUT
        (#322502).

        * gobject.c (g_initially_unowned_init): restore ; after G_DEFINE_TYPE.
2006-08-29 11:29:24 +00:00
Matthias Clasen
12e2c276b5 Really fix #314890.
2005-10-03  Matthias Clasen  <mclasen@redhat.com>

	* glib-mkenums.in: Really fix #314890.
2005-10-03 15:46:15 +00:00
Matthias Clasen
a2b2c8143f Don't hang on '{' following a trigraph comment in the same line. (#314890,
2005-09-26  Matthias Clasen  <mclasen@redhat.com>

	* glib-mkenums.in: Don't hang on '{' following a trigraph comment
	in the same line.  (#314890, Mathias Hasselmann)
2005-09-26 15:19:24 +00:00
Matthias Clasen
39f7b0680c Avoid forcing extra newlines when using template files. (#171005)
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* glib-mkenums.in: Avoid forcing extra newlines when using
	template files.  (#171005)
2005-03-22 03:48:05 +00:00
Matthias Clasen
5868112a61 Actually convert escape chars in --vprod. (#139058, Christophe Saout)
2004-04-22  Matthias Clasen  <mclasen@redhat.com>

	* glib-mkenums.in: Actually convert escape chars in
	--vprod.   (#139058, Christophe Saout)
2004-04-22 21:02:34 +00:00
Matthias Clasen
5c57631f69 Support parsing of intializers containing macros with arguments. (#129717)
Fri Feb 27 01:49:22 2004  Matthias Clasen  <maclas@gmx.de>

	* glib-mkenums.in: Support parsing of intializers containing
	macros with arguments.  (#129717)
2004-02-27 00:49:56 +00:00
Murray Cumming
10bacd6058 Added a lowercase_name option, to be used next to the enum declaration,
2003-12-30  Murray Cumming  <murrayc@usa.net>

        * gobject/glib-mkenums.in: Added a lowercase_name option, to be used
        next to the enum declaration, where the flag option is already used,
        when it is not possible to guess where to put the underscores in the
        _get_type() function name, for instance for GNOMEVFSURIHide.
2003-12-30 10:42:57 +00:00
Matthias Clasen
a821e2c40e Support for template files. 2002-10-15 22:26:39 +00:00
Owen Taylor
648204c8bc Fix various bugs and excessive stack usage that crept in the conversion
Mon Mar 25 17:51:05 2002  Owen Taylor  <otaylor@redhat.com>

        * glib-mkenums.in (parse_entries): Fix various bugs and
        excessive stack usage that crept in the conversion from
        gtk-mkenums. (#74431)
2002-03-25 23:23:35 +00:00
Mark McLoughlin
dbc004bc12 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)
2001-11-18 17:03:33 +00:00
Owen Taylor
404bb824c9 Generate glib-mkenums from glib-mkenums.in, substituting in path to perl.
Mon Oct 29 11:05:15 2001  Owen Taylor  <otaylor@redhat.com>

	* glib-mkenums.in: Generate glib-mkenums from glib-mkenums.in,
	substituting in path to perl.  (#63093, Dan Winship)

	* Makefile.am (bin_SCRIPTS): Remove hack to copy glib-mkenums
	from srcdir.

Mon Oct 29 10:59:36 2001  Owen Taylor  <otaylor@redhat.com>

	* configure.in: Check for path to Perl, add gobject/glib-mkenums
2001-10-29 16:13:36 +00:00
Tim Janik
1ffd953c39 removed \v escaping, newer perl versions don't support this, and it'S
Mon Apr 30 20:03:56 2001  Tim Janik  <timj@gtk.org>

        * glib-mkenums (usage): removed \v escaping, newer perl versions don't
        support this, and it'S probably useless anyways.
2001-04-30 17:59:47 +00:00
Tim Janik
abc5cbbe3e made hook ids a gulong.
Sun Apr 29 00:37:34 2001  Tim Janik  <timj@gtk.org>

        * ghook.[hc]: made hook ids a gulong.

Sat Apr 28 23:39:42 2001  Tim Janik  <timj@gtk.org>

        * gsignal.[hc]: made signal handler and emission hook ids gulongs.
        (signal_handlers_foreach_matched_R): only invoke callback for handlers
        that are not disconnected (id>0).
        (signal_emit_R): prevent invocation of signal handlers during the
        emission they were connected within.

        * glib-mkenums: publically installed perl-script to parse C code
        enums and generate descriptions thereof.
        * glib-mkenums.1: assorted man page.
2001-04-29 03:04:27 +00:00