Imported Upstream version 1.59.2 upstream/1.59.2
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 10 Jan 2019 04:16:39 +0000 (13:16 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 10 Jan 2019 04:16:39 +0000 (13:16 +0900)
65 files changed:
Makefile-gir.am
Makefile-giscanner.am
Makefile.in
NEWS
common.mk
configure
configure.ac
docs/g-ir-compiler.1
docs/g-ir-generate.1
docs/reference/Makefile.am
docs/reference/Makefile.in
docs/reference/html/gi-Version-Information.html
docs/reference/html/index.html
docs/reference/version.xml
gir/cairo-1.0.gir.in
gir/gio-2.0.c
gir/glib-2.0.c
gir/gobject-2.0.c
gir/meson.build
girepository/cmph/cmph_time.h
girepository/cmph/meson.build
girepository/girepository.c
girepository/giversion.h
girepository/meson.build
giscanner/_version.py
giscanner/ccompiler.py
giscanner/codegen.py
giscanner/doctemplates/devdocs/Gjs/method.tmpl [new file with mode: 0644]
giscanner/docwriter.py
giscanner/girparser.py
giscanner/meson.build
giscanner/scannerlexer.c
giscanner/scannerlexer.l
giscanner/scannerparser.c
giscanner/scannerparser.h
giscanner/sourcescanner.py
giscanner/transformer.py
gobject-introspection-1.0.pc
gobject-introspection-no-export-1.0.pc
meson.build
meson_options.txt
misc/update-glib-annotations.py
tests/Makefile.in
tests/gi-tester
tests/gimarshallingtests.h
tests/meson.build
tests/offsets/Makefile.am
tests/offsets/Makefile.in
tests/offsets/gen-gitestoffsets [deleted file]
tests/offsets/gitestoffsets.c [new file with mode: 0644]
tests/offsets/meson.build
tests/repository/meson.build
tests/scanner/Makefile.am
tests/scanner/Makefile.in
tests/scanner/annotationparser/Makefile.in
tests/scanner/annotationparser/meson.build
tests/scanner/meson.build
tests/scanner/test_ccompiler.py [new file with mode: 0644]
tests/scanner/test_docwriter.py [new file with mode: 0644]
tests/scanner/test_sourcescanner.py
tests/scanner/test_transformer.py
tests/warn/Makefile.in
tools/compiler.c
tools/generate.c
tools/meson.build

index c7eb377..36c8dc6 100644 (file)
@@ -157,7 +157,7 @@ GIO_LIBRARY=gio-2.0
 
 if HAVE_GIO_UNIX
 GIO_UNIX_INCLUDEDIR = $(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0
-GIO_UNIX_HDRS = $(GIO_UNIX_INCLUDEDIR)/gio/*.h
+GIO_UNIX_HDRS = $(wildcard $(GIO_UNIX_INCLUDEDIR)/gio/*.h)
 GIO_UNIX_PACKAGES = gio-unix-2.0
 else
 GIO_UNIX_INCLUDEDIR =
@@ -213,12 +213,13 @@ GIRepository_2_0_gir_CFLAGS = \
     -I$(top_builddir)/girepository \
     -DGI_COMPILATION
 GIRepository_2_0_gir_FILES = \
-        $(top_srcdir)/girepository/girepository.h   \
-        $(top_srcdir)/girepository/girepository.c   \
-        $(top_srcdir)/girepository/gi*info.c       \
-        $(top_srcdir)/girepository/gi*info.h       \
-        $(top_builddir)/girepository/giversion.h    \
-        $(top_srcdir)/girepository/gitypelib.h     \
+        $(top_srcdir)/girepository/girepository.h \
+        $(top_srcdir)/girepository/girepository.c \
+        $(wildcard $(top_srcdir)/girepository/gi*info.c) \
+        $(wildcard $(top_srcdir)/girepository/gi*info.h) \
+        $(top_srcdir)/girepository/giversion.c \
+        $(top_builddir)/girepository/giversion.h \
+        $(top_srcdir)/girepository/gitypelib.h \
         $(top_srcdir)/girepository/gitypes.h
 
 BUILT_GIRSOURCES += GIRepository-2.0.gir
index e78df42..8f1fd2a 100644 (file)
@@ -122,6 +122,7 @@ nobase_dist_template_DATA =         \
        giscanner/doctemplates/devdocs/Gjs/enum.tmpl            \
        giscanner/doctemplates/devdocs/Gjs/function.tmpl        \
        giscanner/doctemplates/devdocs/Gjs/interface.tmpl       \
+       giscanner/doctemplates/devdocs/Gjs/method.tmpl          \
        giscanner/doctemplates/devdocs/Gjs/namespace.tmpl
 
 _giscanner_la_CFLAGS = \
index 500c810..32693b5 100644 (file)
@@ -1026,7 +1026,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -1059,7 +1059,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
@@ -1389,6 +1389,7 @@ nobase_dist_template_DATA = \
        giscanner/doctemplates/devdocs/Gjs/enum.tmpl            \
        giscanner/doctemplates/devdocs/Gjs/function.tmpl        \
        giscanner/doctemplates/devdocs/Gjs/interface.tmpl       \
+       giscanner/doctemplates/devdocs/Gjs/method.tmpl          \
        giscanner/doctemplates/devdocs/Gjs/namespace.tmpl
 
 _giscanner_la_CFLAGS = \
@@ -1517,7 +1518,7 @@ GIO_LIBRARY = gio-2.0
 @HAVE_GIO_UNIX_FALSE@GIO_UNIX_INCLUDEDIR = 
 @HAVE_GIO_UNIX_TRUE@GIO_UNIX_INCLUDEDIR = $(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0
 @HAVE_GIO_UNIX_FALSE@GIO_UNIX_HDRS = 
-@HAVE_GIO_UNIX_TRUE@GIO_UNIX_HDRS = $(GIO_UNIX_INCLUDEDIR)/gio/*.h
+@HAVE_GIO_UNIX_TRUE@GIO_UNIX_HDRS = $(wildcard $(GIO_UNIX_INCLUDEDIR)/gio/*.h)
 @HAVE_GIO_UNIX_FALSE@GIO_UNIX_PACKAGES = 
 @HAVE_GIO_UNIX_TRUE@GIO_UNIX_PACKAGES = gio-unix-2.0
 GIO_CINCLUDES = $(patsubst $(GIO_UNIX_INCLUDEDIR)/%,--c-include='%',$(wildcard $(GIO_UNIX_HDRS)))
@@ -1563,12 +1564,13 @@ GIRepository_2_0_gir_CFLAGS = \
     -DGI_COMPILATION
 
 GIRepository_2_0_gir_FILES = \
-        $(top_srcdir)/girepository/girepository.h   \
-        $(top_srcdir)/girepository/girepository.c   \
-        $(top_srcdir)/girepository/gi*info.c       \
-        $(top_srcdir)/girepository/gi*info.h       \
-        $(top_builddir)/girepository/giversion.h    \
-        $(top_srcdir)/girepository/gitypelib.h     \
+        $(top_srcdir)/girepository/girepository.h \
+        $(top_srcdir)/girepository/girepository.c \
+        $(wildcard $(top_srcdir)/girepository/gi*info.c) \
+        $(wildcard $(top_srcdir)/girepository/gi*info.h) \
+        $(top_srcdir)/girepository/giversion.c \
+        $(top_builddir)/girepository/giversion.h \
+        $(top_srcdir)/girepository/gitypelib.h \
         $(top_srcdir)/girepository/gitypes.h
 
 girdir = $(GIR_DIR)
diff --git a/NEWS b/NEWS
index f5d44d5..9e40088 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,42 @@
+1.59.2 - 2019-01-04
+-------------------
+
+* Everything included in 1.58.3
+* meson: Various fixes and all tests have been ported (0.47+ is required now)
+  :mr:`114` :mr:`110` etc.
+  (:user:`Tomasz MiÄ…sko <tmiasko>`, :user:`Emmanuele Bassi <ebassi>`,
+  :user:`Christoph Reiter <creiter>`)
+* scanner: Save preprocessor input and output files with ``save-temps``
+  :mr:`107` (:user:`Tomasz MiÄ…sko <tmiasko>`)
+* automake: Use the wildcard function where needed
+  :mr:`100` (:user:`William Hua <williamhua>`)
+* build: extend ``PYTHONPATH`` instead of replacing it :mr:`101`
+* gir/cairo: add ``cairo_rectangle_t`` :issue:`74` :mr:`103` (Yeti)
+* Add a ``--version`` option to g-ir-compiler and g-ir-generate
+  :issue:`55` :mr:`106`
+* tests: various test improvements
+  :mr:`111` :mr:`117` :mr:`119` (:user:`Tomasz MiÄ…sko <tmiasko>`)
+* ccompiler: don't use Python compiler flags
+  :issue:`150` :mr:`118` :mr:`120`
+  (:user:`Tomasz MiÄ…sko <tmiasko>`, :user:`Christoph Reiter <creiter>`)
+* parser: Do not bail out when parsing GIR files without doc positions
+  :mr:`121` (:user:`Emmanuele Bassi <ebassi>`)
+* gimarshallingtests: Remove declarations of nonexistent functions
+  :mr:`123` (:user:`Philip Chimento <ptomato>`)
+
+
+1.58.3 - 2018-12-30
+-------------------
+
+* docwriter: Support python-markdown 3.x
+  :issue:`250`
+* scanner:  Define grefcount and gatomicrefcount as aliases to gint
+  :issue:`254` (:user:`Tomasz MiÄ…sko <tmiasko>`)
+* scanner: make using bool without stdbool include work again
+  :issue:`247`
+* gir: Update glib annotations for glib 2.58.2
+
+
 1.59.1 - 2018-12-16
 -------------------
 
index b778f7a..64fb02f 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -10,7 +10,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -42,7 +42,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
index c5f08d7..ca58fcd 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gobject-introspection 1.59.1.
+# Generated by GNU Autoconf 2.69 for gobject-introspection 1.59.2.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection>.
 #
@@ -591,8 +591,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='gobject-introspection'
 PACKAGE_TARNAME='gobject-introspection'
-PACKAGE_VERSION='1.59.1'
-PACKAGE_STRING='gobject-introspection 1.59.1'
+PACKAGE_VERSION='1.59.2'
+PACKAGE_STRING='gobject-introspection 1.59.2'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection'
 PACKAGE_URL=''
 
@@ -1462,7 +1462,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gobject-introspection 1.59.1 to adapt to many kinds of systems.
+\`configure' configures gobject-introspection 1.59.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1534,7 +1534,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gobject-introspection 1.59.1:";;
+     short | recursive ) echo "Configuration of gobject-introspection 1.59.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1701,7 +1701,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gobject-introspection configure 1.59.1
+gobject-introspection configure 1.59.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2253,7 +2253,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gobject-introspection $as_me 1.59.1, which was
+It was created by gobject-introspection $as_me 1.59.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3121,7 +3121,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gobject-introspection'
- VERSION='1.59.1'
+ VERSION='1.59.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3395,12 +3395,12 @@ AM_BACKSLASH='\'
 
 
 # Used in docs/reference/version.xml
-GI_VERSION=1.59.1
+GI_VERSION=1.59.2
 
 
 GI_MAJOR_VERSION=1
 GI_MINOR_VERSION=59
-GI_MICRO_VERSION=1
+GI_MICRO_VERSION=2
 
 
 
@@ -17442,7 +17442,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gobject-introspection $as_me 1.59.1, which was
+This file was extended by gobject-introspection $as_me 1.59.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17508,7 +17508,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gobject-introspection config.status 1.59.1
+gobject-introspection config.status 1.59.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index d27edcf..1a35f1f 100644 (file)
@@ -4,7 +4,7 @@
 dnl the gi version number
 m4_define(gi_major_version, 1)
 m4_define(gi_minor_version, 59)
-m4_define(gi_micro_version, 1)
+m4_define(gi_micro_version, 2)
 m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version)
 
 AC_PREREQ([2.63])
index 65c439b..48dc5ce 100644 (file)
@@ -63,6 +63,9 @@ FIXME
 Specifies the shared library where the symbols in the typelib can be
 found. The name of the library should not contain the ending shared
 library suffix.
+.TP
+.B \-\-version
+Show program\(aqs version number and exit
 .UNINDENT
 .SH BUGS
 .sp
index fb07de7..038d171 100644 (file)
@@ -49,6 +49,9 @@ The shared library to read the symbols from.
 .TP
 .BI \-\-output\fB= FILENAME
 Save the resulting output in FILENAME.
+.TP
+.B \-\-version
+Show program\(aqs version number and exit
 .UNINDENT
 .SH BUGS
 .sp
index ee953bb..2354f91 100644 (file)
@@ -13,7 +13,7 @@ DOC_MAIN_SGML_FILE=gi-docs.xml
 # gtk-doc will search all .c and .h files beneath these paths
 # for inline comments documenting functions and macros.
 # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
-DOC_SOURCE_DIR=$(top_srcdir)/girepository
+DOC_SOURCE_DIR=$(top_srcdir)/girepository $(top_builddir)/girepository
 
 # Extra options to pass to gtkdoc-scangobj. Not normally needed.
 SCANGOBJ_OPTIONS=
@@ -40,7 +40,7 @@ FIXXREF_OPTIONS=
 # Used for dependencies. The docs will be rebuilt if any of these change.
 # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
 # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=$(top_srcdir)/girepository/*.h
+HFILE_GLOB=$(top_srcdir)/girepository/*.h $(top_builddir)/girepository/*.h
 CFILE_GLOB=$(top_srcdir)/girepository/*.c
 
 # Extra header to include when scanning, which are not under DOC_SOURCE_DIR
index 149bcea..44309dc 100644 (file)
@@ -352,7 +352,7 @@ DOC_MAIN_SGML_FILE = gi-docs.xml
 # gtk-doc will search all .c and .h files beneath these paths
 # for inline comments documenting functions and macros.
 # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
-DOC_SOURCE_DIR = $(top_srcdir)/girepository
+DOC_SOURCE_DIR = $(top_srcdir)/girepository $(top_builddir)/girepository
 
 # Extra options to pass to gtkdoc-scangobj. Not normally needed.
 SCANGOBJ_OPTIONS = 
@@ -379,7 +379,7 @@ FIXXREF_OPTIONS =
 # Used for dependencies. The docs will be rebuilt if any of these change.
 # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
 # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB = $(top_srcdir)/girepository/*.h
+HFILE_GLOB = $(top_srcdir)/girepository/*.h $(top_builddir)/girepository/*.h
 CFILE_GLOB = $(top_srcdir)/girepository/*.c
 
 # Extra header to include when scanning, which are not under DOC_SOURCE_DIR
index b0e80c1..e029607 100644 (file)
@@ -199,7 +199,7 @@ gi_get_micro_version (<em class="parameter"><code><span class="type">void</span>
 <hr>
 <div class="refsect2">
 <a name="GI-MICRO-VERSION:CAPS"></a><h3>GI_MICRO_VERSION</h3>
-<pre class="programlisting">#define GI_MICRO_VERSION 1
+<pre class="programlisting">#define GI_MICRO_VERSION 2
 </pre>
 <p>The micro version number of the girepository library.</p>
 <p class="since">Since: <a class="link" href="api-index-1-60.html#api-index-1.60">1.60</a></p>
index 55430e2..ea63ee4 100644 (file)
@@ -16,7 +16,7 @@
 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libgirepository API Reference</p></th></tr></table></div>
 <div>
 <p class="releaseinfo">
-      This document is for libgirepository version 1.59.1
+      This document is for libgirepository version 1.59.2
 .
       The latest version of this documentation can be found on-line at
       <a class="ulink" href="https://developer.gnome.org/gi/unstable/" target="_top">https://developer.gnome.org/gi/unstable/</a>.
index 60113e6..ec45e51 100644 (file)
            glib:type-name="CairoScaledFont"
            glib:get-type="cairo_gobject_scaled_font_get_type"/>
     <record name="Path" c:type="cairo_path_t" foreign="1"/>
+    <record name="Rectangle" c:type="cairo_rectangle_t"
+            glib:type-name="CairoRectangle"
+            glib:get-type="cairo_gobject_rectangle_get_type">
+      <field name="x" writable="1">
+        <type name="gdouble" c:type="gdouble"/>
+      </field>
+      <field name="y" writable="1">
+        <type name="gdouble" c:type="gdouble"/>
+      </field>
+      <field name="width" writable="1">
+        <type name="gdouble" c:type="gdouble"/>
+      </field>
+      <field name="height" writable="1">
+        <type name="gdouble" c:type="gdouble"/>
+      </field>
+    </record>
     <record name="RectangleInt" c:type="cairo_rectangle_int_t"
            glib:type-name="CairoRectangleInt"
            glib:get-type="cairo_gobject_rectangle_int_get_type">
index 87a9db7..f4fa552 100644 (file)
 
 
 /**
+ * GDtlsConnection:advertised-protocols:
+ *
+ * The list of application-layer protocols that the connection
+ * advertises that it is willing to speak. See
+ * g_dtls_connection_set_advertised_protocols().
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * GDtlsConnection:base-socket:
  *
  * The #GDatagramBased that the connection wraps. Note that this may be any
 
 
 /**
+ * GDtlsConnection:negotiated-protocol:
+ *
+ * The application-layer protocol negotiated during the TLS
+ * handshake. See g_dtls_connection_get_negotiated_protocol().
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * GDtlsConnection:peer-certificate:
  *
  * The connection's peer's certificate, after the TLS handshake has
 
 
 /**
+ * GTlsConnection:advertised-protocols:
+ *
+ * The list of application-layer protocols that the connection
+ * advertises that it is willing to speak. See
+ * g_tls_connection_set_advertised_protocols().
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * GTlsConnection:base-io-stream:
  *
  * The #GIOStream that the connection wraps. The connection holds a reference
 
 
 /**
+ * GTlsConnection:negotiated-protocol:
+ *
+ * The application-layer protocol negotiated during the TLS
+ * handshake. See g_tls_connection_get_negotiated_protocol().
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * GTlsConnection:peer-certificate:
  *
  * The connection's peer's certificate, after the TLS handshake has
  *
  * A content type is a platform specific string that defines the type
  * of a file. On UNIX it is a
- * [mime type](http://www.wikipedia.org/wiki/Internet_media_type)
- * like "text/plain" or "image/png".
- * On Win32 it is an extension string like ".doc", ".txt" or a perceived
- * string like "audio". Such strings can be looked up in the registry at
- * HKEY_CLASSES_ROOT.
- * On OSX it is a [Uniform Type Identifier](https://en.wikipedia.org/wiki/Uniform_Type_Identifier)
- * such as "com.apple.application".
+ * [MIME type](http://www.wikipedia.org/wiki/Internet_media_type)
+ * like `text/plain` or `image/png`.
+ * On Win32 it is an extension string like `.doc`, `.txt` or a perceived
+ * string like `audio`. Such strings can be looked up in the registry at
+ * `HKEY_CLASSES_ROOT`.
+ * On macOS it is a [Uniform Type Identifier](https://en.wikipedia.org/wiki/Uniform_Type_Identifier)
+ * such as `com.apple.application`.
  */
 
 
 
 
 /**
+ * SECTION:gproxyaddressenumerator
+ * @short_description: Proxy wrapper enumerator for socket addresses
+ * @include: gio/gio.h
+ *
+ * #GProxyAddressEnumerator is a wrapper around #GSocketAddressEnumerator which
+ * takes the #GSocketAddress instances returned by the #GSocketAddressEnumerator
+ * and wraps them in #GProxyAddress instances, using the given
+ * #GProxyAddressEnumerator:proxy-resolver.
+ *
+ * This enumerator will be returned (for example, by
+ * g_socket_connectable_enumerate()) as appropriate when a proxy is configured;
+ * there should be no need to manually wrap a #GSocketAddressEnumerator instance
+ * with one.
+ */
+
+
+/**
  * SECTION:gproxyresolver
  * @short_description: Asynchronous and cancellable network proxy resolver
  * @include: gio/gio.h
 
 
 /**
+ * SECTION:gsocketaddressenumerator
+ * @short_description: Enumerator for socket addresses
+ * @include: gio/gio.h
+ *
+ * #GSocketAddressEnumerator is an enumerator type for #GSocketAddress
+ * instances. It is returned by enumeration functions such as
+ * g_socket_connectable_enumerate(), which returns a #GSocketAddressEnumerator
+ * to list all the #GSocketAddresses which could be used to connect to that
+ * #GSocketConnectable.
+ *
+ * Enumeration is typically a blocking operation, so the asynchronous methods
+ * g_socket_address_enumerator_next_async() and
+ * g_socket_address_enumerator_next_finish() should be used where possible.
+ *
+ * Each #GSocketAddressEnumerator can only be enumerated once. Once
+ * g_socket_address_enumerator_next() has returned %NULL (and no error), further
+ * enumeration with that #GSocketAddressEnumerator is not possible, and it can
+ * be unreffed.
+ */
+
+
+/**
  * SECTION:gsocketclient
  * @short_description: Helper for connecting to a network service
  * @include: gio/gio.h
 
 
 /**
+ * g_content_type_get_mime_dirs:
+ *
+ * Get the list of directories which MIME data is loaded from. See
+ * g_content_type_set_mime_dirs() for details.
+ *
+ * Returns: (transfer none) (array zero-terminated=1): %NULL-terminated list of
+ *    directories to load MIME data from, including any `mime/` subdirectory,
+ *    and with the first directory to try listed first
+ * Since: 2.60
+ */
+
+
+/**
  * g_content_type_get_mime_type:
  * @type: a content type string
  *
 
 
 /**
+ * g_content_type_set_mime_dirs:
+ * @dirs: (array zero-terminated=1) (nullable): %NULL-terminated list of
+ *    directories to load MIME data from, including any `mime/` subdirectory,
+ *    and with the first directory to try listed first
+ *
+ * Set the list of directories used by GIO to load the MIME database.
+ * If @dirs is %NULL, the directories used are the default:
+ *
+ *  - the `mime` subdirectory of the directory in `$XDG_DATA_HOME`
+ *  - the `mime` subdirectory of every directory in `$XDG_DATA_DIRS`
+ *
+ * This function is intended to be used when writing tests that depend on
+ * information stored in the MIME database, in order to control the data.
+ *
+ * Typically, in case your tests use %G_TEST_OPTION_ISOLATE_DIRS, but they
+ * depend on the system’s MIME database, you should call this function
+ * with @dirs set to %NULL before calling g_test_init(), for instance:
+ *
+ * |[<!-- language="C" -->
+ *   // Load MIME data from the system
+ *   g_content_type_set_mime_dirs (NULL);
+ *   // Isolate the environment
+ *   g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
+ *
+ *   â€¦
+ *
+ *   return g_test_run ();
+ * ]|
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * g_content_types_get_registered:
  *
  * Gets a list of strings containing all the registered content types
  * known to the system. The list and its data should be freed using
- * g_list_free_full (list, g_free).
+ * `g_list_free_full (list, g_free)`.
  *
  * Returns: (element-type utf8) (transfer full): list of the registered
  *     content types
 
 
 /**
+ * g_dbus_connection_get_flags:
+ * @connection: a #GDBusConnection
+ *
+ * Gets the flags used to construct this connection
+ *
+ * Returns: zero or more flags from the #GDBusConnectionFlags enumeration
+ * Since: 2.60
+ */
+
+
+/**
  * g_dbus_connection_get_guid:
  * @connection: a #GDBusConnection
  *
 
 
 /**
+ * g_dtls_connection_get_negotiated_protocol:
+ * @conn: a #GDtlsConnection
+ *
+ * Gets the name of the application-layer protocol negotiated during
+ * the handshake.
+ *
+ * If the peer did not use the ALPN extension, or did not advertise a
+ * protocol that matched one of @conn's protocols, or the TLS backend
+ * does not support ALPN, then this will be %NULL. See
+ * g_dtls_connection_set_advertised_protocols().
+ *
+ * Returns: (nullable): the negotiated protocol, or %NULL
+ * Since: 2.60
+ */
+
+
+/**
  * g_dtls_connection_get_peer_certificate:
  * @conn: a #GDtlsConnection
  *
 
 
 /**
+ * g_dtls_connection_set_advertised_protocols:
+ * @conn: a #GDtlsConnection
+ * @protocols: (array zero-terminated=1) (nullable): a %NULL-terminated
+ *   array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL
+ *
+ * Sets the list of application-layer protocols to advertise that the
+ * caller is willing to speak on this connection. The
+ * Application-Layer Protocol Negotiation (ALPN) extension will be
+ * used to negotiate a compatible protocol with the peer; use
+ * g_dtls_connection_get_negotiated_protocol() to find the negotiated
+ * protocol after the handshake.  Specifying %NULL for the the value
+ * of @protocols will disable ALPN negotiation.
+ *
+ * See [IANA TLS ALPN Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
+ * for a list of registered protocol IDs.
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * g_dtls_connection_set_certificate:
  * @conn: a #GDtlsConnection
  * @certificate: the certificate to use for @conn
  *
  * Like g_subprocess_communicate(), but validates the output of the
  * process as UTF-8, and returns it as a regular NUL terminated string.
+ *
+ * On error, @stdout_buf and @stderr_buf will be set to undefined values and
+ * should not be used.
  */
 
 
  * #GMainContext with @task's [priority][io-priority], and sets @source's
  * callback to @callback, with @task as the callback's `user_data`.
  *
+ * It will set the @source’s name to the task’s name (as set with
+ * g_task_set_name()), if one has been set.
+ *
  * This takes a reference on @task until @source is destroyed.
  *
  * Since: 2.36
 
 
 /**
+ * g_task_get_name:
+ * @task: a #GTask
+ *
+ * Gets @task’s name. See g_task_set_name().
+ *
+ * Returns: (nullable) (transfer none): @task’s name, or %NULL
+ * Since: 2.60
+ */
+
+
+/**
  * g_task_get_priority:
  * @task: a #GTask
  *
 
 
 /**
+ * g_task_set_name:
+ * @task: a #GTask
+ * @name: (nullable): a human readable name for the task, or %NULL to unset it
+ *
+ * Sets @task’s name, used in debugging and profiling. The name defaults to
+ * %NULL.
+ *
+ * The task name should describe in a human readable way what the task does.
+ * For example, â€˜Open file’ or â€˜Connect to network host’. It is used to set the
+ * name of the #GSource used for idle completion of the task.
+ *
+ * This function may only be called before the @task is first used in a thread
+ * other than the one it was constructed in.
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * g_task_set_priority:
  * @task: the #GTask
  * @priority: the [priority][io-priority] of the request
 
 
 /**
+ * g_tls_connection_get_negotiated_protocol:
+ * @conn: a #GTlsConnection
+ *
+ * Gets the name of the application-layer protocol negotiated during
+ * the handshake.
+ *
+ * If the peer did not use the ALPN extension, or did not advertise a
+ * protocol that matched one of @conn's protocols, or the TLS backend
+ * does not support ALPN, then this will be %NULL. See
+ * g_tls_connection_set_advertised_protocols().
+ *
+ * Returns: (nullable): the negotiated protocol, or %NULL
+ * Since: 2.60
+ */
+
+
+/**
  * g_tls_connection_get_peer_certificate:
  * @conn: a #GTlsConnection
  *
 
 
 /**
+ * g_tls_connection_set_advertised_protocols:
+ * @conn: a #GTlsConnection
+ * @protocols: (array zero-terminated=1) (nullable): a %NULL-terminated
+ *   array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL
+ *
+ * Sets the list of application-layer protocols to advertise that the
+ * caller is willing to speak on this connection. The
+ * Application-Layer Protocol Negotiation (ALPN) extension will be
+ * used to negotiate a compatible protocol with the peer; use
+ * g_tls_connection_get_negotiated_protocol() to find the negotiated
+ * protocol after the handshake.  Specifying %NULL for the the value
+ * of @protocols will disable ALPN negotiation.
+ *
+ * See [IANA TLS ALPN Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
+ * for a list of registered protocol IDs.
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * g_tls_connection_set_certificate:
  * @conn: a #GTlsConnection
  * @certificate: the certificate to use for @conn
index c70f274..aa46726 100644 (file)
  * simultaneous read-only access (by holding the 'reader' lock via
  * g_rw_lock_reader_lock()).
  *
+ * It is unspecified whether readers or writers have priority in acquiring the
+ * lock when a reader already holds the lock and a writer is queued to acquire
+ * it.
+ *
  * Here is an example for an array with access functions:
  * |[<!-- language="C" -->
  *   GRWLock lock;
 
 
 /**
+ * G_ALIGNOF:
+ * @a: a type-name
+ *
+ * Return the minimum alignment required by the platform ABI for values of the given
+ * type. The address of a variable or struct member of the given type must always be
+ * a multiple of this alignment. For example, most platforms require int variables
+ * to be aligned at a 4-byte boundary, so `G_ALIGNOF (int)` is 4 on most platforms.
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * G_APPROX_VALUE:
  * @a: a numeric value
  * @b: a numeric value
  * The "GMarkup" parser is intended to parse a simple markup format
  * that's a subset of XML. This is a small, efficient, easy-to-use
  * parser. It should not be used if you expect to interoperate with
- * other applications generating full-scale XML. However, it's very
+ * other applications generating full-scale XML, and must not be used if you
+ * expect to parse untrusted input. However, it's very
  * useful for application data files, config files, etc. where you
  * know your application will be the only one writing the file.
  * Full-scale XML parsers should be able to parse the subset used by
  * In addition to the traditional g_assert_true(), the test framework provides
  * an extended set of assertions for comparisons: g_assert_cmpfloat(),
  * g_assert_cmpfloat_with_epsilon(), g_assert_cmpint(), g_assert_cmpuint(),
- * g_assert_cmphex(), g_assert_cmpstr(), and g_assert_cmpmem(). The
+ * g_assert_cmphex(), g_assert_cmpstr(), g_assert_cmpmem() and
+ * g_assert_cmpvariant(). The
  * advantage of these variants over plain g_assert_true() is that the assertion
  * messages can be more elaborate, and include the values of the compared
  * entities.
  * g_assert_cmpfloat:
  * @n1: an floating point number
  * @cmp: The comparison operator to use.
- *     One of ==, !=, <, >, <=, >=.
+ *     One of `==`, `!=`, `<`, `>`, `<=`, `>=`.
  * @n2: another floating point number
  *
  * Debugging macro to compare two floating point numbers.
  * g_assert_cmphex:
  * @n1: an unsigned integer
  * @cmp: The comparison operator to use.
- *     One of ==, !=, <, >, <=, >=.
+ *     One of `==`, `!=`, `<`, `>`, `<=`, `>=`.
  * @n2: another unsigned integer
  *
  * Debugging macro to compare to unsigned integers.
  * g_assert_cmpint:
  * @n1: an integer
  * @cmp: The comparison operator to use.
- *     One of ==, !=, <, >, <=, >=.
+ *     One of `==`, `!=`, `<`, `>`, `<=`, `>=`.
  * @n2: another integer
  *
  * Debugging macro to compare two integers.
  * g_assert_cmpstr:
  * @s1: a string (may be %NULL)
  * @cmp: The comparison operator to use.
- *     One of ==, !=, <, >, <=, >=.
+ *     One of `==`, `!=`, `<`, `>`, `<=`, `>=`.
  * @s2: another string (may be %NULL)
  *
  * Debugging macro to compare two strings. If the comparison fails,
  * g_assert_cmpuint:
  * @n1: an unsigned integer
  * @cmp: The comparison operator to use.
- *     One of ==, !=, <, >, <=, >=.
+ *     One of `==`, `!=`, `<`, `>`, `<=`, `>=`.
  * @n2: another unsigned integer
  *
  * Debugging macro to compare two unsigned integers.
 
 
 /**
+ * g_assert_cmpvariant:
+ * @v1: pointer to a #GVariant
+ * @v2: pointer to another #GVariant
+ *
+ * Debugging macro to compare two #GVariants. If the comparison fails,
+ * an error message is logged and the application is either terminated
+ * or the testcase marked as failed. The variants are compared using
+ * g_variant_equal().
+ *
+ * The effect of `g_assert_cmpvariant (v1, v2)` is the same as
+ * `g_assert_true (g_variant_equal (v1, v2))`. The advantage of this macro is
+ * that it can produce a message that includes the actual values of @v1 and @v2.
+ *
+ * Since: 2.60
+ */
+
+
+/**
  * g_assert_error:
  * @err: a #GError, possibly %NULL
  * @dom: the expected error domain (a #GQuark)
  *
  * This can only be used to test for a specific error. If you want to
  * test that @err is set, but don't care what it's set to, just use
- * `g_assert (err != NULL)`
+ * `g_assert_nonnull (err)`.
  *
  * Since: 2.20
  */
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  * Since: 2.58
  */
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  * Since: 2.58
  */
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  * Since: 2.58
  */
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  * Since: 2.58
  */
  * that the latest on-disk version is used. Call this only
  * if you just changed the data on disk yourself.
  *
- * Due to threadsafety issues this may cause leaking of strings
+ * Due to thread safety issues this may cause leaking of strings
  * that were previously returned from g_get_user_special_dir()
  * that can't be freed. We ensure to only leak the data for
  * the directories that actually changed value though.
 
 
 /**
- * g_strv_length:
- * @str_array: a %NULL-terminated array of strings
+ * g_strv_equal:
+ * @strv1: a %NULL-terminated array of strings
+ * @strv2: another %NULL-terminated array of strings
  *
- * Returns the length of the given %NULL-terminated
- * string array @str_array. @str_array must not be %NULL.
+ * Checks if @strv1 and @strv2 contain exactly the same elements in exactly the
+ * same order. Elements are compared using g_str_equal(). To match independently
+ * of order, sort the arrays first (using g_qsort_with_data() or similar).
  *
- * Returns: length of @str_array.
- * Since: 2.6
+ * Two empty arrays are considered equal. Neither @strv1 not @strv2 may be
+ * %NULL.
+ *
+ * Returns: %TRUE if @strv1 and @strv2 are equal
+ * Since: 2.60
  */
 
 
 /**
- * g_test_add:
- * @testpath: The test path for a new test case.
- * @Fixture: The type of a fixture data structure.
- * @tdata: Data argument for the test functions.
- * @fsetup: The function to set up the fixture data.
- * @ftest: The actual test function.
- * @fteardown: The function to tear down the fixture data.
- *
- * Hook up a new test case at @testpath, similar to g_test_add_func().
- * A fixture data structure with setup and teardown functions may be provided,
- * similar to g_test_create_case().
+ * g_strv_length:
+ * @str_array: a %NULL-terminated array of strings
  *
- * g_test_add() is implemented as a macro, so that the fsetup(), ftest() and
- * fteardown() callbacks can expect a @Fixture pointer as their first argument
- * in a type safe manner. They otherwise have type #GTestFixtureFunc.
+ * Returns the length of the given %NULL-terminated
+ * string array @str_array. @str_array must not be %NULL.
  *
- * Since: 2.16
+ * Returns: length of @str_array.
+ * Since: 2.6
  */
 
 
  * the test will be skipped by default, and only run if explicitly
  * required via the `-p` command-line option or g_test_trap_subprocess().
  *
+ * No component of @testpath may start with a dot (`.`) if the
+ * %G_TEST_OPTION_ISOLATE_DIRS option is being used; and it is recommended to
+ * do so even if it isn’t.
+ *
  * Since: 2.16
  */
 
  * the test will be skipped by default, and only run if explicitly
  * required via the `-p` command-line option or g_test_trap_subprocess().
  *
+ * No component of @testpath may start with a dot (`.`) if the
+ * %G_TEST_OPTION_ISOLATE_DIRS option is being used; and it is recommended to
+ * do so even if it isn’t.
+ *
  * Since: 2.16
  */
 
  *        Changed if any arguments were handled.
  * @argv: Address of the @argv parameter of main().
  *        Any parameters understood by g_test_init() stripped before return.
- * @...: %NULL-terminated list of special options. Currently the only
- *       defined option is `"no_g_set_prgname"`, which
- *       will cause g_test_init() to not call g_set_prgname().
+ * @...: %NULL-terminated list of special options, documented below.
  *
  * Initialize the GLib testing framework, e.g. by seeding the
  * test random number generator, the name for g_get_prgname()
  *
  * - `--debug-log`: Debug test logging output.
  *
+ * Options which can be passed to @... are:
+ *
+ *  - `"no_g_set_prgname"`: Causes g_test_init() to not call g_set_prgname().
+ *  - %G_TEST_OPTION_ISOLATE_DIRS: Creates a unique temporary directory for each
+ *    unit test and uses g_set_user_dirs() to set XDG directories to point into
+ *    that temporary directory for the duration of the unit test. See the
+ *    documentation for %G_TEST_OPTION_ISOLATE_DIRS.
+ *
  * Since 2.58, if tests are compiled with `G_DISABLE_ASSERT` defined,
  * g_test_init() will print an error and exit. This is to prevent no-op tests
  * from being executed, as g_assert() is commonly (erroneously) used in unit
index 079a624..67539ec 100644 (file)
  * of bidirectional bindings, otherwise it will be ignored
  *
  * The binding will automatically be removed when either the @source or the
- * @target instances are finalized. To remove the binding without affecting the
- * @source and the @target you can just call g_object_unref() on the returned
- * #GBinding instance.
+ * @target instances are finalized. This will release the reference that is
+ * being held on the #GBinding instance; if you want to hold on to the
+ * #GBinding instance, you will need to hold a reference to it.
+ *
+ * To remove the binding, call g_binding_unbind().
  *
  * A #GObject can have multiple bindings.
  *
index 0c50fc8..227af4f 100644 (file)
@@ -365,7 +365,7 @@ endif
 # out of date.
 gio_files += files('gio-2.0.c')
 
-gir_files += custom_target('gir-gio',
+gio_gir = custom_target('gir-gio',
   input: gio_files,
   output: 'Gio-2.0.gir',
   depends: [gobject_gir, giscanner_pymod],
@@ -382,6 +382,8 @@ gir_files += custom_target('gir-gio',
   ]
 )
 
+gir_files += gio_gir
+
 # GIRepository
 
 girepository_command = scanner_command + [
index c03558f..5d5d893 100644 (file)
@@ -24,8 +24,9 @@
                        }
                        *elapsed_time =  (double)e_time.tv_sec + ((double)e_time.tv_usec/1000000.0);
                }
-               static inline void dummy_elapsed_time_in_seconds()
+               static inline void dummy_elapsed_time_in_seconds(double * elapsed_time)
                {
+                  (void) elapsed_time;
                }
                static inline void elapsed_time_in_useconds(cmph_uint64 * elapsed_time)
                {
@@ -35,8 +36,9 @@
                        }
                        *elapsed_time =  (cmph_uint64)(e_time.tv_sec*1000000 + e_time.tv_usec);
                }
-               static inline void dummy_elapsed_time_in_useconds()
+               static inline void dummy_elapsed_time_in_useconds(cmph_uint64 * elapsed_time)
                {
+                  (void) elapsed_time;
                }       
        #endif
 #endif
index 368afc7..d7b1e42 100644 (file)
@@ -29,9 +29,20 @@ cmph_deps = [
   cc.find_library('m', required: false),
 ]
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-implicit-fallthrough',
+  '-Wno-old-style-definition',
+  '-Wno-suggest-attribute=noreturn',
+  '-Wno-type-limits',
+  '-Wno-undef',
+  '-Wno-unused-parameter',
+  '-Wno-cast-align',
+  '-Wno-unused-function',
+  '-Wno-return-type',
+])
 cmph = static_library('cmph',
   sources: cmph_sources,
-  c_args: gi_hidden_visibility_cflags,
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
   dependencies: cmph_deps,
 )
 
