[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. f02204656155ad820a400c4f180427726f49d83a
git at osgeo.org
git at osgeo.org
Fri Feb 7 20:07:48 PST 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, stable-3.0 has been updated
via f02204656155ad820a400c4f180427726f49d83a (commit)
from ba08c8cc2478ca5615fb0a880f7d3637a8afb84e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f02204656155ad820a400c4f180427726f49d83a
Author: Regina Obe <lr at pcorp.us>
Date: Fri Feb 7 23:07:32 2020 -0500
replace svn number with git has. Back port https://git.osgeo.org/gitea/postgis/postgis/pulls/43, add --without-phony, references #4637 references #4617 for PostGIS 3.0.1
diff --git a/.gitignore b/.gitignore
index 0a6a578..bceff57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,6 @@
*.gcda
*.gcno
gmon.out
-postgis_svn_revision.h
aclocal.m4
autom4te.cache/
build-aux/
@@ -190,4 +189,5 @@ deps/wagyu/Makefile
#generated files
postgis_revision.h
+postgis_svn_revision.h
ChangeLog
diff --git a/GNUmakefile.in b/GNUmakefile.in
index cb48e9b..becf849 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -25,7 +25,7 @@ all install uninstall noop clean distclean check-unit check-regress:
echo "PostGIS was built successfully. Ready to install."; \
fi
-all: postgis_svn_revision.h
+all: postgis_revision.h
ifeq (@LIBLWGEOM_ONLY@,no)
install: all comments-install
@@ -53,6 +53,7 @@ check-no-trailing-blanks:
grep -v lookup3 | \
grep -v vector_tile.pb-c | \
grep -v postgis/sqldefines.h | \
+ grep -v deps/ | \
xargs grep -n '[[:space:]]$$'
installcheck: installcheck-base installcheck-upgrade
@@ -157,7 +158,7 @@ config.status: configure
./configure
ChangeLog:
- svn2cl --authors=authors.svn -i -o ChangeLog
+ git log --pretty --numstat --summary | git2cl > ChangeLog
raster-post-install-check:
$(MAKE) -C raster post-install-check
@@ -172,13 +173,12 @@ fmt:
commit:
$(MAKE) fmt && $(MAKE) clean && $(MAKE) check && svn commit
-authors.git: authors.svn
- sed -e 's/:/ = /' authors.svn > authors.git
-svnrebase: authors.git
- git svn rebase --authors-file authors.git
+ifeq (@PHONY_REVISION@,yes)
+.PHONY: postgis_revision.h
+endif
-postgis_svn_revision.h:
- $(PERL) utils/svn_repo_revision.pl
+postgis_revision.h:
+ $(PERL) utils/repo_revision.pl
-.PHONY: utils liblwgeom ChangeLog raster postgis_svn_revision.h
+.PHONY: utils liblwgeom ChangeLog raster
\ No newline at end of file
diff --git a/NEWS b/NEWS
index 4fc1fd1..fc64d86 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,15 @@
PostGIS 3.0.1
XXXX/XX/XX
+* Breaking Changes *
+ - #4637 svn number replaced by git hash in version output
+ (Sandro Santilli, Regina Obe, Bas Couwenberg)
+
+* New Features *
+ - #4617, Add configure switch `--without-phony-revision` (Raúl Marín)
+ Use to prevent postgis_revision.h
+ from rebuilding (when building from tar ball) and building in a gitted folder
+
* Bug Fixes and Enhancements *
- #4558, Fix oversimplification of polygon inner rings (Raúl Marín)
- #4588, Fix update when st_union(geometry) doesn't exist (Raúl Marín)
diff --git a/ci/debbie/postgis_release_docs.sh b/ci/debbie/postgis_release_docs.sh
index c68374b..a0cca37 100644
--- a/ci/debbie/postgis_release_docs.sh
+++ b/ci/debbie/postgis_release_docs.sh
@@ -38,13 +38,13 @@ LDFLAGS="-L${PGPATH}/lib" ./configure \
--without-raster --without-wagyu
make clean
-# generating postgis_svn_revision.h in case hasn't been generated
-if test -f utils/svn_repo_revision.pl; then
- echo "Generating postgis_svn_revision.h"
- perl utils/svn_repo_revision.pl
+# generating postgis_revision.h in case hasn't been generated
+if test -f utils/repo_revision.pl; then
+ echo "Generating postgis_revision.h"
+ perl utils/repo_revision.pl
fi
-export VREV="`cat postgis_svn_revision.h | awk '{print $3}'`"
-echo "SVN is ${VREV}"
+export VREV="`cat postgis_revision.h | awk '{print $3}'`"
+echo "GIT is ${VREV}"
cd doc
diff --git a/doc/reporting.xml b/doc/reporting.xml
index 9784a2b..da46d47 100644
--- a/doc/reporting.xml
+++ b/doc/reporting.xml
@@ -14,7 +14,7 @@
version()</code> [for postgresql].</para>
<para>If you aren't using the latest release, it's worth taking a look at
- its <ulink url="http://svn.osgeo.org/postgis/trunk/NEWS">release
+ its <ulink url="https://git.osgeo.org/gitea/postgis/postgis/src/branch/stable-3.0/NEWS">release
changelog</ulink> first, to find out if your bug has already been
fixed.</para>
@@ -44,27 +44,29 @@
<para>If your revision is trivial, just describe it in a new bug tracker
issue, being specific about its location in the documentation.</para>
- <para>If your changes are more extensive, a Subversion patch is definitely
+ <para>If your changes are more extensive, a patch is definitely
preferred. This is a four step process on Unix (assuming you already have
- <ulink url="http://subversion.apache.org/">Subversion</ulink>
+ <ulink url="https://git-scm.com/">Git</ulink>
installed):</para>
<orderedlist>
<listitem>
- <para>Check out a copy of PostGIS' Subversion trunk. On Unix,
+ <para>Check out a copy of PostGIS' git master. On Unix,
type:</para>
- <para><command>svn checkout
- http://svn.osgeo.org/postgis/trunk/</command></para>
+ <para><command>git clone https://git.osgeo.org/gitea/postgis/postgis.git postgis</command></para>
- <para>This will be stored in the directory ./trunk</para>
+ <para>This will be stored in the directory postgis</para>
+ <para>Note if you need to switch to another branch for testing such as latest stable or tagged you can do:</para>
+ <para><command>cd postgis
+git checkout stable-&last_minor_version;</command></para>
</listitem>
<listitem>
<para>Make your changes to the documentation with your favorite text
editor. On Unix, type (for example):</para>
- <para><command>vim trunk/doc/postgis.xml</command></para>
+ <para><command>vim doc/postgis.xml</command></para>
<para>Note that the documentation is written in DocBook XML rather than HTML,
so if you are not familiar with it please follow the example of the
@@ -75,7 +77,7 @@
<para>Make a patch file containing the differences from the master
copy of the documentation. On Unix, type:</para>
- <para><command>svn diff trunk/doc/postgis.xml >
+ <para><command>git diff doc/postgis.xml >
doc.patch</command></para>
</listitem>
diff --git a/extensions/postgis/META.json b/extensions/postgis/META.json
index 4dfc8b0..34aba6d 100644
--- a/extensions/postgis/META.json
+++ b/extensions/postgis/META.json
@@ -12,7 +12,7 @@
"repository" : {
"type" : "svn",
"web" : "http://postgis.net",
- "url" : "svn://svn.osgeo.org/postgis/"
+ "url" : "https://git.osgeo.org/gitea/postgis/postgis.git"
}
},
"tags" : [
diff --git a/extensions/postgis_tiger_geocoder/META.json b/extensions/postgis_tiger_geocoder/META.json
index f5add01..12481e6 100644
--- a/extensions/postgis_tiger_geocoder/META.json
+++ b/extensions/postgis_tiger_geocoder/META.json
@@ -29,9 +29,9 @@
"web": "http://trac.osgeo.org/postgis"
},
"repository": {
- "url": "svn://svn.osgeo.org/postgis/",
+ "url": "https://git.osgeo.org/gitea/postgis/postgis.git",
"web": "http://postgis.net",
- "type": "svn"
+ "type": "git"
}
},
"meta-spec": {
diff --git a/extensions/postgis_topology/META.json b/extensions/postgis_topology/META.json
index ea28bd4..5265e90 100644
--- a/extensions/postgis_topology/META.json
+++ b/extensions/postgis_topology/META.json
@@ -29,9 +29,9 @@
"web": "http://trac.osgeo.org/postgis"
},
"repository": {
- "url": "svn://svn.osgeo.org/postgis/",
+ "url": "https://git.osgeo.org/gitea/postgis/postgis.git",
"web": "http://postgis.net",
- "type": "svn"
+ "type": "git"
}
},
"meta-spec": {
diff --git a/liblwgeom/Makefile.in b/liblwgeom/Makefile.in
index bc1f664..abaeb81 100644
--- a/liblwgeom/Makefile.in
+++ b/liblwgeom/Makefile.in
@@ -167,11 +167,11 @@ install:
uninstall:
-# Make all objects depend upon postgis_config.h and postgis_svn_revision.h
-$(LT_OBJS): ../postgis_config.h ../postgis_svn_revision.h $(SA_HEADERS)
+# Make all objects depend upon postgis_config.h and postgis_revision.h
+$(LT_OBJS): ../postgis_config.h ../postgis_revision.h $(SA_HEADERS)
-../postgis_svn_revision.h:
- $(MAKE) -C .. postgis_svn_revision.h
+../postgis_revision.h:
+ $(MAKE) -C .. postgis_revision.h
liblwgeom.la: $(LT_OBJS)
$(LIBTOOL) --tag=CC --mode=link $(CC) -rpath $(libdir) $(LT_OBJS) \
diff --git a/liblwgeom/cunit/README b/liblwgeom/cunit/README
index 978653c..82fe37c 100644
--- a/liblwgeom/cunit/README
+++ b/liblwgeom/cunit/README
@@ -80,7 +80,7 @@ Add a new line for your test:
PG_ADD_TEST(<your test function name>);
-The tests will be run in the order they appear in the list.
+The tests will be run in the order they appear in the list.
CU_TEST_INFO_NULL must always be the last entry.
2.3 Add any necessary init / cleanup code.
@@ -102,8 +102,8 @@ Do the following steps to create a whole new test suite (new .c file).
3.1 Create the file.
-Create the new file (remember to add to svn as well). The naming convention
-is cu_<suite name>.c.
+Create the new file (remember to add to repository as well).
+The naming convention is cu_<suite name>.c.
Make sure to import:
@@ -186,6 +186,4 @@ if (strlen(cu_error_msg) > 0)
CU_FAIL();
/* be nice and clean it up for the next test. */
cu_error_msg_reset();
-}
-
-
+}
\ No newline at end of file
diff --git a/liblwgeom/lwgeom_api.c b/liblwgeom/lwgeom_api.c
index 90e7a99..64b74c9 100644
--- a/liblwgeom/lwgeom_api.c
+++ b/liblwgeom/lwgeom_api.c
@@ -30,7 +30,10 @@
#include <stdio.h>
#include <assert.h>
-#include "../postgis_svn_revision.h"
+#include "../postgis_revision.h"
+
+#define xstr(s) str(s)
+#define str(s) #s
const char *
lwgeom_version()
@@ -40,7 +43,7 @@ lwgeom_version()
if ( ! ptr )
{
ptr = buf;
- snprintf(ptr, 256, LIBLWGEOM_VERSION" r%d", POSTGIS_SVN_REVISION);
+ snprintf(ptr, 256, LIBLWGEOM_VERSION" " xstr(POSTGIS_REVISION));
}
return ptr;
diff --git a/liblwgeom/lwin_wkt_parse.c b/liblwgeom/lwin_wkt_parse.c
index 7d89447..7cee35e 100644
--- a/liblwgeom/lwin_wkt_parse.c
+++ b/liblwgeom/lwin_wkt_parse.c
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.4. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, 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
@@ -41,14 +40,11 @@
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
-/* Undocumented macros, especially those whose name start with YY_,
- are private implementation details. Do not rely on them. */
-
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.4"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -74,8 +70,8 @@
#define yychar wkt_yychar
#define yylloc wkt_yylloc
-/* First part of user prologue. */
-#line 1 "lwin_wkt_parse.y"
+/* Copy the first part of user declarations. */
+#line 1 "lwin_wkt_parse.y" /* yacc.c:339 */
/* WKT Parser */
@@ -183,17 +179,13 @@ int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int pars
-#line 187 "lwin_wkt_parse.c"
+#line 183 "lwin_wkt_parse.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
# else
-# define YY_NULLPTR ((void*)0)
+# define YY_NULLPTR 0
# endif
# endif
@@ -205,8 +197,8 @@ int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int pars
# define YYERROR_VERBOSE 1
#endif
-/* Use api.header.include to #include this header
- instead of duplicating it here. */
+/* In a future release of Bison, this section will be replaced
+ by #include "lwin_wkt_parse.h". */
#ifndef YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED
# define YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED
/* Debug traces. */
@@ -274,9 +266,10 @@ extern int wkt_yydebug;
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
union YYSTYPE
{
-#line 112 "lwin_wkt_parse.y"
+#line 112 "lwin_wkt_parse.y" /* yacc.c:355 */
int integervalue;
double doublevalue;
@@ -285,9 +278,9 @@ union YYSTYPE
POINT coordinatevalue;
POINTARRAY *ptarrayvalue;
-#line 289 "lwin_wkt_parse.c"
-
+#line 282 "lwin_wkt_parse.c" /* yacc.c:355 */
};
+
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -314,7 +307,9 @@ int wkt_yyparse (void);
#endif /* !YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED */
+/* Copy the second part of user declarations. */
+#line 313 "lwin_wkt_parse.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -335,13 +330,13 @@ typedef signed char yytype_int8;
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
-typedef unsigned short yytype_uint16;
+typedef unsigned short int yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
-typedef short yytype_int16;
+typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -353,7 +348,7 @@ typedef short yytype_int16;
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned
+# define YYSIZE_T unsigned int
# endif
#endif
@@ -389,6 +384,15 @@ typedef short yytype_int16;
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
@@ -396,7 +400,7 @@ typedef short yytype_int16;
# define YYUSE(E) /* empty */
#endif
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
@@ -416,8 +420,6 @@ typedef short yytype_int16;
#endif
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -562,16 +564,16 @@ union yyalloc
/* YYNSTATES -- Number of states. */
#define YYNSTATES 264
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 280
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
#define YYTRANSLATE(YYX) \
- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -911,22 +913,22 @@ static const yytype_uint8 yyr2[] =
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
- do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (0)
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
#define YYTERROR 1
@@ -985,10 +987,10 @@ do { \
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
YY_ATTRIBUTE_UNUSED
-static int
+static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
{
- int res = 0;
+ unsigned res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
@@ -1031,40 +1033,40 @@ do { \
} while (0)
-/*-----------------------------------.
-| Print this symbol's value on YYO. |
-`-----------------------------------*/
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
static void
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
{
- FILE *yyoutput = yyo;
- YYUSE (yyoutput);
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
YYUSE (yylocationp);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
YYUSE (yytype);
}
-/*---------------------------.
-| Print this symbol on YYO. |
-`---------------------------*/
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
static void
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
{
- YYFPRINTF (yyo, "%s %s (",
+ YYFPRINTF (yyoutput, "%s %s (",
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
- YY_LOCATION_PRINT (yyo, *yylocationp);
- YYFPRINTF (yyo, ": ");
- yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp);
- YYFPRINTF (yyo, ")");
+ YY_LOCATION_PRINT (yyoutput, *yylocationp);
+ YYFPRINTF (yyoutput, ": ");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
+ YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
@@ -1098,7 +1100,7 @@ do { \
static void
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
{
- unsigned long yylno = yyrline[yyrule];
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
@@ -1109,7 +1111,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr,
yystos[yyssp[yyi + 1 - yynrhs]],
- &yyvsp[(yyi + 1) - (yynrhs)]
+ &(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) );
YYFPRINTF (stderr, "\n");
}
@@ -1213,10 +1215,7 @@ yytnamerr (char *yyres, const char *yystr)
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
- else
- goto append;
-
- append:
+ /* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
@@ -1234,7 +1233,7 @@ yytnamerr (char *yyres, const char *yystr)
if (! yyres)
return yystrlen (yystr);
- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
+ return yystpcpy (yyres, yystr) - yyres;
}
# endif
@@ -1312,10 +1311,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yyarg[yycount++] = yytname[yyx];
{
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
+ yysize = yysize1;
}
}
}
@@ -1327,7 +1326,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
- default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1339,10 +1337,9 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
{
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
+ yysize = yysize1;
}
if (*yymsg_alloc < yysize)
@@ -1392,222 +1389,223 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
switch (yytype)
{
- case 28: /* geometry_no_srid */
-#line 194 "lwin_wkt_parse.y"
+ case 28: /* geometry_no_srid */
+#line 194 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1399 "lwin_wkt_parse.c"
+#line 1396 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 29: /* geometrycollection */
-#line 195 "lwin_wkt_parse.y"
+#line 195 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1405 "lwin_wkt_parse.c"
+#line 1402 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 31: /* multisurface */
-#line 202 "lwin_wkt_parse.y"
+#line 202 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1411 "lwin_wkt_parse.c"
+#line 1408 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 32: /* surface_list */
-#line 181 "lwin_wkt_parse.y"
+#line 181 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1417 "lwin_wkt_parse.c"
+#line 1414 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 33: /* tin */
-#line 209 "lwin_wkt_parse.y"
+#line 209 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1423 "lwin_wkt_parse.c"
+#line 1420 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 34: /* polyhedralsurface */
-#line 208 "lwin_wkt_parse.y"
+#line 208 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1429 "lwin_wkt_parse.c"
+#line 1426 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 35: /* multipolygon */
-#line 201 "lwin_wkt_parse.y"
+#line 201 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1435 "lwin_wkt_parse.c"
+#line 1432 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 36: /* polygon_list */
-#line 182 "lwin_wkt_parse.y"
+#line 182 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1441 "lwin_wkt_parse.c"
+#line 1438 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 37: /* patch_list */
-#line 183 "lwin_wkt_parse.y"
+#line 183 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1447 "lwin_wkt_parse.c"
+#line 1444 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 38: /* polygon */
-#line 205 "lwin_wkt_parse.y"
+#line 205 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1453 "lwin_wkt_parse.c"
+#line 1450 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 39: /* polygon_untagged */
-#line 207 "lwin_wkt_parse.y"
+#line 207 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1459 "lwin_wkt_parse.c"
+#line 1456 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 40: /* patch */
-#line 206 "lwin_wkt_parse.y"
+#line 206 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1465 "lwin_wkt_parse.c"
+#line 1462 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 41: /* curvepolygon */
-#line 192 "lwin_wkt_parse.y"
+#line 192 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1471 "lwin_wkt_parse.c"
+#line 1468 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 42: /* curvering_list */
-#line 179 "lwin_wkt_parse.y"
+#line 179 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1477 "lwin_wkt_parse.c"
+#line 1474 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 43: /* curvering */
-#line 193 "lwin_wkt_parse.y"
+#line 193 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1483 "lwin_wkt_parse.c"
+#line 1480 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 44: /* patchring_list */
-#line 189 "lwin_wkt_parse.y"
+#line 189 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1489 "lwin_wkt_parse.c"
+#line 1486 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 45: /* ring_list */
-#line 188 "lwin_wkt_parse.y"
+#line 188 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1495 "lwin_wkt_parse.c"
+#line 1492 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 46: /* patchring */
-#line 178 "lwin_wkt_parse.y"
+#line 178 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ ptarray_free(((*yyvaluep).ptarrayvalue)); }
-#line 1501 "lwin_wkt_parse.c"
+#line 1498 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 47: /* ring */
-#line 177 "lwin_wkt_parse.y"
+#line 177 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ ptarray_free(((*yyvaluep).ptarrayvalue)); }
-#line 1507 "lwin_wkt_parse.c"
+#line 1504 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 48: /* compoundcurve */
-#line 191 "lwin_wkt_parse.y"
+#line 191 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1513 "lwin_wkt_parse.c"
+#line 1510 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 49: /* compound_list */
-#line 187 "lwin_wkt_parse.y"
+#line 187 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1519 "lwin_wkt_parse.c"
+#line 1516 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 50: /* multicurve */
-#line 198 "lwin_wkt_parse.y"
+#line 198 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1525 "lwin_wkt_parse.c"
+#line 1522 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 51: /* curve_list */
-#line 186 "lwin_wkt_parse.y"
+#line 186 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1531 "lwin_wkt_parse.c"
+#line 1528 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 52: /* multilinestring */
-#line 199 "lwin_wkt_parse.y"
+#line 199 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1537 "lwin_wkt_parse.c"
+#line 1534 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 53: /* linestring_list */
-#line 185 "lwin_wkt_parse.y"
+#line 185 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1543 "lwin_wkt_parse.c"
+#line 1540 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 54: /* circularstring */
-#line 190 "lwin_wkt_parse.y"
+#line 190 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1549 "lwin_wkt_parse.c"
+#line 1546 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 55: /* linestring */
-#line 196 "lwin_wkt_parse.y"
+#line 196 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1555 "lwin_wkt_parse.c"
+#line 1552 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 56: /* linestring_untagged */
-#line 197 "lwin_wkt_parse.y"
+#line 197 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1561 "lwin_wkt_parse.c"
+#line 1558 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 57: /* triangle_list */
-#line 180 "lwin_wkt_parse.y"
+#line 180 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1567 "lwin_wkt_parse.c"
+#line 1564 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 58: /* triangle */
-#line 210 "lwin_wkt_parse.y"
+#line 210 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1573 "lwin_wkt_parse.c"
+#line 1570 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 59: /* triangle_untagged */
-#line 211 "lwin_wkt_parse.y"
+#line 211 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1579 "lwin_wkt_parse.c"
+#line 1576 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 60: /* multipoint */
-#line 200 "lwin_wkt_parse.y"
+#line 200 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1585 "lwin_wkt_parse.c"
+#line 1582 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 61: /* point_list */
-#line 184 "lwin_wkt_parse.y"
+#line 184 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1591 "lwin_wkt_parse.c"
+#line 1588 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 62: /* point_untagged */
-#line 204 "lwin_wkt_parse.y"
+#line 204 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1597 "lwin_wkt_parse.c"
+#line 1594 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 63: /* point */
-#line 203 "lwin_wkt_parse.y"
+#line 203 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1603 "lwin_wkt_parse.c"
+#line 1600 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
case 64: /* ptarray */
-#line 176 "lwin_wkt_parse.y"
+#line 176 "lwin_wkt_parse.y" /* yacc.c:1257 */
{ ptarray_free(((*yyvaluep).ptarrayvalue)); }
-#line 1609 "lwin_wkt_parse.c"
+#line 1606 "lwin_wkt_parse.c" /* yacc.c:1257 */
break;
+
default:
break;
}
@@ -1707,33 +1705,23 @@ yyparse (void)
yylsp[0] = yylloc;
goto yysetstate;
-
/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate. |
+| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
-yynewstate:
+ yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
-
-/*--------------------------------------------------------------------.
-| yynewstate -- set current state (the top of the stack) to yystate. |
-`--------------------------------------------------------------------*/
-yysetstate:
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
- *yyssp = (yytype_int16) yystate;
+ yysetstate:
+ *yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- goto yyexhaustedlab;
-#else
{
/* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+ YYSIZE_T yysize = yyssp - yyss + 1;
-# if defined yyoverflow
+#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
@@ -1751,11 +1739,15 @@ yysetstate:
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
+ yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
- yyls = yyls1;
}
-# else /* defined YYSTACK_RELOCATE */
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
@@ -1772,34 +1764,36 @@ yysetstate:
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
YYSTACK_RELOCATE (yyls_alloc, yyls);
-# undef YYSTACK_RELOCATE
+# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
+#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
yylsp = yyls + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
-
/*-----------.
| yybackup. |
`-----------*/
yybackup:
+
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
@@ -1872,7 +1866,7 @@ yydefault:
/*-----------------------------.
-| yyreduce -- do a reduction. |
+| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
@@ -1888,825 +1882,823 @@ yyreduce:
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
- /* Default location. */
+ /* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
- yyerror_range[1] = yyloc;
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 2:
-#line 217 "lwin_wkt_parse.y"
+ case 2:
+#line 217 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ wkt_parser_geometry_new((yyvsp[0].geometryvalue), SRID_UNKNOWN); WKT_ERROR(); }
-#line 1901 "lwin_wkt_parse.c"
+#line 1894 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 3:
-#line 219 "lwin_wkt_parse.y"
+#line 219 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ wkt_parser_geometry_new((yyvsp[0].geometryvalue), (yyvsp[-2].integervalue)); WKT_ERROR(); }
-#line 1907 "lwin_wkt_parse.c"
+#line 1900 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 4:
-#line 222 "lwin_wkt_parse.y"
+#line 222 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1913 "lwin_wkt_parse.c"
+#line 1906 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 5:
-#line 223 "lwin_wkt_parse.y"
+#line 223 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1919 "lwin_wkt_parse.c"
+#line 1912 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 6:
-#line 224 "lwin_wkt_parse.y"
+#line 224 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1925 "lwin_wkt_parse.c"
+#line 1918 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 7:
-#line 225 "lwin_wkt_parse.y"
+#line 225 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1931 "lwin_wkt_parse.c"
+#line 1924 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 8:
-#line 226 "lwin_wkt_parse.y"
+#line 226 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1937 "lwin_wkt_parse.c"
+#line 1930 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 9:
-#line 227 "lwin_wkt_parse.y"
+#line 227 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1943 "lwin_wkt_parse.c"
+#line 1936 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 10:
-#line 228 "lwin_wkt_parse.y"
+#line 228 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1949 "lwin_wkt_parse.c"
+#line 1942 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 11:
-#line 229 "lwin_wkt_parse.y"
+#line 229 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1955 "lwin_wkt_parse.c"
+#line 1948 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 12:
-#line 230 "lwin_wkt_parse.y"
+#line 230 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1961 "lwin_wkt_parse.c"
+#line 1954 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 13:
-#line 231 "lwin_wkt_parse.y"
+#line 231 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1967 "lwin_wkt_parse.c"
+#line 1960 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 14:
-#line 232 "lwin_wkt_parse.y"
+#line 232 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1973 "lwin_wkt_parse.c"
+#line 1966 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 15:
-#line 233 "lwin_wkt_parse.y"
+#line 233 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1979 "lwin_wkt_parse.c"
+#line 1972 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 16:
-#line 234 "lwin_wkt_parse.y"
+#line 234 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1985 "lwin_wkt_parse.c"
+#line 1978 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 17:
-#line 235 "lwin_wkt_parse.y"
+#line 235 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1991 "lwin_wkt_parse.c"
+#line 1984 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 18:
-#line 236 "lwin_wkt_parse.y"
+#line 236 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1997 "lwin_wkt_parse.c"
+#line 1990 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 19:
-#line 240 "lwin_wkt_parse.y"
+#line 240 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2003 "lwin_wkt_parse.c"
+#line 1996 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 20:
-#line 242 "lwin_wkt_parse.y"
+#line 242 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2009 "lwin_wkt_parse.c"
+#line 2002 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 21:
-#line 244 "lwin_wkt_parse.y"
+#line 244 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2015 "lwin_wkt_parse.c"
+#line 2008 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 22:
-#line 246 "lwin_wkt_parse.y"
+#line 246 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2021 "lwin_wkt_parse.c"
+#line 2014 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 23:
-#line 250 "lwin_wkt_parse.y"
+#line 250 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2027 "lwin_wkt_parse.c"
+#line 2020 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 24:
-#line 252 "lwin_wkt_parse.y"
+#line 252 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2033 "lwin_wkt_parse.c"
+#line 2026 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 25:
-#line 256 "lwin_wkt_parse.y"
+#line 256 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2039 "lwin_wkt_parse.c"
+#line 2032 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 26:
-#line 258 "lwin_wkt_parse.y"
+#line 258 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2045 "lwin_wkt_parse.c"
+#line 2038 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 27:
-#line 260 "lwin_wkt_parse.y"
+#line 260 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2051 "lwin_wkt_parse.c"
+#line 2044 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 28:
-#line 262 "lwin_wkt_parse.y"
+#line 262 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2057 "lwin_wkt_parse.c"
+#line 2050 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 29:
-#line 266 "lwin_wkt_parse.y"
+#line 266 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2063 "lwin_wkt_parse.c"
+#line 2056 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 30:
-#line 268 "lwin_wkt_parse.y"
+#line 268 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2069 "lwin_wkt_parse.c"
+#line 2062 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 31:
-#line 270 "lwin_wkt_parse.y"
+#line 270 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2075 "lwin_wkt_parse.c"
+#line 2068 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 32:
-#line 272 "lwin_wkt_parse.y"
+#line 272 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2081 "lwin_wkt_parse.c"
+#line 2074 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 33:
-#line 274 "lwin_wkt_parse.y"
+#line 274 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2087 "lwin_wkt_parse.c"
+#line 2080 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 34:
-#line 276 "lwin_wkt_parse.y"
+#line 276 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2093 "lwin_wkt_parse.c"
+#line 2086 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 35:
-#line 280 "lwin_wkt_parse.y"
+#line 280 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2099 "lwin_wkt_parse.c"
+#line 2092 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 36:
-#line 282 "lwin_wkt_parse.y"
+#line 282 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2105 "lwin_wkt_parse.c"
+#line 2098 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 37:
-#line 284 "lwin_wkt_parse.y"
+#line 284 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2111 "lwin_wkt_parse.c"
+#line 2104 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 38:
-#line 286 "lwin_wkt_parse.y"
+#line 286 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2117 "lwin_wkt_parse.c"
+#line 2110 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 39:
-#line 290 "lwin_wkt_parse.y"
+#line 290 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2123 "lwin_wkt_parse.c"
+#line 2116 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 40:
-#line 292 "lwin_wkt_parse.y"
+#line 292 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2129 "lwin_wkt_parse.c"
+#line 2122 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 41:
-#line 294 "lwin_wkt_parse.y"
+#line 294 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2135 "lwin_wkt_parse.c"
+#line 2128 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 42:
-#line 296 "lwin_wkt_parse.y"
+#line 296 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2141 "lwin_wkt_parse.c"
+#line 2134 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 43:
-#line 300 "lwin_wkt_parse.y"
+#line 300 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2147 "lwin_wkt_parse.c"
+#line 2140 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 44:
-#line 302 "lwin_wkt_parse.y"
+#line 302 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2153 "lwin_wkt_parse.c"
+#line 2146 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 45:
-#line 304 "lwin_wkt_parse.y"
+#line 304 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2159 "lwin_wkt_parse.c"
+#line 2152 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 46:
-#line 306 "lwin_wkt_parse.y"
+#line 306 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2165 "lwin_wkt_parse.c"
+#line 2158 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 47:
-#line 310 "lwin_wkt_parse.y"
+#line 310 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2171 "lwin_wkt_parse.c"
+#line 2164 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 48:
-#line 312 "lwin_wkt_parse.y"
+#line 312 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2177 "lwin_wkt_parse.c"
+#line 2170 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 49:
-#line 316 "lwin_wkt_parse.y"
+#line 316 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2183 "lwin_wkt_parse.c"
+#line 2176 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 50:
-#line 318 "lwin_wkt_parse.y"
+#line 318 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2189 "lwin_wkt_parse.c"
+#line 2182 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 51:
-#line 322 "lwin_wkt_parse.y"
+#line 322 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2195 "lwin_wkt_parse.c"
+#line 2188 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 52:
-#line 324 "lwin_wkt_parse.y"
+#line 324 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2201 "lwin_wkt_parse.c"
+#line 2194 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 53:
-#line 326 "lwin_wkt_parse.y"
+#line 326 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2207 "lwin_wkt_parse.c"
+#line 2200 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 54:
-#line 328 "lwin_wkt_parse.y"
+#line 328 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
-#line 2213 "lwin_wkt_parse.c"
+#line 2206 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 55:
-#line 332 "lwin_wkt_parse.y"
+#line 332 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
-#line 2219 "lwin_wkt_parse.c"
+#line 2212 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 56:
-#line 334 "lwin_wkt_parse.y"
+#line 334 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
-#line 2225 "lwin_wkt_parse.c"
+#line 2218 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 57:
-#line 337 "lwin_wkt_parse.y"
+#line 337 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
-#line 2231 "lwin_wkt_parse.c"
+#line 2224 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 58:
-#line 341 "lwin_wkt_parse.y"
+#line 341 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2237 "lwin_wkt_parse.c"
+#line 2230 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 59:
-#line 343 "lwin_wkt_parse.y"
+#line 343 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2243 "lwin_wkt_parse.c"
+#line 2236 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 60:
-#line 345 "lwin_wkt_parse.y"
+#line 345 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2249 "lwin_wkt_parse.c"
+#line 2242 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 61:
-#line 347 "lwin_wkt_parse.y"
+#line 347 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); }
-#line 2255 "lwin_wkt_parse.c"
+#line 2248 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 62:
-#line 351 "lwin_wkt_parse.y"
+#line 351 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2261 "lwin_wkt_parse.c"
+#line 2254 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 63:
-#line 353 "lwin_wkt_parse.y"
+#line 353 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2267 "lwin_wkt_parse.c"
+#line 2260 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 64:
-#line 356 "lwin_wkt_parse.y"
+#line 356 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 2273 "lwin_wkt_parse.c"
+#line 2266 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 65:
-#line 357 "lwin_wkt_parse.y"
+#line 357 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 2279 "lwin_wkt_parse.c"
+#line 2272 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 66:
-#line 358 "lwin_wkt_parse.y"
+#line 358 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 2285 "lwin_wkt_parse.c"
+#line 2278 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 67:
-#line 359 "lwin_wkt_parse.y"
+#line 359 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 2291 "lwin_wkt_parse.c"
+#line 2284 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 68:
-#line 363 "lwin_wkt_parse.y"
+#line 363 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
-#line 2297 "lwin_wkt_parse.c"
+#line 2290 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 69:
-#line 365 "lwin_wkt_parse.y"
+#line 365 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
-#line 2303 "lwin_wkt_parse.c"
+#line 2296 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 70:
-#line 369 "lwin_wkt_parse.y"
+#line 369 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
-#line 2309 "lwin_wkt_parse.c"
+#line 2302 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 71:
-#line 371 "lwin_wkt_parse.y"
+#line 371 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
-#line 2315 "lwin_wkt_parse.c"
+#line 2308 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 72:
-#line 374 "lwin_wkt_parse.y"
+#line 374 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
-#line 2321 "lwin_wkt_parse.c"
+#line 2314 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 73:
-#line 377 "lwin_wkt_parse.y"
+#line 377 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
-#line 2327 "lwin_wkt_parse.c"
+#line 2320 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 74:
-#line 381 "lwin_wkt_parse.y"
+#line 381 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2333 "lwin_wkt_parse.c"
+#line 2326 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 75:
-#line 383 "lwin_wkt_parse.y"
+#line 383 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2339 "lwin_wkt_parse.c"
+#line 2332 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 76:
-#line 385 "lwin_wkt_parse.y"
+#line 385 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2345 "lwin_wkt_parse.c"
+#line 2338 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 77:
-#line 387 "lwin_wkt_parse.y"
+#line 387 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2351 "lwin_wkt_parse.c"
+#line 2344 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 78:
-#line 391 "lwin_wkt_parse.y"
+#line 391 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2357 "lwin_wkt_parse.c"
+#line 2350 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 79:
-#line 393 "lwin_wkt_parse.y"
+#line 393 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2363 "lwin_wkt_parse.c"
+#line 2356 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 80:
-#line 395 "lwin_wkt_parse.y"
+#line 395 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2369 "lwin_wkt_parse.c"
+#line 2362 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 81:
-#line 397 "lwin_wkt_parse.y"
+#line 397 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2375 "lwin_wkt_parse.c"
+#line 2368 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 82:
-#line 399 "lwin_wkt_parse.y"
+#line 399 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2381 "lwin_wkt_parse.c"
+#line 2374 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 83:
-#line 401 "lwin_wkt_parse.y"
+#line 401 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2387 "lwin_wkt_parse.c"
+#line 2380 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 84:
-#line 405 "lwin_wkt_parse.y"
+#line 405 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2393 "lwin_wkt_parse.c"
+#line 2386 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 85:
-#line 407 "lwin_wkt_parse.y"
+#line 407 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2399 "lwin_wkt_parse.c"
+#line 2392 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 86:
-#line 409 "lwin_wkt_parse.y"
+#line 409 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2405 "lwin_wkt_parse.c"
+#line 2398 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 87:
-#line 411 "lwin_wkt_parse.y"
+#line 411 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2411 "lwin_wkt_parse.c"
+#line 2404 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 88:
-#line 415 "lwin_wkt_parse.y"
+#line 415 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2417 "lwin_wkt_parse.c"
+#line 2410 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 89:
-#line 417 "lwin_wkt_parse.y"
+#line 417 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2423 "lwin_wkt_parse.c"
+#line 2416 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 90:
-#line 419 "lwin_wkt_parse.y"
+#line 419 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2429 "lwin_wkt_parse.c"
+#line 2422 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 91:
-#line 421 "lwin_wkt_parse.y"
+#line 421 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2435 "lwin_wkt_parse.c"
+#line 2428 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 92:
-#line 423 "lwin_wkt_parse.y"
+#line 423 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2441 "lwin_wkt_parse.c"
+#line 2434 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 93:
-#line 425 "lwin_wkt_parse.y"
+#line 425 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2447 "lwin_wkt_parse.c"
+#line 2440 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 94:
-#line 427 "lwin_wkt_parse.y"
+#line 427 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2453 "lwin_wkt_parse.c"
+#line 2446 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 95:
-#line 429 "lwin_wkt_parse.y"
+#line 429 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2459 "lwin_wkt_parse.c"
+#line 2452 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 96:
-#line 433 "lwin_wkt_parse.y"
+#line 433 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2465 "lwin_wkt_parse.c"
+#line 2458 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 97:
-#line 435 "lwin_wkt_parse.y"
+#line 435 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2471 "lwin_wkt_parse.c"
+#line 2464 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 98:
-#line 437 "lwin_wkt_parse.y"
+#line 437 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2477 "lwin_wkt_parse.c"
+#line 2470 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 99:
-#line 439 "lwin_wkt_parse.y"
+#line 439 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2483 "lwin_wkt_parse.c"
+#line 2476 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 100:
-#line 443 "lwin_wkt_parse.y"
+#line 443 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2489 "lwin_wkt_parse.c"
+#line 2482 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 101:
-#line 445 "lwin_wkt_parse.y"
+#line 445 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2495 "lwin_wkt_parse.c"
+#line 2488 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 102:
-#line 449 "lwin_wkt_parse.y"
+#line 449 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2501 "lwin_wkt_parse.c"
+#line 2494 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 103:
-#line 451 "lwin_wkt_parse.y"
+#line 451 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2507 "lwin_wkt_parse.c"
+#line 2500 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 104:
-#line 453 "lwin_wkt_parse.y"
+#line 453 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2513 "lwin_wkt_parse.c"
+#line 2506 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 105:
-#line 455 "lwin_wkt_parse.y"
+#line 455 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); }
-#line 2519 "lwin_wkt_parse.c"
+#line 2512 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 106:
-#line 459 "lwin_wkt_parse.y"
+#line 459 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2525 "lwin_wkt_parse.c"
+#line 2518 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 107:
-#line 461 "lwin_wkt_parse.y"
+#line 461 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2531 "lwin_wkt_parse.c"
+#line 2524 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 108:
-#line 463 "lwin_wkt_parse.y"
+#line 463 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2537 "lwin_wkt_parse.c"
+#line 2530 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 109:
-#line 465 "lwin_wkt_parse.y"
+#line 465 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
-#line 2543 "lwin_wkt_parse.c"
+#line 2536 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 110:
-#line 469 "lwin_wkt_parse.y"
+#line 469 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2549 "lwin_wkt_parse.c"
+#line 2542 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 111:
-#line 471 "lwin_wkt_parse.y"
+#line 471 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
-#line 2555 "lwin_wkt_parse.c"
+#line 2548 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 112:
-#line 475 "lwin_wkt_parse.y"
+#line 475 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2561 "lwin_wkt_parse.c"
+#line 2554 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 113:
-#line 477 "lwin_wkt_parse.y"
+#line 477 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2567 "lwin_wkt_parse.c"
+#line 2560 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 114:
-#line 481 "lwin_wkt_parse.y"
+#line 481 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2573 "lwin_wkt_parse.c"
+#line 2566 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 115:
-#line 483 "lwin_wkt_parse.y"
+#line 483 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), (yyvsp[-5].stringvalue)); WKT_ERROR(); }
-#line 2579 "lwin_wkt_parse.c"
+#line 2572 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 116:
-#line 485 "lwin_wkt_parse.y"
+#line 485 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2585 "lwin_wkt_parse.c"
+#line 2578 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 117:
-#line 487 "lwin_wkt_parse.y"
+#line 487 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); }
-#line 2591 "lwin_wkt_parse.c"
+#line 2584 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 118:
-#line 491 "lwin_wkt_parse.y"
+#line 491 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2597 "lwin_wkt_parse.c"
+#line 2590 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 119:
-#line 495 "lwin_wkt_parse.y"
+#line 495 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2603 "lwin_wkt_parse.c"
+#line 2596 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 120:
-#line 497 "lwin_wkt_parse.y"
+#line 497 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2609 "lwin_wkt_parse.c"
+#line 2602 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 121:
-#line 499 "lwin_wkt_parse.y"
+#line 499 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2615 "lwin_wkt_parse.c"
+#line 2608 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 122:
-#line 501 "lwin_wkt_parse.y"
+#line 501 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2621 "lwin_wkt_parse.c"
+#line 2614 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 123:
-#line 505 "lwin_wkt_parse.y"
+#line 505 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2627 "lwin_wkt_parse.c"
+#line 2620 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 124:
-#line 507 "lwin_wkt_parse.y"
+#line 507 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2633 "lwin_wkt_parse.c"
+#line 2626 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 125:
-#line 511 "lwin_wkt_parse.y"
+#line 511 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)),NULL); WKT_ERROR(); }
-#line 2639 "lwin_wkt_parse.c"
+#line 2632 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 126:
-#line 513 "lwin_wkt_parse.y"
+#line 513 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[-1].coordinatevalue)),NULL); WKT_ERROR(); }
-#line 2645 "lwin_wkt_parse.c"
+#line 2638 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 127:
-#line 515 "lwin_wkt_parse.y"
+#line 515 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); }
-#line 2651 "lwin_wkt_parse.c"
+#line 2644 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 128:
-#line 519 "lwin_wkt_parse.y"
+#line 519 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2657 "lwin_wkt_parse.c"
+#line 2650 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 129:
-#line 521 "lwin_wkt_parse.y"
+#line 521 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2663 "lwin_wkt_parse.c"
+#line 2656 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 130:
-#line 523 "lwin_wkt_parse.y"
+#line 523 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2669 "lwin_wkt_parse.c"
+#line 2662 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 131:
-#line 525 "lwin_wkt_parse.y"
+#line 525 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.geometryvalue) = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); }
-#line 2675 "lwin_wkt_parse.c"
+#line 2668 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 132:
-#line 529 "lwin_wkt_parse.y"
+#line 529 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[-2].ptarrayvalue), (yyvsp[0].coordinatevalue)); WKT_ERROR(); }
-#line 2681 "lwin_wkt_parse.c"
+#line 2674 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 133:
-#line 531 "lwin_wkt_parse.y"
+#line 531 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)); WKT_ERROR(); }
-#line 2687 "lwin_wkt_parse.c"
+#line 2680 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 134:
-#line 535 "lwin_wkt_parse.y"
+#line 535 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
-#line 2693 "lwin_wkt_parse.c"
+#line 2686 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 135:
-#line 537 "lwin_wkt_parse.y"
+#line 537 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.coordinatevalue) = wkt_parser_coord_3((yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
-#line 2699 "lwin_wkt_parse.c"
+#line 2692 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
case 136:
-#line 539 "lwin_wkt_parse.y"
+#line 539 "lwin_wkt_parse.y" /* yacc.c:1646 */
{ (yyval.coordinatevalue) = wkt_parser_coord_4((yyvsp[-3].doublevalue), (yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
-#line 2705 "lwin_wkt_parse.c"
+#line 2698 "lwin_wkt_parse.c" /* yacc.c:1646 */
break;
-#line 2709 "lwin_wkt_parse.c"
-
+#line 2702 "lwin_wkt_parse.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2732,13 +2724,14 @@ yyreduce:
/* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
- {
- const int yylhs = yyr1[yyn] - YYNTOKENS;
- const int yyi = yypgoto[yylhs] + *yyssp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
- }
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
@@ -2821,11 +2814,14 @@ yyerrlab:
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
- /* Pacify compilers when the user code never invokes YYERROR and the
- label yyerrorlab therefore never appears in user code. */
- if (0)
- YYERROR;
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -2891,7 +2887,6 @@ yyacceptlab:
yyresult = 0;
goto yyreturn;
-
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
@@ -2899,7 +2894,6 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-
#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
@@ -2910,10 +2904,6 @@ yyexhaustedlab:
/* Fall through. */
#endif
-
-/*-----------------------------------------------------.
-| yyreturn -- parsing is finished, return the result. |
-`-----------------------------------------------------*/
yyreturn:
if (yychar != YYEMPTY)
{
@@ -2943,6 +2933,6 @@ yyreturn:
#endif
return yyresult;
}
-#line 541 "lwin_wkt_parse.y"
+#line 541 "lwin_wkt_parse.y" /* yacc.c:1906 */
diff --git a/liblwgeom/lwin_wkt_parse.h b/liblwgeom/lwin_wkt_parse.h
index e9c7e27..a2216c9 100644
--- a/liblwgeom/lwin_wkt_parse.h
+++ b/liblwgeom/lwin_wkt_parse.h
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.4. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, 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
@@ -31,9 +30,6 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-/* Undocumented macros, especially those whose name start with YY_,
- are private implementation details. Do not rely on them. */
-
#ifndef YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED
# define YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED
/* Debug traces. */
@@ -101,9 +97,10 @@ extern int wkt_yydebug;
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
union YYSTYPE
{
-#line 112 "lwin_wkt_parse.y"
+#line 112 "lwin_wkt_parse.y" /* yacc.c:1909 */
int integervalue;
double doublevalue;
@@ -112,9 +109,9 @@ union YYSTYPE
POINT coordinatevalue;
POINTARRAY *ptarrayvalue;
-#line 116 "lwin_wkt_parse.h"
-
+#line 113 "lwin_wkt_parse.h" /* yacc.c:1909 */
};
+
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
diff --git a/loader/pgsql2shp-cli.c b/loader/pgsql2shp-cli.c
index 7c5c064..dfc6f2d 100644
--- a/loader/pgsql2shp-cli.c
+++ b/loader/pgsql2shp-cli.c
@@ -19,13 +19,15 @@
#include "pgsql2shp-core.h"
#include "../postgis_config.h"
+#define xstr(s) str(s)
+#define str(s) #s
static void
usage(int status)
{
/* TODO: if status != 0 print all to stderr */
- printf(_( "RELEASE: %s (r%d)\n" ), POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION);
+ printf(_( "RELEASE: %s (r%d)\n" ), POSTGIS_LIB_VERSION, xstr(POSTGIS_REVISION));
printf(_("USAGE: pgsql2shp [<options>] <database> [<schema>.]<table>\n"
" pgsql2shp [<options>] <database> <query>\n"
"\n"
diff --git a/loader/shp2pgsql-cli.c b/loader/shp2pgsql-cli.c
index 8ab1214..3a09e8c 100644
--- a/loader/shp2pgsql-cli.c
+++ b/loader/shp2pgsql-cli.c
@@ -17,10 +17,13 @@
#include "shp2pgsql-core.h"
#include "../liblwgeom/liblwgeom.h" /* for SRID_UNKNOWN */
+#define xstr(s) str(s)
+#define str(s) #s
+
static void
usage()
{
- printf(_( "RELEASE: %s (r%d)\n" ), POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION);
+ printf(_( "RELEASE: %s (r%d)\n" ), POSTGIS_LIB_VERSION, xstr(POSTGIS_REVISION));
printf(_( "USAGE: shp2pgsql [<options>] <shapefile> [[<schema>.]<table>]\n"
"OPTIONS:\n" ));
printf(_( " -s [<from>:]<srid> Set the SRID field. Defaults to %d.\n"
diff --git a/postgis/Makefile.in b/postgis/Makefile.in
index 00f6f4b..79a6199 100644
--- a/postgis/Makefile.in
+++ b/postgis/Makefile.in
@@ -200,12 +200,12 @@ endif
# change is made, a PostGIS rebuild is triggered.
#
# Also they are all dependent on postgis_config.h
-# and thus postgis_svn_revision.h
+# and thus postgis_revision.h
#
-$(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postgis_config.h ../postgis_svn_revision.h $(WAGYU_DEP)
+$(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postgis_config.h ../postgis_revision.h $(WAGYU_DEP)
-../postgis_svn_revision.h:
- $(MAKE) -C .. postgis_svn_revision.h
+../postgis_revision.h:
+ $(MAKE) -C .. postgis_revision.h
../liblwgeom/.libs/liblwgeom.a:
$(MAKE) -C ../liblwgeom liblwgeom.la
@@ -262,7 +262,7 @@ sfcgal_upgrade.sql: sfcgal_upgrade.sql.in postgis_after_upgrade.sql
cat $^ > $@
# SQL objects are also dependent on postgis_config.h for PostgreSQL version
-$(SQL_OBJS): ../postgis_config.h ../postgis_svn_revision.h
+$(SQL_OBJS): ../postgis_config.h ../postgis_revision.h
#postgis.sql.in: sqldefines.h long_xact.sql.in.c geography.sql.in.c
diff --git a/postgis/lwgeom_functions_basic.c b/postgis/lwgeom_functions_basic.c
index b48dc8f..cf1bf20 100644
--- a/postgis/lwgeom_functions_basic.c
+++ b/postgis/lwgeom_functions_basic.c
@@ -39,6 +39,9 @@
#include <string.h>
#include <stdio.h>
+#define xstr(s) str(s)
+#define str(s) #s
+
Datum LWGEOM_mem_size(PG_FUNCTION_ARGS);
Datum LWGEOM_summary(PG_FUNCTION_ARGS);
Datum LWGEOM_npoints(PG_FUNCTION_ARGS);
@@ -49,6 +52,7 @@ Datum postgis_version(PG_FUNCTION_ARGS);
Datum postgis_liblwgeom_version(PG_FUNCTION_ARGS);
Datum postgis_lib_version(PG_FUNCTION_ARGS);
Datum postgis_svn_version(PG_FUNCTION_ARGS);
+Datum postgis_lib_revision(PG_FUNCTION_ARGS);
Datum postgis_libxml_version(PG_FUNCTION_ARGS);
Datum postgis_lib_build_date(PG_FUNCTION_ARGS);
Datum LWGEOM_length2d_linestring(PG_FUNCTION_ARGS);
@@ -185,15 +189,21 @@ Datum postgis_lib_version(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(postgis_svn_version);
Datum postgis_svn_version(PG_FUNCTION_ARGS)
{
- static int rev = POSTGIS_SVN_REVISION;
+ return postgis_lib_revision(fcinfo);
+}
+
+PG_FUNCTION_INFO_V1(postgis_lib_revision);
+Datum postgis_lib_revision(PG_FUNCTION_ARGS)
+{
+ static char *rev = xstr(POSTGIS_REVISION);
char ver[32];
- if (rev > 0)
+ if (rev && rev[0] != '\0')
{
- snprintf(ver, 32, "%d", rev);
+ snprintf(ver, 32, "%s", rev);
+ ver[31] = '\0';
PG_RETURN_TEXT_P(cstring_to_text(ver));
}
- else
- PG_RETURN_NULL();
+ else PG_RETURN_NULL();
}
PG_FUNCTION_INFO_V1(postgis_lib_build_date);
@@ -210,7 +220,7 @@ Datum postgis_scripts_released(PG_FUNCTION_ARGS)
char ver[64];
text *result;
- snprintf(ver, 64, "%s r%d", POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION);
+ snprintf(ver, 64, "%s %s", POSTGIS_LIB_VERSION, xstr(POSTGIS_REVISION));
ver[63] = '\0';
result = cstring_to_text(ver);
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 58141ff..8c801cf 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -2887,12 +2887,13 @@ BEGIN
END
$$ LANGUAGE plpgsql VOLATILE;
+-- Changed: 3.0.1 use git hash instead of svn
-- Changed: 3.0.0
CREATE OR REPLACE FUNCTION postgis_full_version() RETURNS text
AS $$
DECLARE
libver text;
- svnver text;
+ librev text;
projver text;
geosver text;
sfcgalver text;
@@ -2944,7 +2945,7 @@ BEGIN
SELECT @extschema at .postgis_libxml_version() INTO libxmlver;
SELECT @extschema at .postgis_scripts_installed() INTO dbproc;
SELECT @extschema at .postgis_scripts_released() INTO relproc;
- SELECT @extschema at .postgis_svn_version() INTO svnver;
+ SELECT @extschema at .postgis_lib_revision() INTO librev;
BEGIN
SELECT topology.postgis_topology_scripts_installed() INTO topo_scr_ver;
EXCEPTION
@@ -2976,8 +2977,8 @@ BEGIN
fullver = 'POSTGIS="' || libver;
- IF svnver IS NOT NULL THEN
- fullver = fullver || ' r' || svnver;
+ IF librev IS NOT NULL THEN
+ fullver = fullver || ' ' || librev;
END IF;
fullver = fullver || '"';
diff --git a/postgis/sqldefines.h.in b/postgis/sqldefines.h.in
index 3a474a0..312f6da 100644
--- a/postgis/sqldefines.h.in
+++ b/postgis/sqldefines.h.in
@@ -1,7 +1,7 @@
#ifndef _LWPGIS_DEFINES
#define _LWPGIS_DEFINES
-#include "../postgis_svn_revision.h"
+#include "../postgis_revision.h"
/*
* Define just the version numbers; otherwise we get some strange substitutions in postgis.sql.in
@@ -50,8 +50,8 @@
#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''@POSTGIS_BUILD_DATE@''::text AS version'
#define _POSTGIS_SQL_SELECT_POSTGIS_PGSQL_VERSION 'SELECT ''@POSTGIS_PGSQL_VERSION@''::text AS version'
-#ifdef POSTGIS_SVN_REVISION
-#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '@POSTGIS_SCRIPTS_VERSION@'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$
+#ifdef POSTGIS_REVISION
+#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT trim('@POSTGIS_SCRIPTS_VERSION@'::text || $rev$ POSTGIS_REVISION $rev$) AS version $$
#else
#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '@POSTGIS_SCRIPTS_VERSION@'::text AS version $$
#endif
diff --git a/postgis_config.h.in b/postgis_config.h.in
index abb6f3f..9046281 100644
--- a/postgis_config.h.in
+++ b/postgis_config.h.in
@@ -1,7 +1,7 @@
#ifndef POSTGIS_CONFIG_H
#define POSTGIS_CONFIG_H 1
-#include "postgis_svn_revision.h"
+#include "postgis_revision.h"
/* Manually manipulate the POSTGIS_DEBUG_LEVEL, it is not affected by the
configure process */
diff --git a/raster/loader/raster2pgsql.c b/raster/loader/raster2pgsql.c
index 1b1199c..517bc71 100644
--- a/raster/loader/raster2pgsql.c
+++ b/raster/loader/raster2pgsql.c
@@ -30,6 +30,9 @@
#include "ogr_srs_api.h"
#include <assert.h>
+#define xstr(s) str(s)
+#define str(s) #s
+
static void
loader_rt_error_handler(const char *fmt, va_list ap) {
static const char *label = "ERROR: ";
@@ -325,7 +328,7 @@ chartrim(const char *input, char *remove) {
static void
usage() {
- printf(_("RELEASE: %s GDAL_VERSION=%d (r%d)\n"), POSTGIS_LIB_VERSION, POSTGIS_GDAL_VERSION, POSTGIS_SVN_REVISION);
+ printf(_("RELEASE: %s GDAL_VERSION=%d (r%d)\n"), POSTGIS_LIB_VERSION, POSTGIS_GDAL_VERSION, xstr(POSTGIS_REVISION));
printf(_(
"USAGE: raster2pgsql [<options>] <raster>[ <raster>[ ...]] [[<schema>.]<table>]\n"
" Multiple rasters can also be specified using wildcards (*,?).\n"
diff --git a/raster/rt_pg/Makefile.in b/raster/rt_pg/Makefile.in
index 046fbb5..ef83534 100644
--- a/raster/rt_pg/Makefile.in
+++ b/raster/rt_pg/Makefile.in
@@ -128,10 +128,10 @@ endif
# Objects dependencies
# NOTE: the .a deps are really only link-time dependencies, but at this
# time I dunno how to wncode those
-$(OBJS): ../../liblwgeom/.libs/liblwgeom.a ../rt_core/librtcore.a ../../libpgcommon/libpgcommon.a ../../postgis_config.h ../../postgis_svn_revision.h
+$(OBJS): ../../liblwgeom/.libs/liblwgeom.a ../rt_core/librtcore.a ../../libpgcommon/libpgcommon.a ../../postgis_config.h ../../postgis_revision.h
# SQL objects deps here
-$(SQL_OBJS): ../../postgis/sqldefines.h ../../postgis_svn_revision.h
+$(SQL_OBJS): ../../postgis/sqldefines.h ../../postgis_revision.h
#this is redundant but trying to fold in with the other just hangs
rtpostgis_upgrade.sql.in: rtpostgis.sql ../../utils/postgis_proc_upgrade.pl
diff --git a/raster/rt_pg/rtpg_utility.c b/raster/rt_pg/rtpg_utility.c
index ef15dbb..916d05c 100644
--- a/raster/rt_pg/rtpg_utility.c
+++ b/raster/rt_pg/rtpg_utility.c
@@ -34,6 +34,9 @@
#include "../../postgis_config.h"
#include "lwgeom_pg.h"
+#define xstr(s) str(s)
+#define str(s) #s
+
#include "rtpostgis.h"
Datum RASTER_lib_version(PG_FUNCTION_ARGS);
@@ -47,7 +50,7 @@ Datum RASTER_lib_version(PG_FUNCTION_ARGS)
char ver[64];
text *result;
- snprintf(ver, 64, "%s r%d", POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION);
+ snprintf(ver, 64, "%s r%d", POSTGIS_LIB_VERSION, xstr(POSTGIS_REVISION));
ver[63] = '\0';
result = cstring_to_text(ver);
diff --git a/topology/Makefile.in b/topology/Makefile.in
index 8889d47..68ea0bd 100644
--- a/topology/Makefile.in
+++ b/topology/Makefile.in
@@ -130,7 +130,7 @@ topology.sql: \
sql/topogeometry/simplify.sql.in \
sql/predicates.sql.in \
../postgis/sqldefines.h \
- ../postgis_svn_revision.h
+ ../postgis_revision.h
uninstall_topology.sql: topology.sql ../utils/create_undef.pl
$(PERL) ../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@
diff --git a/utils/Makefile.in b/utils/Makefile.in
index 8a7e94e..8b22ff1 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -32,7 +32,7 @@ SCRIPTS_built = postgis_restore.pl
SCRIPTS = \
create_undef.pl \
- svn_repo_revision.pl \
+ repo_revision.pl \
postgis_proc_upgrade.pl \
profile_intersects.pl \
test_estimation.pl \
diff --git a/utils/repo_revision.pl b/utils/repo_revision.pl
new file mode 100644
index 0000000..4d4f243
--- /dev/null
+++ b/utils/repo_revision.pl
@@ -0,0 +1,81 @@
+#!/usr/bin/perl
+
+$ENV{"LC_ALL"} = "C";
+
+use warnings;
+use strict;
+
+my $top_srcdir = ".";
+my $rev_file = $top_srcdir.'/postgis_revision.h';
+
+my $target = 'local';
+$target = $ARGV[0] if $ARGV[0];
+
+# Read the revision number
+my $rev = &read_rev($target);
+
+# Write it
+&write_defn($rev);
+
+
+sub read_rev {
+
+ my $target = shift;
+
+ #print STDERR "Target: $target\n";
+
+ return &read_rev_git();
+}
+
+sub read_rev_git {
+
+ # TODO: test on old systems, I think I saw some `which`
+ # implementations returning "nothing found" or something
+ # like that, making the later if ( ! $git_exe ) always false
+ #
+ my $git_exe = `which git`;
+ if ( ! $git_exe ) {
+ print STDERR "Can't determine revision: no git executable found\n";
+ return 0;
+ }
+ chop($git_exe);
+
+ my $cmd = "\"${git_exe}\" describe --always";
+ #print STDERR "cmd: ${cmd}\n";
+ my $rev = `$cmd`;
+
+ if ( ! $rev ) {
+ print STDERR "Can't determine revision from git log\n";
+ $rev = 0;
+ } else {
+ chop($rev);
+ }
+
+ return $rev;
+}
+
+sub write_defn {
+ my $rev = shift;
+ my $oldrev = 0;
+
+ # Do not override the file if new detected
+ # revision isn't zero nor different from the existing one
+ if ( -f $rev_file ) {
+ open(IN, "<$rev_file");
+ my $oldrevline = <IN>;
+ if ( $oldrevline =~ /POSTGIS_REVISION (.*)/ ) {
+ $oldrev = $1;
+ }
+ close(IN);
+ if ( $rev eq "0" or $rev eq $oldrev ) {
+ print STDERR "Not updating existing rev file at $oldrev\n";
+ return;
+ }
+ }
+
+ my $string = "#define POSTGIS_REVISION $rev\n";
+ open(OUT,">$rev_file");
+ print OUT $string;
+ close(OUT);
+ print STDERR "Wrote rev file at $rev\n";
+}
diff --git a/utils/svn_repo_revision.pl b/utils/svn_repo_revision.pl
deleted file mode 100755
index ed20f48..0000000
--- a/utils/svn_repo_revision.pl
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/perl
-
-$ENV{"LC_ALL"} = "C";
-
-use warnings;
-use strict;
-
-my $top_srcdir = ".";
-my $rev_file = $top_srcdir.'/postgis_svn_revision.h';
-
-my $target = 'local';
-$target = $ARGV[0] if $ARGV[0];
-
-# Read the svn revision number
-my $svn_rev = &read_rev($target);
-
-# Write it
-&write_defn($svn_rev);
-
-
-sub read_rev {
-
- my $target = shift;
-
- #print STDERR "Target: $target\n";
-
- my $svn_info;
-
- if ( $target eq "local" ) {
- if ( -d $top_srcdir."/.svn" ) {
- #print STDERR "There's a ". $top_srcdir."/.svn dir\n";
- $svn_info = &read_rev_svn($target);
- } elsif ( -e $top_srcdir."/.git" ) {
- #print STDERR "There's a ". $top_srcdir."/.git dir\n";
- $svn_info = &read_rev_git();
- } else {
- print STDERR "Can't fetch local revision (neither .svn nor .git found)\n";
- $svn_info = 0;
- }
- } else {
- $svn_info = &read_rev_svn($target);
- }
-
- return $svn_info;
-
-}
-
-sub read_rev_git {
-
- # TODO: test on old systems, I think I saw some `which`
- # implementations returning "nothing found" or something
- # like that, making the later if ( ! $svn_exe ) always false
- #
- my $git_exe = `which git`;
- if ( ! $git_exe ) {
- print STDERR "Can't fetch SVN revision: no git executable found\n";
- return 0;
- }
- chop($git_exe);
-
- my $cmd = "\"${git_exe}\" log --grep=git-svn -1 | grep git-svn | cut -d@ -f2 | cut -d' ' -f1";
- #print STDERR "cmd: ${cmd}\n";
- my $rev = `$cmd`;
-
- if ( ! $rev ) {
- print STDERR "Can't fetch SVN revision from git log\n";
- $rev = 0;
- } else {
- chop($rev);
- }
-
- return $rev;
-}
-
-sub read_rev_svn {
-
- my $target = shift;
-
- # TODO: test on old systems, I think I saw some `which`
- # implementations returning "nothing found" or something
- # like that, making the later if ( ! $svn_exe ) always false
- #
- my $svn_exe = `which svn`;
- if ( ! $svn_exe ) {
- print STDERR "Can't fetch SVN revision: no svn executable found\n";
- return 0;
- }
- chop($svn_exe);
-
-
- my $svn_info;
- if ( $target eq "local" ) {
- $svn_info = `"${svn_exe}" info`;
- } else {
- $svn_info = `"${svn_exe}" info $target`;
- }
-
- my $rev;
- if ( $svn_info =~ /Last Changed Rev: (\d+)/ ) {
- $rev = $1;
- } else {
- print STDERR "Can't fetch SVN revision: no 'Loast Changed Rev' in `svn info` output\n";
- $rev = 0;
- }
-
- return $rev;
-}
-
-sub write_defn {
- my $rev = shift;
- my $oldrev = 0;
-
- # Do not override the file if new detected
- # revision isn't zero nor different from the existing one
- if ( -f $rev_file ) {
- open(IN, "<$rev_file");
- my $oldrevline = <IN>;
- if ( $oldrevline =~ /POSTGIS_SVN_REVISION (.*)/ ) {
- $oldrev = $1;
- }
- close(IN);
- if ( $rev == 0 or $rev == $oldrev ) {
- print STDERR "Not updating existing rev file at $oldrev\n";
- return;
- }
- }
-
- my $string = "#define POSTGIS_SVN_REVISION $rev\n";
- open(OUT,">$rev_file");
- print OUT $string;
- close(OUT);
- print STDERR "Wrote rev file at $rev\n";
-}
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 2 +-
GNUmakefile.in | 18 +-
NEWS | 9 +
ci/debbie/postgis_release_docs.sh | 12 +-
doc/reporting.xml | 20 +-
extensions/postgis/META.json | 2 +-
extensions/postgis_tiger_geocoder/META.json | 4 +-
extensions/postgis_topology/META.json | 4 +-
liblwgeom/Makefile.in | 8 +-
liblwgeom/cunit/README | 10 +-
liblwgeom/lwgeom_api.c | 7 +-
liblwgeom/lwin_wkt_parse.c | 928 ++++++++++++++--------------
liblwgeom/lwin_wkt_parse.h | 15 +-
loader/pgsql2shp-cli.c | 4 +-
loader/shp2pgsql-cli.c | 5 +-
postgis/Makefile.in | 10 +-
postgis/lwgeom_functions_basic.c | 22 +-
postgis/postgis.sql.in | 9 +-
postgis/sqldefines.h.in | 6 +-
postgis_config.h.in | 2 +-
raster/loader/raster2pgsql.c | 5 +-
raster/rt_pg/Makefile.in | 4 +-
raster/rt_pg/rtpg_utility.c | 5 +-
topology/Makefile.in | 2 +-
utils/Makefile.in | 2 +-
utils/repo_revision.pl | 81 +++
utils/svn_repo_revision.pl | 133 ----
27 files changed, 649 insertions(+), 680 deletions(-)
create mode 100644 utils/repo_revision.pl
delete mode 100755 utils/svn_repo_revision.pl
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list