From ef6ac735d06f3836f2de2605490e89b97b3628bf Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Thu, 2 Jun 2022 01:27:33 +0300 Subject: [PATCH 1/5] small fixes for modern compilers --- Makefile | 8 ++++---- process_moc.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 8fc69c3..656748d 100644 --- a/Makefile +++ b/Makefile @@ -65,13 +65,13 @@ endif # compiler settings PKG_CONFIG = pkg-config -override CPPFLAGS += $(shell $(PKG_CONFIG) --cflags healpix_cxx) -SHLIB_LINK += $(shell $(PKG_CONFIG) --libs healpix_cxx) -LINK.shared = g++ -shared +override CPPFLAGS += $(shell $(PKG_CONFIG) --cflags healpix_cxx ) -fopenmp +SHLIB_LINK = $(shell $(PKG_CONFIG) --libs healpix_cxx) -fopenmp +LINK.shared = $(CXX) -shared # healpix_bare.c isn't ours so we refrain from fixing the warnings in there healpix_bare/healpix_bare.o : healpix_bare/healpix_bare.c - $(COMPILE.c) -Wno-declaration-after-statement -o $@ $^ + $(COMPILE.c) -fopenmp -Wno-declaration-after-statement -o $@ $^ # experimental for spoint3 pg_version := $(word 2,$(shell $(PG_CONFIG) --version)) diff --git a/process_moc.cpp b/process_moc.cpp index b2ba137..b388cfb 100644 --- a/process_moc.cpp +++ b/process_moc.cpp @@ -15,6 +15,7 @@ #include /* __cxa_current_exception_type */ #include +#include #include "pgs_process_moc.h" #include "pgs_util.h" @@ -575,7 +576,7 @@ create_moc_release_context(void* moc_in_context, Smoc* moc, // the above level-end values stay correct. // process the interval pages - hpint64 order_log = 0; + //hpint64 order_log = 0; rintv_iter i(moc_data, m.layout[0].level_end); rnode_iter n(moc_data, m.layout[1].level_end); // default for "empty" root node, points past the intervals: @@ -590,8 +591,8 @@ create_moc_release_context(void* moc_in_context, Smoc* moc, { first = r->first; last = r->second; - order_log |= first; - order_log |= last; + //order_log |= first; + //order_log |= last; area += last - first; if (i.page_ready()) { From d3d13fb05cfeee29217f120f9151cd31fbf0202a Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Mon, 6 Jun 2022 16:38:43 +0300 Subject: [PATCH 2/5] ignore sparse.c/sparse.h/sscan.c because they are generated --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 4e384bf..2c9cde3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ regression.out regression.diffs tags +/sparse.c +/sparse.h +/sscan.c From e7d241cb37ac9be16c72e1915738101f6aecfba0 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Mon, 6 Jun 2022 16:40:54 +0300 Subject: [PATCH 3/5] mark all possible function as parallel safe, bump 1.2.1 --- Makefile | 12 +- expected/moc100_4.out | 286 ++++++++++++++++ gnomo.sql.in | 4 +- healpix.sql.in | 28 +- ...e--1.2.0.sql.in => pg_sphere--1.2.1.sql.in | 0 pg_sphere.control | 2 +- pgs_box.sql.in | 142 ++++---- pgs_circle.sql.in | 46 +-- pgs_ellipse.sql.in | 86 ++--- pgs_euler.sql.in | 30 +- pgs_gist.sql.in | 6 +- pgs_gist_pointkey.sql.in | 10 +- pgs_gist_spoint3.sql.in | 4 +- pgs_line.sql.in | 60 ++-- pgs_moc_type.sql.in | 26 +- pgs_path.sql.in | 86 ++--- pgs_point.sql.in | 20 +- pgs_polygon.sql.in | 98 +++--- .../pg_sphere--1.2.0--1.2.1.sql.in | 315 ++++++++++++++++++ 19 files changed, 935 insertions(+), 326 deletions(-) create mode 100644 expected/moc100_4.out rename pg_sphere--1.2.0.sql.in => pg_sphere--1.2.1.sql.in (100%) create mode 100644 upgrade_scripts/pg_sphere--1.2.0--1.2.1.sql.in diff --git a/Makefile b/Makefile index 656748d..f9b44b8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PGSPHERE_VERSION = 1.2.0 +PGSPHERE_VERSION = 1.2.1 # the base dir name may be changed depending on git clone command SRC_DIR = $(shell basename $(shell pwd)) @@ -17,7 +17,8 @@ DATA_built = $(RELEASE_SQL) \ pg_sphere--1.0_gavo--1.1.5beta0gavo.sql \ pg_sphere--1.1.5beta0gavo--1.1.5beta2gavo.sql \ pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql \ - pg_sphere--1.1.5beta4gavo--1.2.0.sql + pg_sphere--1.1.5beta4gavo--1.2.0.sql \ + pg_sphere--1.2.0--1.2.1.sql DOCS = README.pg_sphere COPYRIGHT.pg_sphere REGRESS = init tables points euler circle line ellipse poly path box index \ @@ -197,6 +198,13 @@ ifeq ($(has_parallel), n) sed -i -e '/PARALLEL/d' $@ # version $(pg_version) does not have support for PARALLEL endif +pg_sphere--1.2.0--1.2.1.sql: upgrade_scripts/pg_sphere--1.2.0--1.2.1.sql.in +ifeq ($(has_parallel), n) + touch $@ +else + cat $^ > $@ +endif + # end of local stuff sscan.o : sparse.c diff --git a/expected/moc100_4.out b/expected/moc100_4.out new file mode 100644 index 0000000..38ce5de --- /dev/null +++ b/expected/moc100_4.out @@ -0,0 +1,286 @@ +CREATE TABLE moc100 ( + ivoid text, + coverage smoc, + ref_system_name text +); +COPY moc100 FROM STDIN; +CREATE INDEX ON moc100 USING GIN (coverage); +SELECT ivoid FROM moc100 WHERE coverage && '4/0' ORDER BY ivoid; + ivoid +------------------------------------------ + ivo://byu.arvo/dfbsspec/q/getssa + ivo://cadc.nrc.ca/archive/cfht + ivo://cadc.nrc.ca/archive/hst + ivo://cds.vizier/b/assocdata + ivo://cds.vizier/b/swift + ivo://cds.vizier/i/241 + ivo://cds.vizier/iv/12 + ivo://cds.vizier/ix/13 + ivo://cds.vizier/j/a+a/316/147 + ivo://cds.vizier/j/a+as/105/311 + ivo://cds.vizier/j/a+as/122/235 + ivo://chivo/gaia/q/dr1 + ivo://chivo/openngc/q/data + ivo://cxc.harvard.edu/csc + ivo://irsa.ipac/2mass/catalog/psc + ivo://irsa.ipac/2mass/catalog/xsc + ivo://irsa.ipac/2mass/images/asky-ql + ivo://irsa.ipac/cosmos/images + ivo://irsa.ipac/iras/images/issa + ivo://irsa.ipac/mast/scrapbook + ivo://irsa.ipac/spitzer/images/swire + ivo://mssl.ucl.ac.uk/xmmsuss_dsa/xmmsuss + ivo://ned.ipac/sia + ivo://ned.ipac/tap + ivo://svo.cab/cat/gbs + ivo://svo.cab/cat/uves + ivo://svo.cab/cat/xshooter + ivo://vopdc.iap/fss + ivo://vopdc.obspm/imcce/m4ast + ivo://vopdc.obspm/imcce/miriade + ivo://vopdc.obspm/imcce/skybot + ivo://vopdc.obspm/lesia/bestars/besc + ivo://vopdc.obspm/lesia/bestars/bess + ivo://vopdc.obspm/luth/exoplanet + ivo://vopdc.obspm/luth/hess +(35 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage && '0/'; + QUERY PLAN +---------------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (cost=0.00..4.01 rows=1 width=96) (actual rows=0 loops=1) + Recheck Cond: (coverage && '0/'::smoc) + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..0.00 rows=1 width=0) (actual rows=0 loops=1) + Index Cond: (coverage && '0/'::smoc) + Planning: + Buffers: shared hit=5 +(6 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage && '4/0'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=35 loops=1) + Filter: (coverage && '4/0'::smoc) + Rows Removed by Filter: 66 + Buffers: shared hit=114 + Planning: + Buffers: shared hit=1 +(6 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage = '0/0-11'; + QUERY PLAN +-------------------------------------------------------------------------------- + Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=23 loops=1) + Filter: (coverage = '0/0-11'::smoc) + Rows Removed by Filter: 78 + Buffers: shared hit=59 + Planning: + Buffers: shared hit=4 +(6 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage = '6/43225,43227'; + QUERY PLAN +------------------------------------------------------------------------------- + Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=1 loops=1) + Filter: (coverage = '6/43225 43227'::smoc) + Rows Removed by Filter: 100 + Buffers: shared hit=59 + Planning: + Buffers: shared hit=1 +(6 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage = '0/'; + QUERY PLAN +------------------------------------------------------------------------------- + Seq Scan on moc100 (cost=0.00..6.26 rows=1 width=96) (actual rows=1 loops=1) + Filter: (coverage = '0/'::smoc) + Rows Removed by Filter: 100 + Buffers: shared hit=59 + Planning: + Buffers: shared hit=1 +(6 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage <> '0/0-11'; + QUERY PLAN +---------------------------------------------------------------------------------- + Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=78 loops=1) + Filter: (coverage <> '0/0-11'::smoc) + Rows Removed by Filter: 23 + Buffers: shared hit=59 + Planning: + Buffers: shared hit=4 +(6 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage <> '6/43225,43227'; + QUERY PLAN +----------------------------------------------------------------------------------- + Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=100 loops=1) + Filter: (coverage <> '6/43225 43227'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=59 + Planning: + Buffers: shared hit=1 +(6 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage <> '0/'; + QUERY PLAN +----------------------------------------------------------------------------------- + Seq Scan on moc100 (cost=0.00..6.26 rows=100 width=96) (actual rows=100 loops=1) + Filter: (coverage <> '0/'::smoc) + Rows Removed by Filter: 1 + Buffers: shared hit=59 + Planning: + Buffers: shared hit=1 +(6 rows) + +SET enable_seqscan = off; +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage && '4/0'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Bitmap Heap Scan on moc100 (cost=36.00..40.01 rows=1 width=96) (actual rows=35 loops=1) + Recheck Cond: (coverage && '4/0'::smoc) + Heap Blocks: exact=5 + Buffers: shared hit=85 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..36.00 rows=1 width=0) (actual rows=35 loops=1) + Index Cond: (coverage && '4/0'::smoc) + Buffers: shared hit=9 + Planning: + Buffers: shared hit=1 +(9 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage <@ '4/0'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Bitmap Heap Scan on moc100 (cost=44.00..48.01 rows=1 width=96) (actual rows=1 loops=1) + Recheck Cond: (coverage <@ '4/0'::smoc) + Rows Removed by Index Recheck: 35 + Heap Blocks: exact=5 + Buffers: shared hit=33 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..44.00 rows=1 width=0) (actual rows=36 loops=1) + Index Cond: (coverage <@ '4/0'::smoc) + Buffers: shared hit=12 + Planning: + Buffers: shared hit=4 +(10 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage @> '4/0'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Bitmap Heap Scan on moc100 (cost=36.00..40.01 rows=1 width=96) (actual rows=28 loops=1) + Recheck Cond: (coverage @> '4/0'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=4 + Buffers: shared hit=36 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..36.00 rows=1 width=0) (actual rows=29 loops=1) + Index Cond: (coverage @> '4/0'::smoc) + Buffers: shared hit=9 + Planning: + Buffers: shared hit=4 +(10 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage = '0/0-11'; + QUERY PLAN +--------------------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (cost=98308.01..98312.02 rows=1 width=96) (actual rows=23 loops=1) + Recheck Cond: (coverage = '0/0-11'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=2 + Buffers: shared hit=24581 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98308.01 rows=1 width=0) (actual rows=24 loops=1) + Index Cond: (coverage = '0/0-11'::smoc) + Buffers: shared hit=24577 + Planning: + Buffers: shared hit=1 +(10 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage = '6/43225,43227'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Bitmap Heap Scan on moc100 (cost=12.01..16.02 rows=1 width=96) (actual rows=1 loops=1) + Recheck Cond: (coverage = '6/43225 43227'::smoc) + Rows Removed by Index Recheck: 28 + Heap Blocks: exact=3 + Buffers: shared hit=12 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..12.01 rows=1 width=0) (actual rows=29 loops=1) + Index Cond: (coverage = '6/43225 43227'::smoc) + Buffers: shared hit=3 + Planning: + Buffers: shared hit=1 +(10 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage = '0/'; + QUERY PLAN +----------------------------------------------------------------------------------------------------------- + Bitmap Heap Scan on moc100 (cost=12.01..16.02 rows=1 width=96) (actual rows=1 loops=1) + Recheck Cond: (coverage = '0/'::smoc) + Heap Blocks: exact=1 + Buffers: shared hit=5 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..12.01 rows=1 width=0) (actual rows=1 loops=1) + Index Cond: (coverage = '0/'::smoc) + Buffers: shared hit=4 + Planning: + Buffers: shared hit=1 +(9 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage <> '0/0-11'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------ + Bitmap Heap Scan on moc100 (cost=98316.77..98323.02 rows=100 width=96) (actual rows=78 loops=1) + Recheck Cond: (coverage <> '0/0-11'::smoc) + Rows Removed by Index Recheck: 23 + Heap Blocks: exact=5 + Buffers: shared hit=24824 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98316.75 rows=100 width=0) (actual rows=101 loops=1) + Index Cond: (coverage <> '0/0-11'::smoc) + Buffers: shared hit=24762 + Planning: + Buffers: shared hit=1 +(10 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage <> '6/43225,43227'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------ + Bitmap Heap Scan on moc100 (cost=98316.77..98323.02 rows=100 width=341) (actual rows=100 loops=1) + Recheck Cond: (coverage <> '6/43225 43227'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=5 + Buffers: shared hit=247 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98316.75 rows=100 width=0) (actual rows=101 loops=1) + Index Cond: (coverage <> '6/43225 43227'::smoc) + Buffers: shared hit=188 + Planning: + Buffers: shared hit=10 +(10 rows) + +EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) + SELECT * FROM moc100 WHERE coverage <> '0/'; + QUERY PLAN +------------------------------------------------------------------------------------------------------------------ + Bitmap Heap Scan on moc100 (cost=98316.77..98323.02 rows=100 width=341) (actual rows=100 loops=1) + Recheck Cond: (coverage <> '0/'::smoc) + Rows Removed by Index Recheck: 1 + Heap Blocks: exact=5 + Buffers: shared hit=245 + -> Bitmap Index Scan on moc100_coverage_idx (cost=0.00..98316.75 rows=100 width=0) (actual rows=101 loops=1) + Index Cond: (coverage <> '0/'::smoc) + Buffers: shared hit=186 + Planning: + Buffers: shared hit=1 +(10 rows) + diff --git a/gnomo.sql.in b/gnomo.sql.in index a57f509..3564e04 100644 --- a/gnomo.sql.in +++ b/gnomo.sql.in @@ -3,7 +3,7 @@ CREATE OR REPLACE FUNCTION gnomonic_proj(spoint, spoint) RETURNS point AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION gnomonic_proj(spoint, spoint) IS 'gnomonic projection, the second argument is the tangential point'; @@ -11,7 +11,7 @@ COMMENT ON FUNCTION gnomonic_proj(spoint, spoint) IS CREATE OR REPLACE FUNCTION gnomonic_inv(point, spoint) RETURNS spoint AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION gnomonic_inv(point, spoint) IS 'inverse of gnomonic projection, the second argument is the tangential point'; diff --git a/healpix.sql.in b/healpix.sql.in index 7f8943a..a754b19 100644 --- a/healpix.sql.in +++ b/healpix.sql.in @@ -3,97 +3,97 @@ CREATE OR REPLACE FUNCTION nest2ring(integer, bigint) RETURNS bigint AS 'MODULE_PATHNAME', 'pg_nest2ring' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION nest2ring(integer, bigint) IS 'converts nested Healpix index to a ring Healpix index for the specified integer level (first argument)'; CREATE OR REPLACE FUNCTION ring2nest(integer, bigint) RETURNS bigint AS 'MODULE_PATHNAME', 'pg_ring2nest' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION ring2nest(integer, bigint) IS 'converts ringe Healpix index to a nested Healpix index for the specified integer level (first argument)'; CREATE OR REPLACE FUNCTION healpix_convert_nest(integer, integer, bigint) RETURNS bigint AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION healpix_convert_nest(integer, integer, bigint) IS 'converts nested Healpix index (last argument) from level of second argument to level of first argument'; CREATE OR REPLACE FUNCTION healpix_convert_ring(integer, integer, bigint) RETURNS bigint AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION healpix_convert_ring(integer, integer, bigint) IS 'converts ring Healpix index (last argument) from level of second argument to level of first argument'; CREATE OR REPLACE FUNCTION nside2order(bigint) RETURNS integer AS 'MODULE_PATHNAME', 'pg_nside2order' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION nside2order(bigint) IS 'returns integer part of base-two logarithm of argument for powers of two up to 29'; CREATE OR REPLACE FUNCTION order2nside(integer) RETURNS bigint AS 'MODULE_PATHNAME', 'pg_order2nside' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION order2nside(integer) IS 'returns power of two for non-negative values up to 29'; CREATE OR REPLACE FUNCTION nside2npix(bigint) RETURNS bigint AS 'MODULE_PATHNAME', 'pg_nside2npix' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION nside2npix(bigint) IS 'returns 12 * nside ^ 2, the number of Healpix elements for the nside parameter'; CREATE OR REPLACE FUNCTION npix2nside(bigint) RETURNS bigint AS 'MODULE_PATHNAME', 'pg_npix2nside' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION npix2nside(bigint) IS 'returns the nside parameter correspondig to the number of Healpix elements'; CREATE OR REPLACE FUNCTION healpix_nest(integer, spoint) RETURNS bigint AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION healpix_nest(integer, spoint) IS 'nested Healpix index of a spherical point for the specified integer level (first argument)'; CREATE OR REPLACE FUNCTION healpix_ring(integer, spoint) RETURNS bigint AS 'MODULE_PATHNAME' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION healpix_ring(integer, spoint) IS 'Healpix ring index of a spherical point for the specified integer level (first argument)'; CREATE OR REPLACE FUNCTION centre_of_healpix_nest(integer, bigint) RETURNS spoint AS 'MODULE_PATHNAME', 'inv_healpix_nest' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION centre_of_healpix_nest(integer, bigint) IS 'spherical point designating the centre of a nested Healpix element for the specified integer level (first argument)'; CREATE OR REPLACE FUNCTION centre_of_healpix_ring(integer, bigint) RETURNS spoint AS 'MODULE_PATHNAME', 'inv_healpix_ring' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION centre_of_healpix_ring(integer, bigint) IS 'spherical point designating the centre of a ring Healpix element for the specified integer level (first argument)'; CREATE OR REPLACE FUNCTION center_of_healpix_nest(integer, bigint) RETURNS spoint AS 'MODULE_PATHNAME', 'inv_healpix_nest' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION center_of_healpix_nest(integer, bigint) IS 'spherical point designating the center of a nested Healpix element for the specified integer level (first argument)'; CREATE OR REPLACE FUNCTION center_of_healpix_ring(integer, bigint) RETURNS spoint AS 'MODULE_PATHNAME', 'inv_healpix_ring' -LANGUAGE C IMMUTABLE STRICT; +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION center_of_healpix_ring(integer, bigint) IS 'spherical point designating the center of a ring Healpix element for the specified integer level (first argument)'; diff --git a/pg_sphere--1.2.0.sql.in b/pg_sphere--1.2.1.sql.in similarity index 100% rename from pg_sphere--1.2.0.sql.in rename to pg_sphere--1.2.1.sql.in diff --git a/pg_sphere.control b/pg_sphere.control index eacc07b..2b64f2f 100644 --- a/pg_sphere.control +++ b/pg_sphere.control @@ -1,5 +1,5 @@ # pg_sphere extension comment = 'spherical objects with useful functions, operators and index support' -default_version = '1.2.0' +default_version = '1.2.1' module_pathname = '$libdir/pg_sphere' relocatable = true diff --git a/pgs_box.sql.in b/pgs_box.sql.in index 38b206e..1456b86 100644 --- a/pgs_box.sql.in +++ b/pgs_box.sql.in @@ -8,7 +8,7 @@ CREATE FUNCTION sbox(spoint, spoint) RETURNS sbox AS 'MODULE_PATHNAME', 'spherebox_in_from_points' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox(spoint, spoint) IS 'returns a spherical box from south-west corner(arg1) and north-east corner(arg2)'; @@ -17,7 +17,7 @@ CREATE FUNCTION sw(sbox) RETURNS spoint AS 'MODULE_PATHNAME', 'spherebox_sw' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sw(sbox) IS 'south-west corner of spherical box'; @@ -26,7 +26,7 @@ CREATE FUNCTION se(sbox) RETURNS spoint AS 'MODULE_PATHNAME', 'spherebox_se' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION se(sbox) IS 'south-east corner of spherical box'; @@ -36,7 +36,7 @@ CREATE FUNCTION nw(sbox) RETURNS spoint AS 'MODULE_PATHNAME', 'spherebox_nw' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION nw(sbox) IS 'north-west corner of spherical box'; @@ -45,7 +45,7 @@ CREATE FUNCTION ne(sbox) RETURNS spoint AS 'MODULE_PATHNAME', 'spherebox_ne' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION ne(sbox) IS 'north-east corner of spherical box'; @@ -55,7 +55,7 @@ CREATE FUNCTION area(sbox) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherebox_area' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION area(sbox) IS 'area of a spherical box'; @@ -69,7 +69,7 @@ CREATE FUNCTION circum(sbox) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherebox_circ' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION circum(sbox) IS 'circumference of spherical box'; @@ -91,7 +91,7 @@ CREATE FUNCTION sbox_equal(sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_equal(sbox, sbox) IS 'returns true, if spherical boxes are equal'; @@ -117,7 +117,7 @@ CREATE FUNCTION sbox_equal_neg (sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_equal_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_equal_neg (sbox, sbox) IS 'returns true, if spherical boxes are not equal'; @@ -144,7 +144,7 @@ CREATE FUNCTION sbox_contains_box(sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_box' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_box(sbox, sbox) IS 'true if spherical box contains spherical box'; @@ -158,7 +158,7 @@ CREATE FUNCTION sbox_contains_box_com(sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_box_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_box_com(sbox, sbox) IS 'true if spherical box contains spherical box'; @@ -172,7 +172,7 @@ CREATE FUNCTION sbox_contains_box_neg(sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_box_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_box_neg(sbox, sbox) IS 'true if spherical box does not contain spherical box'; @@ -186,7 +186,7 @@ CREATE FUNCTION sbox_contains_box_com_neg(sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_box_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_box_com_neg(sbox, sbox) IS 'true if spherical box does not contain spherical box'; @@ -200,7 +200,7 @@ CREATE FUNCTION sbox_overlap_box(sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_box' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_box(sbox, sbox) IS 'true if spherical box overlap spherical box'; @@ -227,7 +227,7 @@ CREATE FUNCTION sbox_overlap_box_neg(sbox, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_box_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_box_neg(sbox, sbox) IS 'true if spherical box does not overlap spherical box'; @@ -254,7 +254,7 @@ CREATE FUNCTION sbox_cont_point_com(spoint, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_point_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_cont_point_com(spoint, sbox) IS 'true if spherical point is contained by spherical box'; @@ -268,7 +268,7 @@ CREATE FUNCTION sbox_cont_point_com_neg(spoint, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_point_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_cont_point_com_neg (spoint, sbox) IS 'true if spherical point is not contained by spherical box'; @@ -282,7 +282,7 @@ CREATE FUNCTION sbox_cont_point(sbox, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_cont_point (sbox, spoint) IS 'true if spherical box contains spherical point'; @@ -296,7 +296,7 @@ CREATE FUNCTION sbox_cont_point_neg(sbox, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_point_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_cont_point_neg (sbox, spoint) IS 'true if spherical box does not contain spherical point'; @@ -310,7 +310,7 @@ CREATE FUNCTION sbox_contains_circle(sbox, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_circle(sbox, scircle) IS 'true if spherical box contains spherical circle'; @@ -324,7 +324,7 @@ CREATE FUNCTION sbox_contains_circle_com(scircle, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_circle_com(scircle, sbox) IS 'true if spherical box contains spherical circle'; @@ -338,7 +338,7 @@ CREATE FUNCTION sbox_contains_circle_neg(sbox, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_circle_neg(sbox, scircle) IS 'true if spherical box does not contain spherical circle'; @@ -352,7 +352,7 @@ CREATE FUNCTION sbox_contains_circle_com_neg(scircle, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_circle_com_neg(scircle, sbox) IS 'true if spherical box does not contain spherical circle'; @@ -366,7 +366,7 @@ CREATE FUNCTION scircle_contains_box(scircle, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_box' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_box(scircle, sbox) IS 'true if spherical circle contains spherical box'; @@ -380,7 +380,7 @@ CREATE FUNCTION scircle_contains_box_com(sbox, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_box_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_box_com(sbox, scircle) IS 'true if spherical circle contains spherical box'; @@ -394,7 +394,7 @@ CREATE FUNCTION scircle_contains_box_neg(scircle, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_box_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_box_neg(scircle, sbox) IS 'true if spherical circle does not contain spherical box'; @@ -408,7 +408,7 @@ CREATE FUNCTION scircle_contains_box_com_neg(sbox, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_box_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_box_com_neg(sbox, scircle) IS 'true if spherical circle does not contain spherical box'; @@ -422,7 +422,7 @@ CREATE FUNCTION sbox_overlap_circle(sbox, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_circle(sbox, scircle) IS 'true if spherical circle overlap spherical box'; @@ -449,7 +449,7 @@ CREATE FUNCTION sbox_overlap_circle_com(scircle, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_circle_com(scircle, sbox) IS 'true if spherical circle overlap spherical box'; @@ -477,7 +477,7 @@ CREATE FUNCTION sbox_overlap_circle_neg(sbox, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_circle_neg(sbox, scircle) IS 'true if spherical circle does not overlap spherical box'; @@ -504,7 +504,7 @@ CREATE FUNCTION sbox_overlap_circle_com_neg(scircle, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_circle_com_neg(scircle, sbox) IS 'true if spherical circle does not overlap spherical box'; @@ -532,7 +532,7 @@ CREATE FUNCTION sbox_contains_line(sbox, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_line(sbox, sline) IS 'true if spherical box contains spherical line'; @@ -546,7 +546,7 @@ CREATE FUNCTION sbox_contains_line_com(sline, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_line_com(sline, sbox) IS 'true if spherical box contains spherical line'; @@ -560,7 +560,7 @@ CREATE FUNCTION sbox_contains_line_neg(sbox, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_line_neg(sbox, sline) IS 'true if spherical box does not contain spherical line'; @@ -574,7 +574,7 @@ CREATE FUNCTION sbox_contains_line_com_neg(sline, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_line_com_neg(sline, sbox) IS 'true if spherical box does not contain spherical line'; @@ -588,7 +588,7 @@ CREATE FUNCTION sbox_overlap_line(sbox, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_line(sbox, sline) IS 'true if spherical line overlap spherical box'; @@ -615,7 +615,7 @@ CREATE FUNCTION sbox_overlap_line_com(sline, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_line_com(sline, sbox) IS 'true if spherical line overlap spherical box'; @@ -643,7 +643,7 @@ CREATE FUNCTION sbox_overlap_line_neg(sbox, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_line_neg(sbox, sline) IS 'true if spherical line does not overlap spherical box'; @@ -670,7 +670,7 @@ CREATE FUNCTION sbox_overlap_line_com_neg(sline, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_line_com_neg(sline, sbox) IS 'true if spherical line does not overlap spherical box'; @@ -698,7 +698,7 @@ CREATE FUNCTION sbox_contains_ellipse(sbox, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_ellipse(sbox, sellipse) IS 'true if spherical box contains spherical ellipse'; @@ -712,7 +712,7 @@ CREATE FUNCTION sbox_contains_ellipse_com(sellipse, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_ellipse_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_ellipse_com(sellipse, sbox) IS 'true if spherical box contains spherical ellipse'; @@ -726,7 +726,7 @@ CREATE FUNCTION sbox_contains_ellipse_neg(sbox, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_ellipse_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_ellipse_neg(sbox, sellipse) IS 'true if spherical box does not contain spherical ellipse'; @@ -740,7 +740,7 @@ CREATE FUNCTION sbox_contains_ellipse_com_neg(sellipse, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_ellipse_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_ellipse_com_neg(sellipse, sbox) IS 'true if spherical box does not contain spherical ellipse'; @@ -754,7 +754,7 @@ CREATE FUNCTION sellipse_contains_box(sellipse, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_box' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_box(sellipse, sbox) IS 'true if spherical ellipse contains spherical box'; @@ -768,7 +768,7 @@ CREATE FUNCTION sellipse_contains_box_com(sbox, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_box_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_box_com(sbox, sellipse) IS 'true if spherical ellipse contains spherical box'; @@ -782,7 +782,7 @@ CREATE FUNCTION sellipse_contains_box_neg(sellipse, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_box_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_box_neg(sellipse, sbox) IS 'true if spherical ellipse does not contain spherical box'; @@ -796,7 +796,7 @@ CREATE FUNCTION sellipse_contains_box_com_neg(sbox, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_box_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_box_com_neg(sbox, sellipse) IS 'true if spherical ellipse does not contain spherical box'; @@ -810,7 +810,7 @@ CREATE FUNCTION sbox_overlap_ellipse(sbox, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_ellipse(sbox, sellipse) IS 'true if spherical ellipse overlap spherical box'; @@ -837,7 +837,7 @@ CREATE FUNCTION sbox_overlap_ellipse_com(sellipse, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_ellipse_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_ellipse_com(sellipse, sbox) IS 'true if spherical ellipse overlap spherical box'; @@ -865,7 +865,7 @@ CREATE FUNCTION sbox_overlap_ellipse_neg(sbox, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_ellipse_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_ellipse_neg(sbox, sellipse) IS 'true if spherical ellipse does not overlap spherical box'; @@ -892,7 +892,7 @@ CREATE FUNCTION sbox_overlap_ellipse_com_neg(sellipse, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_ellipse_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_ellipse_com_neg(sellipse, sbox) IS 'true if spherical ellipse does not overlap spherical box'; @@ -921,7 +921,7 @@ CREATE FUNCTION sbox_contains_poly(sbox, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_poly' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_poly(sbox, spoly) IS 'true if spherical box contains spherical polygon'; @@ -935,7 +935,7 @@ CREATE FUNCTION sbox_contains_poly_com(spoly, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_poly_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_poly_com(spoly, sbox) IS 'true if spherical box contains spherical polygon'; @@ -949,7 +949,7 @@ CREATE FUNCTION sbox_contains_poly_neg(sbox, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_poly_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_poly_neg(sbox, spoly) IS 'true if spherical box does not contain spherical polygon'; @@ -963,7 +963,7 @@ CREATE FUNCTION sbox_contains_poly_com_neg(spoly, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_poly_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_poly_com_neg(spoly, sbox) IS 'true if spherical box does not contain spherical polygon'; @@ -977,7 +977,7 @@ CREATE FUNCTION spoly_contains_box(spoly, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_box' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_box(spoly, sbox) IS 'true if spherical polygon contains spherical box'; @@ -991,7 +991,7 @@ CREATE FUNCTION spoly_contains_box_com(sbox, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_box_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_box_com(sbox, spoly) IS 'true if spherical polygon contains spherical box'; @@ -1005,7 +1005,7 @@ CREATE FUNCTION spoly_contains_box_neg(spoly, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_box_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_box_neg(spoly, sbox) IS 'true if spherical polygon does not contain spherical box'; @@ -1019,7 +1019,7 @@ CREATE FUNCTION spoly_contains_box_com_neg(sbox, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_box_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_box_com_neg(sbox, spoly) IS 'true if spherical polygon does not contain spherical box'; @@ -1033,7 +1033,7 @@ CREATE FUNCTION sbox_overlap_poly(sbox, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_poly' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_poly(sbox, spoly) IS 'true if spherical polygon overlap spherical box'; @@ -1060,7 +1060,7 @@ CREATE FUNCTION sbox_overlap_poly_com(spoly, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_poly_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_poly_com(spoly, sbox) IS 'true if spherical polygon overlap spherical box'; @@ -1088,7 +1088,7 @@ CREATE FUNCTION sbox_overlap_poly_neg(sbox, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_poly_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_poly_neg(sbox, spoly) IS 'true if spherical polygon does not overlap spherical box'; @@ -1115,7 +1115,7 @@ CREATE FUNCTION sbox_overlap_poly_com_neg(spoly, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_poly_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_poly_com_neg(spoly, sbox) IS 'true if spherical polygon does not overlap spherical box'; @@ -1144,7 +1144,7 @@ CREATE FUNCTION sbox_contains_path(sbox, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_path(sbox, spath) IS 'true if spherical box contains spherical path'; @@ -1158,7 +1158,7 @@ CREATE FUNCTION sbox_contains_path_com(spath, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_path_com(spath, sbox) IS 'true if spherical box contains spherical path'; @@ -1172,7 +1172,7 @@ CREATE FUNCTION sbox_contains_path_neg(sbox, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_path_neg(sbox, spath) IS 'true if spherical box does not contain spherical path'; @@ -1186,7 +1186,7 @@ CREATE FUNCTION sbox_contains_path_com_neg(spath, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_cont_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_contains_path_com_neg(spath, sbox) IS 'true if spherical box does not contain spherical path'; @@ -1200,7 +1200,7 @@ CREATE FUNCTION sbox_overlap_path(sbox, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_path(sbox, spath) IS 'true if spherical path overlap spherical box'; @@ -1227,7 +1227,7 @@ CREATE FUNCTION sbox_overlap_path_com(spath, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_path_com(spath, sbox) IS 'true if spherical path overlap spherical box'; @@ -1255,7 +1255,7 @@ CREATE FUNCTION sbox_overlap_path_neg(sbox, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_path_neg(sbox, spath) IS 'true if spherical path does not overlap spherical box'; @@ -1282,7 +1282,7 @@ CREATE FUNCTION sbox_overlap_path_com_neg(spath, sbox) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherebox_overlap_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sbox_overlap_path_com_neg(spath, sbox) IS 'true if spherical path does not overlap spherical box'; diff --git a/pgs_circle.sql.in b/pgs_circle.sql.in index 99a9ed9..e0c110d 100644 --- a/pgs_circle.sql.in +++ b/pgs_circle.sql.in @@ -9,7 +9,7 @@ CREATE FUNCTION area(scircle) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherecircle_area' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION area(scircle) IS 'area of spherical circle'; @@ -18,7 +18,7 @@ CREATE FUNCTION radius(scircle) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherecircle_radius' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION radius(scircle) IS 'radius of spherical circle'; @@ -27,7 +27,7 @@ CREATE FUNCTION scircle(spoint, float8) RETURNS scircle AS 'MODULE_PATHNAME' , 'spherecircle_by_center' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle(spoint, float8) IS 'spherical circle with spherical point as center and float8 as radius in radians'; @@ -41,7 +41,7 @@ CREATE FUNCTION scircle(spoint) RETURNS scircle AS 'MODULE_PATHNAME' , 'spherepoint_to_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle(spoint) IS 'spherical circle with radius 0 and spherical point as center'; @@ -66,7 +66,7 @@ CREATE FUNCTION scircle_equal(scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_equal(scircle, scircle) IS 'returns true, if spherical circles are equal'; @@ -93,7 +93,7 @@ CREATE FUNCTION scircle_equal_neg(scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_equal_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_equal_neg(scircle, scircle) IS 'returns true, if spherical circles are not equal'; @@ -119,7 +119,7 @@ CREATE FUNCTION scircle_overlap(scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_overlap' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_overlap(scircle, scircle) IS 'true if spherical circles overlap'; @@ -145,7 +145,7 @@ CREATE FUNCTION scircle_overlap_neg(scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_overlap_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_overlap_neg(scircle, scircle) IS 'true if spherical circles do not overlap'; @@ -172,7 +172,7 @@ CREATE FUNCTION center(scircle) RETURNS spoint AS 'MODULE_PATHNAME' , 'spherecircle_center' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION center(scircle) IS 'center of spherical circle'; @@ -194,7 +194,7 @@ CREATE FUNCTION circum(scircle) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherecircle_circ' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION circum(scircle) IS 'circumference of spherical circle'; @@ -216,7 +216,7 @@ CREATE FUNCTION scircle_contained_by_circle(scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_in_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contained_by_circle(scircle, scircle) IS 'true if spherical circle is contained by spherical circle'; @@ -229,7 +229,7 @@ CREATE FUNCTION scircle_contained_by_circle_neg (scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_in_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contained_by_circle_neg (scircle, scircle) IS 'true if spherical circle is not contained by spherical circle'; @@ -242,7 +242,7 @@ CREATE FUNCTION scircle_contains_circle (scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_in_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_circle (scircle, scircle) IS 'true if spherical circle contains spherical circle'; @@ -255,7 +255,7 @@ CREATE FUNCTION scircle_contains_circle_neg (scircle, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherecircle_in_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_circle_neg (scircle, scircle) IS 'true if spherical circle does not contain spherical circle'; @@ -268,7 +268,7 @@ CREATE FUNCTION spoint_contained_by_circle(spoint, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherepoint_in_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint_contained_by_circle(spoint, scircle) IS 'true if spherical point is contained by spherical circle'; @@ -282,7 +282,7 @@ CREATE FUNCTION spoint_contained_by_circle_neg(spoint, scircle) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherepoint_in_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint_contained_by_circle_neg (spoint, scircle) IS 'true if spherical point is not contained by spherical circle '; @@ -296,7 +296,7 @@ CREATE FUNCTION spoint_contained_by_circle_com(scircle, spoint) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherepoint_in_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint_contained_by_circle_com (scircle, spoint) IS 'true if spherical circle contains spherical point '; @@ -310,7 +310,7 @@ CREATE FUNCTION spoint_contained_by_circle_com_neg(scircle, spoint) RETURNS BOOL AS 'MODULE_PATHNAME' , 'spherepoint_in_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint_contained_by_circle_com_neg (scircle, spoint) IS 'true if spherical circle does not contain spherical point '; @@ -324,7 +324,7 @@ CREATE FUNCTION dist(scircle, scircle) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherecircle_distance' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION dist(scircle, scircle) IS 'distance between two spherical circles'; @@ -349,7 +349,7 @@ CREATE FUNCTION dist(scircle, spoint) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherecircle_point_distance' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION dist(scircle, spoint) IS 'distance between spherical circle and spherical point'; @@ -375,7 +375,7 @@ CREATE FUNCTION dist(spoint, scircle) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherecircle_point_distance_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION dist(spoint, scircle) IS 'distance between spherical circle and spherical point'; @@ -401,7 +401,7 @@ CREATE FUNCTION strans_circle(scircle, strans) RETURNS scircle AS 'MODULE_PATHNAME' , 'spheretrans_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_circle (scircle, strans) IS 'returns a transformated spherical circle'; @@ -420,7 +420,7 @@ CREATE FUNCTION strans_circle_inverse(scircle, strans) RETURNS scircle AS 'MODULE_PATHNAME' , 'spheretrans_circle_inverse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_circle_inverse (scircle, strans) IS 'returns a inverse transformated spherical circle'; diff --git a/pgs_ellipse.sql.in b/pgs_ellipse.sql.in index a29452f..70ab229 100644 --- a/pgs_ellipse.sql.in +++ b/pgs_ellipse.sql.in @@ -9,7 +9,7 @@ CREATE FUNCTION sellipse(spoint, float8, float8, float8) RETURNS sellipse AS 'MODULE_PATHNAME', 'sphereellipse_infunc' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse(spoint, float8, float8, float8) IS 'returns spherical ellipse from center, radius1, radius2 and inclination'; @@ -18,7 +18,7 @@ CREATE FUNCTION inc(sellipse) RETURNS float8 AS 'MODULE_PATHNAME', 'sphereellipse_incl' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION inc(sellipse) IS 'inclination of spherical ellipse'; @@ -27,7 +27,7 @@ CREATE FUNCTION lrad(sellipse) RETURNS float8 AS 'MODULE_PATHNAME', 'sphereellipse_rad1' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION lrad(sellipse) IS 'large radius of spherical ellipse'; @@ -36,7 +36,7 @@ CREATE FUNCTION srad(sellipse) RETURNS float8 AS 'MODULE_PATHNAME', 'sphereellipse_rad2' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION srad(sellipse) IS 'small radius of spherical ellipse'; @@ -51,7 +51,7 @@ CREATE FUNCTION sellipse(spoint) RETURNS sellipse AS 'MODULE_PATHNAME', 'spherepoint_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse(spoint) IS 'returns spherical point as spherical ellipse'; @@ -69,7 +69,7 @@ CREATE FUNCTION scircle(sellipse) RETURNS scircle AS 'MODULE_PATHNAME', 'sphereellipse_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle(sellipse) IS 'spherical bounding circle of spherical ellipse'; @@ -86,7 +86,7 @@ CREATE FUNCTION sellipse(scircle) RETURNS sellipse AS 'MODULE_PATHNAME', 'spherecircle_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse(scircle) IS 'returns spherical circle as spherical ellipse'; @@ -103,7 +103,7 @@ CREATE FUNCTION strans(sellipse) RETURNS strans AS 'MODULE_PATHNAME', 'sphereellipse_trans' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans(sellipse) IS 'returns Euler transformation of spherical ellipse'; @@ -127,7 +127,7 @@ CREATE FUNCTION center(sellipse) RETURNS spoint AS 'MODULE_PATHNAME', 'sphereellipse_center' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION center(sellipse) IS 'center of spherical ellipse'; @@ -149,7 +149,7 @@ CREATE FUNCTION sellipse_equal(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_equal(sellipse, sellipse) IS 'returns true, if spherical ellipses are equal'; @@ -177,7 +177,7 @@ CREATE FUNCTION sellipse_equal_neg(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_equal_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_equal_neg(sellipse, sellipse) IS 'returns true, if spherical ellipses are not equal'; @@ -204,7 +204,7 @@ CREATE FUNCTION sellipse_contains_ellipse(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_ellipse(sellipse, sellipse) IS 'true if spherical ellipse contains spherical ellipse'; @@ -218,7 +218,7 @@ CREATE FUNCTION sellipse_contains_ellipse_com(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_ellipse_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_ellipse_com(sellipse, sellipse) IS 'true if spherical ellipse is contained by spherical ellipse'; @@ -232,7 +232,7 @@ CREATE FUNCTION sellipse_contains_ellipse_neg(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_ellipse_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_ellipse_neg(sellipse, sellipse) IS 'true if spherical ellipse does not contain spherical ellipse'; @@ -246,7 +246,7 @@ CREATE FUNCTION sellipse_contains_ellipse_com_neg(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_ellipse_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_ellipse_com_neg(sellipse, sellipse) IS 'true if spherical ellipse is not contained by spherical ellipse'; @@ -260,7 +260,7 @@ CREATE FUNCTION sellipse_overlap_ellipse(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_ellipse(sellipse, sellipse) IS 'true if spherical ellipse overlaps spherical ellipse'; @@ -287,7 +287,7 @@ CREATE FUNCTION sellipse_overlap_ellipse_neg(sellipse, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_ellipse_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_ellipse_neg(sellipse, sellipse) IS 'true if spherical ellipse does not overlap spherical ellipse'; @@ -315,7 +315,7 @@ CREATE FUNCTION sellipse_contains_point(sellipse, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_point(sellipse, spoint) IS 'true if spherical ellipse contains spherical point'; @@ -328,7 +328,7 @@ CREATE FUNCTION sellipse_contains_point_com(spoint, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_point_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_point_com(spoint, sellipse) IS 'true if spherical ellipse contains spherical point'; @@ -342,7 +342,7 @@ CREATE FUNCTION sellipse_contains_point_neg(sellipse, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_point_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_point_neg(sellipse, spoint) IS 'true if spherical ellipse contains spherical point'; @@ -355,7 +355,7 @@ CREATE FUNCTION sellipse_contains_point_com_neg(spoint, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_point_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_point_com_neg(spoint, sellipse) IS 'true if spherical ellipse contains spherical point'; @@ -370,7 +370,7 @@ CREATE FUNCTION strans_ellipse(sellipse, strans) RETURNS sellipse AS 'MODULE_PATHNAME', 'spheretrans_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_ellipse (sellipse, strans) IS 'returns a transformated spherical ellipse'; @@ -388,7 +388,7 @@ CREATE FUNCTION strans_ellipse_inverse (sellipse, strans) RETURNS sellipse AS 'MODULE_PATHNAME', 'spheretrans_ellipse_inv' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_ellipse_inverse (sellipse, strans) IS 'returns a inverse transformated spherical ellipse'; @@ -411,7 +411,7 @@ CREATE FUNCTION sellipse_contains_circle(sellipse, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_circle(sellipse, scircle) IS 'true if spherical ellipse contains spherical circle'; @@ -425,7 +425,7 @@ CREATE FUNCTION sellipse_contains_circle_com(scircle, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_circle_com(scircle, sellipse) IS 'true if spherical ellipse contains spherical circle'; @@ -439,7 +439,7 @@ CREATE FUNCTION sellipse_contains_circle_neg(sellipse, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_circle_neg(sellipse, scircle) IS 'true if spherical ellipse does not contain spherical circle'; @@ -453,7 +453,7 @@ CREATE FUNCTION sellipse_contains_circle_com_neg(scircle, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_circle_com_neg(scircle, sellipse) IS 'true if spherical ellipse does not contain spherical circle'; @@ -467,7 +467,7 @@ CREATE FUNCTION scircle_contains_ellipse(scircle, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_ellipse(scircle, sellipse) IS 'true if spherical circle contains spherical ellipse'; @@ -481,7 +481,7 @@ CREATE FUNCTION scircle_contains_ellipse_com(sellipse, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_ellipse_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_ellipse_com(sellipse, scircle) IS 'true if spherical circle contains spherical ellipse'; @@ -495,7 +495,7 @@ CREATE FUNCTION scircle_contains_ellipse_neg(scircle, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_ellipse_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_ellipse_neg(scircle, sellipse) IS 'true if spherical circle does not contain spherical ellipse'; @@ -509,7 +509,7 @@ CREATE FUNCTION scircle_contains_ellipse_com_neg(sellipse, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_ellipse_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_ellipse_com_neg(sellipse, scircle) IS 'true if spherical circle does not contain spherical ellipse'; @@ -523,7 +523,7 @@ CREATE FUNCTION sellipse_overlap_circle(sellipse, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_circle(sellipse, scircle) IS 'true if spherical circle overlap spherical ellipse'; @@ -551,7 +551,7 @@ CREATE FUNCTION sellipse_overlap_circle_com(scircle, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_circle_com(scircle, sellipse) IS 'true if spherical circle overlap spherical ellipse'; @@ -578,7 +578,7 @@ CREATE FUNCTION sellipse_overlap_circle_neg(sellipse, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_circle_neg(sellipse, scircle) IS 'true if spherical circle does not overlap spherical ellipse'; @@ -606,7 +606,7 @@ CREATE FUNCTION sellipse_overlap_circle_com_neg(scircle, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_circle_com_neg(scircle, sellipse) IS 'true if spherical circle does not overlap spherical ellipse'; @@ -636,7 +636,7 @@ CREATE FUNCTION sellipse_overlap_line (sellipse, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_line (sellipse, sline) IS 'returns true if spherical line overlaps spherical ellipse'; @@ -663,7 +663,7 @@ CREATE FUNCTION sellipse_overlap_line_com(sline, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_line_com(sline, sellipse) IS 'returns true if spherical line overlaps spherical ellipse'; @@ -691,7 +691,7 @@ CREATE FUNCTION sellipse_overlap_line_neg (sellipse, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_line_neg (sellipse, sline) IS 'returns true if spherical line overlaps spherical ellipse'; @@ -718,7 +718,7 @@ CREATE FUNCTION sellipse_overlap_line_com_neg(sline, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_line_com_neg(sline, sellipse) IS 'returns true if spherical line does not overlap spherical ellipse'; @@ -747,7 +747,7 @@ CREATE FUNCTION sellipse_contains_line(sellipse, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_line(sellipse, sline) IS 'returns true if spherical ellipse contains spherical line'; @@ -762,7 +762,7 @@ CREATE FUNCTION sellipse_contains_line_com(sline, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_line_com(sline, sellipse) IS 'returns true if spherical ellipse contains spherical line'; @@ -775,7 +775,7 @@ CREATE FUNCTION sellipse_contains_line_neg(sellipse, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_line_neg(sellipse, sline) IS 'returns true if spherical ellipse does not contain spherical line'; @@ -790,7 +790,7 @@ CREATE FUNCTION sellipse_contains_line_com_neg(sline, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_line_com_neg(sline, sellipse) IS 'returns true if spherical ellipse does not contain spherical line'; diff --git a/pgs_euler.sql.in b/pgs_euler.sql.in index 3739315..6bd25e7 100644 --- a/pgs_euler.sql.in +++ b/pgs_euler.sql.in @@ -6,7 +6,7 @@ CREATE FUNCTION strans_zxz(strans) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans_zxz' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_zxz(strans) IS 'returns Euler transformation as ZXZ transformation'; @@ -15,7 +15,7 @@ CREATE FUNCTION strans(FLOAT8, FLOAT8, FLOAT8) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans_from_float8' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans(FLOAT8, FLOAT8, FLOAT8) IS 'returns an transformation object using Euler angles (ZXZ)'; @@ -24,7 +24,7 @@ CREATE FUNCTION strans(FLOAT8, FLOAT8, FLOAT8, CSTRING) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans_from_float8_and_type' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans(FLOAT8, FLOAT8, FLOAT8, CSTRING) IS 'returns an transformation object using Euler angles and axis'; @@ -33,7 +33,7 @@ CREATE FUNCTION phi(strans) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spheretrans_phi' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION phi(strans) IS 'returns the first angle of Euler angles of a transformation object'; @@ -42,7 +42,7 @@ CREATE FUNCTION theta(strans) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spheretrans_theta' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION theta(strans) IS 'returns the second angle of Euler angles of a transformation object'; @@ -51,7 +51,7 @@ CREATE FUNCTION psi(strans) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spheretrans_psi' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION psi(strans) IS 'returns the third angle of Euler angles of a transformation object'; @@ -60,7 +60,7 @@ CREATE FUNCTION axes(strans) RETURNS CHARACTER(3) AS 'MODULE_PATHNAME', 'spheretrans_type' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION axes (strans) IS 'returns the axis of Euler angles of a transformation object'; @@ -72,7 +72,7 @@ CREATE FUNCTION strans_equal(strans, strans) RETURNS BOOL AS 'MODULE_PATHNAME', 'spheretrans_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_equal(strans, strans) IS 'returns true, if Euler transformations are equal'; @@ -96,7 +96,7 @@ CREATE FUNCTION strans_not_equal(strans, strans) RETURNS BOOL AS 'MODULE_PATHNAME', 'spheretrans_not_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_not_equal(strans, strans) IS 'returns true, if Euler transformations are not equal'; @@ -119,7 +119,7 @@ CREATE FUNCTION strans(strans) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans(strans) IS 'returns Euler transformation'; @@ -136,7 +136,7 @@ CREATE FUNCTION strans_invert(strans) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans_invert' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_invert(strans) IS 'returns inverse Euler transformation'; @@ -153,7 +153,7 @@ CREATE FUNCTION strans_point(spoint, strans) RETURNS spoint AS 'MODULE_PATHNAME', 'spheretrans_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_point (spoint, strans) IS 'returns a transformated spherical point'; @@ -171,7 +171,7 @@ CREATE FUNCTION strans_point_inverse(spoint, strans) RETURNS spoint AS 'MODULE_PATHNAME', 'spheretrans_point_inverse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_point_inverse (spoint, strans) IS 'returns a inverse transformated spherical point'; @@ -189,7 +189,7 @@ CREATE FUNCTION strans_trans(strans, strans) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans_trans' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_trans (strans, strans) IS 'returns a transformated Euler transformation'; @@ -207,7 +207,7 @@ CREATE FUNCTION strans_trans_inv(strans, strans) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans_trans_inv' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_trans_inv (strans, strans) IS 'returns a inverse transformated Euler transformation'; diff --git a/pgs_gist.sql.in b/pgs_gist.sql.in index fe26187..e8ac119 100644 --- a/pgs_gist.sql.in +++ b/pgs_gist.sql.in @@ -39,19 +39,19 @@ CREATE FUNCTION pointkey_volume(pointkey) RETURNS float8 AS 'MODULE_PATHNAME', 'pointkey_volume' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION pointkey_area(pointkey) RETURNS float8 AS 'MODULE_PATHNAME', 'pointkey_area' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION pointkey_perimeter(pointkey) RETURNS float8 AS 'MODULE_PATHNAME', 'pointkey_perimeter' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE TYPE pointkey ( input = pointkey_in, diff --git a/pgs_gist_pointkey.sql.in b/pgs_gist_pointkey.sql.in index d447927..47618e4 100644 --- a/pgs_gist_pointkey.sql.in +++ b/pgs_gist_pointkey.sql.in @@ -2,32 +2,32 @@ CREATE FUNCTION pointkey_in(CSTRING) RETURNS pointkey AS 'MODULE_PATHNAME', 'pointkey_in' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION pointkey_out(pointkey) RETURNS CSTRING AS 'MODULE_PATHNAME', 'pointkey_out' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION pointkey_volume(pointkey) RETURNS float8 AS 'MODULE_PATHNAME', 'pointkey_volume' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION pointkey_area(pointkey) RETURNS float8 AS 'MODULE_PATHNAME', 'pointkey_area' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION pointkey_perimeter(pointkey) RETURNS float8 AS 'MODULE_PATHNAME', 'pointkey_perimeter' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE TYPE pointkey ( input = pointkey_in, diff --git a/pgs_gist_spoint3.sql.in b/pgs_gist_spoint3.sql.in index 6574eda..0382dad 100644 --- a/pgs_gist_spoint3.sql.in +++ b/pgs_gist_spoint3.sql.in @@ -9,7 +9,7 @@ CREATE FUNCTION g_spoint3_penalty (internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME', 'g_spoint3_penalty' LANGUAGE 'c' - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION g_spoint3_picksplit(internal, internal) RETURNS internal @@ -40,7 +40,7 @@ CREATE FUNCTION g_spoint3_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME', 'g_spoint3_fetch' LANGUAGE 'c' - STRICT; + STRICT PARALLEL SAFE; CREATE OPERATOR CLASS spoint3 FOR TYPE spoint USING gist AS diff --git a/pgs_line.sql.in b/pgs_line.sql.in index 4a02c8a..9814355 100644 --- a/pgs_line.sql.in +++ b/pgs_line.sql.in @@ -8,7 +8,7 @@ CREATE FUNCTION sline(spoint, spoint) RETURNS sline AS 'MODULE_PATHNAME', 'sphereline_from_points' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline(spoint, spoint) IS 'returns a spherical line using begin (arg1) and end (arg2)'; @@ -17,7 +17,7 @@ CREATE FUNCTION sline(strans, float8) RETURNS sline AS 'MODULE_PATHNAME', 'sphereline_from_trans' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline(strans, float8) IS 'returns a spherical line using Euler transformation (arg1) and length (arg2)'; @@ -26,7 +26,7 @@ CREATE FUNCTION meridian(float8) RETURNS sline AS 'MODULE_PATHNAME', 'sphereline_meridian' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION meridian(float8) IS 'returns a spherical line as a meridian along longitude arg'; @@ -36,7 +36,7 @@ CREATE FUNCTION sl_beg(sline) RETURNS spoint AS 'MODULE_PATHNAME', 'sphereline_begin' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sl_beg(sline) IS 'returns the begin of a spherical line'; @@ -45,7 +45,7 @@ CREATE FUNCTION sl_end(sline) RETURNS spoint AS 'MODULE_PATHNAME', 'sphereline_end' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sl_end(sline) IS 'returns the end of a spherical line'; @@ -59,7 +59,7 @@ CREATE FUNCTION strans(sline) RETURNS strans AS 'MODULE_PATHNAME', 'spheretrans_from_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans(sline) IS 'converts line to a transformation (ZXZ)'; @@ -77,7 +77,7 @@ CREATE FUNCTION sline(spoint) RETURNS sline AS 'MODULE_PATHNAME', 'sphereline_from_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline(spoint) IS 'casts a spherical point to a spherical line'; @@ -105,7 +105,7 @@ CREATE FUNCTION sline_equal(sline, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_equal(sline, sline) IS 'returns true, if spherical lines are equal'; @@ -132,7 +132,7 @@ CREATE FUNCTION sline_equal_neg(sline, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_equal_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_equal_neg(sline, sline) IS 'returns true, if spherical lines are not equal'; @@ -159,7 +159,7 @@ CREATE FUNCTION length(sline) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'sphereline_length' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION length(sline) IS 'returns the length of a spherical line (in radians)'; @@ -181,7 +181,7 @@ CREATE FUNCTION swap(sline) RETURNS sline AS 'MODULE_PATHNAME', 'sphereline_swap_beg_end' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION swap(sline) IS 'returns a spherical line with swapped begin and end'; @@ -202,7 +202,7 @@ CREATE FUNCTION turn(sline) RETURNS sline AS 'MODULE_PATHNAME', 'sphereline_turn' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION turn(sline) IS 'returns a turned spherical line but keeps begin and end'; @@ -225,7 +225,7 @@ CREATE FUNCTION sline_crosses(sline, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_crosses' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_crosses(sline, sline) IS 'returns true if spherical lines cross'; @@ -253,7 +253,7 @@ CREATE FUNCTION sline_crosses_neg(sline, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_crosses_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_crosses_neg(sline, sline) IS 'returns true if spherical lines do not cross'; @@ -281,7 +281,7 @@ CREATE FUNCTION sline_overlap(sline, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_overlap' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_overlap(sline, sline) IS 'returns true if spherical lines overlap or cross'; @@ -308,7 +308,7 @@ CREATE FUNCTION sline_overlap_neg(sline, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_overlap_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_overlap_neg(sline, sline) IS 'returns true if spherical lines do not overlap or cross'; @@ -337,7 +337,7 @@ CREATE FUNCTION sline_contains_point (sline, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_cont_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_contains_point (sline, spoint) IS 'returns true if spherical line contains spherical point'; @@ -352,7 +352,7 @@ CREATE FUNCTION sline_contains_point_com (spoint, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_cont_point_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_contains_point_com (spoint, sline) IS 'returns true if spherical line contains spherical point'; @@ -366,7 +366,7 @@ CREATE FUNCTION sline_contains_point_neg (sline, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_cont_point_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_contains_point_neg (sline, spoint) IS 'returns true if spherical line does not contain spherical point'; @@ -380,7 +380,7 @@ CREATE FUNCTION sline_contains_point_com_neg (spoint, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_cont_point_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_contains_point_com_neg (spoint, sline) IS 'returns true if spherical line does not contain spherical point'; @@ -393,7 +393,7 @@ CREATE FUNCTION strans_line(sline, strans) RETURNS sline AS 'MODULE_PATHNAME', 'spheretrans_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_line (sline, strans) IS 'returns a transformated spherical line'; @@ -412,7 +412,7 @@ CREATE FUNCTION strans_line_inverse(sline, strans) RETURNS sline AS 'MODULE_PATHNAME', 'spheretrans_line_inverse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_line_inverse (sline, strans) IS 'returns a inverse transformated spherical line'; @@ -435,7 +435,7 @@ CREATE FUNCTION sline_overlap_circle(sline, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_overlap_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_overlap_circle(sline, scircle) IS 'returns true if spherical line overlaps spherical circle'; @@ -462,7 +462,7 @@ CREATE FUNCTION sline_overlap_circle_com(scircle, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_overlap_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_overlap_circle_com(scircle, sline) IS 'returns true if spherical line overlaps spherical circle'; @@ -489,7 +489,7 @@ CREATE FUNCTION sline_overlap_circle_neg(sline, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_overlap_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_overlap_circle_neg(sline, scircle) IS 'returns true if spherical line does not overlap spherical circle'; @@ -516,7 +516,7 @@ CREATE FUNCTION sline_overlap_circle_com_neg(scircle, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereline_overlap_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sline_overlap_circle_com_neg(scircle, sline) IS 'returns true if spherical line overlaps spherical circle'; @@ -545,7 +545,7 @@ CREATE FUNCTION scircle_contains_line(scircle, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_line(scircle, sline) IS 'returns true if spherical circle contains spherical line'; @@ -560,7 +560,7 @@ CREATE FUNCTION scircle_contains_line_com(sline, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_line_com(sline, scircle) IS 'returns true if spherical circle contains spherical line'; @@ -573,7 +573,7 @@ CREATE FUNCTION scircle_contains_line_neg(scircle, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_line_neg(scircle, sline) IS 'returns true if spherical circle does not contain spherical line'; @@ -587,7 +587,7 @@ CREATE FUNCTION scircle_contains_line_com_neg(sline, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_line_com_neg(sline, scircle) IS 'returns true if spherical circle does not contain spherical line'; diff --git a/pgs_moc_type.sql.in b/pgs_moc_type.sql.in index 5f2c8fe..c49dad7 100644 --- a/pgs_moc_type.sql.in +++ b/pgs_moc_type.sql.in @@ -4,13 +4,13 @@ CREATE FUNCTION smoc_in(cstring) RETURNS smoc AS 'MODULE_PATHNAME' LANGUAGE C - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION smoc_out(smoc) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE TYPE smoc ( input = smoc_in, @@ -25,67 +25,67 @@ CREATE FUNCTION moc_debug() RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION set_smoc_output_type(integer) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION max_order(smoc) RETURNS integer AS 'MODULE_PATHNAME', 'smoc_order' LANGUAGE C - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION healpix_subset_smoc(bigint, smoc) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION healpix_not_subset_smoc(bigint, smoc) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION smoc_superset_healpix(smoc, bigint) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION smoc_not_superset_healpix(smoc, bigint) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION spoint_subset_smoc(spoint, smoc) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION spoint_not_subset_smoc(spoint, smoc) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION smoc_superset_spoint(smoc, spoint) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE FUNCTION smoc_not_superset_spoint(smoc, spoint) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C - STRICT; + STRICT PARALLEL SAFE; CREATE OPERATOR <@ ( LEFTARG = bigint, diff --git a/pgs_path.sql.in b/pgs_path.sql.in index 36cee2c..5f4df22 100644 --- a/pgs_path.sql.in +++ b/pgs_path.sql.in @@ -11,7 +11,7 @@ CREATE FUNCTION npoints(spath) RETURNS INT4 AS 'MODULE_PATHNAME', 'spherepath_npts' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION npoints(spath) IS 'returns number of points of spherical path'; @@ -20,7 +20,7 @@ CREATE FUNCTION spoint(spath, int4) RETURNS spoint AS 'MODULE_PATHNAME', 'spherepath_get_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint(spath, int4) IS 'returns n-th point of spherical path'; @@ -29,7 +29,7 @@ CREATE FUNCTION spoint(spath, float8) RETURNS spoint AS 'MODULE_PATHNAME', 'spherepath_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint(spath, float8) IS 'returns n-th point of spherical path using linear interpolation'; @@ -50,7 +50,7 @@ CREATE FUNCTION spath_equal(spath, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_equal(spath, spath) IS 'returns true, if spherical paths are equal'; @@ -78,7 +78,7 @@ CREATE FUNCTION spath_equal_neg(spath, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_equal_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_equal_neg(spath, spath) IS 'returns true, if spherical paths are equal'; @@ -106,7 +106,7 @@ CREATE FUNCTION length(spath) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepath_length' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION length(spath) IS 'returns length of spherical path'; @@ -130,7 +130,7 @@ CREATE FUNCTION swap(spath) RETURNS spath AS 'MODULE_PATHNAME', 'spherepath_swap' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION swap(spath) IS 'returns a swapped spherical path (changed direction)'; @@ -153,7 +153,7 @@ CREATE FUNCTION spath_overlap_path(spath, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_overlap_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_overlap_path(spath, spath) IS 'true if spherical path overlaps spherical path'; @@ -179,7 +179,7 @@ CREATE FUNCTION spath_overlap_path_neg(spath, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_overlap_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_overlap_path_neg(spath, spath) IS 'true if spherical path does not overlap spherical path'; @@ -209,7 +209,7 @@ CREATE FUNCTION spath_contains_point(spath, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_cont_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_contains_point(spath, spoint) IS 'true if spherical path contains spherical point'; @@ -223,7 +223,7 @@ CREATE FUNCTION spath_contains_point_com(spoint, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_cont_point_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_contains_point_com(spoint, spath) IS 'true if spherical path contains spherical point'; @@ -237,7 +237,7 @@ CREATE FUNCTION spath_contains_point_neg(spath, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_cont_point_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_contains_point_neg(spath, spoint) IS 'true if spherical path does not contain spherical point'; @@ -251,7 +251,7 @@ CREATE FUNCTION spath_contains_point_com_neg(spoint, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_cont_point_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_contains_point_com_neg(spoint, spath) IS 'true if spherical path does not contain spherical point'; @@ -264,7 +264,7 @@ CREATE FUNCTION strans_path(spath, strans) RETURNS spath AS 'MODULE_PATHNAME', 'spheretrans_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_path (spath, strans) IS 'returns a transformated spherical path'; @@ -282,7 +282,7 @@ CREATE FUNCTION strans_path_inverse(spath, strans) RETURNS spath AS 'MODULE_PATHNAME', 'spheretrans_path_inverse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_path_inverse (spath, strans) IS 'returns a inverse transformated spherical path'; @@ -306,7 +306,7 @@ CREATE FUNCTION scircle_contains_path(scircle, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_path(scircle, spath) IS 'true if spherical circle contains spherical path'; @@ -320,7 +320,7 @@ CREATE FUNCTION scircle_contains_path_com(spath, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_path_com(spath, scircle) IS 'true if spherical circle contains spherical path'; @@ -333,7 +333,7 @@ CREATE FUNCTION scircle_contains_path_neg(scircle, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_path_neg(scircle, spath) IS 'true if spherical circle does not contain spherical path'; @@ -347,7 +347,7 @@ CREATE FUNCTION scircle_contains_path_com_neg(spath, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_path_com_neg(spath, scircle) IS 'true if spherical circle does not contain spherical path'; @@ -360,7 +360,7 @@ CREATE FUNCTION scircle_overlap_path(scircle, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_overlap_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_overlap_path(scircle, spath) IS 'true if spherical circle overlap spherical path'; @@ -388,7 +388,7 @@ CREATE FUNCTION scircle_overlap_path_com(spath, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_overlap_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_overlap_path_com(spath, scircle) IS 'true if spherical circle overlap spherical path'; @@ -414,7 +414,7 @@ CREATE FUNCTION scircle_overlap_path_neg(scircle, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_overlap_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_overlap_path_neg(scircle, spath) IS 'true if spherical circle does not overlap spherical path'; @@ -442,7 +442,7 @@ CREATE FUNCTION scircle_overlap_path_com_neg(spath, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_overlap_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_overlap_path_com_neg(spath, scircle) IS 'true if spherical circle overlap spherical path'; @@ -468,7 +468,7 @@ CREATE FUNCTION spath_overlap_line(spath, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_overlap_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_overlap_line(spath, sline) IS 'true if spherical path overlaps spherical line'; @@ -496,7 +496,7 @@ CREATE FUNCTION spath_overlap_line_com(sline, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_overlap_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_overlap_line_com(sline, spath) IS 'true if spherical path overlaps spherical line'; @@ -524,7 +524,7 @@ CREATE FUNCTION spath_overlap_line_neg(spath, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_overlap_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_overlap_line_neg(spath, sline) IS 'true if spherical path does not overlap spherical line'; @@ -552,7 +552,7 @@ CREATE FUNCTION spath_overlap_line_com_neg(sline, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepath_overlap_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spath_overlap_line_com_neg(sline, spath) IS 'true if spherical path does not overlap spherical line'; @@ -580,7 +580,7 @@ CREATE FUNCTION sellipse_contains_path(sellipse, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_path(sellipse, spath) IS 'true if spherical ellipse contains spherical path'; @@ -594,7 +594,7 @@ CREATE FUNCTION sellipse_contains_path_com(spath, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_path_com(spath, sellipse) IS 'true if spherical ellipse contains spherical path'; @@ -607,7 +607,7 @@ CREATE FUNCTION sellipse_contains_path_neg(sellipse, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_path_neg(sellipse, spath) IS 'true if spherical ellipse does not contain spherical path'; @@ -621,7 +621,7 @@ CREATE FUNCTION sellipse_contains_path_com_neg(spath, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_path_com_neg(spath, sellipse) IS 'true if spherical ellipse does not contain spherical path'; @@ -634,7 +634,7 @@ CREATE FUNCTION sellipse_overlap_path(sellipse, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_path(sellipse, spath) IS 'true if spherical ellipse overlap spherical path'; @@ -662,7 +662,7 @@ CREATE FUNCTION sellipse_overlap_path_com(spath, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_path_com(spath, sellipse) IS 'true if spherical ellipse overlap spherical path'; @@ -688,7 +688,7 @@ CREATE FUNCTION sellipse_overlap_path_neg(sellipse, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_path_neg(sellipse, spath) IS 'true if spherical ellipse does not overlap spherical path'; @@ -716,7 +716,7 @@ CREATE FUNCTION sellipse_overlap_path_com_neg(spath, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_overlap_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_overlap_path_com_neg(spath, sellipse) IS 'true if spherical ellipse overlap spherical path'; @@ -743,7 +743,7 @@ CREATE FUNCTION spoly_contains_path(spoly, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_path(spoly, spath) IS 'true if spherical polygon contains spherical path'; @@ -757,7 +757,7 @@ CREATE FUNCTION spoly_contains_path_com(spath, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_path_com(spath, spoly) IS 'true if spherical polygon contains spherical path'; @@ -770,7 +770,7 @@ CREATE FUNCTION spoly_contains_path_neg(spoly, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_path_neg(spoly, spath) IS 'true if spherical polygon does not contain spherical path'; @@ -784,7 +784,7 @@ CREATE FUNCTION spoly_contains_path_com_neg(spath, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_path_com_neg(spath, spoly) IS 'true if spherical polygon does not contain spherical path'; @@ -797,7 +797,7 @@ CREATE FUNCTION spoly_overlap_path(spoly, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_path' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_path(spoly, spath) IS 'true if spherical polygon overlap spherical path'; @@ -825,7 +825,7 @@ CREATE FUNCTION spoly_overlap_path_com(spath, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_path_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_path_com(spath, spoly) IS 'true if spherical polygon overlap spherical path'; @@ -851,7 +851,7 @@ CREATE FUNCTION spoly_overlap_path_neg(spoly, spath) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_path_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_path_neg(spoly, spath) IS 'true if spherical polygon does not overlap spherical path'; @@ -879,7 +879,7 @@ CREATE FUNCTION spoly_overlap_path_com_neg(spath, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_path_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_path_com_neg(spath, spoly) IS 'true if spherical polygon overlap spherical path'; diff --git a/pgs_point.sql.in b/pgs_point.sql.in index c946c5b..a9afb84 100644 --- a/pgs_point.sql.in +++ b/pgs_point.sql.in @@ -13,7 +13,7 @@ CREATE FUNCTION spoint(FLOAT8, FLOAT8) RETURNS spoint AS 'MODULE_PATHNAME', 'spherepoint_from_long_lat' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; CREATE FUNCTION set_sphere_output_precision(INT4) RETURNS CSTRING @@ -32,7 +32,7 @@ CREATE FUNCTION long(spoint) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoint_long' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION long(spoint) IS 'longitude of spherical point'; @@ -41,7 +41,7 @@ CREATE FUNCTION lat(spoint) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoint_lat' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION lat(spoint) IS 'latitude of spherical point'; @@ -50,7 +50,7 @@ CREATE FUNCTION x(spoint) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoint_x' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION x(spoint) IS 'cartesian x value of spherical point'; @@ -60,7 +60,7 @@ CREATE FUNCTION y(spoint) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoint_y' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION y(spoint) IS 'cartesian y value of spherical point'; @@ -69,7 +69,7 @@ CREATE FUNCTION xyz(spoint) RETURNS FLOAT8[] AS 'MODULE_PATHNAME', 'spherepoint_xyz' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION xyz(spoint) IS 'cartesian values of spherical point'; @@ -79,7 +79,7 @@ CREATE FUNCTION z(spoint) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoint_z' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION z(spoint) IS 'cartesian z value of spherical point'; @@ -99,7 +99,7 @@ CREATE FUNCTION spoint_equal(spoint, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoint_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint_equal(spoint, spoint) IS 'returns true, if spherical points are equal'; @@ -125,7 +125,7 @@ CREATE FUNCTION spoint_equal_neg (spoint, spoint) RETURNS BOOL AS 'SELECT NOT spoint_equal($1,$2);' LANGUAGE 'sql' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoint_equal_neg (spoint, spoint) IS 'returns true, if spherical points are not equal'; @@ -152,7 +152,7 @@ CREATE FUNCTION dist(spoint, spoint) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoint_distance' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION dist(spoint, spoint) IS 'distance between spherical points'; diff --git a/pgs_polygon.sql.in b/pgs_polygon.sql.in index b9e68c4..3d8cf61 100644 --- a/pgs_polygon.sql.in +++ b/pgs_polygon.sql.in @@ -6,7 +6,7 @@ CREATE FUNCTION npoints(spoly) RETURNS INT4 AS 'MODULE_PATHNAME', 'spherepoly_npts' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION npoints(spoly) IS 'returns number of points of spherical polygon'; @@ -15,7 +15,7 @@ CREATE FUNCTION area(spoly) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoly_area' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION area(spoly) IS 'returns area of spherical polygon'; @@ -37,7 +37,7 @@ CREATE FUNCTION spoly_equal(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_equal' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_equal(spoly, spoly) IS 'returns true, if spherical polygons are equal'; @@ -64,7 +64,7 @@ CREATE FUNCTION spoly_not_equal(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_equal_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_not_equal(spoly, spoly) IS 'returns true, if spherical polygons are not equal'; @@ -90,7 +90,7 @@ CREATE FUNCTION circum(spoly) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'spherepoly_circ' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION circum(spoly) IS 'returns circumference of spherical polygon'; @@ -112,7 +112,7 @@ CREATE FUNCTION spoly_contains_polygon(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_poly' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_polygon(spoly, spoly) IS 'true if spherical polygon contains spherical polygon'; @@ -126,7 +126,7 @@ CREATE FUNCTION spoly_contains_polygon_com(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_poly_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_polygon_com(spoly, spoly) IS 'true if spherical polygon is contained by spherical polygon'; @@ -140,7 +140,7 @@ CREATE FUNCTION spoly_contains_polygon_neg(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_poly_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_polygon_neg(spoly, spoly) IS 'true if spherical polygon does not contain spherical polygon'; @@ -154,7 +154,7 @@ CREATE FUNCTION spoly_contains_polygon_com_neg(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_poly_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_polygon_com_neg(spoly, spoly) IS 'true if spherical polygon is not contained by spherical polygon'; @@ -168,7 +168,7 @@ CREATE FUNCTION spoly_overlap_polygon(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_poly' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_polygon(spoly, spoly) IS 'true if spherical polygon overlaps spherical polygon'; @@ -195,7 +195,7 @@ CREATE FUNCTION spoly_overlap_polygon_neg(spoly, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_poly_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_polygon_neg(spoly, spoly) IS 'true if spherical polygon does not overlap spherical polygon'; @@ -223,7 +223,7 @@ CREATE FUNCTION spoly_contains_point(spoly, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_point' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_point(spoly, spoint) IS 'true if spherical polygon contains spherical point'; @@ -236,7 +236,7 @@ CREATE FUNCTION spoly_contains_point_com(spoint, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_point_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_point_com(spoint, spoly) IS 'true if spherical polygon contains spherical point'; @@ -249,7 +249,7 @@ CREATE FUNCTION spoly_contains_point_neg(spoly, spoint) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_point_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_point_neg(spoly, spoint) IS 'true if spherical polygon does not contain spherical point'; @@ -262,7 +262,7 @@ CREATE FUNCTION spoly_contains_point_com_neg(spoint, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_point_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_point_com_neg(spoint, spoly) IS 'true if spherical polygon does not contain spherical point'; @@ -275,7 +275,7 @@ CREATE FUNCTION strans_poly(spoly, strans) RETURNS spoly AS 'MODULE_PATHNAME', 'spheretrans_poly' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_poly (spoly, strans) IS 'returns a transformated spherical polygon'; @@ -293,7 +293,7 @@ CREATE FUNCTION strans_poly_inverse(spoly, strans) RETURNS spoly AS 'MODULE_PATHNAME', 'spheretrans_poly_inverse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION strans_poly_inverse (spoly, strans) IS 'returns a inverse transformated spherical polygon'; @@ -316,7 +316,7 @@ CREATE FUNCTION spoly_contains_circle(spoly, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_circle(spoly, scircle) IS 'true if spherical polygon contains spherical circle'; @@ -330,7 +330,7 @@ CREATE FUNCTION spoly_contains_circle_com(scircle, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_circle_com(scircle, spoly) IS 'true if spherical polygon contains spherical circle'; @@ -344,7 +344,7 @@ CREATE FUNCTION spoly_contains_circle_neg(spoly, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_circle_neg(spoly, scircle) IS 'true if spherical polygon does not contain spherical circle'; @@ -358,7 +358,7 @@ CREATE FUNCTION spoly_contains_circle_com_neg(scircle, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_circle_com_neg(scircle, spoly) IS 'true if spherical polygon does not contain spherical circle'; @@ -372,7 +372,7 @@ CREATE FUNCTION scircle_contains_polygon(scircle, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_poly' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_polygon(scircle, spoly) IS 'true if spherical circle contains spherical polygon'; @@ -386,7 +386,7 @@ CREATE FUNCTION scircle_contains_polygon_com(spoly, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_poly_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_polygon_com(spoly, scircle) IS 'true if spherical circle contains spherical polygon'; @@ -400,7 +400,7 @@ CREATE FUNCTION scircle_contains_polygon_neg(scircle, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_poly_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_polygon_neg(scircle, spoly) IS 'true if spherical circle does not contain spherical polygon'; @@ -414,7 +414,7 @@ CREATE FUNCTION scircle_contains_polygon_com_neg(spoly, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherecircle_cont_poly_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION scircle_contains_polygon_com_neg(spoly, scircle) IS 'true if spherical circle does not contain spherical polygon'; @@ -428,7 +428,7 @@ CREATE FUNCTION spoly_overlap_circle(spoly, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_circle' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_circle(spoly, scircle) IS 'true if spherical circle overlap spherical polygon'; @@ -455,7 +455,7 @@ CREATE FUNCTION spoly_overlap_circle_com(scircle, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_circle_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_circle_com(scircle, spoly) IS 'true if spherical circle overlap spherical polygon'; @@ -483,7 +483,7 @@ CREATE FUNCTION spoly_overlap_circle_neg(spoly, scircle) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_circle_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_circle_neg(spoly, scircle) IS 'true if spherical circle does not overlap spherical polygon'; @@ -510,7 +510,7 @@ CREATE FUNCTION spoly_overlap_circle_com_neg(scircle, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_circle_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_circle_com_neg(scircle, spoly) IS 'true if spherical circle does not overlap spherical polygon'; @@ -538,7 +538,7 @@ CREATE FUNCTION spoly_contains_line(spoly, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_line(spoly, sline) IS 'true if spherical polygon contains spherical line'; @@ -551,7 +551,7 @@ CREATE FUNCTION spoly_contains_line_com(sline, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_line_com(sline, spoly) IS 'true if spherical polygon contains spherical line'; @@ -564,7 +564,7 @@ CREATE FUNCTION spoly_contains_line_neg(spoly, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_line_neg(spoly, sline) IS 'true if spherical polygon does not contain spherical line'; @@ -577,7 +577,7 @@ CREATE FUNCTION spoly_contains_line_com_neg(sline, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_line_com_neg(sline, spoly) IS 'true if spherical polygon does not contain spherical line'; @@ -590,7 +590,7 @@ CREATE FUNCTION spoly_overlap_line(spoly, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_line' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_line(spoly, sline) IS 'true if spherical line overlap spherical polygon'; @@ -617,7 +617,7 @@ CREATE FUNCTION spoly_overlap_line_com(sline, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_line_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_line_com(sline, spoly) IS 'true if spherical line overlap spherical polygon'; @@ -645,7 +645,7 @@ CREATE FUNCTION spoly_overlap_line_neg(spoly, sline) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_line_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_line_neg(spoly, sline) IS 'true if spherical line does not overlap spherical polygon'; @@ -672,7 +672,7 @@ CREATE FUNCTION spoly_overlap_line_com_neg(sline, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_line_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_line_com_neg(sline, spoly) IS 'true if spherical line does not overlap spherical polygon'; @@ -701,7 +701,7 @@ CREATE FUNCTION spoly_contains_ellipse(spoly, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_ellipse(spoly, sellipse) IS 'true if spherical polygon contains spherical ellipse'; @@ -715,7 +715,7 @@ CREATE FUNCTION spoly_contains_ellipse_com(sellipse, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_ellipse_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_ellipse_com(sellipse, spoly) IS 'true if spherical polygon contains spherical ellipse'; @@ -729,7 +729,7 @@ CREATE FUNCTION spoly_contains_ellipse_neg(spoly, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_ellipse_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_ellipse_neg(spoly, sellipse) IS 'true if spherical polygon does not contain spherical ellipse'; @@ -743,7 +743,7 @@ CREATE FUNCTION spoly_contains_ellipse_com_neg(sellipse, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_cont_ellipse_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_contains_ellipse_com_neg(sellipse, spoly) IS 'true if spherical polygon does not contain spherical ellipse'; @@ -757,7 +757,7 @@ CREATE FUNCTION sellipse_contains_polygon(sellipse, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_poly' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_polygon(sellipse, spoly) IS 'true if spherical ellipse contains spherical polygon'; @@ -771,7 +771,7 @@ CREATE FUNCTION sellipse_contains_polygon_com(spoly, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_poly_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_polygon_com(spoly, sellipse) IS 'true if spherical ellipse contains spherical polygon'; @@ -785,7 +785,7 @@ CREATE FUNCTION sellipse_contains_polygon_neg(sellipse, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_poly_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_polygon_neg(sellipse, spoly) IS 'true if spherical ellipse does not contain spherical polygon'; @@ -799,7 +799,7 @@ CREATE FUNCTION sellipse_contains_polygon_com_neg(spoly, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'sphereellipse_cont_poly_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION sellipse_contains_polygon_com_neg(spoly, sellipse) IS 'true if spherical ellipse does not contain spherical polygon'; @@ -813,7 +813,7 @@ CREATE FUNCTION spoly_overlap_ellipse(spoly, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_ellipse' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_ellipse(spoly, sellipse) IS 'true if spherical ellipse overlap spherical polygon'; @@ -840,7 +840,7 @@ CREATE FUNCTION spoly_overlap_ellipse_com(sellipse, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_ellipse_com' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_ellipse_com(sellipse, spoly) IS 'true if spherical ellipse overlap spherical polygon'; @@ -868,7 +868,7 @@ CREATE FUNCTION spoly_overlap_ellipse_neg(spoly, sellipse) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_ellipse_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_ellipse_neg(spoly, sellipse) IS 'true if spherical ellipse does not overlap spherical polygon'; @@ -895,7 +895,7 @@ CREATE FUNCTION spoly_overlap_ellipse_com_neg(sellipse, spoly) RETURNS BOOL AS 'MODULE_PATHNAME', 'spherepoly_overlap_ellipse_com_neg' LANGUAGE 'c' - IMMUTABLE STRICT; + IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION spoly_overlap_ellipse_com_neg(sellipse, spoly) IS 'true if spherical ellipse does not overlap spherical polygon'; diff --git a/upgrade_scripts/pg_sphere--1.2.0--1.2.1.sql.in b/upgrade_scripts/pg_sphere--1.2.0--1.2.1.sql.in new file mode 100644 index 0000000..c72bba6 --- /dev/null +++ b/upgrade_scripts/pg_sphere--1.2.0--1.2.1.sql.in @@ -0,0 +1,315 @@ +ALTER FUNCTION gnomonic_proj(spoint, spoint) PARALLEL SAFE; +ALTER FUNCTION gnomonic_inv(point, spoint) PARALLEL SAFE; +ALTER FUNCTION nest2ring(integer, bigint) PARALLEL SAFE; +ALTER FUNCTION ring2nest(integer, bigint) PARALLEL SAFE; +ALTER FUNCTION healpix_convert_nest(integer, integer, bigint) PARALLEL SAFE; +ALTER FUNCTION healpix_convert_ring(integer, integer, bigint) PARALLEL SAFE; +ALTER FUNCTION nside2order(bigint) PARALLEL SAFE; +ALTER FUNCTION order2nside(integer) PARALLEL SAFE; +ALTER FUNCTION nside2npix(bigint) PARALLEL SAFE; +ALTER FUNCTION npix2nside(bigint) PARALLEL SAFE; +ALTER FUNCTION healpix_nest(integer, spoint) PARALLEL SAFE; +ALTER FUNCTION healpix_ring(integer, spoint) PARALLEL SAFE; +ALTER FUNCTION centre_of_healpix_nest(integer, bigint) PARALLEL SAFE; +ALTER FUNCTION centre_of_healpix_ring(integer, bigint) PARALLEL SAFE; +ALTER FUNCTION center_of_healpix_nest(integer, bigint) PARALLEL SAFE; +ALTER FUNCTION center_of_healpix_ring(integer, bigint) PARALLEL SAFE; +ALTER FUNCTION sbox_equal(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_equal_neg(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_box(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_box_com(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_box_neg(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_box_com_neg(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_box(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_box_neg(sbox, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_cont_point_com(spoint, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_cont_point_com_neg(spoint, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_cont_point(sbox, spoint) PARALLEL SAFE; +ALTER FUNCTION sbox_cont_point_neg(sbox, spoint) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_circle(sbox, scircle) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_circle_com(scircle, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_circle_neg(sbox, scircle) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_circle_com_neg(scircle, sbox) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_box(scircle, sbox) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_box_com(sbox, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_box_neg(scircle, sbox) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_box_com_neg(sbox, scircle) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_circle(sbox, scircle) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_circle_com(scircle, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_circle_neg(sbox, scircle) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_circle_com_neg(scircle, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_line(sbox, sline) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_line_com(sline, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_line_neg(sbox, sline) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_line_com_neg(sline, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_line(sbox, sline) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_line_com(sline, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_line_neg(sbox, sline) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_line_com_neg(sline, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_ellipse(sbox, sellipse) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_ellipse_com(sellipse, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_ellipse_neg(sbox, sellipse) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_ellipse_com_neg(sellipse, sbox) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_box(sellipse, sbox) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_box_com(sbox, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_box_neg(sellipse, sbox) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_box_com_neg(sbox, sellipse) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_ellipse(sbox, sellipse) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_ellipse_com(sellipse, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_ellipse_neg(sbox, sellipse) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_ellipse_com_neg(sellipse, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_poly(sbox, spoly) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_poly_com(spoly, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_poly_neg(sbox, spoly) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_poly_com_neg(spoly, sbox) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_box(spoly, sbox) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_box_com(sbox, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_box_neg(spoly, sbox) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_box_com_neg(sbox, spoly) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_poly(sbox, spoly) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_poly_com(spoly, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_poly_neg(sbox, spoly) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_poly_com_neg(spoly, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_path(sbox, spath) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_path_com(spath, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_path_neg(sbox, spath) PARALLEL SAFE; +ALTER FUNCTION sbox_contains_path_com_neg(spath, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_path(sbox, spath) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_path_com(spath, sbox) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_path_neg(sbox, spath) PARALLEL SAFE; +ALTER FUNCTION sbox_overlap_path_com_neg(spath, sbox) PARALLEL SAFE; +ALTER FUNCTION area(scircle) PARALLEL SAFE; +ALTER FUNCTION radius(scircle) PARALLEL SAFE; +ALTER FUNCTION scircle(spoint, float8) PARALLEL SAFE; +ALTER FUNCTION scircle(spoint) PARALLEL SAFE; +ALTER FUNCTION scircle_equal(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_equal_neg(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_overlap(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_overlap_neg(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION center(scircle) PARALLEL SAFE; +ALTER FUNCTION circum(scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contained_by_circle(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contained_by_circle_neg(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_circle(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_circle_neg(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION spoint_contained_by_circle(spoint, scircle) PARALLEL SAFE; +ALTER FUNCTION spoint_contained_by_circle_neg(spoint, scircle) PARALLEL SAFE; +ALTER FUNCTION spoint_contained_by_circle_com(scircle, spoint) PARALLEL SAFE; +ALTER FUNCTION spoint_contained_by_circle_com_neg(scircle, spoint) PARALLEL SAFE; +ALTER FUNCTION dist(scircle, scircle) PARALLEL SAFE; +ALTER FUNCTION dist(scircle, spoint) PARALLEL SAFE; +ALTER FUNCTION dist(spoint, scircle) PARALLEL SAFE; +ALTER FUNCTION strans_circle(scircle, strans) PARALLEL SAFE; +ALTER FUNCTION strans_circle_inverse(scircle, strans) PARALLEL SAFE; +ALTER FUNCTION sellipse(spoint, float8, float8, float8) PARALLEL SAFE; +ALTER FUNCTION inc(sellipse) PARALLEL SAFE; +ALTER FUNCTION lrad(sellipse) PARALLEL SAFE; +ALTER FUNCTION srad(sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse(spoint) PARALLEL SAFE; +ALTER FUNCTION scircle(sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse(scircle) PARALLEL SAFE; +ALTER FUNCTION strans(sellipse) PARALLEL SAFE; +ALTER FUNCTION center(sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_equal(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_equal_neg(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_ellipse(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_ellipse_com(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_ellipse_neg(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_ellipse_com_neg(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_ellipse(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_ellipse_neg(sellipse, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_point(sellipse, spoint) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_point_com(spoint, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_point_neg(sellipse, spoint) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_point_com_neg(spoint, sellipse) PARALLEL SAFE; +ALTER FUNCTION strans_ellipse(sellipse, strans) PARALLEL SAFE; +ALTER FUNCTION strans_ellipse_inverse(sellipse, strans) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_circle(sellipse, scircle) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_circle_com(scircle, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_circle_neg(sellipse, scircle) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_circle_com_neg(scircle, sellipse) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_ellipse(scircle, sellipse) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_ellipse_com(sellipse, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_ellipse_neg(scircle, sellipse) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_ellipse_com_neg(sellipse, scircle) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_circle(sellipse, scircle) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_circle_com(scircle, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_circle_neg(sellipse, scircle) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_circle_com_neg(scircle, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_line(sellipse, sline) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_line_com(sline, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_line_neg(sellipse, sline) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_line_com_neg(sline, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_line(sellipse, sline) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_line_com(sline, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_line_neg(sellipse, sline) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_line_com_neg(sline, sellipse) PARALLEL SAFE; +ALTER FUNCTION strans_zxz(strans) PARALLEL SAFE; +ALTER FUNCTION strans(FLOAT8, FLOAT8, FLOAT8) PARALLEL SAFE; +ALTER FUNCTION strans(FLOAT8, FLOAT8, FLOAT8, CSTRING) PARALLEL SAFE; +ALTER FUNCTION phi(strans) PARALLEL SAFE; +ALTER FUNCTION theta(strans) PARALLEL SAFE; +ALTER FUNCTION psi(strans) PARALLEL SAFE; +ALTER FUNCTION axes(strans) PARALLEL SAFE; +ALTER FUNCTION strans_equal(strans, strans) PARALLEL SAFE; +ALTER FUNCTION strans_not_equal(strans, strans) PARALLEL SAFE; +ALTER FUNCTION strans(strans) PARALLEL SAFE; +ALTER FUNCTION strans_invert(strans) PARALLEL SAFE; +ALTER FUNCTION strans_point(spoint, strans) PARALLEL SAFE; +ALTER FUNCTION strans_point_inverse(spoint, strans) PARALLEL SAFE; +ALTER FUNCTION strans_trans(strans, strans) PARALLEL SAFE; +ALTER FUNCTION strans_trans_inv(strans, strans) PARALLEL SAFE; +ALTER FUNCTION pointkey_volume(pointkey) PARALLEL SAFE; +ALTER FUNCTION pointkey_area(pointkey) PARALLEL SAFE; +ALTER FUNCTION pointkey_perimeter(pointkey) PARALLEL SAFE; +ALTER FUNCTION sline(spoint, spoint) PARALLEL SAFE; +ALTER FUNCTION sline(strans, float8) PARALLEL SAFE; +ALTER FUNCTION meridian(float8) PARALLEL SAFE; +ALTER FUNCTION sl_beg(sline) PARALLEL SAFE; +ALTER FUNCTION sl_end(sline) PARALLEL SAFE; +ALTER FUNCTION strans(sline) PARALLEL SAFE; +ALTER FUNCTION sline(spoint) PARALLEL SAFE; +ALTER FUNCTION sline_equal(sline, sline) PARALLEL SAFE; +ALTER FUNCTION sline_equal_neg(sline, sline) PARALLEL SAFE; +ALTER FUNCTION length(sline) PARALLEL SAFE; +ALTER FUNCTION swap(sline) PARALLEL SAFE; +ALTER FUNCTION turn(sline) PARALLEL SAFE; +ALTER FUNCTION sline_crosses(sline, sline) PARALLEL SAFE; +ALTER FUNCTION sline_crosses_neg(sline, sline) PARALLEL SAFE; +ALTER FUNCTION sline_overlap(sline, sline) PARALLEL SAFE; +ALTER FUNCTION sline_overlap_neg(sline, sline) PARALLEL SAFE; +ALTER FUNCTION sline_contains_point(sline, spoint) PARALLEL SAFE; +ALTER FUNCTION sline_contains_point_com(spoint, sline) PARALLEL SAFE; +ALTER FUNCTION sline_contains_point_neg(sline, spoint) PARALLEL SAFE; +ALTER FUNCTION sline_contains_point_com_neg(spoint, sline) PARALLEL SAFE; +ALTER FUNCTION strans_line(sline, strans) PARALLEL SAFE; +ALTER FUNCTION strans_line_inverse(sline, strans) PARALLEL SAFE; +ALTER FUNCTION sline_overlap_circle(sline, scircle) PARALLEL SAFE; +ALTER FUNCTION sline_overlap_circle_com(scircle, sline) PARALLEL SAFE; +ALTER FUNCTION sline_overlap_circle_neg(sline, scircle) PARALLEL SAFE; +ALTER FUNCTION sline_overlap_circle_com_neg(scircle, sline) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_line(scircle, sline) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_line_com(sline, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_line_neg(scircle, sline) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_line_com_neg(sline, scircle) PARALLEL SAFE; +ALTER FUNCTION smoc_in(cstring) PARALLEL SAFE; +ALTER FUNCTION smoc_out(smoc) PARALLEL SAFE; +ALTER FUNCTION moc_debug() PARALLEL SAFE; +ALTER FUNCTION set_smoc_output_type(integer) PARALLEL SAFE; +ALTER FUNCTION max_order(smoc) PARALLEL SAFE; +ALTER FUNCTION healpix_subset_smoc(bigint, smoc) PARALLEL SAFE; +ALTER FUNCTION healpix_not_subset_smoc(bigint, smoc) PARALLEL SAFE; +ALTER FUNCTION smoc_superset_healpix(smoc, bigint) PARALLEL SAFE; +ALTER FUNCTION smoc_not_superset_healpix(smoc, bigint) PARALLEL SAFE; +ALTER FUNCTION spoint_subset_smoc(spoint, smoc) PARALLEL SAFE; +ALTER FUNCTION spoint_not_subset_smoc(spoint, smoc) PARALLEL SAFE; +ALTER FUNCTION smoc_superset_spoint(smoc, spoint) PARALLEL SAFE; +ALTER FUNCTION smoc_not_superset_spoint(smoc, spoint) PARALLEL SAFE; +ALTER FUNCTION npoints(spath) PARALLEL SAFE; +ALTER FUNCTION spoint(spath, int4) PARALLEL SAFE; +ALTER FUNCTION spoint(spath, float8) PARALLEL SAFE; +ALTER FUNCTION spath_equal(spath, spath) PARALLEL SAFE; +ALTER FUNCTION spath_equal_neg(spath, spath) PARALLEL SAFE; +ALTER FUNCTION length(spath) PARALLEL SAFE; +ALTER FUNCTION swap(spath) PARALLEL SAFE; +ALTER FUNCTION spath_overlap_path(spath, spath) PARALLEL SAFE; +ALTER FUNCTION spath_overlap_path_neg(spath, spath) PARALLEL SAFE; +ALTER FUNCTION spath_contains_point(spath, spoint) PARALLEL SAFE; +ALTER FUNCTION spath_contains_point_com(spoint, spath) PARALLEL SAFE; +ALTER FUNCTION spath_contains_point_neg(spath, spoint) PARALLEL SAFE; +ALTER FUNCTION spath_contains_point_com_neg(spoint, spath) PARALLEL SAFE; +ALTER FUNCTION strans_path(spath, strans) PARALLEL SAFE; +ALTER FUNCTION strans_path_inverse(spath, strans) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_path(scircle, spath) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_path_com(spath, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_path_neg(scircle, spath) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_path_com_neg(spath, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_overlap_path(scircle, spath) PARALLEL SAFE; +ALTER FUNCTION scircle_overlap_path_com(spath, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_overlap_path_neg(scircle, spath) PARALLEL SAFE; +ALTER FUNCTION scircle_overlap_path_com_neg(spath, scircle) PARALLEL SAFE; +ALTER FUNCTION spath_overlap_line(spath, sline) PARALLEL SAFE; +ALTER FUNCTION spath_overlap_line_com(sline, spath) PARALLEL SAFE; +ALTER FUNCTION spath_overlap_line_neg(spath, sline) PARALLEL SAFE; +ALTER FUNCTION spath_overlap_line_com_neg(sline, spath) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_path(sellipse, spath) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_path_com(spath, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_path_neg(sellipse, spath) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_path_com_neg(spath, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_path(sellipse, spath) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_path_com(spath, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_path_neg(sellipse, spath) PARALLEL SAFE; +ALTER FUNCTION sellipse_overlap_path_com_neg(spath, sellipse) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_path(spoly, spath) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_path_com(spath, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_path_neg(spoly, spath) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_path_com_neg(spath, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_path(spoly, spath) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_path_com(spath, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_path_neg(spoly, spath) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_path_com_neg(spath, spoly) PARALLEL SAFE; +ALTER FUNCTION spath_add_point_aggr(spath, spoint) PARALLEL SAFE; +ALTER FUNCTION spath_add_points_fin_aggr(spath) PARALLEL SAFE; +ALTER FUNCTION spoint(FLOAT8, FLOAT8) PARALLEL SAFE; +ALTER FUNCTION set_sphere_output_precision(INT4) PARALLEL SAFE; +ALTER FUNCTION set_sphere_output(CSTRING) PARALLEL SAFE; +ALTER FUNCTION long(spoint) PARALLEL SAFE; +ALTER FUNCTION lat(spoint) PARALLEL SAFE; +ALTER FUNCTION x(spoint) PARALLEL SAFE; +ALTER FUNCTION y(spoint) PARALLEL SAFE; +ALTER FUNCTION xyz(spoint) PARALLEL SAFE; +ALTER FUNCTION z(spoint) PARALLEL SAFE; +ALTER FUNCTION spoint_equal(spoint, spoint) PARALLEL SAFE; +ALTER FUNCTION spoint_equal_neg(spoint, spoint) PARALLEL SAFE; +ALTER FUNCTION dist(spoint, spoint) PARALLEL SAFE; +ALTER FUNCTION npoints(spoly) PARALLEL SAFE; +ALTER FUNCTION area(spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_equal(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_not_equal(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION circum(spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_polygon(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_polygon_com(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_polygon_neg(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_polygon_com_neg(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_polygon(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_polygon_neg(spoly, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_point(spoly, spoint) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_point_com(spoint, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_point_neg(spoly, spoint) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_point_com_neg(spoint, spoly) PARALLEL SAFE; +ALTER FUNCTION strans_poly(spoly, strans) PARALLEL SAFE; +ALTER FUNCTION strans_poly_inverse(spoly, strans) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_circle(spoly, scircle) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_circle_com(scircle, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_circle_neg(spoly, scircle) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_circle_com_neg(scircle, spoly) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_polygon(scircle, spoly) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_polygon_com(spoly, scircle) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_polygon_neg(scircle, spoly) PARALLEL SAFE; +ALTER FUNCTION scircle_contains_polygon_com_neg(spoly, scircle) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_circle(spoly, scircle) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_circle_com(scircle, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_circle_neg(spoly, scircle) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_circle_com_neg(scircle, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_line(spoly, sline) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_line_com(sline, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_line_neg(spoly, sline) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_line_com_neg(sline, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_line(spoly, sline) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_line_com(sline, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_line_neg(spoly, sline) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_line_com_neg(sline, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_ellipse(spoly, sellipse) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_ellipse_com(sellipse, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_ellipse_neg(spoly, sellipse) PARALLEL SAFE; +ALTER FUNCTION spoly_contains_ellipse_com_neg(sellipse, spoly) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_polygon(sellipse, spoly) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_polygon_com(spoly, sellipse) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_polygon_neg(sellipse, spoly) PARALLEL SAFE; +ALTER FUNCTION sellipse_contains_polygon_com_neg(spoly, sellipse) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_ellipse(spoly, sellipse) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_ellipse_com(sellipse, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_ellipse_neg(spoly, sellipse) PARALLEL SAFE; +ALTER FUNCTION spoly_overlap_ellipse_com_neg(sellipse, spoly) PARALLEL SAFE; +ALTER FUNCTION spoly_add_point_aggr(spoly, spoint) PARALLEL SAFE; +ALTER FUNCTION spoly_add_points_fin_aggr(spoly) PARALLEL SAFE; From 96ca3b6a51ce06923b139d492f2bf0bab56778fb Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Mon, 6 Jun 2022 17:00:45 +0300 Subject: [PATCH 4/5] remove -fopenmp as unused --- Makefile | 6 +- sparse.c | 2359 ++++++++++++++++-------------------------------------- sparse.h | 127 +-- sscan.c | 10 +- 4 files changed, 718 insertions(+), 1784 deletions(-) diff --git a/Makefile b/Makefile index f9b44b8..8257b63 100644 --- a/Makefile +++ b/Makefile @@ -66,13 +66,13 @@ endif # compiler settings PKG_CONFIG = pkg-config -override CPPFLAGS += $(shell $(PKG_CONFIG) --cflags healpix_cxx ) -fopenmp -SHLIB_LINK = $(shell $(PKG_CONFIG) --libs healpix_cxx) -fopenmp +override CPPFLAGS += $(shell $(PKG_CONFIG) --cflags healpix_cxx ) +SHLIB_LINK = $(shell $(PKG_CONFIG) --libs healpix_cxx) LINK.shared = $(CXX) -shared # healpix_bare.c isn't ours so we refrain from fixing the warnings in there healpix_bare/healpix_bare.o : healpix_bare/healpix_bare.c - $(COMPILE.c) -fopenmp -Wno-declaration-after-statement -o $@ $^ + $(COMPILE.c) -Wno-declaration-after-statement -o $@ $^ # experimental for spoint3 pg_version := $(word 2,$(shell $(PG_CONFIG) --version)) diff --git a/sparse.c b/sparse.c index f220086..cb7c746 100644 --- a/sparse.c +++ b/sparse.c @@ -1,81 +1,103 @@ -/* A Bison parser, made by GNU Bison 3.4.2. */ +/* original parser id follows */ +/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */ +/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */ + +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define YYPATCH 20200330 + +#define YYEMPTY (-1) +#define yyclearin (yychar = YYEMPTY) +#define yyerrok (yyerrflag = 0) +#define YYRECOVERING() (yyerrflag != 0) +#define YYENOMEM (-2) +#define YYEOF 0 + +#ifndef yyparse +#define yyparse sphere_yyparse +#endif /* yyparse */ + +#ifndef yylex +#define yylex sphere_yylex +#endif /* yylex */ + +#ifndef yyerror +#define yyerror sphere_yyerror +#endif /* yyerror */ + +#ifndef yychar +#define yychar sphere_yychar +#endif /* yychar */ + +#ifndef yyval +#define yyval sphere_yyval +#endif /* yyval */ + +#ifndef yylval +#define yylval sphere_yylval +#endif /* yylval */ + +#ifndef yydebug +#define yydebug sphere_yydebug +#endif /* yydebug */ + +#ifndef yynerrs +#define yynerrs sphere_yynerrs +#endif /* yynerrs */ + +#ifndef yyerrflag +#define yyerrflag sphere_yyerrflag +#endif /* yyerrflag */ + +#ifndef yylhs +#define yylhs sphere_yylhs +#endif /* yylhs */ + +#ifndef yylen +#define yylen sphere_yylen +#endif /* yylen */ + +#ifndef yydefred +#define yydefred sphere_yydefred +#endif /* yydefred */ + +#ifndef yydgoto +#define yydgoto sphere_yydgoto +#endif /* yydgoto */ + +#ifndef yysindex +#define yysindex sphere_yysindex +#endif /* yysindex */ + +#ifndef yyrindex +#define yyrindex sphere_yyrindex +#endif /* yyrindex */ + +#ifndef yygindex +#define yygindex sphere_yygindex +#endif /* yygindex */ + +#ifndef yytable +#define yytable sphere_yytable +#endif /* yytable */ + +#ifndef yycheck +#define yycheck sphere_yycheck +#endif /* yycheck */ + +#ifndef yyname +#define yyname sphere_yyname +#endif /* yyname */ + +#ifndef yyrule +#define yyrule sphere_yyrule +#endif /* yyrule */ +#define YYPREFIX "sphere_yy" -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 - the Free Software Foundation, either version 3 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, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - 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.2" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ #define YYPURE 0 -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - -/* Substitute the variable and function names. */ -#define yyparse sphere_yyparse -#define yylex sphere_yylex -#define yyerror sphere_yyerror -#define yydebug sphere_yydebug -#define yynerrs sphere_yynerrs - -#define yylval sphere_yylval -#define yychar sphere_yychar - -/* First part of user prologue. */ -#line 1 "sparse.y" - +#line 2 "sparse.y" #include #include #include "postgres.h" @@ -109,1733 +131,726 @@ static double human2dec(double d, double m, double s) } } - -#line 114 "sparse.c" - -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 +#ifdef YYSTYPE +#undef YYSTYPE_IS_DECLARED +#define YYSTYPE_IS_DECLARED 1 #endif - -/* Use api.header.include to #include this header - instead of duplicating it here. */ -#ifndef YY_SPHERE_YY_SPARSE_H_INCLUDED -# define YY_SPHERE_YY_SPARSE_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int sphere_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - HOUR = 258, - DEG = 259, - MIN = 260, - SEC = 261, - COMMA = 262, - OPENCIRC = 263, - CLOSECIRC = 264, - OPENPOINT = 265, - CLOSEPOINT = 266, - OPENARR = 267, - CLOSEARR = 268, - SIGN = 269, - INT = 270, - FLOAT = 271, - EULERAXIS = 272 - }; -#endif -/* Tokens. */ -#define HOUR 258 -#define DEG 259 -#define MIN 260 -#define SEC 261 -#define COMMA 262 -#define OPENCIRC 263 -#define CLOSECIRC 264 -#define OPENPOINT 265 -#define CLOSEPOINT 266 -#define OPENARR 267 -#define CLOSEARR 268 -#define SIGN 269 -#define INT 270 -#define FLOAT 271 -#define EULERAXIS 272 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -union YYSTYPE -{ +#ifndef YYSTYPE_IS_DECLARED +#define YYSTYPE_IS_DECLARED 1 #line 41 "sparse.y" - +typedef union { int i; double d; char c[3]; - -#line 197 "sparse.c" - -}; -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - -extern YYSTYPE sphere_yylval; - -int sphere_yyparse (void); - -#endif /* !YY_SPHERE_YY_SPARSE_H_INCLUDED */ - - - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t +} YYSTYPE; +#endif /* !YYSTYPE_IS_DECLARED */ +#line 148 "sparse.c" + +/* compatibility with bison */ +#ifdef YYPARSE_PARAM +/* compatibility with FreeBSD */ +# ifdef YYPARSE_PARAM_TYPE +# define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM) # else -# define YYSIZE_T unsigned +# define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM) # endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YYPARSE_DECL() yyparse(void) #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") +/* Parameters sent to lex. */ +#ifdef YYLEX_PARAM +# define YYLEX_DECL() yylex(void *YYLEX_PARAM) +# define YYLEX yylex(YYLEX_PARAM) #else -# define YY_INITIAL_VALUE(Value) Value +# define YYLEX_DECL() yylex(void) +# define YYLEX yylex() #endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#define YY_ASSERT(E) ((void) (0 && (E))) - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) +/* Parameters sent to yyerror. */ +#ifndef YYERROR_DECL +#define YYERROR_DECL() yyerror(const char *s) #endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 31 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 128 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 18 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 16 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 46 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 109 - -#define YYUNDEFTOK 2 -#define YYMAXUTOK 272 - -/* 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) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 64, 64, 66, 70, 71, 72, 73, 74, 75, - 76, 81, 82, 87, 88, 89, 90, 91, 92, 93, - 94, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 114, 115, 120, 121, 127, 135, 143, 147, - 155, 163, 164, 168, 173, 181, 182 -}; +#ifndef YYERROR_CALL +#define YYERROR_CALL(msg) yyerror(msg) #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "HOUR", "DEG", "MIN", "SEC", "COMMA", - "OPENCIRC", "CLOSECIRC", "OPENPOINT", "CLOSEPOINT", "OPENARR", - "CLOSEARR", "SIGN", "INT", "FLOAT", "EULERAXIS", "$accept", "commands", - "command", "number", "angle_lat_us", "angle_long_us", "angle_long", - "angle_lat", "spherepoint", "spherecircle", "eulertrans", "sphereline", - "spherepointlist", "spherepath", "sphereellipse", "spherebox", YY_NULLPTR +extern int YYPARSE_DECL(); + +#define HOUR 257 +#define DEG 258 +#define MIN 259 +#define SEC 260 +#define COMMA 261 +#define OPENCIRC 262 +#define CLOSECIRC 263 +#define OPENPOINT 264 +#define CLOSEPOINT 265 +#define OPENARR 266 +#define CLOSEARR 267 +#define SIGN 268 +#define INT 269 +#define FLOAT 270 +#define EULERAXIS 271 +#define YYERRCODE 256 +typedef int YYINT; +static const YYINT sphere_yylhs[] = { -1, + 0, 0, 9, 9, 9, 9, 9, 9, 9, 1, + 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 4, 4, 2, 2, 6, 10, 12, 12, 11, 7, + 7, 8, 13, 14, 14, }; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272 +static const YYINT sphere_yylen[] = { 2, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 3, 4, 4, 5, 6, 1, + 2, 2, 3, 4, 4, 5, 6, 3, 5, 6, + 1, 2, 1, 2, 5, 5, 5, 7, 5, 2, + 3, 4, 11, 5, 3, }; -# endif - -#define YYPACT_NINF -18 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-18))) - -#define YYTABLE_NINF -29 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int8 yypact[] = -{ - 58, 9, 33, -4, -2, 27, 11, 26, -18, -18, - -18, 31, 35, -18, -18, -18, -18, -18, -18, 19, - 38, 43, 52, 54, 34, 60, -4, -18, 41, 48, - -18, -18, 19, -4, 62, 91, 92, -18, 68, 38, - 63, -4, 93, -18, 3, 94, -18, -18, 96, 97, - -18, 98, -18, 69, 65, -18, 38, 89, 71, 86, - 99, 100, -18, 95, 101, -2, -18, -18, 76, 76, - -18, 19, 38, 103, 104, -18, 102, -18, -18, 2, - 106, -18, -18, -18, -18, 105, 108, 109, 76, -18, - 110, 113, 114, 115, -18, -18, 107, 117, -4, 13, - 118, -18, -18, 119, 87, 69, 120, 111, -18 +static const YYINT sphere_yydefred[] = { 0, + 0, 0, 0, 0, 0, 0, 0, 20, 0, 31, + 0, 7, 2, 4, 5, 6, 8, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 32, 0, 0, 21, + 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, + 0, 40, 0, 0, 10, 28, 0, 0, 23, 0, + 45, 0, 0, 13, 0, 0, 0, 0, 0, 0, + 0, 33, 0, 0, 41, 42, 0, 0, 24, 0, + 0, 0, 0, 15, 0, 36, 34, 0, 0, 35, + 44, 39, 11, 0, 0, 0, 0, 16, 0, 0, + 0, 0, 30, 27, 0, 0, 0, 0, 0, 38, + 19, 0, 0, 0, 0, 0, 43, }; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 0, 0, 0, 12, 11, 0, 3, 21, - 32, 0, 4, 5, 7, 6, 8, 9, 10, 0, - 0, 0, 0, 0, 0, 0, 0, 33, 0, 23, - 22, 1, 0, 0, 0, 12, 11, 13, 0, 0, - 0, 0, 0, 41, 0, 12, 11, 29, 12, 11, - 24, 0, 46, 0, 15, 14, 0, 0, 0, 12, - 11, 13, 34, 0, 0, 0, 42, 43, 0, 26, - 25, 0, 0, 12, 11, 16, 0, 37, 35, 15, - 14, 36, 45, 40, 12, 30, 27, 38, 18, 17, - 0, 12, 11, 16, 31, 28, 0, 19, 0, 18, - 17, 39, 20, 0, 19, 0, 20, 0, 44 +static const YYINT sphere_yydgoto[] = { 7, + 8, 61, 62, 50, 10, 11, 26, 12, 13, 14, + 15, 16, 17, 18, }; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -18, -18, -18, -17, -12, 0, 5, 16, -1, -18, - 126, -18, -18, -18, -18, -18 +static const YYINT sphere_yysindex[] = { -183, + -210, -248, -228, -152, -138, -229, 0, 0, -217, 0, + -215, 0, 0, 0, 0, 0, 0, 0, -251, -148, + -212, -197, -172, -187, -166, -228, 0, -146, -144, 0, + -251, -228, -155, -121, -120, 0, -151, -148, -157, -228, + -122, 0, -256, -119, 0, 0, -118, -117, 0, -116, + 0, -154, -142, 0, -148, -159, -140, -126, -115, 0, + -114, 0, -113, -152, 0, 0, -136, -136, 0, -251, + -148, -112, -111, 0, -123, 0, 0, -134, 0, 0, + 0, 0, 0, -110, -107, -106, -136, 0, -105, -102, + -101, 0, 0, 0, -125, -100, -228, -136, 0, 0, + 0, -99, -97, -154, 0, -109, 0, }; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 7, 8, 9, 62, 10, 51, 63, 12, 13, - 14, 15, 26, 16, 17, 18 +static const YYINT sphere_yyrindex[] = { 149, + 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, + 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, + 0, 0, 0, -235, -206, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, + 0, 0, -196, 0, 0, 0, 0, -234, -226, -223, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, + 0, -235, -206, 0, 0, 0, 0, -220, -181, 0, + 0, 0, 0, 9, 10, 7, -193, 0, 0, -234, + -226, -165, 0, 0, 0, -173, 0, -164, -163, 0, + 0, 0, -158, 0, -156, 0, 0, }; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int8 yytable[] = -{ - 21, 23, 25, 37, 27, 11, 19, 22, 38, -23, - 66, 47, 50, 5, 6, 30, 67, 91, 92, 19, - -26, 20, 37, 61, 34, 44, 31, 57, 84, 46, - 28, 29, 52, 4, 5, 6, 37, 75, 32, 37, - 64, 61, 33, 19, 76, 42, 78, 4, 5, 6, - 39, 85, 86, 35, 36, 37, 45, 46, 27, 40, - 78, 41, 93, 48, 49, 83, 1, 43, 2, 53, - 3, 97, 4, 5, 6, 56, 87, 58, 59, 60, - 73, 74, 104, 72, 35, 36, 59, 60, 37, 28, - 79, 84, 46, 106, -27, 54, 55, 103, 77, 68, - 65, 69, 70, 80, 0, 71, 81, -21, 88, 89, - 0, 94, 82, -22, 95, 90, 96, 98, 99, 100, - 108, 107, -24, 102, 101, -25, 105, -28, 24 +static const YYINT sphere_yygindex[] = { 0, + -5, 57, 20, 6, -4, 11, 0, 0, 0, 0, + 0, 162, 0, 0, }; - -static const yytype_int8 yycheck[] = -{ - 1, 2, 3, 20, 4, 0, 10, 2, 20, 7, - 7, 28, 29, 15, 16, 4, 13, 15, 16, 10, - 7, 12, 39, 40, 19, 26, 0, 39, 15, 16, - 3, 4, 33, 14, 15, 16, 53, 54, 7, 56, - 41, 58, 7, 10, 56, 11, 58, 14, 15, 16, - 7, 68, 69, 15, 16, 72, 15, 16, 58, 7, - 72, 7, 79, 15, 16, 65, 8, 7, 10, 7, - 12, 88, 14, 15, 16, 7, 71, 14, 15, 16, - 15, 16, 99, 14, 15, 16, 15, 16, 105, 3, - 4, 15, 16, 6, 7, 4, 4, 98, 9, 5, - 7, 5, 5, 4, -1, 7, 11, 7, 5, 5, - -1, 6, 11, 7, 6, 13, 7, 7, 5, 5, - 9, 105, 7, 6, 17, 7, 7, 7, 2 +#define YYTABLESIZE 275 +static const YYINT sphere_yytable[] = { 27, + 11, 10, 22, 25, 65, 9, 37, 22, 29, 26, + 66, 21, 23, 25, 36, 19, 4, 5, 6, 4, + 5, 6, 46, 49, 33, 11, 11, 11, 30, 11, + 11, 11, 36, 60, 10, 19, 43, 20, 10, 37, + 22, 12, 51, 31, 14, 32, 36, 74, 38, 36, + 63, 60, 27, 19, 10, 20, 10, 56, 10, 82, + 10, 84, 85, 39, 14, 36, 14, 17, 14, 17, + 14, 17, 92, 17, 75, 86, 77, 41, 1, 21, + 2, 96, 3, 13, 4, 5, 6, 18, 40, 18, + 77, 18, 103, 18, 42, 23, 25, 24, 36, 15, + 17, 16, 26, 76, 27, 52, 18, 102, 19, 55, + 57, 58, 59, 71, 34, 35, 5, 6, 28, 29, + 34, 35, 44, 45, 47, 48, 72, 73, 58, 59, + 28, 78, 83, 45, 90, 91, 53, 54, 64, 67, + 68, 69, 79, 89, 70, 100, 87, 88, 1, 93, + 80, 81, 94, 107, 95, 97, 98, 99, 3, 101, + 106, 104, 105, 24, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11, 10, 22, 25, 11, 10, 22, 25, 29, + 26, 37, 0, 29, 26, }; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 8, 10, 12, 14, 15, 16, 19, 20, 21, - 23, 24, 26, 27, 28, 29, 31, 32, 33, 10, - 12, 26, 24, 26, 28, 26, 30, 23, 3, 4, - 4, 0, 7, 7, 24, 15, 16, 21, 22, 7, - 7, 7, 11, 7, 26, 15, 16, 21, 15, 16, - 21, 24, 26, 7, 4, 4, 7, 22, 14, 15, - 16, 21, 22, 25, 26, 7, 7, 13, 5, 5, - 5, 7, 14, 15, 16, 21, 22, 9, 22, 4, - 4, 11, 11, 23, 15, 21, 21, 24, 5, 5, - 13, 15, 16, 21, 6, 6, 7, 21, 7, 5, - 5, 17, 6, 26, 21, 7, 6, 25, 9 +static const YYINT sphere_yycheck[] = { 4, + 0, 0, 0, 0, 261, 0, 0, 2, 0, 0, + 267, 1, 2, 3, 20, 264, 268, 269, 270, 268, + 269, 270, 28, 29, 19, 261, 261, 263, 258, 265, + 265, 267, 38, 39, 261, 264, 26, 261, 265, 20, + 261, 265, 32, 261, 265, 261, 52, 53, 261, 55, + 40, 57, 57, 264, 261, 266, 263, 38, 265, 64, + 267, 67, 68, 261, 261, 71, 263, 261, 265, 263, + 267, 265, 78, 267, 55, 70, 57, 265, 262, 261, + 264, 87, 266, 265, 268, 269, 270, 261, 261, 263, + 71, 265, 98, 267, 261, 261, 261, 261, 104, 265, + 265, 265, 261, 263, 261, 261, 265, 97, 265, 261, + 268, 269, 270, 268, 269, 270, 269, 270, 257, 258, + 269, 270, 269, 270, 269, 270, 269, 270, 269, 270, + 257, 258, 269, 270, 269, 270, 258, 258, 261, 259, + 259, 259, 258, 267, 261, 271, 259, 259, 0, 260, + 265, 265, 260, 263, 261, 261, 259, 259, 0, 260, + 104, 261, 260, 2, -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, -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, -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, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 261, 261, 261, 261, 265, 265, 265, 265, 261, + 261, 265, -1, 265, 265, }; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 18, 19, 19, 20, 20, 20, 20, 20, 20, - 20, 21, 21, 22, 22, 22, 22, 22, 22, 22, - 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 24, 24, 25, 25, 26, 27, 28, 28, - 29, 30, 30, 31, 32, 33, 33 +#define YYFINAL 7 +#ifndef YYDEBUG +#define YYDEBUG 0 +#endif +#define YYMAXTOKEN 271 +#define YYUNDFTOKEN 288 +#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a)) +#if YYDEBUG +static const char *const sphere_yyname[] = { + +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"HOUR","DEG","MIN","SEC","COMMA", +"OPENCIRC","CLOSECIRC","OPENPOINT","CLOSEPOINT","OPENARR","CLOSEARR","SIGN", +"INT","FLOAT","EULERAXIS",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"illegal-symbol", }; +static const char *const sphere_yyrule[] = { +"$accept : commands", +"commands :", +"commands : command", +"command : spherepoint", +"command : spherecircle", +"command : sphereline", +"command : eulertrans", +"command : spherepath", +"command : sphereellipse", +"command : spherebox", +"number : FLOAT", +"number : INT", +"angle_lat_us : number", +"angle_lat_us : FLOAT DEG", +"angle_lat_us : INT DEG", +"angle_lat_us : INT DEG number", +"angle_lat_us : INT DEG FLOAT MIN", +"angle_lat_us : INT DEG INT MIN", +"angle_lat_us : INT DEG INT MIN number", +"angle_lat_us : INT DEG INT MIN number SEC", +"angle_long_us : number", +"angle_long_us : FLOAT DEG", +"angle_long_us : INT DEG", +"angle_long_us : INT DEG number", +"angle_long_us : INT DEG FLOAT MIN", +"angle_long_us : INT DEG INT MIN", +"angle_long_us : INT DEG INT MIN number", +"angle_long_us : INT DEG INT MIN number SEC", +"angle_long_us : INT HOUR number", +"angle_long_us : INT HOUR INT MIN number", +"angle_long_us : INT HOUR INT MIN number SEC", +"angle_long : angle_long_us", +"angle_long : SIGN angle_long_us", +"angle_lat : angle_lat_us", +"angle_lat : SIGN angle_lat_us", +"spherepoint : OPENPOINT angle_long COMMA angle_lat CLOSEPOINT", +"spherecircle : OPENCIRC spherepoint COMMA angle_lat_us CLOSECIRC", +"eulertrans : angle_long COMMA angle_long COMMA angle_long", +"eulertrans : angle_long COMMA angle_long COMMA angle_long COMMA EULERAXIS", +"sphereline : OPENPOINT eulertrans CLOSEPOINT COMMA angle_long_us", +"spherepointlist : spherepoint COMMA", +"spherepointlist : spherepointlist spherepoint COMMA", +"spherepath : OPENARR spherepointlist spherepoint CLOSEARR", +"sphereellipse : OPENCIRC OPENARR angle_lat_us COMMA angle_lat_us CLOSEARR COMMA spherepoint COMMA angle_lat CLOSECIRC", +"spherebox : OPENPOINT spherepoint COMMA spherepoint CLOSEPOINT", +"spherebox : spherepoint COMMA spherepoint", - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 3, 4, 4, 5, - 6, 1, 2, 2, 3, 4, 4, 5, 6, 3, - 5, 6, 1, 2, 1, 2, 5, 5, 5, 7, - 5, 2, 3, 4, 11, 5, 3 }; +#endif - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#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) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ #if YYDEBUG +int yydebug; +#endif -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +int yyerrflag; +int yychar; +YYSTYPE yyval; +YYSTYPE yylval; +int yynerrs; -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +/* define the initial stack-sizes */ +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 10000 +#define YYMAXDEPTH 10000 +#endif #endif +#define YYINITSTACKSIZE 200 -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +typedef struct { + unsigned stacksize; + YYINT *s_base; + YYINT *s_mark; + YYINT *s_last; + YYSTYPE *l_base; + YYSTYPE *l_mark; +} YYSTACKDATA; +/* variables for the parser stack */ +static YYSTACKDATA yystack; +#if YYDEBUG +#include /* needed for printf */ +#endif -/*-----------------------------------. -| Print this symbol's value on YYO. | -`-----------------------------------*/ +#include /* needed for malloc, etc */ +#include /* needed for memset */ -static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +/* allocate initial stack or double stack size, up to YYMAXDEPTH */ +static int yygrowstack(YYSTACKDATA *data) { - FILE *yyoutput = yyo; - YYUSE (yyoutput); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); -# endif - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END + int i; + unsigned newsize; + YYINT *newss; + YYSTYPE *newvs; + + if ((newsize = data->stacksize) == 0) + newsize = YYINITSTACKSIZE; + else if (newsize >= YYMAXDEPTH) + return YYENOMEM; + else if ((newsize *= 2) > YYMAXDEPTH) + newsize = YYMAXDEPTH; + + i = (int) (data->s_mark - data->s_base); + newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss)); + if (newss == 0) + return YYENOMEM; + + data->s_base = newss; + data->s_mark = newss + i; + + newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs)); + if (newvs == 0) + return YYENOMEM; + + data->l_base = newvs; + data->l_mark = newvs + i; + + data->stacksize = newsize; + data->s_last = data->s_base + newsize - 1; + return 0; } - -/*---------------------------. -| Print this symbol on YYO. | -`---------------------------*/ - -static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +#if YYPURE || defined(YY_NO_LEAKS) +static void yyfreestack(YYSTACKDATA *data) { - YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyo, yytype, yyvaluep); - YYFPRINTF (yyo, ")"); + free(data->s_base); + free(data->l_base); + memset(data, 0, sizeof(*data)); } +#else +#define yyfreestack(data) /* nothing */ +#endif -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +int +YYPARSE_DECL() { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ + int yym, yyn, yystate; +#if YYDEBUG + const char *yys; -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) -{ - unsigned long yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) + if ((yys = getenv("YYDEBUG")) != 0) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - ); - YYFPRINTF (stderr, "\n"); + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 #endif -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ + yym = 0; + yyn = 0; + yynerrs = 0; + yyerrflag = 0; + yychar = YYEMPTY; + yystate = 0; -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 +#if YYPURE + memset(&yystack, 0, sizeof(yystack)); #endif + if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; + yystack.s_mark = yystack.s_base; + yystack.l_mark = yystack.l_base; + yystate = 0; + *yystack.s_mark = 0; -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') +yyloop: + if ((yyn = yydefred[yystate]) != 0) goto yyreduce; + if (yychar < 0) { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) + yychar = YYLEX; + if (yychar < 0) yychar = YYEOF; +#if YYDEBUG + if (yydebug) { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); } +#endif } - - switch (yycount) - { -# define YYCASE_(N, S) \ - 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")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - - if (*yymsg_alloc < yysize) + if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar) { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -{ - YYUSE (yyvaluep); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (void) -{ - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); #endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - - -/*------------------------------------------------------------. -| yynewstate -- push a new state, which is found in yystate. | -`------------------------------------------------------------*/ -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; - - if (yyss + yystacksize - 1 <= yyssp) -#if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; -#else + if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; + yystate = yytable[yyn]; + *++yystack.s_mark = yytable[yyn]; + *++yystack.l_mark = yylval; + yychar = YYEMPTY; + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar) { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); - -# if defined yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + yyn = yytable[yyn]; + goto yyreduce; } -#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - - 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. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; + if (yyerrflag != 0) goto yyinrecovery; - /* Not known => get a lookahead token if don't already have one. */ + YYERROR_CALL("syntax error"); - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (); - } + goto yyerrlab; /* redundant goto avoids 'unused label' warning */ +yyerrlab: + ++yynerrs; - if (yychar <= YYEOF) +yyinrecovery: + if (yyerrflag < 3) { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + yyerrflag = 3; + for (;;) + { + if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]); +#endif + if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; + yystate = yytable[yyn]; + *++yystack.s_mark = yytable[yyn]; + *++yystack.l_mark = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yystack.s_mark); +#endif + if (yystack.s_mark <= yystack.s_base) goto yyabort; + --yystack.s_mark; + --yystack.l_mark; + } + } } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) + else { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; + if (yychar == YYEOF) goto yyabort; +#if YYDEBUG + if (yydebug) + { + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = YYEMPTY; + goto yyloop; } - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- do a reduction. | -`-----------------------------*/ yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + if (yym > 0) + yyval = yystack.l_mark[1-yym]; + else + memset(&yyval, 0, sizeof yyval); - YY_REDUCE_PRINT (yyn); - switch (yyn) + switch (yyn) { - case 4: +case 3: #line 70 "sparse.y" - { set_spheretype( STYPE_POINT ); } -#line 1355 "sparse.c" - break; - - case 5: + { set_spheretype( STYPE_POINT ); } +break; +case 4: #line 71 "sparse.y" - { set_spheretype( STYPE_CIRCLE ); } -#line 1361 "sparse.c" - break; - - case 6: + { set_spheretype( STYPE_CIRCLE ); } +break; +case 5: #line 72 "sparse.y" - { set_spheretype( STYPE_LINE ); } -#line 1367 "sparse.c" - break; - - case 7: + { set_spheretype( STYPE_LINE ); } +break; +case 6: #line 73 "sparse.y" - { set_spheretype( STYPE_EULER ); } -#line 1373 "sparse.c" - break; - - case 8: + { set_spheretype( STYPE_EULER ); } +break; +case 7: #line 74 "sparse.y" - { set_spheretype( STYPE_PATH ); } -#line 1379 "sparse.c" - break; - - case 9: + { set_spheretype( STYPE_PATH ); } +break; +case 8: #line 75 "sparse.y" - { set_spheretype( STYPE_ELLIPSE ); } -#line 1385 "sparse.c" - break; - - case 10: + { set_spheretype( STYPE_ELLIPSE ); } +break; +case 9: #line 76 "sparse.y" - { set_spheretype( STYPE_BOX ); } -#line 1391 "sparse.c" - break; - - case 11: + { set_spheretype( STYPE_BOX ); } +break; +case 10: #line 81 "sparse.y" - { (yyval.d) = (yyvsp[0].d); } -#line 1397 "sparse.c" - break; - - case 12: + { yyval.d = yystack.l_mark[0].d; } +break; +case 11: #line 82 "sparse.y" - { (yyval.d) = (yyvsp[0].i); } -#line 1403 "sparse.c" - break; - - case 13: + { yyval.d = yystack.l_mark[0].i; } +break; +case 12: #line 87 "sparse.y" - { (yyval.i) = set_angle(0, (yyvsp[0].d) ); } -#line 1409 "sparse.c" - break; - - case 14: + { yyval.i = set_angle(0, yystack.l_mark[0].d ); } +break; +case 13: #line 88 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].d), 0, 0) ); } -#line 1415 "sparse.c" - break; - - case 15: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-1].d, 0, 0) ); } +break; +case 14: #line 89 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].i), 0, 0) ); } -#line 1421 "sparse.c" - break; - - case 16: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-1].i, 0, 0) ); } +break; +case 15: #line 90 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-2].i), (yyvsp[0].d), 0) ); } -#line 1427 "sparse.c" - break; - - case 17: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-2].i, yystack.l_mark[0].d, 0) ); } +break; +case 16: #line 91 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].d), 0) ); } -#line 1433 "sparse.c" - break; - - case 18: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-3].i, yystack.l_mark[-1].d, 0) ); } +break; +case 17: #line 92 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].i), 0) ); } -#line 1439 "sparse.c" - break; - - case 19: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-3].i, yystack.l_mark[-1].i, 0) ); } +break; +case 18: #line 93 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d)) ); } -#line 1445 "sparse.c" - break; - - case 20: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-4].i, yystack.l_mark[-2].i, yystack.l_mark[0].d) ); } +break; +case 19: #line 94 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d)) ); } -#line 1451 "sparse.c" - break; - - case 21: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-5].i, yystack.l_mark[-3].i, yystack.l_mark[-1].d) ); } +break; +case 20: #line 99 "sparse.y" - { (yyval.i) = set_angle(0, (yyvsp[0].d)); } -#line 1457 "sparse.c" - break; - - case 22: + { yyval.i = set_angle(0, yystack.l_mark[0].d); } +break; +case 21: #line 100 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].d), 0, 0)); } -#line 1463 "sparse.c" - break; - - case 23: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-1].d, 0, 0)); } +break; +case 22: #line 101 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-1].i), 0, 0)); } -#line 1469 "sparse.c" - break; - - case 24: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-1].i, 0, 0)); } +break; +case 23: #line 102 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-2].i), (yyvsp[0].d), 0)); } -#line 1475 "sparse.c" - break; - - case 25: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-2].i, yystack.l_mark[0].d, 0)); } +break; +case 24: #line 103 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].d), 0)); } -#line 1481 "sparse.c" - break; - - case 26: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-3].i, yystack.l_mark[-1].d, 0)); } +break; +case 25: #line 104 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-3].i), (yyvsp[-1].i), 0)); } -#line 1487 "sparse.c" - break; - - case 27: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-3].i, yystack.l_mark[-1].i, 0)); } +break; +case 26: #line 105 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d))); } -#line 1493 "sparse.c" - break; - - case 28: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-4].i, yystack.l_mark[-2].i, yystack.l_mark[0].d)); } +break; +case 27: #line 106 "sparse.y" - { (yyval.i) = set_angle(1, human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d))); } -#line 1499 "sparse.c" - break; - - case 29: + { yyval.i = set_angle(1, human2dec(yystack.l_mark[-5].i, yystack.l_mark[-3].i, yystack.l_mark[-1].d)); } +break; +case 28: #line 107 "sparse.y" - { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-2].i), (yyvsp[0].d), 0)); } -#line 1505 "sparse.c" - break; - - case 30: + { yyval.i = set_angle(1, 15 * human2dec(yystack.l_mark[-2].i, yystack.l_mark[0].d, 0)); } +break; +case 29: #line 108 "sparse.y" - { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].d))); } -#line 1511 "sparse.c" - break; - - case 31: + { yyval.i = set_angle(1, 15 * human2dec(yystack.l_mark[-4].i, yystack.l_mark[-2].i, yystack.l_mark[0].d)); } +break; +case 30: #line 109 "sparse.y" - { (yyval.i) = set_angle(1, 15 * human2dec((yyvsp[-5].i), (yyvsp[-3].i), (yyvsp[-1].d))); } -#line 1517 "sparse.c" - break; - - case 32: + { yyval.i = set_angle(1, 15 * human2dec(yystack.l_mark[-5].i, yystack.l_mark[-3].i, yystack.l_mark[-1].d)); } +break; +case 31: #line 114 "sparse.y" - { (yyval.i) = set_angle_sign((yyvsp[0].i), 1); } -#line 1523 "sparse.c" - break; - - case 33: + { yyval.i = set_angle_sign(yystack.l_mark[0].i, 1); } +break; +case 32: #line 115 "sparse.y" - { (yyval.i) = set_angle_sign((yyvsp[0].i), (yyvsp[-1].i)); } -#line 1529 "sparse.c" - break; - - case 34: + { yyval.i = set_angle_sign(yystack.l_mark[0].i, yystack.l_mark[-1].i); } +break; +case 33: #line 120 "sparse.y" - { (yyval.i) = set_angle_sign((yyvsp[0].i), 1); } -#line 1535 "sparse.c" - break; - - case 35: + { yyval.i = set_angle_sign(yystack.l_mark[0].i, 1); } +break; +case 34: #line 121 "sparse.y" - { (yyval.i) = set_angle_sign((yyvsp[0].i), (yyvsp[-1].i)); } -#line 1541 "sparse.c" - break; - - case 36: + { yyval.i = set_angle_sign(yystack.l_mark[0].i, yystack.l_mark[-1].i); } +break; +case 35: #line 128 "sparse.y" - { - (yyval.i) = set_point((yyvsp[-3].i), (yyvsp[-1].i)); + { + yyval.i = set_point(yystack.l_mark[-3].i, yystack.l_mark[-1].i); } -#line 1549 "sparse.c" - break; - - case 37: +break; +case 36: #line 136 "sparse.y" - { - set_circle((yyvsp[-3].i), (yyvsp[-1].i)); + { + set_circle(yystack.l_mark[-3].i, yystack.l_mark[-1].i); } -#line 1557 "sparse.c" - break; - - case 38: +break; +case 37: #line 144 "sparse.y" - { - set_euler((yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].i), "ZXZ"); + { + set_euler(yystack.l_mark[-4].i, yystack.l_mark[-2].i, yystack.l_mark[0].i, "ZXZ"); } -#line 1565 "sparse.c" - break; - - case 39: +break; +case 38: #line 148 "sparse.y" - { - set_euler((yyvsp[-6].i), (yyvsp[-4].i), (yyvsp[-2].i), (yyvsp[0].c)); + { + set_euler(yystack.l_mark[-6].i, yystack.l_mark[-4].i, yystack.l_mark[-2].i, yystack.l_mark[0].c); } -#line 1573 "sparse.c" - break; - - case 40: +break; +case 39: #line 156 "sparse.y" - { - set_line ((yyvsp[0].i)); + { + set_line (yystack.l_mark[0].i); } -#line 1581 "sparse.c" - break; - - case 43: +break; +case 42: #line 168 "sparse.y" - { } -#line 1587 "sparse.c" - break; - - case 44: + { } +break; +case 43: #line 174 "sparse.y" - { - set_ellipse((yyvsp[-8].i), (yyvsp[-6].i), (yyvsp[-3].i), (yyvsp[-1].i)); + { + set_ellipse(yystack.l_mark[-8].i, yystack.l_mark[-6].i, yystack.l_mark[-3].i, yystack.l_mark[-1].i); } -#line 1595 "sparse.c" - break; - - case 45: +break; +case 44: #line 181 "sparse.y" - { } -#line 1601 "sparse.c" - break; - - case 46: + { } +break; +case 45: #line 182 "sparse.y" - { } -#line 1607 "sparse.c" - break; - - -#line 1611 "sparse.c" - - default: break; + { } +break; +#line 800 "sparse.c" } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* 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]); - } - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) + yystack.s_mark -= yym; + yystate = *yystack.s_mark; + yystack.l_mark -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); #endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) + yystate = YYFINAL; + *++yystack.s_mark = YYFINAL; + *++yystack.l_mark = yyval; + if (yychar < 0) { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| 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; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yychar = YYLEX; + if (yychar < 0) yychar = YYEOF; +#if YYDEBUG + if (yydebug) { - yyn = yytable[yyn]; - if (0 < yyn) - break; + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); } +#endif } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); + if (yychar == YYEOF) goto yyaccept; + goto yyloop; } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ + if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yystack.s_mark, yystate); #endif + if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; + *++yystack.s_mark = (YYINT) yystate; + *++yystack.l_mark = yyval; + goto yyloop; +yyoverflow: + YYERROR_CALL("yacc stack overflow"); -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; +yyabort: + yyfreestack(&yystack); + return (1); + +yyaccept: + yyfreestack(&yystack); + return (0); } diff --git a/sparse.h b/sparse.h index 032b5fd..78d398d 100644 --- a/sparse.h +++ b/sparse.h @@ -1,109 +1,28 @@ -/* A Bison parser, made by GNU Bison 3.4.2. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 - the Free Software Foundation, either version 3 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, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - 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_SPHERE_YY_SPARSE_H_INCLUDED -# define YY_SPHERE_YY_SPARSE_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 +#define HOUR 257 +#define DEG 258 +#define MIN 259 +#define SEC 260 +#define COMMA 261 +#define OPENCIRC 262 +#define CLOSECIRC 263 +#define OPENPOINT 264 +#define CLOSEPOINT 265 +#define OPENARR 266 +#define CLOSEARR 267 +#define SIGN 268 +#define INT 269 +#define FLOAT 270 +#define EULERAXIS 271 +#ifdef YYSTYPE +#undef YYSTYPE_IS_DECLARED +#define YYSTYPE_IS_DECLARED 1 #endif -#if YYDEBUG -extern int sphere_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - HOUR = 258, - DEG = 259, - MIN = 260, - SEC = 261, - COMMA = 262, - OPENCIRC = 263, - CLOSECIRC = 264, - OPENPOINT = 265, - CLOSEPOINT = 266, - OPENARR = 267, - CLOSEARR = 268, - SIGN = 269, - INT = 270, - FLOAT = 271, - EULERAXIS = 272 - }; -#endif -/* Tokens. */ -#define HOUR 258 -#define DEG 259 -#define MIN 260 -#define SEC 261 -#define COMMA 262 -#define OPENCIRC 263 -#define CLOSECIRC 264 -#define OPENPOINT 265 -#define CLOSEPOINT 266 -#define OPENARR 267 -#define CLOSEARR 268 -#define SIGN 269 -#define INT 270 -#define FLOAT 271 -#define EULERAXIS 272 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -union YYSTYPE -{ -#line 41 "sparse.y" - +#ifndef YYSTYPE_IS_DECLARED +#define YYSTYPE_IS_DECLARED 1 +typedef union { int i; double d; char c[3]; - -#line 97 "sparse.h" - -}; -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - +} YYSTYPE; +#endif /* !YYSTYPE_IS_DECLARED */ extern YYSTYPE sphere_yylval; - -int sphere_yyparse (void); - -#endif /* !YY_SPHERE_YY_SPARSE_H_INCLUDED */ diff --git a/sscan.c b/sscan.c index 3d904c6..d90a3dc 100644 --- a/sscan.c +++ b/sscan.c @@ -1,6 +1,6 @@ -#line 2 "sscan.c" +#line 1 "sscan.c" -#line 4 "sscan.c" +#line 3 "sscan.c" #define YY_INT_ALIGNED short int @@ -745,8 +745,8 @@ void sphere_flush_scanner_buffer(void) { YY_FLUSH_BUFFER; } +#line 748 "sscan.c" #line 749 "sscan.c" -#line 750 "sscan.c" #define INITIAL 0 @@ -963,7 +963,7 @@ YY_DECL { #line 35 "sscan.l" -#line 967 "sscan.c" +#line 966 "sscan.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1117,7 +1117,7 @@ YY_RULE_SETUP #line 55 "sscan.l" ECHO; YY_BREAK -#line 1121 "sscan.c" +#line 1120 "sscan.c" case YY_STATE_EOF(INITIAL): yyterminate(); From a2edbe286a0f7572e2a02b8956eb28df5b6ac15d Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Mon, 6 Jun 2022 17:13:06 +0300 Subject: [PATCH 5/5] fix compiler warning (clang12 on MacOS) --- process_moc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/process_moc.cpp b/process_moc.cpp index b388cfb..b91c583 100644 --- a/process_moc.cpp +++ b/process_moc.cpp @@ -280,11 +280,12 @@ struct moc_input size_t options_bytes; size_t options_size; layout_vec layout; - int order = 0; + int order; std::string s; moc_input() : options_bytes(0), options_size(0) { + order = 0; layout.reserve(5); } void dump()