@@ -40,11 +51,16 @@ cmph_dep = declare_dependency(
   include_directories: include_directories('.'),
 )
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-old-style-definition',
+  '-Wno-type-limits',
+])
 cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c',
   dependencies: [
     cmph_dep,
     glib_dep,
-  ]
+  ],
+  c_args: custom_c_args,
 )
 
 test('cmph-bdz-test', cmph_test)
index 8bc49eb..e262d3e 100644 (file)
@@ -76,6 +76,8 @@ static HMODULE girepository_dll = NULL;
 
 #ifdef DLL_EXPORT
 
+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
+
 BOOL WINAPI
 DllMain (HINSTANCE hinstDLL,
         DWORD     fdwReason,
index 3010bf3..08aded1 100644 (file)
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
 
 #define GI_MAJOR_VERSION 1
 #define GI_MINOR_VERSION 59
-#define GI_MICRO_VERSION 1
+#define GI_MICRO_VERSION 2
 
 #define GI_CHECK_VERSION(major,minor,micro) \
     (GI_MAJOR_VERSION > (major) || \
index cc8d842..0261e1a 100644 (file)
@@ -1,9 +1,13 @@
 subdir('cmph')
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-old-style-definition',
+  '-Wno-cast-align',
+])
 girepo_gthash_lib = static_library('girepository-gthash',
   sources: 'gthash.c',
   include_directories : configinc,
-  c_args: gi_hidden_visibility_cflags,
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
   dependencies: [
     cmph_dep,
     glib_dep,
@@ -17,6 +21,11 @@ girepo_gthash_dep = declare_dependency(
   include_directories: include_directories('.'),
 )
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-unused-parameter',
+  '-Wno-duplicated-branches',
+  '-Wno-cast-align',
+])
 girepo_internals_lib = static_library('girepository-internals',
   sources: [
     'girmodule.c',
@@ -25,7 +34,7 @@ girepo_internals_lib = static_library('girepository-internals',
     'girparser.c',
     'girwriter.c',
   ],
-  c_args: gi_hidden_visibility_cflags,
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
   include_directories : configinc,
   dependencies: [girepo_gthash_dep, libffi_dep],
 )
@@ -136,10 +145,18 @@ girepo_gir_sources = files(
 
 install_headers(girepo_headers, subdir: 'gobject-introspection-1.0')
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-unused-parameter',
+  '-Wno-duplicated-branches',
+  '-Wno-type-limits',
+  '-Wno-cast-align',
+  '-Wno-missing-field-initializers',
+])
 girepo_lib = shared_library('girepository-1.0',
   sources: girepo_sources,
   include_directories : configinc,
-  c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'],
+  c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'] +
+          custom_c_args,
   dependencies: [glib_dep, gobject_dep, gmodule_dep,
                  gio_dep, girepo_internals_dep],
   version: '1.0.0',
@@ -149,7 +166,7 @@ girepo_lib = shared_library('girepository-1.0',
 # Copy to builddir for use with giscanner/dumper.py when running uninstalled
 configure_file(input : 'gdump.c',
   output : 'gdump.c',
-  configuration : configuration_data(),
+  copy: true,
   install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'),
   install : true,
 )
index e464b48..735e36d 100644 (file)
@@ -1 +1 @@
-__version__ = '1.59.1'
+__version__ = '1.59.2'
index 5db0453..aee6a1a 100644 (file)
@@ -29,11 +29,69 @@ import distutils
 from distutils.msvccompiler import MSVCCompiler
 from distutils.unixccompiler import UnixCCompiler
 from distutils.cygwinccompiler import Mingw32CCompiler
-from distutils.sysconfig import customize_compiler
+from distutils.sysconfig import get_config_vars
 
 from . import utils
 
 
+def customize_compiler(compiler):
+    """This is a version of distutils.sysconfig.customize_compiler, without
+    any macOS specific bits and which tries to avoid using any Python specific
+    defaults if alternatives through env vars are given.
+    """
+
+    if compiler.compiler_type == "unix":
+        (cc, cxx, ldshared, shlib_suffix, ar, ar_flags) = \
+            get_config_vars('CC', 'CXX', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
+
+        if 'CC' in os.environ:
+            newcc = os.environ['CC']
+            if 'LDSHARED' not in os.environ and ldshared.startswith(cc):
+                ldshared = newcc + ldshared[len(cc):]
+            cc = newcc
+        if 'CXX' in os.environ:
+            cxx = os.environ['CXX']
+        if 'LDSHARED' in os.environ:
+            ldshared = os.environ['LDSHARED']
+        if 'CPP' in os.environ:
+            cpp = os.environ['CPP']
+        else:
+            cpp = cc + " -E"
+        if 'LDFLAGS' in os.environ:
+            ldshared = ldshared + ' ' + os.environ['LDFLAGS']
+        if 'CFLAGS' in os.environ:
+            cflags = os.environ['CFLAGS']
+            ldshared = ldshared + ' ' + os.environ['CFLAGS']
+        else:
+            cflags = ''
+        if 'CPPFLAGS' in os.environ:
+            cpp = cpp + ' ' + os.environ['CPPFLAGS']
+            cflags = cflags + ' ' + os.environ['CPPFLAGS']
+            ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
+        if 'AR' in os.environ:
+            ar = os.environ['AR']
+        if 'ARFLAGS' in os.environ:
+            archiver = ar + ' ' + os.environ['ARFLAGS']
+        else:
+            archiver = ar + ' ' + ar_flags
+
+        cc_cmd = cc + ' ' + cflags
+        compiler.set_executables(
+            preprocessor=cpp,
+            compiler=cc_cmd,
+            compiler_so=cc_cmd,
+            compiler_cxx=cxx,
+            linker_so=ldshared,
+            linker_exe=cc,
+            archiver=archiver)
+
+        compiler.shared_lib_extension = shlib_suffix
+
+
+# Flags that retain macros in preprocessed output.
+FLAGS_RETAINING_MACROS = ['-g3', '-ggdb3', '-gstabs3', '-gcoff3', '-gxcoff3', '-gvms3']
+
+
 class CCompiler(object):
 
     compiler_cmd = ''
@@ -376,6 +434,6 @@ class CCompiler(object):
             else:
                 # We expect the preprocessor to remove macros. If debugging is turned
                 # up high enough that won't happen, so don't add those flags. Bug #720504
-                if option not in ['-g3', '-ggdb3', '-gstabs3', '-gcoff3', '-gxcoff3', '-gvms3']:
+                if option not in FLAGS_RETAINING_MACROS:
                     other_options.append(option)
         return (includes, macros, other_options)
index ce07aaa..138acf7 100644 (file)
@@ -18,6 +18,7 @@
 # Boston, MA 02111-1307, USA.
 #
 
+import os
 from contextlib import contextmanager
 
 from . import ast
@@ -142,7 +143,9 @@ class CCodeGenerator(object):
         for header in self.include_first_src:
             self.out_c.write("""#include "%s"\n""" % header)
 
-        self.out_c.write("""#include "%s"\n\n""" % (self.out_h_filename, ))
+        src_dir = os.path.dirname(os.path.realpath(self.out_c.name))
+        header = os.path.relpath(self.out_h_filename, src_dir)
+        self.out_c.write("""#include "%s"\n\n""" % (header, ))
 
         for header in self.include_last_src:
             self.out_c.write("""#include "%s"\n""" % header)
diff --git a/giscanner/doctemplates/devdocs/Gjs/method.tmpl b/giscanner/doctemplates/devdocs/Gjs/method.tmpl
new file mode 100644 (file)
index 0000000..2c997c0
--- /dev/null
@@ -0,0 +1 @@
+<%inherit file="function.tmpl"/>
\ No newline at end of file
index 15e6843..7ccce59 100644 (file)
@@ -29,7 +29,6 @@ import tempfile
 from xml.sax import saxutils
 from mako.lookup import TemplateLookup
 import markdown
-from markdown.extensions.headerid import HeaderIdExtension
 
 from . import ast, xmlwriter
 from .utils import to_underscores
@@ -61,6 +60,18 @@ language_mimes = {
 }
 
 
+def get_headerid_ext():
+    try:
+        from markdown.extensions.headerid import HeaderIdExtension
+    except ImportError:
+        # markdown 3.x
+        from markdown.extensions.toc import TocExtension
+        return TocExtension(toc_depth=0)
+    else:
+        # markdown 2.x
+        return HeaderIdExtension(forceid=False)
+
+
 def make_page_id(node, recursive=False):
     if isinstance(node, ast.Namespace):
         if recursive:
@@ -1170,7 +1181,7 @@ class DevDocsFormatterGjs(DocFormatterGjs):
             'markdown.extensions.fenced_code',
             'markdown.extensions.nl2br',
             'markdown.extensions.attr_list',
-            HeaderIdExtension(forceid=False)
+            get_headerid_ext(),
         ])
 
     def format_function_name(self, func):
@@ -1258,7 +1269,7 @@ class DevDocsFormatterGjs(DocFormatterGjs):
             'markdown.extensions.fenced_code',
             'markdown.extensions.nl2br',
             'markdown.extensions.attr_list',
-            HeaderIdExtension(forceid=False)
+            get_headerid_ext(),
         ])
 
     def format_in_parameters(self, node):
index 3bc4a6f..5fa9f51 100644 (file)
@@ -185,8 +185,8 @@ class GIRParser(object):
         if doc is not None:
             if doc.text:
                 obj.doc = doc.text
-                obj.doc_position = Position(doc.attrib['filename'],
-                                            doc.attrib['line'],
+                obj.doc_position = Position(doc.attrib.get('filename', '<unknown>'),
+                                            doc.attrib.get('line', None),
                                             doc.attrib.get('column', None))
         version = node.attrib.get('version')
         if version:
index 7b4b0d9..6ae3406 100644 (file)
@@ -15,6 +15,7 @@ giscanner_files = [
   'gdumpparser.py',
   'libtoolimporter.py',
   'maintransformer.py',
+  'mdextensions.py',
   'message.py',
   'msvccompiler.py',
   'pkgconfig.py',
@@ -48,6 +49,18 @@ endforeach
 
 install_subdir('doctemplates', install_dir: giscannerdir)
 
+# XXX: this doesn't track the input, but there is nothing to copy many files
+# in meson.
+doc_templates = custom_target('copy-templates',
+  input : 'doctemplates',
+  output : 'doctemplates',
+  command : [
+    python, '-c',
+      'import sys, shutil;' +
+      'shutil.rmtree(sys.argv[2], ignore_errors=True);' +
+      'shutil.copytree(sys.argv[1], sys.argv[2])',
+    '@INPUT@', '@OUTPUT@'])
+
 flex = find_program('flex', 'win_flex')
 bison = find_program('bison', 'win_bison')
 
@@ -69,23 +82,34 @@ if not cc.has_header('unistd.h')
   giscanner_args += '-DYY_NO_UNISTD_H'
 endif
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-missing-field-initializers',
+  '-Wno-unused-parameter',
+])
 giscanner_lib = static_library('giscanner',
   sources: [
     'sourcescanner.c',
     scannerparser,
     scannerlexer,
   ],
-  c_args: giscanner_args,
+  c_args: giscanner_args + custom_c_args,
   include_directories : configinc,
   dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
 )
 
+# https://github.com/mesonbuild/meson/issues/4117
+if host_machine.system() == 'windows'
+  python_ext_dep = python.dependency()
+else
+  python_ext_dep = python.dependency().partial_dependency(compile_args: true)
+endif
+
 giscanner_pymod = python.extension_module('_giscanner', ['giscannermodule.c'],
   link_with: giscanner_lib,
-  c_args: [gi_hidden_visibility_cflags],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
   include_directories : configinc,
   dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep,
-                 python.dependency()],
+                 python_ext_dep],
   install: true,
   install_dir: giscannerdir,
 )
index 323e47c..6290aeb 100644 (file)
@@ -351,8 +351,8 @@ static void yynoreturn yy_fatal_error ( const char* msg  );
        (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
        (yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 170
-#define YY_END_OF_BUFFER 171
+#define YY_NUM_RULES 171
+#define YY_END_OF_BUFFER 172
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -360,135 +360,136 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static const flex_int16_t yy_acclist[1128] =
+static const flex_int16_t yy_acclist[1135] =
     {   0,
-      171,  169,  170,    3,  169,  170,    1,  170,   45,  169,
-      170,  169,  170,   20,  169,  170,   40,  169,  170,   42,
-      169,  170,  169,  170,   29,  169,  170,   30,  169,  170,
-       38,  169,  170,   36,  169,  170,   69,  169,  170,   37,
-      169,  170,   35,  169,  170,   39,  169,  170,  162,  169,
-      170,  162,  169,  170,   32,  169,  170,   31,  169,  170,
-       47,  169,  170,   46,  169,  170,   48,  169,  170,   34,
-      169,  170,  109,  159,  169,  170,  109,  159,  169,  170,
-      109,  159,  169,  170,  109,  159,  169,  170,  109,  159,
-      169,  170,   25,  169,  170,  169,  170,   27,  169,  170,
-
-       41,  169,  170,  109,  159,  169,  170,  109,  159,  169,
-      170,  109,  159,  169,  170,  109,  159,  169,  170,  109,
-      159,  169,  170,  109,  159,  169,  170,  109,  159,  169,
-      170,  109,  159,  169,  170,  109,  159,  169,  170,  109,
-      159,  169,  170,  109,  159,  169,  170,  109,  159,  169,
-      170,  109,  159,  169,  170,  109,  159,  169,  170,  109,
-      159,  169,  170,  109,  159,  169,  170,   21,  169,  170,
-       43,  169,  170,   23,  169,  170,   44,  169,  170,    3,
-        1,   62,  167,   53,   24,   65,   55,  165,   51,   67,
-       49,   68,   50,   70,  163,    4,    6,   52,  163,  161,
-
-      162,  162,  162,  162,   28,   22,   26,   57,   63,   61,
-       64,   58,  109,  159,  109,  159,  109,  159,  109,  159,
-        2,   54,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  118,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  133,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,   56,   66,   33,  163,    6,  161,  162,  161,
-
-      162,  164,  162,  162,  162,  160,   59,   60,  109,  159,
-      109,  159,  168,  166,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  110,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      131,  159,  109,  159,  109,  159,  109,  135,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  163,  161,  162,  161,  162,
-      161,  162,  164,  162,  160,  160,  109,  159,  109,  159,
-      109,  159,  105,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      111,  159,  109,  159,  109,  113,  159,  109,  114,  159,
-
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  120,
-      159,  109,  121,  159,  109,  159,  109,  159,  109,  159,
-      109,  132,  159,  109,  159,  109,  141,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  107,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  156,  159,
-      109,  159,  109,  159,   18,   13,  161,  162,  160,  160,
-      160,  106,  109,  159,  109,  159,  109,  159,   96,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,   74,  109,  159,  109,  159,  109,  159,  109,  159,
-
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  102,  109,  159,  109,  112,  159,
-      109,  115,  159,  109,  159,  109,  159,  109,  159,  109,
-      159,  108,  109,  159,  109,  123,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  145,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  154,  159,  109,  159,  109,  159,  109,
-      158,  159,   15,  160,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  119,
-      159,  109,  122,  159,  109,  134,  159,  109,  159,  109,
-      159,  109,  144,  159,  109,  146,  159,  109,  149,  159,
-      109,  150,  159,  109,  151,  159,  109,  152,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,   14,   16,    5,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-
-       75,  109,  159,  109,  159,   98,  109,  159,   78,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,  109,
-      136,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  117,  159,  109,  159,  109,  159,  109,  159,  109,
-      153,  159,  109,  159,  109,  159,   12,  109,  159,  109,
-      159,  109,  159,  109,  124,  159,  109,  125,  159,  109,
-      126,  159,   83,  109,  159,  109,  159,  109,  159,  109,
-      159,  109,  159,  109,  159,  109,  159,  109,  159,   81,
-      109,  159,  109,  140,  159,  109,  159,   87,  109,  159,
-
-      109,  159,  109,  147,  159,  109,  159,   93,  109,  159,
-      109,  159,  109,  159,  109,  116,  159,  109,  142,  159,
-      109,  143,  159,  109,  159,  109,  155,  159,  109,  157,
-      159,    8,   11,   19,   17,  109,  159,  109,  159,  109,
-      127,  159,  109,  128,  159,  109,  129,  159,   86,  109,
-      159,  109,  159,   84,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,   82,  109,
-      159,  109,  159,  109,  159,  101,  109,  159,  109,  159,
-      109,  139,  159,  109,  159,  109,  159,    7,    8,  109,
-      159,  109,  159,  109,  130,  159,  109,  159,  109,  159,
-
-      109,  159,  109,  159,  109,  159,   80,  109,  159,  109,
-      138,  159,   88,  109,  159,  109,  148,  159,   92,  109,
-      159,  109,  159,   94,  109,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,   77,  109,  159,  109,
-      159,  109,  159,  109,  137,  159,  109,  159,  109,  159,
-      109,  159,  109,  159,  109,  159,  109,  159,  109,  159,
-      109,  159,   89,  109,  159,   95,  109,  159,   90,  109,
-      159,  109,  159,  109,  159,  109,  159,   91,  109,  159,
-       76,  109,  159,  100,   79,  109,  159,  109,  159,  109,
-      159,  109,  159,   71,  109,  159,  109,  159,  109,  159,
-
-      109,  159,  109,  159,  109,  159,   72,  103,  109,  159,
-      109,  159,   85,  109,  159,  104,  109,  159,   73,    9,
-        9,   12,   10,   10,   11,   99,   97
+      172,  170,  171,    3,  170,  171,    1,  171,   45,  170,
+      171,  170,  171,   20,  170,  171,   40,  170,  171,   42,
+      170,  171,  170,  171,   29,  170,  171,   30,  170,  171,
+       38,  170,  171,   36,  170,  171,   69,  170,  171,   37,
+      170,  171,   35,  170,  171,   39,  170,  171,  163,  170,
+      171,  163,  170,  171,   32,  170,  171,   31,  170,  171,
+       47,  170,  171,   46,  170,  171,   48,  170,  171,   34,
+      170,  171,  110,  160,  170,  171,  110,  160,  170,  171,
+      110,  160,  170,  171,  110,  160,  170,  171,  110,  160,
+      170,  171,   25,  170,  171,  170,  171,   27,  170,  171,
+
+       41,  170,  171,  110,  160,  170,  171,  110,  160,  170,
+      171,  110,  160,  170,  171,  110,  160,  170,  171,  110,
+      160,  170,  171,  110,  160,  170,  171,  110,  160,  170,
+      171,  110,  160,  170,  171,  110,  160,  170,  171,  110,
+      160,  170,  171,  110,  160,  170,  171,  110,  160,  170,
+      171,  110,  160,  170,  171,  110,  160,  170,  171,  110,
+      160,  170,  171,  110,  160,  170,  171,   21,  170,  171,
+       43,  170,  171,   23,  170,  171,   44,  170,  171,    3,
+        1,   62,  168,   53,   24,   65,   55,  166,   51,   67,
+       49,   68,   50,   70,  164,    4,    6,   52,  164,  162,
+
+      163,  163,  163,  163,   28,   22,   26,   57,   63,   61,
+       64,   58,  110,  160,  110,  160,  110,  160,  110,  160,
+        2,   54,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  119,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  134,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,   56,   66,   33,  164,    6,  162,
+
+      163,  162,  163,  165,  163,  163,  163,  161,   59,   60,
+      110,  160,  110,  160,  169,  167,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  111,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  132,  160,  110,  160,  110,  160,
+      110,  136,  160,  110,  160,  110,  160,  110,  160,  110,
+
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  164,
+      162,  163,  162,  163,  162,  163,  165,  163,  161,  161,
+      110,  160,  110,  160,  110,  160,  106,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  112,  160,   97,  110,  160,  110,
+
+      160,  110,  114,  160,  110,  115,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  121,  160,  110,  122,
+      160,  110,  160,  110,  160,  110,  160,  110,  133,  160,
+      110,  160,  110,  142,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  108,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  157,  160,  110,  160,  110,
+      160,   18,   13,  162,  163,  161,  161,  161,  107,  110,
+      160,  110,  160,  110,  160,   96,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,   74,  110,
+
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  103,  110,  160,  110,  113,  160,  110,  116,  160,
+      110,  160,  110,  160,  110,  160,  110,  160,  109,  110,
+      160,  110,  124,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  146,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      155,  160,  110,  160,  110,  160,  110,  159,  160,   15,
+      161,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  120,  160,  110,  123,
+      160,  110,  135,  160,  110,  160,  110,  160,  110,  145,
+      160,  110,  147,  160,  110,  150,  160,  110,  151,  160,
+      110,  152,  160,  110,  153,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,   14,   16,    5,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+
+      160,  110,  160,  110,  160,  110,  160,   75,  110,  160,
+      110,  160,   99,  110,  160,   78,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,  110,  137,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  118,  160,
+      110,  160,  110,  160,  110,  160,  110,  154,  160,  110,
+      160,  110,  160,   12,  110,  160,  110,  160,  110,  160,
+      110,  125,  160,  110,  126,  160,  110,  127,  160,   83,
+      110,  160,  110,  160,  110,  160,  110,  160,  110,  160,
+      110,  160,  110,  160,  110,  160,   81,  110,  160,  110,
+
+      141,  160,  110,  160,   87,  110,  160,  110,  160,  110,
+      148,  160,  110,  160,   93,  110,  160,  110,  160,  110,
+      160,  110,  117,  160,  110,  143,  160,  110,  144,  160,
+      110,  160,  110,  156,  160,  110,  158,  160,    8,   11,
+       19,   17,  110,  160,  110,  160,  110,  128,  160,  110,
+      129,  160,  110,  130,  160,   86,  110,  160,  110,  160,
+       84,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,   82,  110,  160,  110,  160,
+      110,  160,  102,  110,  160,  110,  160,  110,  140,  160,
+      110,  160,  110,  160,    7,    8,  110,  160,  110,  160,
+
+      110,  131,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,   80,  110,  160,  110,  139,  160,   88,
+      110,  160,  110,  149,  160,   92,  110,  160,  110,  160,
+       94,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,   77,  110,  160,  110,  160,  110,  160,
+      110,  138,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,  110,  160,  110,  160,  110,  160,   89,
+      110,  160,   95,  110,  160,   90,  110,  160,  110,  160,
+      110,  160,  110,  160,   91,  110,  160,   76,  110,  160,
+      101,   79,  110,  160,  110,  160,  110,  160,  110,  160,
+
+       71,  110,  160,  110,  160,  110,  160,  110,  160,  110,
+      160,  110,  160,   72,  104,  110,  160,  110,  160,   85,
+      110,  160,  105,  110,  160,   73,    9,    9,   12,   10,
+       10,   11,  100,   98
     } ;
 
-static const flex_int16_t yy_accept[746] =
+static const flex_int16_t yy_accept[749] =
     {   0,
         1,    1,    1,    2,    4,    7,    9,   12,   14,   17,
        20,   23,   25,   28,   31,   34,   37,   40,   43,   46,
@@ -503,75 +504,75 @@ static const flex_int16_t yy_accept[746] =
 
       211,  212,  213,  215,  217,  219,  219,  219,  221,  222,
       223,  225,  227,  229,  231,  233,  235,  237,  239,  241,
-      243,  245,  247,  250,  252,  254,  256,  258,  260,  262,
-      264,  267,  269,  271,  273,  275,  277,  279,  281,  283,
-      285,  287,  289,  291,  293,  294,  295,  295,  295,  295,
-      295,  295,  295,  295,  296,  296,  297,  297,  297,  298,
-      300,  302,  302,  303,  304,  305,  306,  307,  308,  309,
-      311,  313,  313,  314,  314,  314,  315,  315,  317,  319,
+      243,  245,  247,  249,  252,  254,  256,  258,  260,  262,
+      264,  266,  269,  271,  273,  275,  277,  279,  281,  283,
+      285,  287,  289,  291,  293,  295,  296,  297,  297,  297,
+      297,  297,  297,  297,  297,  298,  298,  299,  299,  299,
+      300,  302,  304,  304,  305,  306,  307,  308,  309,  310,
+      311,  313,  315,  315,  316,  316,  316,  317,  317,  319,
       321,  323,  325,  327,  329,  331,  333,  335,  337,  339,
-      341,  343,  345,  347,  349,  351,  353,  356,  358,  360,
+      341,  343,  345,  347,  349,  351,  353,  355,  358,  360,
 
       362,  364,  366,  368,  370,  372,  374,  376,  378,  380,
-      383,  385,  387,  390,  392,  394,  396,  398,  400,  402,
+      382,  384,  387,  389,  391,  394,  396,  398,  400,  402,
       404,  406,  408,  410,  412,  414,  416,  418,  420,  422,
-      424,  426,  426,  426,  426,  426,  426,  426,  426,  426,
-      426,  426,  426,  427,  427,  429,  431,  433,  434,  435,
-      436,  437,  439,  441,  443,  446,  448,  450,  452,  454,
+      424,  426,  428,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,  430,  431,  431,  433,  435,  437,
+      438,  439,  440,  441,  443,  445,  447,  450,  452,  454,
       456,  458,  460,  462,  464,  466,  468,  470,  472,  474,
-      476,  478,  480,  482,  484,  486,  488,  490,  493,  495,
-      498,  501,  503,  505,  507,  509,  512,  515,  517,  519,
-      521,  524,  526,  529,  531,  533,  535,  537,  539,  541,
-
-      543,  545,  547,  549,  552,  554,  556,  558,  561,  563,
-      565,  565,  566,  566,  566,  566,  566,  566,  567,  567,
-      567,  567,  567,  567,  569,  570,  571,  572,  575,  577,
-      579,  582,  584,  586,  588,  590,  592,  595,  597,  599,
-      601,  603,  605,  607,  609,  611,  613,  615,  617,  619,
-      621,  623,  625,  628,  631,  634,  636,  638,  640,  642,
-      645,  648,  650,  652,  654,  656,  659,  661,  663,  665,
-      667,  669,  671,  673,  676,  678,  680,  683,  683,  683,
-      683,  684,  684,  684,  684,  684,  684,  684,  684,  685,
-      687,  689,  691,  693,  695,  697,  699,  701,  701,  703,
-
-      705,  707,  709,  711,  713,  715,  717,  719,  721,  723,
-      725,  727,  729,  731,  733,  735,  737,  739,  742,  745,
-      748,  750,  752,  755,  758,  761,  764,  767,  770,  772,
-      774,  776,  778,  778,  778,  779,  779,  780,  780,  780,
-      780,  780,  780,  781,  783,  785,  787,  789,  791,  793,
-      795,  797,  799,  801,  801,  804,  806,  809,  812,  814,
-      816,  818,  820,  823,  825,  827,  829,  831,  833,  835,
-      837,  839,  841,  844,  846,  848,  850,  853,  855,  857,
-      857,  857,  857,  857,  858,  858,  858,  858,  858,  858,
-      860,  862,  864,  867,  870,  873,  876,  878,  880,  882,
-
-      884,  884,  884,  886,  888,  890,  893,  896,  898,  901,
-      903,  906,  908,  911,  913,  915,  918,  921,  924,  926,
-      926,  929,  932,  933,  933,  933,  933,  933,  933,  934,
-      934,  934,  935,  935,  936,  938,  940,  943,  946,  949,
-      952,  954,  957,  959,  959,  959,  959,  961,  963,  965,
-      967,  969,  972,  974,  976,  979,  981,  984,  986,  988,
-      988,  989,  990,  990,  990,  990,  990,  992,  994,  997,
-      999, 1001, 1001, 1001, 1001, 1003, 1005, 1007, 1010, 1013,
-     1016, 1019, 1022, 1024, 1027, 1029, 1029, 1029, 1029, 1029,
-     1029, 1031, 1033, 1035, 1037, 1037, 1037, 1037, 1040, 1040,
-
-     1040, 1042, 1044, 1047, 1049, 1051, 1051, 1051, 1051, 1051,
-     1051, 1053, 1055, 1057, 1059, 1059, 1059, 1059, 1061, 1061,
-     1061, 1061, 1063, 1066, 1069, 1072, 1072, 1072, 1072, 1072,
-     1072, 1074, 1076, 1078, 1081, 1081, 1081, 1081, 1084, 1085,
-     1085, 1088, 1088, 1088, 1088, 1088, 1088, 1090, 1092, 1094,
-     1095, 1095, 1095, 1095, 1095, 1095, 1095, 1095, 1095, 1097,
-     1099, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101,
-     1103, 1105, 1107, 1107, 1108, 1108, 1108, 1108, 1108, 1108,
-     1108, 1111, 1113, 1116, 1116, 1116, 1116, 1116, 1116, 1116,
-     1116, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119,
-
-     1119, 1119, 1119, 1119, 1119, 1119, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1121, 1121, 1121,
-     1123, 1123, 1123, 1123, 1123, 1123, 1123, 1124, 1124, 1124,
-     1126, 1126, 1126, 1126, 1127, 1127, 1127, 1127, 1127, 1127,
-     1127, 1127, 1127, 1128, 1128
+      476,  478,  480,  482,  484,  486,  488,  490,  492,  494,
+      497,  500,  502,  505,  508,  510,  512,  514,  516,  519,
+      522,  524,  526,  528,  531,  533,  536,  538,  540,  542,
+
+      544,  546,  548,  550,  552,  554,  556,  559,  561,  563,
+      565,  568,  570,  572,  572,  573,  573,  573,  573,  573,
+      573,  574,  574,  574,  574,  574,  574,  576,  577,  578,
+      579,  582,  584,  586,  589,  591,  593,  595,  597,  599,
+      602,  604,  606,  608,  610,  612,  614,  616,  618,  620,
+      622,  624,  626,  628,  630,  632,  635,  638,  641,  643,
+      645,  647,  649,  652,  655,  657,  659,  661,  663,  666,
+      668,  670,  672,  674,  676,  678,  680,  683,  685,  687,
+      690,  690,  690,  690,  691,  691,  691,  691,  691,  691,
+      691,  691,  692,  694,  696,  698,  700,  702,  704,  706,
+
+      708,  708,  710,  712,  714,  716,  718,  720,  722,  724,
+      726,  728,  730,  732,  734,  736,  738,  740,  742,  744,
+      746,  749,  752,  755,  757,  759,  762,  765,  768,  771,
+      774,  777,  779,  781,  783,  785,  785,  785,  786,  786,
+      787,  787,  787,  787,  787,  787,  788,  790,  792,  794,
+      796,  798,  800,  802,  804,  806,  808,  808,  811,  813,
+      816,  819,  821,  823,  825,  827,  830,  832,  834,  836,
+      838,  840,  842,  844,  846,  848,  851,  853,  855,  857,
+      860,  862,  864,  864,  864,  864,  864,  865,  865,  865,
+      865,  865,  865,  867,  869,  871,  874,  877,  880,  883,
+
+      885,  887,  889,  891,  891,  891,  893,  895,  897,  900,
+      903,  905,  908,  910,  913,  915,  918,  920,  922,  925,
+      928,  931,  933,  933,  936,  939,  940,  940,  940,  940,
+      940,  940,  941,  941,  941,  942,  942,  943,  945,  947,
+      950,  953,  956,  959,  961,  964,  966,  966,  966,  966,
+      968,  970,  972,  974,  976,  979,  981,  983,  986,  988,
+      991,  993,  995,  995,  996,  997,  997,  997,  997,  997,
+      999, 1001, 1004, 1006, 1008, 1008, 1008, 1008, 1010, 1012,
+     1014, 1017, 1020, 1023, 1026, 1029, 1031, 1034, 1036, 1036,
+     1036, 1036, 1036, 1036, 1038, 1040, 1042, 1044, 1044, 1044,
+
+     1044, 1047, 1047, 1047, 1049, 1051, 1054, 1056, 1058, 1058,
+     1058, 1058, 1058, 1058, 1060, 1062, 1064, 1066, 1066, 1066,
+     1066, 1068, 1068, 1068, 1068, 1070, 1073, 1076, 1079, 1079,
+     1079, 1079, 1079, 1079, 1081, 1083, 1085, 1088, 1088, 1088,
+     1088, 1091, 1092, 1092, 1095, 1095, 1095, 1095, 1095, 1095,
+     1097, 1099, 1101, 1102, 1102, 1102, 1102, 1102, 1102, 1102,
+     1102, 1102, 1104, 1106, 1108, 1108, 1108, 1108, 1108, 1108,
+     1108, 1108, 1108, 1110, 1112, 1114, 1114, 1115, 1115, 1115,
+     1115, 1115, 1115, 1115, 1118, 1120, 1123, 1123, 1123, 1123,
+     1123, 1123, 1123, 1123, 1126, 1126, 1126, 1126, 1126, 1126,
+
+     1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1127,
+     1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
+     1128, 1128, 1128, 1130, 1130, 1130, 1130, 1130, 1130, 1130,
+     1131, 1131, 1131, 1133, 1133, 1133, 1133, 1134, 1134, 1134,
+     1134, 1134, 1134, 1134, 1134, 1134, 1135, 1135
     } ;
 
 static const YY_CHAR yy_ec[256] =
@@ -619,185 +620,185 @@ static const YY_CHAR yy_meta[86] =
        15,    1,    1,    1,    1
     } ;
 
-static const flex_int16_t yy_base[775] =
+static const flex_int16_t yy_base[778] =
     {   0,
-        0,    0, 1409, 1410,   84,    0, 1376,   80,   85,   59,
-       83,   83, 1410, 1410, 1375,   80, 1410,   81,   79,   97,
-      140,  202, 1373, 1410,   99, 1373,   77, 1410,    0, 1369,
-     1347,  110, 1355, 1410, 1398, 1410, 1368,   98,   44, 1326,
-       68,   66,   56,   84, 1327,   78, 1326, 1335,  105,  108,
-     1325, 1323, 1329, 1410,   90, 1410, 1410,  172,    0, 1410,
-       89, 1410, 1389,  172, 1330,   81, 1328, 1324, 1315, 1410,
-     1410, 1410, 1410,  133, 1410, 1384, 1410, 1410, 1410, 1410,
-     1410, 1410, 1368,  170,  154,    0, 1410,  196,  193,    0,
-      259,  171,  134,    0, 1410, 1410, 1410, 1353, 1410, 1410,
-
-     1410, 1352,    0, 1339, 1341,  164,  192, 1331, 1410, 1410,
-     1309, 1311,  111, 1314,  231, 1308, 1301, 1314, 1300, 1316,
-     1302, 1309, 1294, 1295, 1292, 1292, 1298, 1294, 1291, 1288,
-        0,  136, 1292,  179, 1290,  126,  161, 1295, 1286, 1282,
-     1285,  185,  183, 1291, 1410, 1410,  290, 1293,  191, 1294,
-      207, 1283, 1295, 1410,  304, 1410, 1320,    0,    0,  289,
-      205,  320,  231,  218, 1410,  254,  305, 1410, 1410, 1302,
-      163,  282, 1410, 1346,  244, 1410, 1345, 1308, 1275, 1274,
-      250, 1276, 1270,  262,  290, 1281, 1262, 1270, 1268, 1265,
-     1276,  287, 1256, 1270, 1263, 1307,    0, 1261, 1274, 1269,
-
-     1256,  279, 1271, 1269, 1265, 1256, 1263, 1249, 1265,    0,
-     1250, 1255,    0, 1256, 1253, 1242, 1240, 1242, 1244, 1252,
-     1237, 1235, 1235, 1248, 1247, 1246, 1235, 1240, 1244, 1246,
-     1234, 1298, 1235, 1237, 1237, 1232, 1293, 1234, 1234, 1232,
-     1229,  362,  330, 1258,  284, 1410,  307, 1410, 1410,  327,
-      312, 1251, 1244, 1245,    0, 1219, 1229, 1215, 1223, 1215,
-     1221, 1212, 1205, 1218, 1208, 1218, 1201,  291, 1205, 1217,
-     1199, 1209, 1211, 1198, 1199, 1200, 1243,    0, 1199,    0,
-        0, 1190, 1199, 1187, 1194,    0,    0, 1188, 1199, 1184,
-        0, 1188,    0, 1183, 1183, 1182, 1179, 1192, 1181, 1186,
-
-     1191, 1190, 1191,    0, 1187, 1176, 1182,    0, 1169, 1182,
-     1239, 1410, 1171, 1235, 1236, 1176, 1234, 1410, 1174, 1174,
-     1229, 1164,  362, 1410,  318, 1410,  325,    0, 1183, 1186,
-        0, 1155, 1153, 1153,  322, 1170,  395, 1153, 1166, 1150,
-     1155, 1161, 1156,  337, 1150, 1156, 1143, 1147, 1157, 1154,
-     1139, 1156,    0,    0,    0, 1142, 1143, 1149, 1139,    0,
-        0, 1147, 1132, 1141, 1135,    0, 1144, 1141, 1143, 1126,
-     1136, 1139, 1137,    0, 1127, 1131,    0, 1134, 1191, 1190,
-     1410, 1189,  399, 1129,  385, 1133, 1175, 1169, 1410, 1161,
-     1137,  393, 1117, 1108, 1107, 1124, 1121,  413, 1124, 1114,
-
-     1110, 1102, 1102, 1105, 1104, 1151, 1148, 1095, 1101, 1096,
-     1107, 1110, 1095, 1144, 1089, 1087, 1087,    0,    0,    0,
-     1100, 1101,    0,    0,    0,    0,    0,    0, 1103, 1096,
-     1096, 1088, 1150, 1151, 1410, 1150, 1410,  418,  419,  423,
-      421, 1147, 1410, 1127, 1124,   97, 1127, 1124, 1079, 1073,
-     1075, 1076, 1087, 1071,  425, 1083,    0,    0, 1068, 1065,
-     1077, 1110,    0, 1068, 1078, 1069, 1073, 1064, 1069, 1108,
-     1064, 1067,    0, 1054, 1051, 1057, 1119, 1063, 1061,    0,
-     1065, 1117,  429, 1410,  335,  431,  435, 1116, 1115, 1061,
-     1092, 1088,    0, 1035, 1034,    0, 1042, 1037, 1049, 1041,
-
-     1040,  448, 1031, 1045, 1040, 1048, 1047, 1034,    0, 1042,
-     1044, 1031, 1042, 1070, 1028,    0,    0,    0, 1024, 1035,
-        0,    0, 1081, 1051,  259, 1035, 1087,  452, 1410,  432,
-     1086, 1410, 1085, 1410, 1050, 1030, 1006,    0,    0,    0,
-     1012,    0, 1012, 1025, 1025, 1009, 1004, 1019, 1006, 1020,
-     1000,    0,  999, 1017,    0, 1016, 1015, 1009, 1010, 1004,
-     1410, 1055, 1023,  436, 1024,  453, 1018, 1026,    0, 1001,
-     1002,  985,  982,  990,  996,  456,  986,    0,    0,  999,
-        0,    0,  979,  997,  995,  994,  994,  456, 1006,  457,
-     1003, 1001,  987,  988,  979,  972,  985,  985,  460,  980,
-
-      983,  982,    0,  981,  968,  962,  986,  461,  977,  460,
-      984,  986,  965,  961,  960,  959,  951,  969,    0, 1011,
-      453,  967,    0,    0,    0, 1017,  984,  464,  972,  467,
-      970,  970,  955,    0,  955,  958,  949,    0, 1410,  456,
-        0,  957,  977,  468,  974,  470,  975,  960,  943, 1410,
-      932,  938,  463,  949,  930,  257,  868,  475,  857,  866,
-      839,  834,  837,  468,  823,  851,  474,  850,  477,  833,
-      712,  695,  686, 1410,  471,  677,  711,  479,  704,  486,
-        0,  665,    0,  651,  470,  654,  662,  490,  668,  493,
-        0,  650,  473,  617,  635,  489,  607,  492,  597,  485,
-
-      570,  575,  494,  572,  496, 1410,  489,  567,  518,  538,
-      567,  502,  521,  509,  558,  554, 1410,  552,  548, 1410,
-      551,  557,  534,  487,  539,  535, 1410,  532,  523, 1410,
-      511,  504,  439,  498,  432,  341,  323,  297,  210,  158,
-      202,  172, 1410, 1410,  562,  578,  594,  605,  616,  632,
-      643,  657,  673,  688,  699,  715,  731,  742,  758,  774,
-      790,  806,  816,  832,  848,  864,  877,  892,  908,  924,
-      940,  956,  972,  988
+        0,    0, 1412, 1413,   84,    0, 1379,   80,   85,   59,
+       83,   83, 1413, 1413, 1378,   80, 1413,   81,   79,   97,
+      140,  202, 1376, 1413,   99, 1376,   77, 1413,    0, 1372,
+     1350,  110, 1358, 1413, 1401, 1413, 1371,   98,   44,   51,
+       68,   66,   72,   84, 1331,   86, 1330, 1339,  105,  108,
+     1329, 1327, 1333, 1413,   91, 1413, 1413,  171,    0, 1413,
+      142, 1413, 1393,  211, 1334,  117, 1332, 1328, 1319, 1413,
+     1413, 1413, 1413,  124, 1413, 1388, 1413, 1413, 1413, 1413,
+     1413, 1413, 1372,  153,  238,    0, 1413,  205,  203,    0,
+      266,  230,  134,    0, 1413, 1413, 1413, 1357, 1413, 1413,
+
+     1413, 1356,    0, 1343, 1345,  152,  133, 1335, 1413, 1413,
+     1313, 1315,  118, 1318,  250, 1312, 1305, 1308, 1317, 1303,
+     1319, 1305, 1312, 1297, 1298, 1295, 1295, 1301, 1297, 1294,
+     1291,    0,   51, 1295,  135, 1293,  119,  139, 1298, 1289,
+     1285, 1288,  139,  138, 1294, 1413, 1413,  309, 1296,  177,
+     1297,  202, 1286, 1298, 1413,  323, 1413, 1323,    0,    0,
+      308,  216,  339,  313,  200, 1413,  217,  324, 1413, 1413,
+     1305,  168,  164, 1413, 1349,  244, 1413, 1348, 1311, 1278,
+     1277,  186, 1279, 1273,  183,  204, 1284, 1265, 1273, 1271,
+     1268, 1279,  230, 1259, 1273, 1266, 1310,    0, 1264, 1266,
+
+     1276, 1271, 1258,  225, 1273, 1271, 1267, 1258, 1265, 1251,
+     1267,    0, 1252, 1257,    0, 1258, 1255, 1244, 1242, 1244,
+     1246, 1254, 1239, 1237, 1237, 1250, 1249, 1248, 1237, 1242,
+     1246, 1248, 1236, 1300, 1237, 1239, 1239, 1234, 1295, 1236,
+     1236, 1234, 1231,  381,  329, 1260,  227, 1413,  273, 1413,
+     1413,  343,  274, 1253, 1246, 1247,    0, 1221, 1231, 1217,
+     1225, 1217, 1223, 1214, 1207, 1220, 1210, 1220, 1203,  233,
+     1207, 1219, 1201, 1211, 1213, 1200, 1201, 1202, 1245,    0,
+        0, 1201,    0,    0, 1192, 1201, 1189, 1196,    0,    0,
+     1190, 1201, 1186,    0, 1190,    0, 1185, 1185, 1184, 1181,
+
+     1194, 1183, 1188, 1193, 1192, 1193,    0, 1189, 1178, 1184,
+        0, 1171, 1184, 1241, 1413, 1173, 1237, 1238, 1178, 1236,
+     1413, 1176, 1176, 1231, 1166,  375, 1413,  263, 1413,  310,
+        0, 1185, 1188,    0, 1157, 1155, 1155,  299, 1172,  381,
+     1155, 1168, 1152, 1157, 1163, 1158,  295, 1152, 1158, 1145,
+     1149, 1159, 1156, 1141, 1158,    0,    0,    0, 1144, 1145,
+     1151, 1141,    0,    0, 1149, 1134, 1143, 1137,    0, 1146,
+     1143, 1145, 1128, 1138, 1141, 1139,    0, 1129, 1133,    0,
+     1136, 1193, 1192, 1413, 1191,  263, 1131,  400, 1135, 1177,
+     1171, 1413, 1163, 1139,  373, 1119, 1110, 1109, 1126, 1123,
+
+      408, 1126, 1116, 1112, 1104, 1104, 1107, 1106, 1153, 1150,
+     1097, 1103, 1098, 1109, 1112, 1097, 1146, 1091, 1089, 1089,
+        0,    0,    0, 1102, 1103,    0,    0,    0,    0,    0,
+        0, 1105, 1098, 1098, 1090, 1152, 1153, 1413, 1152, 1413,
+      377,  412,  393,  424, 1149, 1413, 1129, 1126,  408, 1129,
+     1126, 1081, 1075, 1077, 1078, 1089, 1073,  434, 1085,    0,
+        0, 1070, 1067, 1079, 1112,    0, 1070, 1080, 1071, 1075,
+     1066, 1071, 1110, 1066, 1069,    0, 1056, 1053, 1059, 1121,
+     1065, 1063,    0, 1067, 1119,  438, 1413,  316,  430,  451,
+     1118, 1117, 1063, 1094, 1090,    0, 1037, 1036,    0, 1044,
+
+     1039, 1051, 1043, 1042,  453, 1033, 1047, 1042, 1050, 1049,
+     1036,    0, 1044, 1046, 1033, 1044, 1072, 1030,    0,    0,
+        0, 1026, 1037,    0,    0, 1083, 1053,  428, 1037, 1089,
+      457, 1413,  415, 1088, 1413, 1087, 1413, 1052, 1032, 1008,
+        0,    0,    0, 1014,    0, 1014, 1027, 1027, 1011, 1006,
+     1021, 1008, 1022, 1002,    0, 1001, 1019,    0, 1018, 1017,
+     1011, 1012, 1006, 1413, 1057, 1025,  439, 1026,  458, 1020,
+     1028,    0, 1003, 1004,  987,  984,  992,  998,  461,  988,
+        0,    0, 1001,    0,    0,  981,  999,  997,  996,  996,
+      461, 1008,  462, 1005, 1003,  989,  990,  981,  974,  987,
+
+      987,  465,  982,  985,  984,    0,  983,  970,  964,  988,
+      368,  979,  469,  986,  988,  967,  963,  962,  961,  953,
+      971,    0, 1013,  235,  969,    0,    0,    0, 1019,  986,
+      471,  974,  472,  972,  972,  957,    0,  957,  960,  951,
+        0, 1413,  463,    0,  959,  979,  475,  976,  477,  977,
+      962,  945, 1413,  934,  940,  466,  951,  961,  478,  941,
+      480,  859,  868,  841,  836,  839,  471,  825,  853,  484,
+      852,  486,  847,  838,  698,  688, 1413,  475,  680,  714,
+      487,  706,  488,    0,  701,    0,  654,  479,  656,  665,
+      490,  671,  499,    0,  652,  482,  632,  637,  493,  645,
+
+      494,  599,  485,  589,  580,  497,  576,  498, 1413,  490,
+      570,  516,  540,  571,  503,  499,  568,  563,  559, 1413,
+      549,  548, 1413,  553,  558,  535,  490,  541,  537, 1413,
+      525,  524, 1413,  511,  509,  442,  491,  316,  327,  297,
+      237,  248,  227,  196,   93, 1413, 1413,  563,  579,  595,
+      606,  617,  633,  644,  658,  674,  689,  700,  716,  732,
+      743,  759,  775,  791,  807,  817,  833,  849,  865,  878,
+      893,  909,  925,  941,  957,  973,  989
     } ;
 
-static const flex_int16_t yy_def[775] =
+static const flex_int16_t yy_def[778] =
     {   0,
-      744,    1,  744,  744,  744,  745,  744,  746,  744,  744,
-      744,  747,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  748,  748,
-      748,  748,  748,  744,  744,  744,  744,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  744,  744,  744,  744,  744,  745,  744,
-      746,  744,  746,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  747,  744,  747,  744,  744,  744,  744,
-      744,  744,  744,  749,  744,  750,  744,  749,   21,   22,
-      744,  744,  744,  751,  744,  744,  744,  744,  744,  744,
-
-      744,  744,  748,  748,  748,  752,  753,  748,  744,  744,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  754,  750,  744,
-      744,  744,  755,  744,  744,  744,  751,  744,  744,  748,
-      748,  752,  744,  752,  753,  744,  753,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  756,  744,  744,  744,  744,  757,  744,  744,  744,
-      744,  744,  758,  754,  744,  744,  744,  744,  744,  744,
-      744,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      756,  744,  744,  744,  759,  744,  757,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  744,  760,  759,
-      744,  761,  744,  744,  744,  744,  744,  744,  744,  748,
-      748,  748,  748,  748,  748,  748,  748,  744,  748,  748,
-
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  744,  760,  744,  761,  744,  744,  762,  744,
-      744,  744,  744,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  744,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  763,
-      744,  762,  762,  744,  762,  744,  764,  765,  766,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-
-      744,  744,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  744,
-      748,  748,  767,  744,  762,  744,  764,  764,  744,  764,
-      765,  744,  766,  744,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  744,  744,  744,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  744,
-      744,  767,  744,  762,  744,  764,  748,  748,  748,  748,
-      748,  744,  744,  744,  748,  748,  748,  748,  748,  748,
-      748,  748,  748,  748,  748,  744,  744,  762,  744,  764,
-      748,  748,  748,  748,  744,  744,  744,  748,  744,  768,
-
-      748,  748,  748,  748,  748,  744,  744,  762,  744,  764,
-      748,  748,  748,  748,  744,  744,  744,  748,  768,  768,
-      768,  748,  748,  748,  748,  744,  744,  762,  744,  764,
-      748,  748,  748,  748,  744,  744,  744,  748,  744,  768,
-      748,  744,  744,  762,  744,  764,  748,  748,  748,  744,
-      744,  744,  768,  744,  744,  762,  744,  764,  748,  748,
-      748,  744,  744,  768,  744,  744,  762,  744,  764,  748,
-      748,  748,  744,  744,  768,  744,  744,  762,  744,  764,
-      748,  748,  748,  744,  768,  744,  744,  762,  744,  764,
-      748,  744,  768,  744,  744,  762,  744,  764,  744,  768,
-
-      744,  744,  762,  744,  764,  744,  768,  744,  769,  770,
-      744,  764,  768,  744,  769,  769,  744,  770,  770,  744,
-      771,  772,  773,  744,  771,  771,  744,  772,  772,  744,
-      773,  773,  744,  773,  744,  744,  744,  744,  744,  744,
-      774,  774,  744,    0,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744
+      747,    1,  747,  747,  747,  748,  747,  749,  747,  747,
+      747,  750,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  751,  751,
+      751,  751,  751,  747,  747,  747,  747,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  747,  747,  747,  747,  747,  748,  747,
+      749,  747,  749,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  750,  747,  750,  747,  747,  747,  747,
+      747,  747,  747,  752,  747,  753,  747,  752,   21,   22,
+      747,  747,  747,  754,  747,  747,  747,  747,  747,  747,
+
+      747,  747,  751,  751,  751,  755,  756,  751,  747,  747,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  757,  753,
+      747,  747,  747,  758,  747,  747,  747,  754,  747,  747,
+      751,  751,  755,  747,  755,  756,  747,  756,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  759,  747,  747,  747,  747,  760,  747,
+      747,  747,  747,  747,  761,  757,  747,  747,  747,  747,
+      747,  747,  747,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  759,  747,  747,  747,  762,  747,  760,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      747,  763,  762,  747,  764,  747,  747,  747,  747,  747,
+      747,  747,  751,  751,  751,  751,  751,  751,  751,  751,
+
+      747,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  747,  763,  747,  764,  747,
+      747,  765,  747,  747,  747,  747,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  747,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  766,  747,  765,  765,  747,  765,  747,  767,
+      768,  769,  751,  751,  751,  751,  751,  751,  751,  751,
+
+      751,  751,  751,  747,  747,  751,  751,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  747,  751,  751,  770,  747,  765,  747,  767,
+      767,  747,  767,  768,  747,  769,  747,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  747,  747,  747,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  747,  747,  770,  747,  765,  747,  767,  751,
+      751,  751,  751,  751,  747,  747,  747,  751,  751,  751,
+      751,  751,  751,  751,  751,  751,  751,  751,  747,  747,
+      765,  747,  767,  751,  751,  751,  751,  747,  747,  747,
+
+      751,  747,  771,  751,  751,  751,  751,  751,  747,  747,
+      765,  747,  767,  751,  751,  751,  751,  747,  747,  747,
+      751,  771,  771,  771,  751,  751,  751,  751,  747,  747,
+      765,  747,  767,  751,  751,  751,  751,  747,  747,  747,
+      751,  747,  771,  751,  747,  747,  765,  747,  767,  751,
+      751,  751,  747,  747,  747,  771,  747,  747,  765,  747,
+      767,  751,  751,  751,  747,  747,  771,  747,  747,  765,
+      747,  767,  751,  751,  751,  747,  747,  771,  747,  747,
+      765,  747,  767,  751,  751,  751,  747,  771,  747,  747,
+      765,  747,  767,  751,  747,  771,  747,  747,  765,  747,
+
+      767,  747,  771,  747,  747,  765,  747,  767,  747,  771,
+      747,  772,  773,  747,  767,  771,  747,  772,  772,  747,
+      773,  773,  747,  774,  775,  776,  747,  774,  774,  747,
+      775,  775,  747,  776,  776,  747,  776,  747,  747,  747,
+      747,  747,  747,  777,  777,  747,    0,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747
     } ;
 
-static const flex_int16_t yy_nxt[1496] =
+static const flex_int16_t yy_nxt[1499] =
     {   0,
         4,    5,    6,    5,    5,    7,    8,    9,   10,   11,
        12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
@@ -808,165 +809,165 @@ static const flex_int16_t yy_nxt[1496] =
        43,   44,   45,   29,   46,   29,   29,   47,   29,   29,
        29,   29,   48,   49,   50,   51,   52,   53,   29,   29,
        29,   54,   55,   56,   57,   58,   62,   58,   58,   64,
-       70,   71,   72,   75,   78,   62,   83,   80,   84,   84,
+       70,   71,   72,   75,   78,  746,   83,   80,   84,   84,
 
        84,   84,   84,   84,   84,   84,   84,   96,  101,  102,
-       85,   79,   81,   82,   73,   86,  106,  116,  492,  117,
-      107,  145,  493,  124,  119,  125,  122,   97,   87,   98,
-       99,  120,   63,  111,  126,   76,  123,  112,  121,  131,
-      127,   63,  113,   75,   65,   66,  114,  132,  149,   67,
-      150,  128,   68,  115,  129,  157,   69,   88,  157,   89,
-       89,   89,   89,   89,   89,   89,   90,   90,  135,  136,
-      173,  139,  146,   58,  743,   58,   58,  166,   91,  137,
-      140,  181,  138,   92,  158,   76,  182,  141,  219,   93,
-       94,  147,  147,  147,  147,  147,  147,  147,  147,  147,
-
-       91,  166,  176,  212,  743,  253,  220,   92,  155,  156,
-      213,  237,  254,  156,  164,   93,  174,  221,   94,   88,
-      165,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-      155,  156,  741,  222,  155,  156,  160,  156,  164,  156,
-       91,  215,  161,  744,  177,   92,  165,  229,  247,  227,
-      230,   93,  216,  217,  176,  234,  155,  156,  228,  484,
-      160,  484,   91,  156,  235,  740,  238,  165,  161,   92,
-      248,  744,  247,  162,  248,  162,  239,   93,  163,  163,
-      163,  163,  163,  163,  163,  163,  163,  184,  173,  185,
-      186,  187,  248,  165,  232,  188,  177,  249,  248,  564,
-
-      189,  667,  190,  191,  192,  193,  194,  195,  196,  147,
-      147,  147,  147,  147,  147,  147,  147,  147,  242,  258,
-      242,  249,  259,  243,  243,  243,  243,  243,  243,  243,
-      243,  243,  245,  246,  174,  262,  263,  484,  246,  163,
-      163,  163,  163,  163,  163,  163,  163,  163,  250,  264,
-      324,  272,  282,  283,  251,  327,  245,  406,  343,  246,
-      265,  273,  407,  387,  246,  344,  387,  326,  389,  156,
-      325,  739,  250,  156,  324,  388,  326,  395,  396,  327,
-      251,  243,  243,  243,  243,  243,  243,  243,  243,  243,
-      525,  156,  389,  326,  325,  738,  398,  156,  398,  398,
-
-      438,  737,  326,  439,  441,  441,  441,  441,  441,  441,
-      441,  441,  441,  446,  398,  447,  398,  398,  448,  438,
-      483,  484,  438,  483,  486,  488,  502,  487,  502,  502,
-      483,  484,  486,  483,  529,  486,  528,  529,  484,  528,
-      441,  441,  441,  441,  441,  441,  441,  441,  441,  502,
-      399,  502,  502,  528,  529,  529,  528,  599,  484,  529,
-      599,  599,  529,  484,  599,  639,  484,  600,  639,  529,
-      484,  619,  529,  481,  485,  639,  484,  529,  588,  529,
-      639,  484,  639,  639,  485,  639,  526,  566,  529,  454,
-      530,  484,  484,  590,  529,  529,  484,  639,  529,  610,
-
-      644,  639,  656,  545,  529,  736,  658,  530,  628,  669,
-      734,  608,  735,  640,  646,  630,  734,  688,  678,  716,
-      717,  680,  716,  732,  546,  730,  693,  653,  675,  685,
-      690,  698,  723,  639,  730,  664,  696,  727,  705,  719,
-      720,  727,  719,  733,  703,  707,  732,  700,  713,  710,
-      720,  712,  726,  727,  720,  726,  717,  722,  729,  730,
-      717,  729,   59,   59,  724,   59,   59,   59,   59,   59,
-       59,   59,   59,   59,   59,   59,   59,   59,   61,   61,
+       85,   79,   81,   82,   73,   86,  106,  116,  214,  117,
+      107,  118,  146,  119,  120,  215,  123,   97,   87,   98,
+       99,  121,   63,  111,   75,   76,  124,  112,  122,  125,
+      128,  126,  113,  177,   65,   66,  114,  132,   62,   67,
+      127,  129,   68,  115,  130,  133,   69,   88,  174,   89,
+       89,   89,   89,   89,   89,   89,   90,   90,  136,  137,
+      174,  140,   58,  147,   58,   58,   76,  167,   91,  138,
+      141,  221,  139,   92,  150,  178,  151,  142,  182,   93,
+       94,  156,  157,  183,   63,  223,  157,  217,  746,  222,
+
+       91,  167,  231,  229,  175,  232,  239,   92,  218,  219,
+      255,  224,  230,  156,  157,   93,  175,  256,   94,   88,
+      157,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+      148,  148,  148,  148,  148,  148,  148,  148,  148,  158,
+       91,  236,  158,  156,  157,   92,  161,  642,  157,  166,
+      237,   93,  162,  747,  177,  260,  264,  265,  261,  249,
+      251,  240,   91,  266,  441,  156,  157,  442,  159,   92,
+      161,  241,  157,  165,  267,  166,  248,   93,  162,  166,
+      163,  747,  163,  249,  251,  164,  164,  164,  164,  164,
+      164,  164,  164,  164,  274,  643,  178,  165,  285,  286,
+
+      346,  744,  248,  743,  275,  166,  185,  347,  186,  187,
+      188,  742,  329,  234,  189,  409,  327,  330,  487,  190,
+      410,  191,  192,  193,  194,  195,  196,  197,  148,  148,
+      148,  148,  148,  148,  148,  148,  148,  244,  329,  244,
+      327,  330,  245,  245,  245,  245,  245,  245,  245,  245,
+      245,  247,  250,  392,  398,  399,  250,  248,  164,  164,
+      164,  164,  164,  164,  164,  164,  164,  252,  157,  741,
+      487,  528,  157,  253,  250,  247,  390,  392,  441,  390,
+      250,  441,  401,  248,  401,  401,  328,  740,  391,  739,
+      157,  252,  329,  449,  489,  450,  157,  490,  451,  253,
+
+      245,  245,  245,  245,  245,  245,  245,  245,  245,  401,
+      328,  401,  401,  486,  487,  631,  486,  532,  329,  444,
+      444,  444,  444,  444,  444,  444,  444,  444,  491,  495,
+      487,  489,  484,  496,  489,  505,  402,  505,  505,  486,
+      487,  487,  486,  444,  444,  444,  444,  444,  444,  444,
+      444,  444,  531,  532,  505,  531,  505,  505,  531,  532,
+      532,  531,  602,  487,  532,  602,  602,  488,  567,  602,
+      569,  532,  603,  487,  532,  642,  622,  487,  642,  532,
+      487,  591,  532,  642,  457,  529,  487,  642,  532,  487,
+      532,  642,  487,  488,  642,  487,  532,  642,  593,  487,
+
+      532,  532,  642,  737,  613,  532,  533,  647,  548,  659,
+      726,  642,  533,  661,  672,  738,  611,  719,  720,  649,
+      719,  737,  670,  735,  633,  691,  733,  733,  681,  549,
+      683,  678,  693,  688,  656,  696,  699,  701,  667,  730,
+      708,  722,  723,  730,  722,  710,  736,  735,  706,  716,
+      723,  723,  713,  715,  729,  730,  703,  729,  725,  732,
+      733,  720,  732,   59,   59,  720,   59,   59,   59,   59,
+       59,   59,   59,   59,   59,   59,   59,   59,   59,   61,
        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
-       61,   61,   61,   61,   74,   74,   74,   74,   74,   74,
+       61,   61,   61,   61,   61,   74,   74,   74,   74,   74,
 
        74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
-      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
-      103,   84,  721,   84,   84,  714,   84,  711,   84,   84,
-      709,   84,  159,  159,  708,  159,  159,  159,  159,  159,
-      159,  159,  159,  159,  159,  159,  159,  159,  167,  167,
-      167,  167,  706,  704,  167,  167,  167,  172,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-      172,  172,  172,  175,  175,  175,  175,  175,  175,  175,
-      175,  175,  175,  175,  175,  175,  175,  175,  175,  244,
-      702,  701,  244,  244,  244,  244,  244,  244,  244,  244,
-
-      244,  244,  244,  244,  163,  699,  697,  163,  695,  163,
-      694,  692,  163,  691,  163,  311,  311,  311,  311,  311,
-      311,  311,  311,  311,  311,  311,  311,  311,  311,  311,
-      311,  317,  317,  317,  317,  317,  317,  317,  317,  317,
-      317,  317,  317,  317,  317,  317,  317,  243,  689,  687,
-      243,  686,  243,  684,  683,  243,  682,  243,  380,  380,
-      380,  380,  380,  380,  380,  380,  380,  380,  380,  380,
-      380,  380,  380,  380,  434,  434,  434,  434,  434,  434,
-      434,  434,  434,  434,  434,  434,  434,  434,  434,  434,
-      436,  436,  436,  436,  436,  436,  436,  436,  436,  436,
-
-      436,  436,  436,  436,  436,  436,  482,  482,  482,  482,
-      482,  482,  482,  482,  482,  482,  482,  482,  482,  482,
-      482,  482,  523,  523,  523,  523,  523,  523,  523,  523,
-      523,  523,  527,  527,  527,  527,  527,  527,  527,  527,
-      527,  527,  527,  527,  527,  527,  527,  527,  531,  531,
-      531,  531,  531,  531,  531,  531,  531,  531,  531,  531,
-      531,  531,  531,  531,  533,  533,  533,  533,  533,  533,
-      533,  533,  533,  533,  533,  533,  533,  533,  533,  533,
-      562,  681,  562,  562,  562,  562,  562,  562,  562,  562,
-      562,  562,  562,  620,  679,  677,  676,  674,  673,  672,
-
-      671,  670,  668,  620,  620,  620,  620,  620,  715,  715,
-      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
-      715,  715,  715,  715,  718,  718,  718,  718,  718,  718,
+       74,  103,  103,  103,  103,  103,  103,  103,  103,  103,
+      103,  103,   84,  727,   84,   84,  724,   84,  717,   84,
+       84,  714,   84,  160,  160,  712,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  168,
+      168,  168,  168,  711,  709,  168,  168,  168,  173,  173,
+      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
+      173,  173,  173,  173,  176,  176,  176,  176,  176,  176,
+      176,  176,  176,  176,  176,  176,  176,  176,  176,  176,
+      246,  707,  705,  246,  246,  246,  246,  246,  246,  246,
+
+      246,  246,  246,  246,  246,  164,  704,  702,  164,  700,
+      164,  698,  697,  164,  695,  164,  314,  314,  314,  314,
+      314,  314,  314,  314,  314,  314,  314,  314,  314,  314,
+      314,  314,  320,  320,  320,  320,  320,  320,  320,  320,
+      320,  320,  320,  320,  320,  320,  320,  320,  245,  694,
+      692,  245,  690,  245,  689,  687,  245,  686,  245,  383,
+      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  383,  383,  437,  437,  437,  437,  437,
+      437,  437,  437,  437,  437,  437,  437,  437,  437,  437,
+      437,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+
+      439,  439,  439,  439,  439,  439,  439,  485,  485,  485,
+      485,  485,  485,  485,  485,  485,  485,  485,  485,  485,
+      485,  485,  485,  526,  526,  526,  526,  526,  526,  526,
+      526,  526,  526,  530,  530,  530,  530,  530,  530,  530,
+      530,  530,  530,  530,  530,  530,  530,  530,  530,  534,
+      534,  534,  534,  534,  534,  534,  534,  534,  534,  534,
+      534,  534,  534,  534,  534,  536,  536,  536,  536,  536,
+      536,  536,  536,  536,  536,  536,  536,  536,  536,  536,
+      536,  565,  685,  565,  565,  565,  565,  565,  565,  565,
+      565,  565,  565,  565,  623,  684,  682,  680,  679,  677,
+
+      676,  675,  674,  673,  623,  623,  623,  623,  623,  718,
       718,  718,  718,  718,  718,  718,  718,  718,  718,  718,
-      725,  725,  725,  725,  725,  725,  725,  725,  725,  725,
-      725,  725,  725,  725,  725,  725,  728,  728,  728,  728,
-      728,  728,  728,  728,  728,  728,  728,  728,  728,  728,
-      728,  728,  731,  731,  666,  731,  731,  731,  731,  731,
-      731,  731,  731,  731,  731,  731,  731,  731,  742,  742,
-      742,  742,  742,  742,  742,  742,  742,  742,  742,  742,
-
-      742,  742,  742,  742,  665,  663,  662,  661,  660,  659,
-      657,  655,  654,  652,  651,  650,  649,  648,  647,  645,
-      643,  642,  641,  639,  638,  637,  636,  635,  634,  633,
-      632,  631,  629,  627,  626,  625,  624,  623,  622,  621,
-      618,  617,  616,  615,  614,  613,  612,  611,  609,  607,
-      606,  605,  604,  603,  602,  601,  598,  597,  596,  595,
-      594,  593,  592,  591,  589,  587,  561,  586,  585,  584,
-      583,  582,  581,  580,  579,  578,  577,  576,  575,  574,
-      573,  572,  571,  570,  569,  568,  567,  534,  532,  529,
-      565,  563,  561,  560,  559,  558,  557,  556,  555,  554,
-
-      553,  552,  551,  550,  549,  548,  547,  544,  543,  542,
-      541,  540,  539,  538,  537,  536,  535,  534,  532,  484,
-      524,  522,  521,  520,  519,  518,  517,  516,  515,  514,
-      513,  512,  511,  510,  509,  508,  507,  506,  505,  504,
-      503,  501,  500,  499,  498,  497,  496,  495,  494,  491,
-      490,  489,  437,  435,  480,  479,  478,  477,  476,  475,
-      474,  473,  472,  471,  470,  469,  468,  467,  466,  465,
-      464,  463,  462,  461,  460,  459,  458,  457,  456,  455,
-      453,  452,  451,  450,  449,  445,  444,  443,  388,  442,
-      440,  437,  381,  435,  433,  432,  431,  430,  429,  428,
-
-      427,  426,  425,  424,  423,  422,  421,  420,  419,  418,
-      417,  416,  415,  414,  413,  412,  411,  410,  409,  408,
-      405,  404,  403,  402,  401,  400,  397,  394,  393,  392,
-      391,  390,  386,  385,  384,  383,  318,  382,  381,  379,
-      378,  312,  377,  376,  375,  374,  373,  372,  371,  370,
-      369,  368,  367,  366,  365,  364,  363,  362,  361,  360,
-      359,  358,  357,  356,  355,  354,  353,  352,  351,  350,
-      349,  348,  347,  346,  345,  342,  341,  340,  339,  338,
-      337,  336,  335,  334,  333,  332,  331,  330,  329,  328,
-      323,  322,  321,  320,  319,  318,  316,  315,  314,  313,
-
-      312,  310,  309,  308,  307,  306,  305,  304,  303,  302,
-      301,  300,  299,  298,  297,  296,  295,  294,  293,  292,
-      291,  290,  289,  288,  287,  286,  285,  284,  281,  280,
-      279,  278,  277,  276,  275,  274,  271,  270,  269,  268,
-      267,  266,  261,  260,  257,  256,  255,  744,  744,  252,
-      158,  241,  240,  236,  233,  231,  226,  225,  224,  223,
-      218,  214,  211,  210,  209,  208,  207,  206,  205,  204,
-      203,  202,  201,  200,  199,  198,  197,  183,  180,  179,
-      178,  171,  170,  169,  168,  154,  744,  153,  152,  151,
-      148,  744,  144,  143,  142,  134,  133,  130,  118,  110,
-
-      109,  108,  105,  104,  100,   95,   77,   60,  744,    3,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744
+      718,  718,  718,  718,  718,  721,  721,  721,  721,  721,
+      721,  721,  721,  721,  721,  721,  721,  721,  721,  721,
+      721,  728,  728,  728,  728,  728,  728,  728,  728,  728,
+      728,  728,  728,  728,  728,  728,  728,  731,  731,  731,
+      731,  731,  731,  731,  731,  731,  731,  731,  731,  731,
+      731,  731,  731,  734,  734,  671,  734,  734,  734,  734,
+      734,  734,  734,  734,  734,  734,  734,  734,  734,  745,
+      745,  745,  745,  745,  745,  745,  745,  745,  745,  745,
+
+      745,  745,  745,  745,  745,  669,  668,  666,  665,  664,
+      663,  662,  660,  658,  657,  655,  654,  653,  652,  651,
+      650,  648,  646,  645,  644,  642,  641,  640,  639,  638,
+      637,  636,  635,  634,  632,  630,  629,  628,  627,  626,
+      625,  624,  621,  620,  619,  618,  617,  616,  615,  614,
+      612,  610,  609,  608,  607,  606,  605,  604,  601,  600,
+      599,  598,  597,  596,  595,  594,  592,  590,  564,  589,
+      588,  587,  586,  585,  584,  583,  582,  581,  580,  579,
+      578,  577,  576,  575,  574,  573,  572,  571,  570,  537,
+      535,  532,  568,  566,  564,  563,  562,  561,  560,  559,
+
+      558,  557,  556,  555,  554,  553,  552,  551,  550,  547,
+      546,  545,  544,  543,  542,  541,  540,  539,  538,  537,
+      535,  487,  527,  525,  524,  523,  522,  521,  520,  519,
+      518,  517,  516,  515,  514,  513,  512,  511,  510,  509,
+      508,  507,  506,  504,  503,  502,  501,  500,  499,  498,
+      497,  494,  493,  492,  440,  438,  483,  482,  481,  480,
+      479,  478,  477,  476,  475,  474,  473,  472,  471,  470,
+      469,  468,  467,  466,  465,  464,  463,  462,  461,  460,
+      459,  458,  456,  455,  454,  453,  452,  448,  447,  446,
+      391,  445,  443,  440,  384,  438,  436,  435,  434,  433,
+
+      432,  431,  430,  429,  428,  427,  426,  425,  424,  423,
+      422,  421,  420,  419,  418,  417,  416,  415,  414,  413,
+      412,  411,  408,  407,  406,  405,  404,  403,  400,  397,
+      396,  395,  394,  393,  389,  388,  387,  386,  321,  385,
+      384,  382,  381,  315,  380,  379,  378,  377,  376,  375,
+      374,  373,  372,  371,  370,  369,  368,  367,  366,  365,
+      364,  363,  362,  361,  360,  359,  358,  357,  356,  355,
+      354,  353,  352,  351,  350,  349,  348,  345,  344,  343,
+      342,  341,  340,  339,  338,  337,  336,  335,  334,  333,
+      332,  331,  326,  325,  324,  323,  322,  321,  319,  318,
+
+      317,  316,  315,  313,  312,  311,  310,  309,  308,  307,
+      306,  305,  304,  303,  302,  301,  300,  299,  298,  297,
+      296,  295,  294,  293,  292,  291,  290,  289,  288,  287,
+      284,  283,  282,  281,  280,  279,  278,  277,  276,  273,
+      272,  271,  270,  269,  268,  263,  262,  259,  258,  257,
+      747,  747,  254,  159,  243,  242,  238,  235,  233,  228,
+      227,  226,  225,  220,  216,  213,  212,  211,  210,  209,
+      208,  207,  206,  205,  204,  203,  202,  201,  200,  199,
+      198,  184,  181,  180,  179,  172,  171,  170,  169,  155,
+      747,  154,  153,  152,  149,  747,  145,  144,  143,  135,
+
+      134,  131,  110,  109,  108,  105,  104,  100,   95,   77,
+       60,  747,    3,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747
 
     } ;
 
-static const flex_int16_t yy_chk[1496] =
+static const flex_int16_t yy_chk[1499] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -977,161 +978,161 @@ static const flex_int16_t yy_chk[1496] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    5,    8,    5,    5,    9,
-       10,   10,   11,   12,   16,   61,   19,   18,   19,   19,
+       10,   10,   11,   12,   16,  745,   19,   18,   19,   19,
 
        19,   19,   19,   19,   19,   19,   19,   25,   27,   27,
-       20,   16,   18,   18,   11,   20,   32,   39,  446,   39,
-       32,   55,  446,   43,   41,   43,   42,   25,   20,   25,
-       25,   41,    8,   38,   43,   12,   42,   38,   41,   46,
-       44,   61,   38,   74,    9,    9,   38,   46,   66,    9,
-       66,   44,    9,   38,   44,   85,    9,   21,   85,   21,
+       20,   16,   18,   18,   11,   20,   32,   39,  133,   39,
+       32,   40,   55,   40,   41,  133,   42,   25,   20,   25,
+       25,   41,    8,   38,   74,   12,   42,   38,   41,   43,
+       44,   43,   38,  107,    9,    9,   38,   46,   61,    9,
+       43,   44,    9,   38,   44,   46,    9,   21,  106,   21,
        21,   21,   21,   21,   21,   21,   21,   21,   49,   49,
-      106,   50,   55,   58,  742,   58,   58,   93,   21,   49,
-       50,  113,   49,   21,   85,   74,  113,   50,  136,   21,
-       21,   64,   64,   64,   64,   64,   64,   64,   64,   64,
-
-       21,   93,  107,  132,  741,  171,  136,   21,   84,   84,
-      132,  151,  171,   84,   92,   21,  106,  137,   21,   22,
-       92,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-       84,   84,  740,  137,   88,   88,   89,   84,   92,   88,
-       22,  134,   89,   89,  107,   22,   92,  143,  161,  142,
-      143,   22,  134,  134,  175,  149,   88,   88,  142,  656,
-       89,  525,   22,   88,  149,  739,  151,  164,   89,   22,
-      163,   89,  161,   91,  163,   91,  151,   22,   91,   91,
-       91,   91,   91,   91,   91,   91,   91,  115,  172,  115,
-      115,  115,  163,  164,  147,  115,  175,  166,  163,  525,
-
-      115,  656,  115,  115,  115,  115,  115,  115,  115,  147,
-      147,  147,  147,  147,  147,  147,  147,  147,  155,  181,
-      155,  166,  181,  155,  155,  155,  155,  155,  155,  155,
-      155,  155,  160,  245,  172,  184,  184,  485,  160,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  167,  185,
-      247,  192,  202,  202,  167,  251,  160,  344,  268,  245,
-      185,  192,  344,  323,  160,  268,  323,  325,  327,  243,
-      250,  738,  167,  243,  247,  323,  250,  335,  335,  251,
-      167,  242,  242,  242,  242,  242,  242,  242,  242,  242,
-      485,  243,  327,  325,  250,  737,  337,  243,  337,  337,
-
-      383,  736,  250,  383,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  392,  398,  392,  398,  398,  392,  438,
-      439,  439,  438,  439,  440,  441,  455,  440,  455,  455,
-      483,  483,  486,  483,  530,  486,  487,  487,  564,  487,
-      441,  441,  441,  441,  441,  441,  441,  441,  441,  502,
-      337,  502,  502,  528,  528,  566,  528,  576,  588,  590,
-      576,  599,  610,  608,  599,  621,  628,  576,  640,  630,
-      644,  599,  646,  438,  439,  653,  667,  658,  564,  669,
-      664,  678,  685,  675,  483,  693,  486,  530,  680,  398,
-      487,  696,  688,  566,  698,  690,  703,  700,  705,  590,
-
-      628,  707,  644,  502,  712,  735,  646,  528,  608,  658,
-      734,  588,  733,  621,  630,  610,  732,  678,  667,  709,
-      709,  669,  709,  731,  502,  729,  685,  640,  664,  675,
-      680,  690,  713,  713,  728,  653,  688,  726,  698,  710,
-      710,  725,  710,  724,  696,  700,  723,  693,  707,  703,
-      719,  705,  721,  721,  718,  721,  716,  712,  722,  722,
-      715,  722,  745,  745,  714,  745,  745,  745,  745,  745,
-      745,  745,  745,  745,  745,  745,  745,  745,  746,  746,
-      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
-      746,  746,  746,  746,  747,  747,  747,  747,  747,  747,
-
-      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
-      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
-      748,  749,  711,  749,  749,  708,  749,  704,  749,  749,
-      702,  749,  750,  750,  701,  750,  750,  750,  750,  750,
-      750,  750,  750,  750,  750,  750,  750,  750,  751,  751,
-      751,  751,  699,  697,  751,  751,  751,  752,  752,  752,
-      752,  752,  752,  752,  752,  752,  752,  752,  752,  752,
-      752,  752,  752,  753,  753,  753,  753,  753,  753,  753,
+      173,   50,   58,   55,   58,   58,   74,   93,   21,   49,
+       50,  137,   49,   21,   66,  107,   66,   50,  113,   21,
+       21,   84,   84,  113,   61,  138,   84,  135,  744,  137,
+
+       21,   93,  144,  143,  106,  144,  152,   21,  135,  135,
+      172,  138,  143,   84,   84,   21,  173,  172,   21,   22,
+       84,   22,   22,   22,   22,   22,   22,   22,   22,   22,
+       64,   64,   64,   64,   64,   64,   64,   64,   64,   85,
+       22,  150,   85,   88,   88,   22,   89,  624,   88,  165,
+      150,   22,   89,   89,  176,  182,  185,  185,  182,  162,
+      167,  152,   22,  186,  386,   88,   88,  386,   85,   22,
+       89,  152,   88,   92,  186,  165,  247,   22,   89,   92,
+       91,   89,   91,  162,  167,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,  193,  624,  176,   92,  204,  204,
+
+      270,  743,  247,  742,  193,   92,  115,  270,  115,  115,
+      115,  741,  328,  148,  115,  347,  249,  253,  488,  115,
+      347,  115,  115,  115,  115,  115,  115,  115,  148,  148,
+      148,  148,  148,  148,  148,  148,  148,  156,  328,  156,
+      249,  253,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  161,  164,  330,  338,  338,  164,  161,  163,  163,
+      163,  163,  163,  163,  163,  163,  163,  168,  245,  740,
+      611,  488,  245,  168,  164,  161,  326,  330,  441,  326,
+      164,  441,  340,  161,  340,  340,  252,  739,  326,  738,
+      245,  168,  252,  395,  443,  395,  245,  443,  395,  168,
+
+      244,  244,  244,  244,  244,  244,  244,  244,  244,  401,
+      252,  401,  401,  442,  442,  611,  442,  533,  252,  388,
+      388,  388,  388,  388,  388,  388,  388,  388,  444,  449,
+      528,  489,  441,  449,  489,  458,  340,  458,  458,  486,
+      486,  567,  486,  444,  444,  444,  444,  444,  444,  444,
+      444,  444,  490,  490,  505,  490,  505,  505,  531,  531,
+      569,  531,  579,  591,  593,  579,  602,  442,  528,  602,
+      533,  613,  579,  631,  633,  643,  602,  647,  656,  649,
+      659,  567,  661,  667,  401,  489,  670,  678,  672,  681,
+      683,  688,  691,  486,  696,  699,  701,  703,  569,  706,
+
+      708,  693,  710,  737,  593,  715,  490,  631,  505,  647,
+      716,  716,  531,  649,  661,  736,  591,  712,  712,  633,
+      712,  735,  659,  734,  613,  681,  732,  731,  670,  505,
+      672,  667,  683,  678,  643,  688,  691,  693,  656,  729,
+      701,  713,  713,  728,  713,  703,  727,  726,  699,  710,
+      722,  721,  706,  708,  724,  724,  696,  724,  715,  725,
+      725,  719,  725,  748,  748,  718,  748,  748,  748,  748,
+      748,  748,  748,  748,  748,  748,  748,  748,  748,  749,
+      749,  749,  749,  749,  749,  749,  749,  749,  749,  749,
+      749,  749,  749,  749,  749,  750,  750,  750,  750,  750,
+
+      750,  750,  750,  750,  750,  750,  750,  750,  750,  750,
+      750,  751,  751,  751,  751,  751,  751,  751,  751,  751,
+      751,  751,  752,  717,  752,  752,  714,  752,  711,  752,
+      752,  707,  752,  753,  753,  705,  753,  753,  753,  753,
       753,  753,  753,  753,  753,  753,  753,  753,  753,  754,
-      695,  694,  754,  754,  754,  754,  754,  754,  754,  754,
-
-      754,  754,  754,  754,  755,  692,  689,  755,  687,  755,
-      686,  684,  755,  682,  755,  756,  756,  756,  756,  756,
+      754,  754,  754,  704,  702,  754,  754,  754,  755,  755,
+      755,  755,  755,  755,  755,  755,  755,  755,  755,  755,
+      755,  755,  755,  755,  756,  756,  756,  756,  756,  756,
       756,  756,  756,  756,  756,  756,  756,  756,  756,  756,
-      756,  757,  757,  757,  757,  757,  757,  757,  757,  757,
-      757,  757,  757,  757,  757,  757,  757,  758,  679,  677,
-      758,  676,  758,  673,  672,  758,  671,  758,  759,  759,
-      759,  759,  759,  759,  759,  759,  759,  759,  759,  759,
-      759,  759,  759,  759,  760,  760,  760,  760,  760,  760,
-      760,  760,  760,  760,  760,  760,  760,  760,  760,  760,
-      761,  761,  761,  761,  761,  761,  761,  761,  761,  761,
+      757,  700,  698,  757,  757,  757,  757,  757,  757,  757,
 
-      761,  761,  761,  761,  761,  761,  762,  762,  762,  762,
+      757,  757,  757,  757,  757,  758,  697,  695,  758,  692,
+      758,  690,  689,  758,  687,  758,  759,  759,  759,  759,
+      759,  759,  759,  759,  759,  759,  759,  759,  759,  759,
+      759,  759,  760,  760,  760,  760,  760,  760,  760,  760,
+      760,  760,  760,  760,  760,  760,  760,  760,  761,  685,
+      682,  761,  680,  761,  679,  676,  761,  675,  761,  762,
       762,  762,  762,  762,  762,  762,  762,  762,  762,  762,
-      762,  762,  763,  763,  763,  763,  763,  763,  763,  763,
-      763,  763,  764,  764,  764,  764,  764,  764,  764,  764,
-      764,  764,  764,  764,  764,  764,  764,  764,  765,  765,
-      765,  765,  765,  765,  765,  765,  765,  765,  765,  765,
-      765,  765,  765,  765,  766,  766,  766,  766,  766,  766,
-      766,  766,  766,  766,  766,  766,  766,  766,  766,  766,
-      767,  670,  767,  767,  767,  767,  767,  767,  767,  767,
-      767,  767,  767,  768,  668,  666,  665,  663,  662,  661,
+      762,  762,  762,  762,  762,  763,  763,  763,  763,  763,
+      763,  763,  763,  763,  763,  763,  763,  763,  763,  763,
+      763,  764,  764,  764,  764,  764,  764,  764,  764,  764,
 
-      660,  659,  657,  768,  768,  768,  768,  768,  769,  769,
+      764,  764,  764,  764,  764,  764,  764,  765,  765,  765,
+      765,  765,  765,  765,  765,  765,  765,  765,  765,  765,
+      765,  765,  765,  766,  766,  766,  766,  766,  766,  766,
+      766,  766,  766,  767,  767,  767,  767,  767,  767,  767,
+      767,  767,  767,  767,  767,  767,  767,  767,  767,  768,
+      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
+      768,  768,  768,  768,  768,  769,  769,  769,  769,  769,
       769,  769,  769,  769,  769,  769,  769,  769,  769,  769,
-      769,  769,  769,  769,  770,  770,  770,  770,  770,  770,
-      770,  770,  770,  770,  770,  770,  770,  770,  770,  770,
-      771,  771,  771,  771,  771,  771,  771,  771,  771,  771,
-      771,  771,  771,  771,  771,  771,  772,  772,  772,  772,
+      769,  770,  674,  770,  770,  770,  770,  770,  770,  770,
+      770,  770,  770,  770,  771,  673,  671,  669,  668,  666,
+
+      665,  664,  663,  662,  771,  771,  771,  771,  771,  772,
       772,  772,  772,  772,  772,  772,  772,  772,  772,  772,
-      772,  772,  773,  773,  655,  773,  773,  773,  773,  773,
-      773,  773,  773,  773,  773,  773,  773,  773,  774,  774,
-      774,  774,  774,  774,  774,  774,  774,  774,  774,  774,
-
-      774,  774,  774,  774,  654,  652,  651,  649,  648,  647,
-      645,  643,  642,  637,  636,  635,  633,  632,  631,  629,
-      627,  626,  622,  620,  618,  617,  616,  615,  614,  613,
-      612,  611,  609,  607,  606,  605,  604,  602,  601,  600,
-      598,  597,  596,  595,  594,  593,  592,  591,  589,  587,
-      586,  585,  584,  583,  580,  577,  575,  574,  573,  572,
-      571,  570,  568,  567,  565,  563,  562,  560,  559,  558,
-      557,  556,  554,  553,  551,  550,  549,  548,  547,  546,
-      545,  544,  543,  541,  537,  536,  535,  533,  531,  527,
-      526,  524,  523,  520,  519,  515,  514,  513,  512,  511,
-
-      510,  508,  507,  506,  505,  504,  503,  501,  500,  499,
-      498,  497,  495,  494,  492,  491,  490,  489,  488,  482,
-      481,  479,  478,  477,  476,  475,  474,  472,  471,  470,
-      469,  468,  467,  466,  465,  464,  462,  461,  460,  459,
-      456,  454,  453,  452,  451,  450,  449,  448,  447,  445,
-      444,  442,  436,  434,  433,  432,  431,  430,  429,  422,
-      421,  417,  416,  415,  414,  413,  412,  411,  410,  409,
-      408,  407,  406,  405,  404,  403,  402,  401,  400,  399,
-      397,  396,  395,  394,  393,  391,  390,  388,  387,  386,
-      384,  382,  380,  379,  378,  376,  375,  373,  372,  371,
-
-      370,  369,  368,  367,  365,  364,  363,  362,  359,  358,
-      357,  356,  352,  351,  350,  349,  348,  347,  346,  345,
-      343,  342,  341,  340,  339,  338,  336,  334,  333,  332,
-      330,  329,  322,  321,  320,  319,  317,  316,  315,  314,
-      313,  311,  310,  309,  307,  306,  305,  303,  302,  301,
-      300,  299,  298,  297,  296,  295,  294,  292,  290,  289,
-      288,  285,  284,  283,  282,  279,  277,  276,  275,  274,
-      273,  272,  271,  270,  269,  267,  266,  265,  264,  263,
-      262,  261,  260,  259,  258,  257,  256,  254,  253,  252,
-      244,  241,  240,  239,  238,  237,  236,  235,  234,  233,
-
-      232,  231,  230,  229,  228,  227,  226,  225,  224,  223,
-      222,  221,  220,  219,  218,  217,  216,  215,  214,  212,
-      211,  209,  208,  207,  206,  205,  204,  203,  201,  200,
-      199,  198,  196,  195,  194,  193,  191,  190,  189,  188,
-      187,  186,  183,  182,  180,  179,  178,  177,  174,  170,
-      157,  153,  152,  150,  148,  144,  141,  140,  139,  138,
-      135,  133,  130,  129,  128,  127,  126,  125,  124,  123,
-      122,  121,  120,  119,  118,  117,  116,  114,  112,  111,
-      108,  105,  104,  102,   98,   83,   76,   69,   68,   67,
-       65,   63,   53,   52,   51,   48,   47,   45,   40,   37,
-
-       35,   33,   31,   30,   26,   23,   15,    7,    3,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
-      744,  744,  744,  744,  744
+      772,  772,  772,  772,  772,  773,  773,  773,  773,  773,
+      773,  773,  773,  773,  773,  773,  773,  773,  773,  773,
+      773,  774,  774,  774,  774,  774,  774,  774,  774,  774,
+      774,  774,  774,  774,  774,  774,  774,  775,  775,  775,
+      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
+      775,  775,  775,  776,  776,  660,  776,  776,  776,  776,
+      776,  776,  776,  776,  776,  776,  776,  776,  776,  777,
+      777,  777,  777,  777,  777,  777,  777,  777,  777,  777,
+
+      777,  777,  777,  777,  777,  658,  657,  655,  654,  652,
+      651,  650,  648,  646,  645,  640,  639,  638,  636,  635,
+      634,  632,  630,  629,  625,  623,  621,  620,  619,  618,
+      617,  616,  615,  614,  612,  610,  609,  608,  607,  605,
+      604,  603,  601,  600,  599,  598,  597,  596,  595,  594,
+      592,  590,  589,  588,  587,  586,  583,  580,  578,  577,
+      576,  575,  574,  573,  571,  570,  568,  566,  565,  563,
+      562,  561,  560,  559,  557,  556,  554,  553,  552,  551,
+      550,  549,  548,  547,  546,  544,  540,  539,  538,  536,
+      534,  530,  529,  527,  526,  523,  522,  518,  517,  516,
+
+      515,  514,  513,  511,  510,  509,  508,  507,  506,  504,
+      503,  502,  501,  500,  498,  497,  495,  494,  493,  492,
+      491,  485,  484,  482,  481,  480,  479,  478,  477,  475,
+      474,  473,  472,  471,  470,  469,  468,  467,  465,  464,
+      463,  462,  459,  457,  456,  455,  454,  453,  452,  451,
+      450,  448,  447,  445,  439,  437,  436,  435,  434,  433,
+      432,  425,  424,  420,  419,  418,  417,  416,  415,  414,
+      413,  412,  411,  410,  409,  408,  407,  406,  405,  404,
+      403,  402,  400,  399,  398,  397,  396,  394,  393,  391,
+      390,  389,  387,  385,  383,  382,  381,  379,  378,  376,
+
+      375,  374,  373,  372,  371,  370,  368,  367,  366,  365,
+      362,  361,  360,  359,  355,  354,  353,  352,  351,  350,
+      349,  348,  346,  345,  344,  343,  342,  341,  339,  337,
+      336,  335,  333,  332,  325,  324,  323,  322,  320,  319,
+      318,  317,  316,  314,  313,  312,  310,  309,  308,  306,
+      305,  304,  303,  302,  301,  300,  299,  298,  297,  295,
+      293,  292,  291,  288,  287,  286,  285,  282,  279,  278,
+      277,  276,  275,  274,  273,  272,  271,  269,  268,  267,
+      266,  265,  264,  263,  262,  261,  260,  259,  258,  256,
+      255,  254,  246,  243,  242,  241,  240,  239,  238,  237,
+
+      236,  235,  234,  233,  232,  231,  230,  229,  228,  227,
+      226,  225,  224,  223,  222,  221,  220,  219,  218,  217,
+      216,  214,  213,  211,  210,  209,  208,  207,  206,  205,
+      203,  202,  201,  200,  199,  197,  196,  195,  194,  192,
+      191,  190,  189,  188,  187,  184,  183,  181,  180,  179,
+      178,  175,  171,  158,  154,  153,  151,  149,  145,  142,
+      141,  140,  139,  136,  134,  131,  130,  129,  128,  127,
+      126,  125,  124,  123,  122,  121,  120,  119,  118,  117,
+      116,  114,  112,  111,  108,  105,  104,  102,   98,   83,
+       76,   69,   68,   67,   65,   63,   53,   52,   51,   48,
+
+       47,   45,   37,   35,   33,   31,   30,   26,   23,   15,
+        7,    3,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747
 
     } ;
 
@@ -1219,8 +1220,8 @@ static void print_error (GISourceScanner *scanner);
 #define IS_EOF EOF
 #endif
 
-#line 1223 "giscanner/scannerlexer.c"
 #line 1224 "giscanner/scannerlexer.c"
+#line 1225 "giscanner/scannerlexer.c"
 
 #define INITIAL 0
 
@@ -1444,7 +1445,7 @@ YY_DECL
 #line 78 "giscanner/scannerlexer.l"
 
 
-#line 1448 "giscanner/scannerlexer.c"
+#line 1449 "giscanner/scannerlexer.c"
 
        while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
                {
@@ -1470,14 +1471,14 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 745 )
+                               if ( yy_current_state >= 748 )
                                        yy_c = yy_meta[yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
                        *(yy_state_ptr)++ = yy_current_state;
                        ++yy_cp;
                        }
-               while ( yy_base[yy_current_state] != 1410 );
+               while ( yy_base[yy_current_state] != 1413 );
 
 yy_find_action:
                yy_current_state = *--(yy_state_ptr);
@@ -2005,15 +2006,15 @@ YY_RULE_SETUP
 { return BASIC_TYPE; }
        YY_BREAK
 case 97:
-/* rule 97 can match eol */
 YY_RULE_SETUP
 #line 186 "giscanner/scannerlexer.l"
-{ ++lineno; /* Ignore */ }
+{ return BASIC_TYPE; }
        YY_BREAK
 case 98:
+/* rule 98 can match eol */
 YY_RULE_SETUP
 #line 187 "giscanner/scannerlexer.l"
-{ /* Ignore */ }
+{ ++lineno; /* Ignore */ }
        YY_BREAK
 case 99:
 YY_RULE_SETUP
@@ -2028,7 +2029,7 @@ YY_RULE_SETUP
 case 101:
 YY_RULE_SETUP
 #line 190 "giscanner/scannerlexer.l"
-{ /* ignore */ }
+{ /* Ignore */ }
        YY_BREAK
 case 102:
 YY_RULE_SETUP
@@ -2037,18 +2038,18 @@ YY_RULE_SETUP
        YY_BREAK
 case 103:
 YY_RULE_SETUP
-#line 193 "giscanner/scannerlexer.l"
-{ return INTL_CONST; }
+#line 192 "giscanner/scannerlexer.l"
+{ /* ignore */ }
        YY_BREAK
 case 104:
 YY_RULE_SETUP
 #line 194 "giscanner/scannerlexer.l"
-{ return INTUL_CONST; }
+{ return INTL_CONST; }
        YY_BREAK
 case 105:
 YY_RULE_SETUP
-#line 196 "giscanner/scannerlexer.l"
-{ return BOOLEAN; }
+#line 195 "giscanner/scannerlexer.l"
+{ return INTUL_CONST; }
        YY_BREAK
 case 106:
 YY_RULE_SETUP
@@ -2067,78 +2068,78 @@ YY_RULE_SETUP
        YY_BREAK
 case 109:
 YY_RULE_SETUP
-#line 201 "giscanner/scannerlexer.l"
-{ if (scanner->macro_scan) return check_identifier(scanner, yytext); else REJECT; }
+#line 200 "giscanner/scannerlexer.l"
+{ return BOOLEAN; }
        YY_BREAK
 case 110:
 YY_RULE_SETUP
-#line 203 "giscanner/scannerlexer.l"
-{ if (!parse_ignored_macro()) REJECT; }
+#line 202 "giscanner/scannerlexer.l"
+{ if (scanner->macro_scan) return check_identifier(scanner, yytext); else REJECT; }
        YY_BREAK
 case 111:
 YY_RULE_SETUP
 #line 204 "giscanner/scannerlexer.l"
-{ return AUTO; }
+{ if (!parse_ignored_macro()) REJECT; }
        YY_BREAK
 case 112:
 YY_RULE_SETUP
 #line 205 "giscanner/scannerlexer.l"
-{ return BREAK; }
+{ return AUTO; }
        YY_BREAK
 case 113:
 YY_RULE_SETUP
 #line 206 "giscanner/scannerlexer.l"
-{ return CASE; }
+{ return BREAK; }
        YY_BREAK
 case 114:
 YY_RULE_SETUP
 #line 207 "giscanner/scannerlexer.l"
-{ return BASIC_TYPE; }
+{ return CASE; }
        YY_BREAK
 case 115:
 YY_RULE_SETUP
 #line 208 "giscanner/scannerlexer.l"
-{ return CONST; }
+{ return BASIC_TYPE; }
        YY_BREAK
 case 116:
 YY_RULE_SETUP
 #line 209 "giscanner/scannerlexer.l"
-{ return CONTINUE; }
+{ return CONST; }
        YY_BREAK
 case 117:
 YY_RULE_SETUP
 #line 210 "giscanner/scannerlexer.l"
-{ return DEFAULT; }
+{ return CONTINUE; }
        YY_BREAK
 case 118:
 YY_RULE_SETUP
 #line 211 "giscanner/scannerlexer.l"
-{ return DO; }
+{ return DEFAULT; }
        YY_BREAK
 case 119:
 YY_RULE_SETUP
 #line 212 "giscanner/scannerlexer.l"
-{ return BASIC_TYPE; }
+{ return DO; }
        YY_BREAK
 case 120:
 YY_RULE_SETUP
 #line 213 "giscanner/scannerlexer.l"
-{ return ELSE; }
+{ return BASIC_TYPE; }
        YY_BREAK
 case 121:
 YY_RULE_SETUP
 #line 214 "giscanner/scannerlexer.l"
-{ return ENUM; }
+{ return ELSE; }
        YY_BREAK
 case 122:
 YY_RULE_SETUP
 #line 215 "giscanner/scannerlexer.l"
-{ return EXTERN; }
+{ return ENUM; }
        YY_BREAK
 case 123:
 YY_RULE_SETUP
 #line 216 "giscanner/scannerlexer.l"
-{ return BASIC_TYPE; }
+{ return EXTERN; }
        YY_BREAK
 case 124:
 YY_RULE_SETUP
@@ -2178,27 +2179,27 @@ YY_RULE_SETUP
 case 131:
 YY_RULE_SETUP
 #line 224 "giscanner/scannerlexer.l"
-{ return FOR; }
+{ return BASIC_TYPE; }
        YY_BREAK
 case 132:
 YY_RULE_SETUP
 #line 225 "giscanner/scannerlexer.l"
-{ return GOTO; }
+{ return FOR; }
        YY_BREAK
 case 133:
 YY_RULE_SETUP
 #line 226 "giscanner/scannerlexer.l"
-{ return IF; }
+{ return GOTO; }
        YY_BREAK
 case 134:
 YY_RULE_SETUP
 #line 227 "giscanner/scannerlexer.l"
-{ return INLINE; }
+{ return IF; }
        YY_BREAK
 case 135:
 YY_RULE_SETUP
 #line 228 "giscanner/scannerlexer.l"
-{ return BASIC_TYPE; }
+{ return INLINE; }
        YY_BREAK
 case 136:
 YY_RULE_SETUP
@@ -2233,27 +2234,27 @@ YY_RULE_SETUP
 case 142:
 YY_RULE_SETUP
 #line 235 "giscanner/scannerlexer.l"
-{ return REGISTER; }
+{ return BASIC_TYPE; }
        YY_BREAK
 case 143:
 YY_RULE_SETUP
 #line 236 "giscanner/scannerlexer.l"
-{ return RESTRICT; }
+{ return REGISTER; }
        YY_BREAK
 case 144:
 YY_RULE_SETUP
 #line 237 "giscanner/scannerlexer.l"
-{ return RETURN; }
+{ return RESTRICT; }
        YY_BREAK
 case 145:
 YY_RULE_SETUP
 #line 238 "giscanner/scannerlexer.l"
-{ return BASIC_TYPE; }
+{ return RETURN; }
        YY_BREAK
 case 146:
 YY_RULE_SETUP
 #line 239 "giscanner/scannerlexer.l"
-{ return SIGNED; }
+{ return BASIC_TYPE; }
        YY_BREAK
 case 147:
 YY_RULE_SETUP
@@ -2268,62 +2269,62 @@ YY_RULE_SETUP
 case 149:
 YY_RULE_SETUP
 #line 242 "giscanner/scannerlexer.l"
-{ return SIZEOF; }
+{ return SIGNED; }
        YY_BREAK
 case 150:
 YY_RULE_SETUP
 #line 243 "giscanner/scannerlexer.l"
-{ return STATIC; }
+{ return SIZEOF; }
        YY_BREAK
 case 151:
 YY_RULE_SETUP
 #line 244 "giscanner/scannerlexer.l"
-{ return STRUCT; }
+{ return STATIC; }
        YY_BREAK
 case 152:
 YY_RULE_SETUP
 #line 245 "giscanner/scannerlexer.l"
-{ return SWITCH; }
+{ return STRUCT; }
        YY_BREAK
 case 153:
 YY_RULE_SETUP
 #line 246 "giscanner/scannerlexer.l"
-{ return TYPEDEF; }
+{ return SWITCH; }
        YY_BREAK
 case 154:
 YY_RULE_SETUP
 #line 247 "giscanner/scannerlexer.l"
-{ return UNION; }
+{ return TYPEDEF; }
        YY_BREAK
 case 155:
 YY_RULE_SETUP
 #line 248 "giscanner/scannerlexer.l"
-{ return UNSIGNED; }
+{ return UNION; }
        YY_BREAK
 case 156:
 YY_RULE_SETUP
 #line 249 "giscanner/scannerlexer.l"
-{ return VOID; }
+{ return UNSIGNED; }
        YY_BREAK
 case 157:
 YY_RULE_SETUP
 #line 250 "giscanner/scannerlexer.l"
-{ return VOLATILE; }
+{ return VOID; }
        YY_BREAK
 case 158:
 YY_RULE_SETUP
 #line 251 "giscanner/scannerlexer.l"
-{ return WHILE; }
+{ return VOLATILE; }
        YY_BREAK
 case 159:
 YY_RULE_SETUP
-#line 253 "giscanner/scannerlexer.l"
-{ return check_identifier(scanner, yytext); }
+#line 252 "giscanner/scannerlexer.l"
+{ return WHILE; }
        YY_BREAK
 case 160:
 YY_RULE_SETUP
-#line 255 "giscanner/scannerlexer.l"
-{ return INTEGER; }
+#line 254 "giscanner/scannerlexer.l"
+{ return check_identifier(scanner, yytext); }
        YY_BREAK
 case 161:
 YY_RULE_SETUP
@@ -2337,8 +2338,8 @@ YY_RULE_SETUP
        YY_BREAK
 case 163:
 YY_RULE_SETUP
-#line 259 "giscanner/scannerlexer.l"
-{ return FLOATING; }
+#line 258 "giscanner/scannerlexer.l"
+{ return INTEGER; }
        YY_BREAK
 case 164:
 YY_RULE_SETUP
@@ -2346,10 +2347,9 @@ YY_RULE_SETUP
 { return FLOATING; }
        YY_BREAK
 case 165:
-/* rule 165 can match eol */
 YY_RULE_SETUP
-#line 262 "giscanner/scannerlexer.l"
-{ return CHARACTER; }
+#line 261 "giscanner/scannerlexer.l"
+{ return FLOATING; }
        YY_BREAK
 case 166:
 /* rule 166 can match eol */
@@ -2360,8 +2360,8 @@ YY_RULE_SETUP
 case 167:
 /* rule 167 can match eol */
 YY_RULE_SETUP
-#line 265 "giscanner/scannerlexer.l"
-{ return STRING; }
+#line 264 "giscanner/scannerlexer.l"
+{ return CHARACTER; }
        YY_BREAK
 case 168:
 /* rule 168 can match eol */
@@ -2370,16 +2370,22 @@ YY_RULE_SETUP
 { return STRING; }
        YY_BREAK
 case 169:
+/* rule 169 can match eol */
 YY_RULE_SETUP
-#line 268 "giscanner/scannerlexer.l"
-{ print_error(scanner); }
+#line 267 "giscanner/scannerlexer.l"
+{ return STRING; }
        YY_BREAK
 case 170:
 YY_RULE_SETUP
-#line 270 "giscanner/scannerlexer.l"
+#line 269 "giscanner/scannerlexer.l"
+{ print_error(scanner); }
+       YY_BREAK
+case 171:
+YY_RULE_SETUP
+#line 271 "giscanner/scannerlexer.l"
 ECHO;
        YY_BREAK
-#line 2383 "giscanner/scannerlexer.c"
+#line 2389 "giscanner/scannerlexer.c"
                        case YY_STATE_EOF(INITIAL):
                                yyterminate();
 
@@ -2644,7 +2650,7 @@ static int yy_get_next_buffer (void)
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 745 )
+                       if ( yy_current_state >= 748 )
                                yy_c = yy_meta[yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -2667,11 +2673,11 @@ static int yy_get_next_buffer (void)
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 745 )
+               if ( yy_current_state >= 748 )
                        yy_c = yy_meta[yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-       yy_is_jam = (yy_current_state == 744);
+       yy_is_jam = (yy_current_state == 747);
        if ( ! yy_is_jam )
                *(yy_state_ptr)++ = yy_current_state;
 
@@ -3320,7 +3326,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 270 "giscanner/scannerlexer.l"
+#line 271 "giscanner/scannerlexer.l"
 
 
 static int
@@ -3424,6 +3430,15 @@ check_identifier (GISourceScanner *scanner,
 #define G_PATH_LENGTH 2048
 #endif
 
+#ifdef _WIN32
+/* We don't want to include <windows.h> as it clashes horribly
+ * with token names from scannerparser.h. So just declare
+ * GetFullPathNameA() here unless we already defined it, like
+ * in giscanner.c.
+ */
+extern unsigned long __stdcall GetFullPathNameA(const char*, int, char*, char**);
+#endif
+
 static inline char *
 _realpath (const char *path)
 {
@@ -3432,12 +3447,6 @@ _realpath (const char *path)
 
   return realpath (path, buffer) ? g_strdup (buffer) : NULL;
 #else
-  /* We don't want to include <windows.h> as it clashes horribly
-   * with token names from scannerparser.h. So just declare
-   * GetFullPathNameA() here unless we already defined it, like
-   * in giscanner.c.
-   */
-  extern unsigned long __stdcall GetFullPathNameA(const char*, int, char*, char**);
   char *buffer;
   char dummy;
   int rc, len;
index d3a6017..bcce439 100644 (file)
@@ -183,6 +183,7 @@ stringtext                          ([^\\\"])|(\\.)
 "__volatile"                           { return VOLATILE; }
 "__volatile__"                         { return VOLATILE; }
 "_Bool"                                        { return BASIC_TYPE; }
+"bool"                                 { return BASIC_TYPE; }
 "typedef char __static_assert_t".*"\n" { ++lineno; /* Ignore */ }
 "__cdecl"                              { /* Ignore */ }
 "__declspec(deprecated(".*"))"         { /* Ignore */ }
@@ -370,6 +371,15 @@ check_identifier (GISourceScanner *scanner,
 #define G_PATH_LENGTH 2048
 #endif
 
+#ifdef _WIN32
+/* We don't want to include <windows.h> as it clashes horribly
+ * with token names from scannerparser.h. So just declare
+ * GetFullPathNameA() here unless we already defined it, like
+ * in giscanner.c.
+ */
+extern unsigned long __stdcall GetFullPathNameA(const char*, int, char*, char**);
+#endif
+
 static inline char *
 _realpath (const char *path)
 {
@@ -378,12 +388,6 @@ _realpath (const char *path)
 
   return realpath (path, buffer) ? g_strdup (buffer) : NULL;
 #else
-  /* We don't want to include <windows.h> as it clashes horribly
-   * with token names from scannerparser.h. So just declare
-   * GetFullPathNameA() here unless we already defined it, like
-   * in giscanner.c.
-   */
-  extern unsigned long __stdcall GetFullPathNameA(const char*, int, char*, char**);
   char *buffer;
   char dummy;
   int rc, len;
index 1780ce0..0dda9ba 100644 (file)
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 3.2.2.  */
+/* A Bison parser, made by GNU Bison 3.2.4.  */
 
 /* Bison implementation for Yacc-like parsers in C
 
@@ -47,7 +47,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "3.2.2"
+#define YYBISON_VERSION "3.2.4"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
index 710bca0..bf99944 100644 (file)
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 3.2.2.  */
+/* A Bison parser, made by GNU Bison 3.2.4.  */
 
 /* Bison interface for Yacc-like parsers in C
 
index d6cb92a..471131c 100644 (file)
@@ -24,6 +24,7 @@ import tempfile
 from .libtoolimporter import LibtoolImporter
 from .message import Position
 from .ccompiler import CCompiler
+from .utils import have_debug_flag
 
 with LibtoolImporter(None, None):
     if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ:
@@ -303,9 +304,11 @@ class SourceScanner(object):
                       tmpfile_output,
                       self._cpp_options)
 
-        os.unlink(tmp_name_cpp)
+        if not have_debug_flag('save-temps'):
+            os.unlink(tmp_name_cpp)
         self._scanner.parse_file(tmpfile_output)
-        os.unlink(tmpfile_output)
+        if not have_debug_flag('save-temps'):
+            os.unlink(tmpfile_output)
 
     def _write_preprocess_src(self, fp, defines, undefs, filenames):
         # Write to the temp file for feeding into the preprocessor
index 1c406e9..a74cb6b 100644 (file)
@@ -699,7 +699,7 @@ raise ValueError."""
         # because of different ABI, but this usually works fine,
         # so for backward compatibility lets continue for now:
         # https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/24#note_92792
-        if canonical == '_Bool':
+        if canonical in ('_Bool', 'bool'):
             canonical = 'gboolean'
             base = canonical
 
index 33bbc34..7970227 100644 (file)
@@ -21,4 +21,4 @@ Libs.private:
 
 Name: gobject-introspection
 Description: GObject Introspection
-Version: 1.59.1
+Version: 1.59.2
index c3234f5..c93e9bc 100644 (file)
@@ -20,4 +20,4 @@ Libs.private:
 
 Name: gobject-introspection
 Description: GObject Introspection
-Version: 1.59.1
+Version: 1.59.2
index cd79f7a..025f518 100644 (file)
@@ -1,6 +1,6 @@
 project('gobject-introspection', 'c',
-  version: '1.59.1',
-  meson_version: '>= 0.46.0',
+  version: '1.59.2',
+  meson_version: '>= 0.47.0',
   default_options: [
     'warning_level=1',
     'buildtype=debugoptimized',
@@ -22,6 +22,52 @@ if not python_version.version_compare(python_version_req)
 endif
 
 cc = meson.get_compiler('c')
+
+project_c_args = []
+if cc.get_id() != 'msvc'
+    project_c_args += [
+      '-Wall',
+      '-Warray-bounds',
+      '-Wcast-align',
+      '-Wdeclaration-after-statement',
+      '-Wduplicated-branches',
+      '-Wextra',
+      '-Wformat=2',
+      '-Wformat-nonliteral',
+      '-Wformat-security',
+      '-Wimplicit-function-declaration',
+      '-Winit-self',
+      '-Wjump-misses-init',
+      '-Wlogical-op',
+      '-Wmissing-declarations',
+      '-Wmissing-format-attribute',
+      '-Wmissing-include-dirs',
+      '-Wmissing-noreturn',
+      '-Wmissing-prototypes',
+      '-Wnested-externs',
+      '-Wnull-dereference',
+      '-Wold-style-definition',
+      '-Wpacked',
+      '-Wpointer-arith',
+      '-Wrestrict',
+      '-Wreturn-type',
+      '-Wshadow',
+      '-Wsign-compare',
+      '-Wstrict-aliasing',
+      '-Wstrict-prototypes',
+      '-Wundef',
+      '-Wunused-but-set-variable',
+      '-Wwrite-strings',
+    ]
+
+    project_c_args += [
+      '-fno-strict-aliasing',
+    ]
+endif
+
+project_c_args = cc.get_supported_arguments(project_c_args)
+add_project_arguments(project_c_args, language: 'c')
+
 config = configuration_data()
 
 config.set('GI_MAJOR_VERSION', gi_versions[0])
@@ -93,6 +139,20 @@ endif
 libffi_dep = dependency('libffi',
   fallback : ['libffi', 'ffi_dep'])
 
+with_cairo = get_option('cairo')
+
+if with_cairo
+  cairo_dep = dependency('cairo', required: cc.get_id() != 'msvc')
+  cairo_gobject_dep = dependency('cairo-gobject', required: cc.get_id() != 'msvc')
+
+  if cc.get_id() == 'msvc' and (not cairo_gobject_dep.found() or not cairo_dep.found())
+    if cc.has_header('cairo.h') and cc.has_header ('cairo-gobject.h')
+      cairo_dep = cc.find_library ('cairo')
+      cairo_gobject_dep = cc.find_library ('cairo-gobject')
+    endif
+  endif
+endif
+
 subdir('girepository')
 subdir('tools')
 subdir('giscanner')
index ee6958d..f268607 100644 (file)
@@ -2,7 +2,7 @@ option('cairo', type: 'boolean', value : false,
   description: 'Use cairo for tests'
 )
 
-option('doctool', type: 'boolean', value : true,
+option('doctool', type: 'boolean', value : false,
   description: 'Install g-ir-doc-tool'
 )
 
index 241439d..bfcb5a3 100755 (executable)
 #!/usr/bin/env python3
 # Scan glib sources.
-# e.g.:
-#   ./update-glib-annotations.py ../../glib ../../glib/_build
+#
+# meson _build
+# ninja -C _build
+# ./misc/update-glib-annotations.py <path-to-glib-git-checkout>
 
 import os
 import sys
-
 import subprocess
 
-path=os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
-for k in ['UNINSTALLED_INTROSPECTION_SRCDIR',
-          'UNINSTALLED_INTROSPECTION_BUILDDIR']:
-    if k not in os.environ:
-        os.environ[k] = path
-
-possible_builddirs = ['../_build/', '..', '../../build/']
 
+SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
+SRC_DIR = os.path.realpath(os.path.join(SCRIPT_DIR, ".."))
 
-def directory_includes(dirs, srcdir, builddir):
-    result = []
-    result.append('-I' + srcdir)
 
-    if srcdir != builddir:
-        result.append('-I' + builddir)
+def get_build_dir():
+    build_dir = os.path.join(SRC_DIR, "_build")
+    if not os.path.isdir(build_dir):
+        raise SystemExit(
+            "build dir not found: "
+            "build with meson in %r first" % build_dir)
+    return build_dir
 
-    for name in dirs:
-        result.append('-I' + os.path.join(srcdir, name))
-        if srcdir != builddir:
-            result.append('-I' + os.path.join(builddir, name))
 
-    return result
+def get_tool_path():
+    build_dir = get_build_dir()
+    tool_path = os.path.join(build_dir, "tools", "g-ir-annotation-tool")
+    if not os.path.isfile(tool_path):
+        raise SystemExit(
+            "g-ir-annotation-tool not found: "
+            "build with meson in %r first" % build_dir)
+    return tool_path
 
 
-def extract_annotations(module, srcdir, builddir, outfile):
+def extract_annotations(module_name, glib_srcdir, outfile):
     sources = []
-    subdir = os.path.join(srcdir, module['name'])
-    includes = directory_includes(module['includes'],
-                                  srcdir, builddir)
 
-    for sourcename in os.listdir(subdir):
+    glib_subdir = os.path.join(glib_srcdir, module_name)
+    for sourcename in sorted(os.listdir(glib_subdir), reverse=True):
         if sourcename.endswith('.c'):
-            sources.append(os.path.join(subdir, sourcename))
+            sources.append(os.path.join(glib_subdir, sourcename))
 
-    annotation_tool_base_args = [
-        os.path.join(builddir, 'g-ir-annotation-tool'), '--extract']
+    env = os.environ.copy()
+    env['PYTHONPATH'] = os.path.join(get_build_dir(), 'giscanner')
 
-    return subprocess.check_call(annotation_tool_base_args +
-                                 module['defines'] +
-                                 includes +
-                                 sources,
-                                 stdout=outfile)
+    tool_args = [sys.executable, get_tool_path(), '--extract'] + sources
+    return subprocess.check_call(tool_args, stdout=outfile, env=env)
 
 
-if __name__ == '__main__':
-    srcdir = sys.argv[1]
-    if len(sys.argv) == 3:
-        builddir = sys.argv[2]
-    else:
-        for d in possible_builddirs:
-            if os.path.isfile(os.path.join(d, 'g-ir-annotation-tool')):
-                builddir = d
-                break
-        assert builddir is not None
-
-    print("Using source directory: '%s' build directory: '%s'" % (srcdir, builddir))
-
-    modules = [{'name':         'glib',
-                'srcname':      '../gir/glib-2.0.c',
-                'includes':     ['glib', 'gmodule'],
-                'defines':      ['-DGLIB_COMPILATION']},
-
-               {'name':         'gmodule',
-                'srcname':      '../gir/gmodule-2.0.c',
-                'includes':     ['glib', 'gmodule'],
-                'defines':      ['-DGLIB_COMPILATION']},
-
-               {'name':         'gobject',
-                'srcname':      '../gir/gobject-2.0.c',
-                'includes':     ['glib', 'gobject', 'gmodule'],
-                'defines':      ['-DGOBJECT_COMPILATION']},
-
-               {'name':         'gio',
-                'srcname':      '../gir/gio-2.0.c',
-                'includes':     ['glib', 'gmodule', 'gobject', 'gio'],
-                'defines':      ['-DGOBJECT_COMPILATION', '-DGIO_COMPILATION', '-DG_SETTINGS_ENABLE_BACKEND']}]
-
-    for module in modules:
-        srcname = module['srcname']
-        tmpname = module['srcname'] + '.tmp'
-
-        if os.path.isfile(tmpname):
-            os.unlink(tmpname)
-
-        if os.path.isfile(srcname):
-            os.unlink(srcname)
-
-        # Extract annotations into a file opened in binary mode.
-        # Since g-ir-scanner-tool outputs utf-8 encoded data, we simply pass
-        # that directly into this file via. the underlying subprocess call.
-        srcfile = open(tmpname, 'wb')
-        extract_annotations(module, srcdir, builddir, srcfile)
-        srcfile.close()
-        os.rename(tmpname, srcname)
-
-        print("Updated '%s'" % (srcname, ))
+def update_module(module_name, glib_src_dir, target_path):
+    tmpname = target_path + '.tmp'
+
+    if os.path.isfile(tmpname):
+        os.unlink(tmpname)
+    with open(tmpname, 'wb') as target:
+        extract_annotations(module_name, glib_src_dir, target)
+    if os.path.isfile(target_path):
+        os.unlink(target_path)
+    os.rename(tmpname, target_path)
+
+    print("Updated '%s'" % (target_path, ))
+
+
+def main(argv):
+    if len(argv) != 2:
+        raise SystemExit("only pass the glib src dir")
+    glib_src_dir = argv[1]
+    if not os.path.exists(os.path.join(glib_src_dir, "glib.doap")):
+        raise SystemExit("%s isn't the glib source dir" % glib_src_dir)
+
+    print("Using source directory: '%s' build directory: '%s'" % (
+        glib_src_dir, get_build_dir()))
+
+    gir_dir = os.path.join(SRC_DIR, "gir")
+    modules = {
+        'glib': os.path.join(gir_dir, 'glib-2.0.c'),
+        'gmodule': os.path.join(gir_dir, 'gmodule-2.0.c'),
+        'gobject': os.path.join(gir_dir, 'gobject-2.0.c'),
+        'gio': os.path.join(gir_dir, 'gio-2.0.c'),
+    }
+
+    for module_name, target_path in modules.items():
+        update_module(module_name, glib_src_dir, target_path)
 
     print("Done; run \"git diff\" to see any changes.")
+
+
+if __name__ == '__main__':
+    main(sys.argv)
index 96e2660..0ad9bd8 100644 (file)
@@ -639,7 +639,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -672,7 +672,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
index 98817d1..1c92fe3 100755 (executable)
@@ -111,7 +111,8 @@ def main(argv):
             filter(
                 None,
                 [os.environ.get("top_builddir"),
-                 os.environ.get("top_srcdir")]))
+                 os.environ.get("top_srcdir"),
+                 os.environ.get("PYTHONPATH")]))
         subprocess.check_call([env["PYTHON"], targetname], env=env)
     else:
         raise SystemError("Unknown file type: %s" % targetbase)
index 95e5240..7837acb 100644 (file)
@@ -1317,14 +1317,6 @@ void gi_marshalling_tests_union_inv (GIMarshallingTestsUnion *union_);
 
 
 _GI_TEST_EXTERN
-void gi_marshalling_tests_union_out (GIMarshallingTestsUnion **union_);
-
-
-_GI_TEST_EXTERN
-void gi_marshalling_tests_union_inout (GIMarshallingTestsUnion **union_);
-
-
-_GI_TEST_EXTERN
 void gi_marshalling_tests_union_method (GIMarshallingTestsUnion *union_);
 
  /* Object */
index bfa8f8b..7e01595 100644 (file)
@@ -1,3 +1,21 @@
+sub_build_root = join_paths(meson.build_root(), 'subprojects')
+test_env_common_path = []
+if glib_dep.type_name() == 'internal' and host_system == 'windows'
+  test_env_common_path += [
+    join_paths(sub_build_root, 'glib', 'glib'),
+    join_paths(sub_build_root, 'glib', 'gobject'),
+    join_paths(sub_build_root, 'glib', 'gio'),
+    join_paths(sub_build_root, 'glib', 'gmodule'),
+    join_paths(sub_build_root, 'proxy-libintl'),
+    join_paths(sub_build_root, 'zlib'),
+  ]
+endif
+if libffi_dep.type_name() == 'internal' and host_system == 'windows'
+  test_env_common_path += [join_paths(sub_build_root, 'libffi',  'src')]
+endif
+test_env_common_pypath = [meson.build_root()]
+
+
 test_regress_sources = files('scanner/regress.c')
 test_regress_headers = files('scanner/regress.h')
 test_marshalling_sources = files('gimarshallingtests.c')
@@ -6,8 +24,16 @@ test_marshalling_headers = files('gimarshallingtests.h')
 test_regress_incdirs = include_directories(['.', 'scanner'])
 
 installed_sources = [
+  'scanner/annotation.c',
+  'scanner/annotation.h',
+  'scanner/drawable.c',
+  'scanner/drawable.h',
+  'scanner/foo.c',
+  'scanner/foo.h',
   'scanner/regress.c',
   'scanner/regress.h',
+  'scanner/utility.c',
+  'scanner/utility.h',
   'scanner/warnlib.c',
   'scanner/warnlib.h',
   'gimarshallingtests.c',
@@ -15,7 +41,9 @@ installed_sources = [
   'gitestmacros.h',
 ]
 
-install_data(installed_sources, install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0', 'tests'))
+test_install_dir = join_paths(get_option('datadir'), 'gobject-introspection-1.0', 'tests')
+
+install_data(installed_sources, install_dir: test_install_dir)
 
 # Generate everything.h and everything.c:
 test_everything_files = custom_target('everything',
@@ -28,24 +56,32 @@ test_everything_files = custom_target('everything',
     '--function-decoration=_GI_TEST_EXTERN',
     '--include-first-in-src=config.h',
     '--include-last-in-header=gitestmacros.h',
-  ]
+  ],
+  install: true,
+  install_dir: test_install_dir,
 )
 
 test_everything_headers = [test_everything_files[0]]
 test_everything_sources = [test_everything_files[1]]
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-unused-parameter',
+])
 everything_lib = shared_library('everything-1.0',
   sources: test_everything_sources,
   include_directories : configinc,
-  c_args: gi_hidden_visibility_cflags,
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
   dependencies: [glib_dep, gobject_dep],
   version: '1.0.0',
 )
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-unused-parameter',
+])
 gimarshallingtests_lib = shared_library('gimarshallingtests-1.0',
   sources: test_marshalling_sources,
   include_directories : configinc,
-  c_args: gi_hidden_visibility_cflags,
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
   dependencies: [glib_dep, gobject_dep],
   version: '1.0.0',
 )
@@ -134,8 +170,7 @@ if glib_dep.type_name() == 'pkgconfig'
 
 endif
 
-### TODO: actually test
 subdir('offsets')
 subdir('warn')
-subdir('repository')
 subdir('scanner')
+subdir('repository')
index 1a6abaf..9ce1d01 100644 (file)
@@ -35,21 +35,17 @@ CLEANFILES += Offsets-1.0.gir Offsets-1.0.typelib liboffsets.la
 
 EXTRA_PROGRAMS += gitestoffsets
 
-nodist_gitestoffsets_SOURCES = gitestoffsets.c
+gitestoffsets_SOURCES = gitestoffsets.c
 gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository -I$(top_builddir)/girepository -I$(top_srcdir)/tests
 gitestoffsets_CFLAGS = $(WARN_CFLAGS)
 gitestoffsets_LDFLAGS = $(WARN_LDFLAGS)
 gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
-
-gitestoffsets.c: gen-gitestoffsets offsets.h Offsets-1.0.typelib
-       $(AM_V_GEN) $(PYTHON) $(srcdir)/gen-gitestoffsets $(srcdir)/offsets.h > $@ || ( rm -f $@ && false )
+EXTRA_gitestoffsets_DEPENDENCIES = Offsets-1.0.typelib
 
 EXTRA_DIST += \
-       gen-gitestoffsets \
        test_offsets.py \
        meson.build
-BUILT_SOURCES += gitestoffsets.c
-CLEANFILES += gitestoffsets.c $(EXTRA_PROGRAMS)
+CLEANFILES += $(EXTRA_PROGRAMS)
 
 ############################################################
 
index d55fde4..883f251 100644 (file)
@@ -161,8 +161,8 @@ am__v_lt_1 =
 liboffsets_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(liboffsets_la_CFLAGS) \
        $(CFLAGS) $(liboffsets_la_LDFLAGS) $(LDFLAGS) -o $@
-nodist_gitestoffsets_OBJECTS = gitestoffsets-gitestoffsets.$(OBJEXT)
-gitestoffsets_OBJECTS = $(nodist_gitestoffsets_OBJECTS)
+am_gitestoffsets_OBJECTS = gitestoffsets-gitestoffsets.$(OBJEXT)
+gitestoffsets_OBJECTS = $(am_gitestoffsets_OBJECTS)
 am__DEPENDENCIES_1 =
 gitestoffsets_DEPENDENCIES = $(top_builddir)/libgirepository-1.0.la \
        $(am__DEPENDENCIES_1)
@@ -205,8 +205,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(liboffsets_la_SOURCES) $(nodist_gitestoffsets_SOURCES)
-DIST_SOURCES = $(liboffsets_la_SOURCES)
+SOURCES = $(liboffsets_la_SOURCES) $(gitestoffsets_SOURCES)
+DIST_SOURCES = $(liboffsets_la_SOURCES) $(gitestoffsets_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -633,7 +633,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -666,7 +666,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
@@ -712,10 +712,10 @@ _gir_silent_compiler = $(_gir_silent_compiler_$(V))
 _gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
 _gir_silent_compiler_0 = @echo "  GICOMP   $(1)";
 _gir_default_scanner_env = CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" PKG_CONFIG="$(PKG_CONFIG)" GI_HOST_OS="$(GI_HOST_OS)" DLLTOOL="$(DLLTOOL)"
-BUILT_SOURCES = gitestoffsets.c
+BUILT_SOURCES = 
 CLEANFILES = Offsets-1.0.gir Offsets-1.0.typelib liboffsets.la \
-       gitestoffsets.c $(EXTRA_PROGRAMS)
-EXTRA_DIST = gen-gitestoffsets test_offsets.py meson.build
+       $(EXTRA_PROGRAMS)
+EXTRA_DIST = test_offsets.py meson.build
 INTROSPECTION_GIRS = Offsets-1.0.gir
 
 ############################################################
@@ -733,11 +733,12 @@ Offsets_1_0_gir_LIBS = liboffsets.la
 Offsets_1_0_gir_PACKAGES = gobject-2.0
 Offsets_1_0_gir_FILES = offsets.h offsets.c
 Offsets_1_0_gir_SCANNERFLAGS = $(INTROSPECTION_SCANNER_ARGS) --warn-all --warn-error  -I$(top_srcdir)/tests
-nodist_gitestoffsets_SOURCES = gitestoffsets.c
+gitestoffsets_SOURCES = gitestoffsets.c
 gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository -I$(top_builddir)/girepository -I$(top_srcdir)/tests
 gitestoffsets_CFLAGS = $(WARN_CFLAGS)
 gitestoffsets_LDFLAGS = $(WARN_LDFLAGS)
 gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
+EXTRA_gitestoffsets_DEPENDENCIES = Offsets-1.0.typelib
 TESTS_ENVIRONMENT = env top_builddir=$(top_builddir) builddir=$(builddir)
 LOG_COMPILER = $(PYTHON) $(srcdir)/test_offsets.py && echo
 all: $(BUILT_SOURCES)
@@ -1321,9 +1322,6 @@ endef
 
 Offsets-1.0.gir: liboffsets.la offsets.h
 
-gitestoffsets.c: gen-gitestoffsets offsets.h Offsets-1.0.typelib
-       $(AM_V_GEN) $(PYTHON) $(srcdir)/gen-gitestoffsets $(srcdir)/offsets.h > $@ || ( rm -f $@ && false )
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/tests/offsets/gen-gitestoffsets b/tests/offsets/gen-gitestoffsets
deleted file mode 100755 (executable)
index 2e9bc5f..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-#!/bin/env python
-# -*- Mode: Python -*-
-# GObject-Introspection - a framework for introspecting GObject libraries
-# Copyright (C) 2008  Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-
-# The idea here is that we want to compare offset information two ways:
-#
-#  1) As generated by the compiler
-#  2) As found in the typelib
-#
-# So we find all the structures in the input file (offsets.h), parse out
-# fields within the structure and generate code that outputs the field
-# offsets using G_STRUCT_OFFSET() to one file and the field offsets using
-# the typelib to the another file. We can then diff the two files to see
-# if they are the same
-
-import re
-import sys
-
-if len(sys.argv) != 2:
-    print("Usage: gen-gitestoffsets INPUT > OUTPUT", file=sys.stderr)
-    sys.exit(1)
-
-# Helper function that we use to generate source. It does substitions
-# from a dictionary, removes white space at the ends and removes a
-# leading '|' from each line
-STRIP_AROUND_RE = re.compile("^[ \t]*\n?(.*?)[ \t]*$", re.DOTALL)
-STRIP_LEADER_RE = re.compile("^\|", re.MULTILINE)
-def output(args, format):
-    format = STRIP_AROUND_RE.sub(r"\1", format)
-    format = STRIP_LEADER_RE.sub(r"", format)
-    sys.stdout.write(format % args)
-
-#
-# Some regular expressions we use when parsing
-#
-TOKEN = "(?:[A-Za-z_][A-Za-z_0-9]+)"
-
-def compile_re(expr):
-    expr = expr.replace("TOKEN", TOKEN)
-    return re.compile(expr, re.VERBOSE)
-
-COMMENT_RE = compile_re("/\*([^*]+|\*[^/])*\*/")
-STRUCT_DEF_RE = compile_re("struct\s+_(TOKEN)\s*{([^}]*)}")
-
-# This certainly can't handle all type declarations, but it only
-# needs to handle the ones we use in the test cases
-FIELD_RE = compile_re(r"^(?:const\s+)?TOKEN(?:[\s*]+)(TOKEN)\s*(?:\[([0-9]*)\])?\s*;$")
-
-
-input_f = open(sys.argv[1])
-input = input_f.read()
-input_f.close()
-
-# Strip comments
-input = COMMENT_RE.sub("", input)
-
-symbols = []
-symbol_fields = {}
-
-for m in STRUCT_DEF_RE.finditer(input):
-    symbol = m.group(1)
-
-    fields = []
-
-    body = m.group(2)
-    for line in re.split("\n|\r\n", body):
-        line = line.strip()
-        if line == "":
-            continue
-        n = FIELD_RE.match(line)
-        if not n:
-            print("Can't parse structure line '%s'" % line, file=sys.stderr)
-            sys.exit(1)
-        fields.append(n.group(1))
-
-    symbols.append(symbol)
-    symbol_fields[symbol] = fields
-
-# Sort for convenience
-symbols.sort()
-
-output({}, r'''
-| /* GENERATED FILE. DO NOT EDIT. See gen-gitestoffsets */
-|
-|#include <errno.h>
-|#include <stdio.h>
-|#include <string.h>
-|#include <glib.h>
-|#include <girepository.h>
-|#include "offsets.h"
-|
-|static GIRepository *repository;
-|static const char *namespace = "Offsets";
-|static const char *version = "1.0";
-|
-|static void
-|print_field_offset(FILE         *outfile,
-|                   GIStructInfo *struct_info,
-|                   const gchar  *name)
-|{
-|   gint i;
-|   gint n_fields = g_struct_info_get_n_fields (struct_info);
-|   for (i = 0; i < n_fields; i++)
-|     {
-|       GIFieldInfo *field_info = g_struct_info_get_field (struct_info, i);
-|       const char *field_name = g_base_info_get_name ((GIBaseInfo *)field_info);
-|       if (strcmp (field_name, name) == 0)
-|         {
-|           fprintf (outfile, "%%s %%d\n", name, g_field_info_get_offset (field_info));
-|           g_base_info_unref ((GIBaseInfo *)field_info);
-|           return;
-|         }
-|
-|       g_base_info_unref ((GIBaseInfo *)field_info);
-|     }
-|
-|   g_error("Can't find field '%%s.%%s' in introspection information",
-|           g_base_info_get_name ((GIBaseInfo *)struct_info), name);
-|}
-|
-''')
-
-for symbol in symbols:
-    fields = symbol_fields[symbol]
-
-    output({'symbol' : symbol}, r'''
-|typedef struct {
-|   char dummy;
-|   %(symbol)s struct_;
-|} Align%(symbol)s;
-|
-|static void
-|compiled_%(symbol)s (FILE *outfile)
-|{
-|  fprintf (outfile, "%(symbol)s: size=%%" G_GSIZE_FORMAT ", alignment=%%ld\n",
-|           sizeof(%(symbol)s),
-|           G_STRUCT_OFFSET(Align%(symbol)s, struct_));
-|
-           ''')
-
-    for field in fields:
-        output({ 'field' : field, 'symbol' : symbol }, r'''
-|  fprintf (outfile, "%%s %%ld\n", "%(field)s", G_STRUCT_OFFSET(%(symbol)s, %(field)s));
-               ''')
-
-    output({}, r'''
-|
-|  fprintf (outfile, "\n");
-|}
-|
-           ''')
-
-    if not symbol.startswith("Offsets"):
-        print >> sys.stderr, "Symbol '%s' doesn't start with Offsets" % symbol
-    bare_symbol = symbol[len("Offsets"):]
-
-
-    output({'symbol' : symbol, 'bare_symbol' : bare_symbol}, r'''
-|static void
-|introspected_%(symbol)s (FILE *outfile)
-|{
-|  GIStructInfo *struct_info = (GIStructInfo *)g_irepository_find_by_name(repository, namespace,
-|                                                                         "%(bare_symbol)s");
-|  if (!struct_info)
-|     g_error ("Can't find GIStructInfo for '%(symbol)s'");
-|
-|  fprintf (outfile, "%(symbol)s: size=%%" G_GSIZE_FORMAT ", alignment=%%" G_GSIZE_FORMAT "\n",
-|           g_struct_info_get_size (struct_info),
-|           g_struct_info_get_alignment (struct_info));
-|
-           ''')
-    for field in fields:
-        output({'field' : field}, '''
-|  print_field_offset(outfile, struct_info, "%(field)s");
-               ''')
-
-    output({}, r'''
-|
-|  fprintf (outfile, "\n");
-|
-|  g_base_info_unref ((GIBaseInfo *)struct_info);
-|}
-           ''')
-
-output({}, r'''
-|
-|int main(int argc, char **argv)
-|{
-|  GError *error = NULL;
-|  FILE *outfile;
-|
-|  if (argc != 3)
-|    g_error ("Usage: gitestoffsets COMPILED_OFFSETS_FILE INTROSPECTED_OFFSETS_FILE");
-|
-|  repository = g_irepository_get_default ();
-|  if (!g_irepository_require (repository, namespace, version, 0, &error))
-|     g_error ("Failed to load %%s-%%s.typelib: %%s", namespace, version, error->message);
-|
-|  outfile = fopen (argv[1], "w");
-|  if (!outfile)
-|    g_error ("Cannot open '%%s': %%s'", argv[1], g_strerror(errno));
-|
-''')
-
-for symbol in symbols:
-    output({'symbol' : symbol}, '''
-|  compiled_%(symbol)s (outfile);
-   ''')
-
-output({}, '''
-|
-|  fclose (outfile);
-|
-|  outfile = fopen (argv[2], "w");
-|  if (!outfile)
-|    g_error ("Cannot open '%%s': %%s'", argv[1], g_strerror(errno));
-|
-''')
-
-
-for symbol in symbols:
-    output({'symbol' : symbol}, '''
-|  introspected_%(symbol)s (outfile);
-''')
-
-output({}, r'''
-|
-|  fclose (outfile);
-|
-|  return 0;
-}
-''')
diff --git a/tests/offsets/gitestoffsets.c b/tests/offsets/gitestoffsets.c
new file mode 100644 (file)
index 0000000..538f321
--- /dev/null
@@ -0,0 +1,191 @@
+/*
+ * Copyright (C) 2008 Red Hat, Inc.
+ * Copyright (C) 2018 Tomasz MiÄ…sko
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * The idea here is that we want to compare offset information two ways:
+ *
+ *  1) As generated by the compiler
+ *  2) As found in the typelib
+ *
+ * So we write the field offsets using G_STRUCT_OFFSET() to one file and the
+ * field offsets using the typelib to the another file. We can then diff the
+ * two files to see if they are the same.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <girepository.h>
+#include "offsets.h"
+
+static GIRepository *repository;
+static const char *namespace = "Offsets";
+static const char *version = "1.0";
+
+static void
+introspected_struct (FILE *outfile, const gchar *name)
+{
+  gint i, n_fields;
+  GIStructInfo *struct_info;
+
+  struct_info = g_irepository_find_by_name(repository, namespace, name);
+  if (!struct_info)
+     g_error ("Can't find GIStructInfo for '%s'", name);
+
+  g_fprintf (outfile, "%s%s: size=%" G_GSIZE_FORMAT ", alignment=%" G_GSIZE_FORMAT "\n",
+             namespace, name,
+             g_struct_info_get_size (struct_info),
+             g_struct_info_get_alignment (struct_info));
+
+   n_fields = g_struct_info_get_n_fields (struct_info);
+   for (i = 0; i != n_fields; ++i)
+     {
+       GIFieldInfo *field_info;
+
+       field_info = g_struct_info_get_field (struct_info, i);
+
+       g_fprintf (outfile, "%s %d\n",
+                  g_base_info_get_name ((GIBaseInfo *) field_info),
+                  g_field_info_get_offset (field_info));
+
+       g_base_info_unref ((GIBaseInfo *)field_info);
+     }
+
+  g_fprintf (outfile, "\n");
+
+  g_base_info_unref ((GIBaseInfo *)struct_info);
+}
+
+static void
+compiled (FILE *outfile)
+{
+#define ALIGNOF(type) G_STRUCT_OFFSET(struct {char a; type b;}, b)
+#define PRINT_TYPE(type) g_fprintf (outfile, \
+  "%s: size=%" G_GSIZE_FORMAT ", alignment=%ld\n", \
+  #type, sizeof (type), ALIGNOF (type))
+#define PRINT_MEMBER(type, member) g_fprintf (outfile, \
+  "%s %ld\n", \
+  #member, G_STRUCT_OFFSET(type, member))
+
+  PRINT_TYPE (OffsetsArray);
+  PRINT_MEMBER (OffsetsArray, some_ints);
+  PRINT_MEMBER (OffsetsArray, some_int8s);
+  PRINT_MEMBER (OffsetsArray, some_doubles);
+  PRINT_MEMBER (OffsetsArray, some_enum);
+  PRINT_MEMBER (OffsetsArray, some_ptrs);
+  g_fprintf (outfile, "\n");
+
+  PRINT_TYPE (OffsetsBasic);
+  PRINT_MEMBER (OffsetsBasic, dummy1);
+  PRINT_MEMBER (OffsetsBasic, field_int8);
+  PRINT_MEMBER (OffsetsBasic, dummy2);
+  PRINT_MEMBER (OffsetsBasic, field_int16);
+  PRINT_MEMBER (OffsetsBasic, dummy3);
+  PRINT_MEMBER (OffsetsBasic, field_int32);
+  PRINT_MEMBER (OffsetsBasic, dummy4);
+  PRINT_MEMBER (OffsetsBasic, field_int64);
+  PRINT_MEMBER (OffsetsBasic, dummy5);
+  PRINT_MEMBER (OffsetsBasic, field_pointer);
+  PRINT_MEMBER (OffsetsBasic, dummy6);
+  PRINT_MEMBER (OffsetsBasic, field_float);
+  PRINT_MEMBER (OffsetsBasic, dummy7);
+  PRINT_MEMBER (OffsetsBasic, field_double);
+  PRINT_MEMBER (OffsetsBasic, dummy8);
+  PRINT_MEMBER (OffsetsBasic, field_size);
+  g_fprintf (outfile, "\n");
+
+  PRINT_TYPE (OffsetsEnum);
+  PRINT_MEMBER (OffsetsEnum, enum1);
+  PRINT_MEMBER (OffsetsEnum, dummy1);
+  PRINT_MEMBER (OffsetsEnum, enum2);
+  PRINT_MEMBER (OffsetsEnum, dummy2);
+  PRINT_MEMBER (OffsetsEnum, enum3);
+  PRINT_MEMBER (OffsetsEnum, dummy3);
+  PRINT_MEMBER (OffsetsEnum, enum4);
+  PRINT_MEMBER (OffsetsEnum, dummy4);
+  PRINT_MEMBER (OffsetsEnum, enum5);
+  PRINT_MEMBER (OffsetsEnum, dummy5);
+  PRINT_MEMBER (OffsetsEnum, enum6);
+  PRINT_MEMBER (OffsetsEnum, dummy6);
+  g_fprintf (outfile, "\n");
+
+  PRINT_TYPE (OffsetsNested);
+  PRINT_MEMBER (OffsetsNested, dummy1);
+  PRINT_MEMBER (OffsetsNested, nestee);
+  PRINT_MEMBER (OffsetsNested, dummy2);
+  PRINT_MEMBER (OffsetsNested, nestee_union);
+  PRINT_MEMBER (OffsetsNested, dummy3);
+  g_fprintf (outfile, "\n");
+
+  PRINT_TYPE (OffsetsNestee);
+  PRINT_MEMBER (OffsetsNestee, field1);
+  PRINT_MEMBER (OffsetsNestee, field2);
+  PRINT_MEMBER (OffsetsNestee, field3);
+  g_fprintf (outfile, "\n");
+
+  PRINT_TYPE (OffsetsObj);
+  PRINT_MEMBER (OffsetsObj, parent_instance);
+  PRINT_MEMBER (OffsetsObj, other);
+  g_fprintf (outfile, "\n");
+
+  PRINT_TYPE (OffsetsObjClass);
+  PRINT_MEMBER (OffsetsObjClass, parent_class);
+  g_fprintf (outfile, "\n");
+
+#undef ALIGNOF
+#undef PRINT_TYPE
+#undef PRINT_MEMBER
+}
+
+int main(int argc, char **argv)
+{
+  GError *error = NULL;
+  FILE *outfile;
+
+  if (argc != 3)
+    g_error ("Usage: gitestoffsets COMPILED_OFFSETS_FILE INTROSPECTED_OFFSETS_FILE");
+
+  repository = g_irepository_get_default ();
+  if (!g_irepository_require (repository, namespace, version, 0, &error))
+     g_error ("Failed to load %s-%s.typelib: %s", namespace, version, error->message);
+
+  outfile = fopen (argv[1], "w");
+  if (!outfile)
+    g_error ("Cannot open '%s': %s'", argv[1], g_strerror(errno));
+
+  compiled (outfile);
+  fclose (outfile);
+
+  outfile = fopen (argv[2], "w");
+  if (!outfile)
+    g_error ("Cannot open '%s': %s'", argv[1], g_strerror(errno));
+
+  introspected_struct (outfile, "Array");
+  introspected_struct (outfile, "Basic");
+  introspected_struct (outfile, "Enum");
+  introspected_struct (outfile, "Nested");
+  introspected_struct (outfile, "Nestee");
+  introspected_struct (outfile, "Obj");
+  introspected_struct (outfile, "ObjClass");
+
+  fclose (outfile);
+
+  return 0;
+}
index acf8145..ca1471f 100644 (file)
@@ -11,9 +11,7 @@ test_offsets_lib = shared_library('offsets-1.0',
   version: '1.0.0',
 )
 
-# FIXME: See tests/meson.build
-# FIXME: gitestoffsets.exe fails with STATUS_DLL_NOT_FOUND
-if host_system != 'windows'
+if glib_dep.type_name() == 'pkgconfig'
 
   test_offsets_gir = custom_target('gir-offsets',
     input: test_offsets_sources + test_offsets_headers,
@@ -51,15 +49,8 @@ if host_system != 'windows'
     ],
   )
 
-  gitestoffsets_sources = custom_target(
-    'generate-gitestoffsets.c',
-    output: ['gitestoffsets.c'],
-    command: [python] + files('gen-gitestoffsets', 'offsets.h'),
-    capture: true,
-  )
-
-  executable('gitestoffsets',
-    gitestoffsets_sources, 
+  gitestoffsets_exe = executable('gitestoffsets',
+    'gitestoffsets.c', 
     include_directories : test_offsets_inc,
     dependencies: [girepo_dep],
   )
@@ -67,12 +58,15 @@ if host_system != 'windows'
   test_offsets_env = environment()
   test_offsets_env.set('top_builddir', join_paths(meson.build_root(), 'gir'))
   test_offsets_env.set('builddir', meson.current_build_dir())
-  
+  if host_system == 'windows'
+    test_offsets_env.prepend('PATH', join_paths(meson.build_root(), 'girepository'))
+  endif
+
   test('test_offsets.py',
     python, 
     args: files('test_offsets.py'),
     env: test_offsets_env,
-    depends: test_offsets_typelib,
+    depends: [gitestoffsets_exe, test_offsets_typelib],
   )
 
 endif
index 1281427..e1858b6 100644 (file)
@@ -1,22 +1,33 @@
-repository_tests = [
-  'gitestrepo',
-  'giteststructinfo',
-  'gitestthrows',
-  # FIXME: Requires Regress typelib which is not yet ported to meson.
-  # 'gitypelibtest',
-]
+if glib_dep.type_name() == 'pkgconfig'
 
-repository_test_env = environment()
-repository_test_env.append(
-  'GI_TYPELIB_PATH',
-  join_paths(meson.build_root(), 'gir'),
-  join_paths(meson.build_root(), 'tests')
-)
+  repository_tests = {
+    'gitestrepo': typelibs,
+    'giteststructinfo': typelibs,
+    'gitestthrows': typelibs,
+    'gitypelibtest': [regress_typelib],
+  }
 
-if glib_dep.type_name() == 'pkgconfig'
-  foreach test_name : repository_tests
+  repository_test_env = environment()
+  repository_test_env.prepend(
+    'GI_TYPELIB_PATH',
+    join_paths(meson.build_root(), 'gir'),
+    join_paths(meson.build_root(), 'tests'),
+    join_paths(meson.build_root(), 'tests', 'scanner'),
+  )
+  if host_system == 'windows'
+    repository_test_env.prepend(
+      'PATH', join_paths(meson.build_root(), 'tests', 'scanner'))
+  endif
+
+  custom_c_args = cc.get_supported_arguments([
+    '-Wno-unused-parameter',
+  ])
+
+  foreach test_name, depends : repository_tests
     source = files(test_name + '.c')
-    exe = executable(test_name, source, dependencies: [girepo_dep])
-    test(test_name, exe, env: repository_test_env)
+    exe = executable(test_name, source,
+      dependencies: [girepo_dep],
+      c_args: custom_c_args)
+    test(test_name, exe, env: repository_test_env, depends: depends)
   endforeach
 endif
index d5124e7..9e424d7 100644 (file)
@@ -229,11 +229,13 @@ CHECKDOCS =
 endif
 
 PYTESTS = \
+       test_ccompiler.py \
        test_shlibs.py \
        test_pkgconfig.py \
        test_sourcescanner.py \
        test_transformer.py \
-       test_xmlwriter.py
+       test_xmlwriter.py \
+       test_docwriter.py
 
 TESTS = $(CHECKGIRS) $(CHECKDOCS) $(TYPELIBS) $(PYTESTS)
 TESTS_ENVIRONMENT = env srcdir=$(srcdir) top_srcdir=$(top_srcdir) builddir=$(builddir) top_builddir=$(top_builddir) \
index d3a75b2..2b60920 100644 (file)
@@ -738,7 +738,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -769,7 +769,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
@@ -934,11 +934,13 @@ Typedefs_1_0_gir_SCANNERFLAGS = $(INTROSPECTION_SCANNER_ARGS) --c-include="typed
 @BUILD_DOCTOOL_TRUE@MALLARD_CLEAN = $(DOCGIRS:.gir=-C)/* $(DOCGIRS:.gir=-Python)/* $(DOCGIRS:.gir=-Gjs)/* $(DOCGIRS:.gir=-sections.txt)
 @BUILD_DOCTOOL_TRUE@EXPECTED_MALLARD_DIRS = $(MALLARD_DIRS:=-expected)
 PYTESTS = \
+       test_ccompiler.py \
        test_shlibs.py \
        test_pkgconfig.py \
        test_sourcescanner.py \
        test_transformer.py \
-       test_xmlwriter.py
+       test_xmlwriter.py \
+       test_docwriter.py
 
 TESTS_ENVIRONMENT = env srcdir=$(srcdir) top_srcdir=$(top_srcdir) builddir=$(builddir) top_builddir=$(top_builddir) \
        CC="$(CC)" \
@@ -1523,6 +1525,13 @@ Bar-1.0.typelib.log: Bar-1.0.typelib
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_ccompiler.py.log: test_ccompiler.py
+       @p='test_ccompiler.py'; \
+       b='test_ccompiler.py'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test_shlibs.py.log: test_shlibs.py
        @p='test_shlibs.py'; \
        b='test_shlibs.py'; \
@@ -1558,6 +1567,13 @@ test_xmlwriter.py.log: test_xmlwriter.py
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_docwriter.py.log: test_docwriter.py
+       @p='test_docwriter.py'; \
+       b='test_docwriter.py'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 .test.log:
        @p='$<'; \
        $(am__set_b); \
index e037c90..d876f31 100644 (file)
@@ -530,7 +530,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -563,7 +563,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
index 954dc28..cce8c5c 100644 (file)
@@ -1,20 +1,14 @@
 annotationparser_test_env = environment()
-annotationparser_test_env.append('PYTHONPATH', join_paths(meson.current_build_dir(), '../../../'))
+annotationparser_test_env.prepend('PYTHONPATH', test_env_common_pypath)
+if test_env_common_path.length() > 0
+    annotationparser_test_env.prepend('PATH', test_env_common_path)
+endif
 
 annotationparser_test_files = [
   'test_patterns.py',
+  'test_parser.py',
 ]
 
-# FIXME: MSVC
-#   from giscanner._giscanner import SourceScanner as CSourceScanner
-#   ImportError: DLL load failed: The specified module could not be found.
-if cc.get_id() != 'msvc'
-  annotationparser_test_files += [
-    'test_parser.py',
-  ]
-endif
-
 foreach f : annotationparser_test_files
-  test(f, python, args: files(f), env: annotationparser_test_env)
+  test(f, python, args: files(f), env: annotationparser_test_env, depends: [giscanner_pymod])
 endforeach
-
index 525e5f0..28430a2 100644 (file)
-
 scanner_test_env = environment()
-scanner_test_env.append('PYTHONPATH', join_paths(meson.current_build_dir(), '../../'))
+scanner_test_env.prepend('PYTHONPATH', test_env_common_pypath)
+if test_env_common_path.length() > 0
+    scanner_test_env.prepend('PATH', test_env_common_path)
+endif
 
 scanner_test_files = [
+  'test_ccompiler.py',
   'test_shlibs.py',
+  'test_sourcescanner.py',
+  'test_transformer.py',
+  'test_xmlwriter.py',
+  'test_pkgconfig.py',
+  'test_docwriter.py',
+]
+
+foreach f : scanner_test_files 
+  test(f, python, args: files(f), env: scanner_test_env, depends: [giscanner_pymod])
+endforeach
+
+test_girs = []
+test_typelibs = []
+
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-unused-parameter',
+])
+
+typedef_lib = shared_library('typedef-1.0',
+  sources: ['typedefs.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
+  dependencies: [gobject_dep],
+)
+
+sletter_lib = shared_library('sletter-1.0',
+  sources: ['sletter.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
+  dependencies: [gio_dep],
+)
+
+warnlib_lib = shared_library('warnlib-1.0',
+  sources: ['warnlib.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
+  dependencies: [gio_dep],
+)
+
+utility_lib = shared_library('utility-1.0',
+  sources: ['utility.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
+  dependencies: [gobject_dep],
+)
+
+gtkfrob_lib = shared_library('gtkfrob-1.0',
+  sources: ['gtkfrob.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
+  dependencies: [gobject_dep],
+)
+
+gettype_lib = shared_library('gettype-1.0',
+  sources: ['gettype.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
+  dependencies: [gobject_dep],
+)
+
+barapp_lib = shared_library('barapp-1.0',
+  sources: ['barapp.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + custom_c_args,
+  dependencies: [gobject_dep, girepo_dep],
+)
+
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-unused-parameter',
+  '-Wno-old-style-definition',
+  '-Wno-missing-field-initializers',
+])
+
+if with_cairo
+  regress_deps = [cairo_dep, cairo_gobject_dep]
+  regress_c_args = []
+else
+  regress_deps = []
+  regress_c_args = ['-D_GI_DISABLE_CAIRO']
+endif
+
+regress_lib = shared_library('regress-1.0',
+  sources: ['regress.c', 'annotation.c', 'foo.c', 'drawable.c'],
+  include_directories : [configinc, include_directories('..')],
+  c_args: gi_hidden_visibility_cflags + regress_c_args + custom_c_args,
+  dependencies: [gobject_dep, gio_dep] + regress_deps,
+)
+
+python_path = run_command(python, ['-c', 'import sys; sys.stdout.write(sys.executable)']).stdout()
+
+gircompiler_command = [
+  gircompiler, '-o', '@OUTPUT@', '@INPUT@',
+  '--includedir', join_paths(meson.build_root(), 'gir'),
+  '--includedir', meson.current_build_dir(),
 ]
 
-# FIXME: MSVC
-if cc.get_id() != 'msvc'
-  scanner_test_files += [
-    'test_sourcescanner.py',
-    'test_transformer.py',
-    'test_xmlwriter.py',
-    'test_pkgconfig.py',
+if glib_dep.type_name() == 'pkgconfig'
+  typedef_gir = custom_target('gir-typedef',
+    input: ['typedefs.c', 'typedefs.h'],
+    output: 'Typedefs-1.0.gir',
+    depends: [typedef_lib] + typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--warn-all',
+      '--warn-error',
+      '--namespace=Typedefs',
+      '--nsversion=1.0',
+      '--symbol-prefix=typedefs',
+      '--identifier-prefix=Typedefs',
+      '--include=GObject-2.0',
+      '--pkg=gobject-2.0',
+      '--library=typedef-1.0',
+      '--c-include=typedefs.h',
+      '-L', meson.current_build_dir(),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += typedef_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-typedef',
+    input: typedef_gir,
+    output: '@BASENAME@.typelib',
+    depends: [gobject_gir],
+    command: gircompiler_command,
+  )
+
+  bar_gir = custom_target('gir-bar',
+    input: ['barapp.c', 'barapp.h'],
+    output: 'Bar-1.0.gir',
+    depends: [barapp_lib] + typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--warn-all',
+      '--warn-error',
+      '--namespace=Bar',
+      '--nsversion=1.0',
+      '--include=GObject-2.0',
+      '--pkg=gobject-2.0',
+      '--library=barapp-1.0',
+      '--accept-unprefixed',
+      '-L', meson.current_build_dir(),
+      '-L', join_paths(meson.build_root(), 'girepository'),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      '@INPUT@',
     ]
+  )
+  test_girs += bar_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-bar',
+    input: bar_gir,
+    output: '@BASENAME@.typelib',
+    depends: [gobject_gir],
+    command: gircompiler_command,
+  )
+
+  sletter_gir = custom_target('gir-sletter',
+    input: ['sletter.c', 'sletter.h'],
+    output: 'SLetter-1.0.gir',
+    depends: [sletter_lib] + typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--warn-all',
+      '--warn-error',
+      '--namespace=SLetter',
+      '--nsversion=1.0',
+      '--identifier-prefix=S',
+      '--include=Gio-2.0',
+      '--library=sletter-1.0',
+      '--c-include=sletter.h',
+      '-L', meson.current_build_dir(),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += sletter_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-sletter',
+    input: sletter_gir,
+    output: '@BASENAME@.typelib',
+    depends: [gio_gir],
+    command: gircompiler_command,
+  )
+
+  warnlib_gir = custom_target('gir-warnlib',
+    input: ['warnlib.c', 'warnlib.h'],
+    output: 'WarnLib-1.0.gir',
+    depends: [warnlib_lib] + typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--namespace=WarnLib',
+      '--nsversion=1.0',
+      '--include=Gio-2.0',
+      '--library=warnlib-1.0',
+      '--symbol-prefix=warnlib_',
+      '--c-include=warnlib.h',
+      '-L', meson.current_build_dir(),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += warnlib_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-warnlib',
+    input: warnlib_gir,
+    output: '@BASENAME@.typelib',
+    depends: [gio_gir],
+    command: gircompiler_command,
+  )
+
+  utility_gir = custom_target('gir-utility',
+    input: ['utility.c', 'utility.h'],
+    output: 'Utility-1.0.gir',
+    depends: [utility_lib] + typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--warn-all',
+      '--warn-error',
+      '--namespace=Utility',
+      '--nsversion=1.0',
+      '--include=GObject-2.0',
+      '--pkg=gobject-2.0',
+      '--library=utility-1.0',
+      '--c-include=utility.h',
+      '-L', meson.current_build_dir(),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += utility_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-utility',
+    input: utility_gir,
+    output: '@BASENAME@.typelib',
+    depends: [gobject_gir],
+    command: gircompiler_command,
+  )
+
+  gtkfrob_gir = custom_target('gir-gtkfrob',
+    input: ['gtkfrob.c', 'gtkfrob.h'],
+    output: 'GtkFrob-1.0.gir',
+    depends: [gtkfrob_lib] + typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--warn-all',
+      '--warn-error',
+      '--namespace=GtkFrob',
+      '--nsversion=1.0',
+      '--identifier-prefix=Gtk',
+      '--symbol-prefix=gtk_frob',
+      '--include=GObject-2.0',
+      '--pkg=gobject-2.0',
+      '--library=gtkfrob-1.0',
+      '-L', meson.current_build_dir(),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += gtkfrob_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-gtkfrob',
+    input: gtkfrob_gir,
+    output: '@BASENAME@.typelib',
+    depends: [gobject_gir],
+    command: gircompiler_command,
+  )
+
+  gettype_gir = custom_target('gir-gettype',
+    input: ['gettype.c', 'gettype.h'],
+    output: 'GetType-1.0.gir',
+    depends: [gettype_lib] + typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--namespace=GetType',
+      '--nsversion=1.0',
+      '--identifier-prefix=GetType',
+      '--symbol-prefix=gettype',
+      '--include=GObject-2.0',
+      '--pkg=gobject-2.0',
+      '--library=gettype-1.0',
+      '--c-include=gettype.h',
+      '-L', meson.current_build_dir(),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += gettype_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-gettype',
+    input: gettype_gir,
+    output: '@BASENAME@.typelib',
+    depends: [gobject_gir],
+    command: gircompiler_command,
+  )
+
+  symbolfilter_gir = custom_target('gir-symbolfilter',
+    input: ['symbolfilter.h'],
+    output: 'Symbolfilter-1.0.gir',
+    depends: typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--namespace=Symbolfilter',
+      '--nsversion=1.0',
+      '--header-only',
+      '--symbol-filter-cmd=' + python_path + ' ' +  join_paths(meson.current_source_dir(), 'symbolfilter.py'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += symbolfilter_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-symbolfilter',
+    input: symbolfilter_gir,
+    output: '@BASENAME@.typelib',
+    command: gircompiler_command,
+  )
+
+  identfilter_gir = custom_target('gir-identfilter',
+    input: ['identfilter.h'],
+    output: 'Identfilter-1.0.gir',
+    depends: typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--accept-unprefixed',
+      '--reparse-validate',
+      '--namespace=Identfilter',
+      '--nsversion=1.0',
+      '--header-only',
+      '--identifier-filter-cmd=' + python_path + ' ' +  join_paths(meson.current_source_dir(), 'identfilter.py'),
+      '@INPUT@',
+    ]
+  )
+  test_girs += identfilter_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-identfilter',
+    input: identfilter_gir,
+    output: '@BASENAME@.typelib',
+    command: gircompiler_command,
+  )
+
+  headeronly_gir = custom_target('gir-headeronly',
+    input: ['headeronly.h'],
+    output: 'Headeronly-1.0.gir',
+    depends: typelibs,
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--warn-all',
+      '--warn-error',
+      '--reparse-validate',
+      '--namespace=Headeronly',
+      '--nsversion=1.0',
+      '--header-only',
+      '@INPUT@',
+    ]
+  )
+  test_girs += headeronly_gir
+
+  test_typelibs += custom_target(
+    'generate-typelib-headeronly',
+    input: headeronly_gir,
+    output: '@BASENAME@.typelib',
+    command: gircompiler_command,
+  )
+
+  if with_cairo
+    regress_scanner_cairo_args = ['--include=cairo-1.0']
+  else
+    regress_scanner_cairo_args = ['-D_GI_DISABLE_CAIRO',]
+  endif
+
+  regress_gir = custom_target('gir-regress',
+    input: ['regress.c', 'regress.h', 'annotation.c', 'annotation.h',
+            'foo.c', 'foo.h', 'drawable.c', 'drawable.h'],
+    output: 'Regress-1.0.gir',
+    depends: [regress_lib] + typelibs + [utility_gir],
+    command: [
+      python,
+      girscanner,
+      '--output=@OUTPUT@',
+      '--no-libtool',
+      '--reparse-validate',
+      '--add-include-path', join_paths(meson.source_root(), 'gir'),
+      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--add-include-path', meson.current_build_dir(),
+      '--namespace=Regress',
+      '--nsversion=1.0',
+      '--include=Gio-2.0',
+      '--include=Utility-1.0',
+      '--library=regress-1.0',
+      '--c-include=regress.h',
+      '-L', meson.current_build_dir(),
+      '-I', meson.current_source_dir(),
+      '-I', join_paths(meson.current_source_dir(), '..'),
+      ] + regress_scanner_cairo_args + [
+      '@INPUT@',
+    ]
+  )
+
+  # The reference gir is generated with cairo support, so we can only compare
+  # things if we build with cairo as well
+  if with_cairo
+    test_girs += regress_gir
+  endif
+
+  regress_typelib = custom_target(
+    'generate-typelib-regress',
+    input: regress_gir,
+    output: '@BASENAME@.typelib',
+    command: gircompiler_command,
+  )
+  test_typelibs += regress_typelib
 endif
 
-foreach f : scanner_test_files 
-  test(f, python, args: files(f), env: scanner_test_env)
+gi_tester = files(join_paths('..', 'gi-tester'))
+
+foreach gir : test_girs
+  gir_name = gir.full_path().split('/')[-1]
+  test(
+    'gi-tester-' + gir_name,
+    python,
+    args: [gi_tester, gir_name],
+    depends: [gir],
+    env: [
+      'srcdir=' + meson.current_source_dir(),
+      'builddir=' + meson.current_build_dir(),
+    ],
+  )
+endforeach
+
+if get_option('doctool') and glib_dep.type_name() == 'pkgconfig'
+  foreach language : ['C', 'Python', 'Gjs']
+    regress_docs = custom_target(
+      'generate-docs-' + language,
+      input: regress_gir,
+      depends: [doc_templates],
+      build_by_default: not with_cairo,
+      output: 'Regress-1.0-' + language,
+      command: [
+        python, girdoctool,
+        '--add-include-path=' + join_paths(meson.build_root(), 'gir'),
+        '--add-include-path=' + meson.current_build_dir(),
+        '--language', language,
+        '@INPUT@', '-o', '@OUTPUT@'],
+    )
+
+    if with_cairo
+      test(
+        'gi-tester-docs-Regress-1.0-' + language,
+        python,
+        args: [gi_tester, 'Regress-1.0-' + language],
+        depends: [regress_docs],
+        env: [
+          'srcdir=' + meson.current_source_dir(),
+          'builddir=' + meson.current_build_dir(),
+        ],
+      )
+    endif
+  endforeach
+
+  regress_sections = custom_target(
+    'generate-docs-sections',
+    input: regress_gir,
+    depends: [doc_templates],
+    build_by_default: not with_cairo,
+    output: 'Regress-1.0-sections.txt',
+    command: [
+      python, girdoctool,
+      '--add-include-path=' + join_paths(meson.build_root(), 'gir'),
+      '--add-include-path=' + meson.current_build_dir(),
+      '--write-sections-file',
+      '@INPUT@', '-o', '@OUTPUT@'],
+  )
+
+  if with_cairo
+    test(
+      'gi-tester-docs-Regress-1.0-sections.txt',
+      python,
+      args: [gi_tester, 'Regress-1.0-sections.txt'],
+      depends: [regress_sections],
+      env: [
+        'srcdir=' + meson.current_source_dir(),
+        'builddir=' + meson.current_build_dir(),
+      ],
+    )
+  endif
+endif
+
+foreach typelib : test_typelibs
+  typelib_name = typelib.full_path().split('/')[-1]
+  test(
+    'gi-tester-' + typelib_name,
+    python,
+    args: [gi_tester, typelib.full_path()],
+    depends: [typelib],
+  )
 endforeach
 
 subdir('annotationparser')
diff --git a/tests/scanner/test_ccompiler.py b/tests/scanner/test_ccompiler.py
new file mode 100644 (file)
index 0000000..dd8700d
--- /dev/null
@@ -0,0 +1,218 @@
+# GObject-Introspection - a framework for introspecting GObject libraries
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+import distutils
+import os
+import shlex
+import unittest
+from contextlib import contextmanager
+
+from giscanner.ccompiler import CCompiler, FLAGS_RETAINING_MACROS
+
+
+@contextmanager
+def Environ(new_environ):
+    """Context manager for os.environ."""
+    old_environ = os.environ.copy()
+    os.environ.clear()
+    os.environ.update(new_environ)
+    try:
+        yield
+    finally:
+        # Restore previous environment
+        os.environ.clear()
+        os.environ.update(old_environ)
+
+
+@unittest.skipIf(os.name != 'posix', 'tests for unix compiler only')
+class UnixCCompilerTest(unittest.TestCase):
+
+    def assertListStartsWith(self, seq, prefix):
+        """Checks whether seq starts with specified prefix."""
+        if not isinstance(seq, list):
+            raise self.fail('First argument is not a list: %r' % (seq,))
+        if not isinstance(prefix, list):
+            raise self.fail('Second argument is not a list: %r' % (prefix,))
+        self.assertSequenceEqual(seq[:len(prefix)], prefix, seq_type=list)
+
+    def assertIsSubsequence(self, list1, list2):
+        """Checks whether list1 is a subsequence of list2. Not necessarily a contiguous one."""
+        if not isinstance(list1, list):
+            raise self.fail('First argument is not a list: %r' % (list1,))
+        if not isinstance(list2, list):
+            raise self.fail('Second argument is not a list: %r' % (list2,))
+        start = 0
+        for elem in list1:
+            try:
+                start = list2.index(elem, start) + 1
+            except ValueError:
+                self.fail('%r is not a subsequence of %r' % (list1, list2))
+
+    def test_link_args_override(self):
+        with Environ(dict(CC="foobar")):
+            compiler = CCompiler()
+            self.assertEqual(compiler.compiler.linker_so[0], "foobar")
+
+    def compile_args(self, environ={}, compiler_name='unix',
+                     pkg_config_cflags=[], cpp_includes=[],
+                     source='a.c', init_sections=[]):
+        """Returns a list of arguments that would be passed to the compiler executing given compilation step."""
+
+        try:
+            from unittest.mock import patch
+        except ImportError as e:
+            raise unittest.SkipTest(e)
+
+        with patch.object(distutils.ccompiler.CCompiler, 'spawn') as spawn:
+            with Environ(environ):
+                cc = CCompiler(compiler_name=compiler_name)
+                # Avoid check if target is newer from source.
+                cc.compiler.force = True
+                # Don't actually do anything.
+                cc.compiler.dry_run = True
+                cc.compile(pkg_config_cflags, cpp_includes, [source], init_sections)
+        spawn.assert_called_once()
+        args, kwargs = spawn.call_args
+        return args[0]
+
+    def preprocess_args(self, environ={}, compiler_name=None,
+                        source='a.c', output=None, cpp_options=[]):
+        """Returns a list of arguments that would be passed to the preprocessor executing given preprocessing step."""
+
+        try:
+            from unittest.mock import patch
+        except ImportError as e:
+            raise unittest.SkipTest(e)
+
+        with patch.object(distutils.ccompiler.CCompiler, 'spawn') as spawn:
+            with Environ(environ):
+                cc = CCompiler(compiler_name=compiler_name)
+                # Avoid check if target is newer from source.
+                cc.compiler.force = True
+                # Don't actually do anything.
+                cc.compiler.dry_run = True
+                cc.preprocess(source, output, cpp_options)
+        spawn.assert_called_once()
+        args, kwargs = spawn.call_args
+        return args[0]
+
+    @unittest.skip("Currently a Python build time compiler is used as the default.")
+    def test_compile_default(self):
+        """Checks that cc is used as the default compiler."""
+        args = self.compile_args()
+        self.assertListStartsWith(args, ['cc'])
+
+    def test_compile_cc(self):
+        """Checks that CC overrides used compiler."""
+        args = self.compile_args(environ=dict(CC='supercc'))
+        self.assertListStartsWith(args, ['supercc'])
+
+    def test_preprocess_cc(self):
+        """Checks that CC overrides used preprocessor when CPP is unspecified."""
+        args = self.preprocess_args(environ=dict(CC='clang'))
+        self.assertListStartsWith(args, ['clang'])
+        self.assertIn('-E', args)
+
+    def test_preprocess_cpp(self):
+        """Checks that CPP overrides used preprocessor regardless of CC."""
+        args = self.preprocess_args(environ=dict(CC='my-compiler', CPP='my-preprocessor'))
+        self.assertListStartsWith(args, ['my-preprocessor'])
+        self.assertNotIn('-E', args)
+
+    @unittest.skip("Currently a Python build time preprocessor is used as the default")
+    def test_preprocess_default(self):
+        """Checks that cpp is used as the default preprocessor."""
+        args = self.preprocess_args()
+        self.assertListStartsWith(args, ['cpp'])
+
+    def test_multiple_args_in_cc(self):
+        """Checks that shell word splitting rules are used to split CC."""
+        args = self.compile_args(environ=dict(CC='build-log -m " hello  there  " gcc'))
+        self.assertListStartsWith(args, ['build-log', '-m', ' hello  there  ', 'gcc'])
+
+    def test_multiple_args_in_cpp(self):
+        """Checks that shell word splitting rules are used to split CPP."""
+        args = self.preprocess_args(environ=dict(CPP='build-log -m " hello  there" gcc -E'))
+        self.assertListStartsWith(args, ['build-log', '-m', ' hello  there', 'gcc', '-E'])
+
+    def test_deprecation_warnings_are_disabled_during_compilation(self):
+        """Checks that deprecation warnings are disabled during compilation."""
+        args = self.compile_args()
+        self.assertIn('-Wno-deprecated-declarations', args)
+
+    def test_preprocess_includes_cppflags(self):
+        """Checks that preprocessing step includes CPPFLAGS."""
+        args = self.preprocess_args(environ=dict(CPPFLAGS='-fsecure -Ddebug'))
+        self.assertIsSubsequence(['-fsecure', '-Ddebug'], args)
+
+    def test_compile_includes_cppflags(self):
+        """Checks that compilation step includes both CFLAGS and CPPFLAGS, in that order."""
+        args = self.compile_args(environ=dict(CFLAGS='-lfoo -Da="x y" -Weverything',
+                                              CPPFLAGS='-fsecure -Ddebug'))
+        self.assertIsSubsequence(['-lfoo', '-Da=x y', '-Weverything', '-fsecure', '-Ddebug'],
+                                 args)
+
+    def test_flags_retaining_macros_are_filtered_out(self):
+        """Checks that flags that would retain macros after preprocessing step are filtered out."""
+        args = self.preprocess_args(cpp_options=list(FLAGS_RETAINING_MACROS))
+        for flag in FLAGS_RETAINING_MACROS:
+            self.assertNotIn(flag, args)
+
+    @unittest.expectedFailure
+    def test_macros(self):
+        """"Checks that macros from CFLAGS are defined only once."""
+        args = self.compile_args(environ=dict(CFLAGS='-DSECRET_MACRO'))
+        self.assertEqual(1, args.count('-DSECRET_MACRO'))
+
+    @unittest.expectedFailure
+    def test_flags_retaining_macros_are_filtered_out_from_cppflags(self):
+        """Checks that flags that would retain macros after preprocessing step are filtered out from CPPFLAGS."""
+        cppflags = ' '.join(shlex.quote(flag) for flag in FLAGS_RETAINING_MACROS)
+        args = self.preprocess_args(environ=dict(CPPFLAGS=cppflags))
+        for flag in FLAGS_RETAINING_MACROS:
+            self.assertNotIn(flag, args)
+
+    def test_preprocess_preserves_comments(self):
+        """Checks that preprocessing step includes flag that preserves comments."""
+        args = self.preprocess_args()
+        self.assertIn('-C', args)
+
+    def test_perprocess_includes_cwd(self):
+        """Checks that preprocessing includes current working directory."""
+        args = self.preprocess_args()
+        self.assertIn('-I.', args)
+
+    def test_preprocess_command(self):
+        """"Checks complete preprocessing command."""
+        args = self.preprocess_args(environ=dict(CPP='gcc -E'),
+                                    source='/tmp/file.c')
+        self.assertEqual(['gcc', '-E', '-I.', '-C', '/tmp/file.c'],
+                         args)
+
+    def test_compile_command(self):
+        """Checks complete compilation command."""
+        args = self.compile_args(environ=dict(CC='clang'),
+                                 source='/tmp/file.c')
+        self.assertEqual(['clang',
+                          '-c', '/tmp/file.c',
+                          '-o', '/tmp/file.o',
+                          '-Wno-deprecated-declarations'],
+                         args)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/tests/scanner/test_docwriter.py b/tests/scanner/test_docwriter.py
new file mode 100644 (file)
index 0000000..3fb6417
--- /dev/null
@@ -0,0 +1,23 @@
+import unittest
+
+try:
+    import mako
+except ImportError:
+    HAS_MAKO = False
+else:
+    HAS_MAKO = True
+    mako
+    from giscanner.docwriter import DocWriter
+    from giscanner.transformer import Transformer
+
+
+@unittest.skipUnless(HAS_MAKO, "mako missing")
+class TestDocWriter(unittest.TestCase):
+
+    def test_main(self):
+        transformer = Transformer(None)
+        DocWriter(transformer, "gjs", "devdocs")
+
+
+if __name__ == '__main__':
+    unittest.main()
index c731049..b31af19 100644 (file)
@@ -78,6 +78,11 @@ void foo(int bar) {
         self.assertEqual(len(list(scanner.get_symbols())), 1)
         self.assertFalse(scanner.get_errors())
 
+    def test_bool_no_include(self):
+        # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/247
+        scanner = self._parse_files("bool foo;")
+        self.assertFalse(scanner.get_errors())
+
 
 if __name__ == '__main__':
     unittest.main()
index 27bfad5..4731b5c 100644 (file)
@@ -16,11 +16,14 @@ from giscanner.message import MessageLogger, WARNING, ERROR, FATAL
 def create_scanner_from_source_string(source):
     ss = SourceScanner()
     tmp_fd, tmp_name = tempfile.mkstemp(suffix='.h', text=True)
-    file = os.fdopen(tmp_fd, 'wt')
-    file.write(source)
-    file.close()
 
-    ss.parse_files([tmp_name])
+    try:
+        with os.fdopen(tmp_fd, 'wt') as file:
+            file.write(source)
+        ss.parse_files([tmp_name])
+    finally:
+        os.unlink(tmp_name)
+
     return ss
 
 
index 95d7603..b6d1267 100644 (file)
@@ -529,7 +529,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -562,7 +562,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
index 06d87d9..700305e 100644 (file)
@@ -45,6 +45,7 @@ gchar **shlibs = NULL;
 gboolean include_cwd = FALSE;
 gboolean debug = FALSE;
 gboolean verbose = FALSE;
+gboolean show_version = FALSE;
 
 static gboolean
 write_out_typelib (gchar *prefix,
@@ -135,6 +136,7 @@ static GOptionEntry options[] =
   { "shared-library", 'l', 0, G_OPTION_ARG_FILENAME_ARRAY, &shlibs, "shared library", "FILE" }, 
   { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, "show debug messages", NULL }, 
   { "verbose", 0, 0, G_OPTION_ARG_NONE, &verbose, "show verbose messages", NULL }, 
+  { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, "show program's version number and exit", NULL },
   { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
   { NULL, }
 };
@@ -174,6 +176,13 @@ main (int argc, char ** argv)
 
   g_log_set_default_handler (log_handler, NULL);
 
+  if (show_version)
+    {
+      g_printf ("g-ir-compiler %u.%u.%u\n",
+                GI_MAJOR_VERSION, GI_MINOR_VERSION, GI_MICRO_VERSION);
+      return 0;
+    }
+
   if (!input) 
     { 
       g_fprintf (stderr, "no input files\n"); 
index 36e1d05..143f01f 100644 (file)
@@ -41,6 +41,7 @@ main (int argc, char *argv[])
   GOptionContext *context;
   GError *error = NULL;
   gboolean needs_prefix;
+  gboolean show_version = FALSE;
   gint i;
   GOptionEntry options[] =
     {
@@ -48,6 +49,7 @@ main (int argc, char *argv[])
       { "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" },
       { "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, "include directories in GIR search path", NULL },
       { "all", 0, 0, G_OPTION_ARG_NONE, &show_all, "show all available information", NULL, },
+      { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, "show program's version number and exit", NULL },
       { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
       { NULL, }
     };
@@ -67,6 +69,13 @@ main (int argc, char *argv[])
       return 1;
     }
 
+  if (show_version)
+    {
+      g_printf ("g-ir-generate %u.%u.%u\n",
+                GI_MAJOR_VERSION, GI_MINOR_VERSION, GI_MICRO_VERSION);
+      return 0;
+    }
+
   if (!input)
     {
       g_fprintf (stderr, "no input files\n");
index 3d5c004..6d38361 100644 (file)
@@ -22,6 +22,7 @@ foreach tool : tools
   tools_conf.set('datarootdir', datadir_abs)
   tools_conf.set('gir_dir_prefix', gir_dir_prefix)
   tools_conf.set('PYTHON_CMD', python_cmd)
+  tools_conf.set('GIR_DIR', girdir)
 
   tools_conf.set('TOOL_MODULE', tool[1])
   tools_conf.set('TOOL_FUNCTION', tool[2])
@@ -38,24 +39,39 @@ foreach tool : tools
 endforeach
 
 girscanner = tool_output[0]
+if get_option('doctool')
+  girdoctool = tool_output[-1]
+endif
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-missing-field-initializers',
+])
 gircompiler = executable('g-ir-compiler', 'compiler.c',
   dependencies: [
     girepo_internals_dep,
     girepo_dep,
   ],
   install: true,
+  c_args: custom_c_args,
 )
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-missing-field-initializers',
+])
 girgenerate = executable('g-ir-generate', 'generate.c',
   dependencies: [
     girepo_internals_dep,
     girepo_dep,
   ],
   install: true,
+  c_args: custom_c_args,
 )
 
+custom_c_args = cc.get_supported_arguments([
+  '-Wno-missing-field-initializers',
+])
 girinspect = executable('g-ir-inspect', 'g-ir-inspect.c',
   dependencies: girepo_dep,
   install: true,
+  c_args: custom_c_args,
 )