From 094bec2450c6dae7d29678831c93aa7cb121b0e3 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Tue, 20 Jun 2023 14:11:57 +0300 Subject: [PATCH 1/3] Source files are moved into src subdirectory. --- Makefile | 18 +++++++++--------- box.c => src/box.c | 0 box.h => src/box.h | 0 circle.c => src/circle.c | 0 circle.h => src/circle.h | 0 ellipse.c => src/ellipse.c | 0 ellipse.h => src/ellipse.h | 0 epochprop.c => src/epochprop.c | 0 epochprop.h => src/epochprop.h | 0 euler.c => src/euler.c | 0 euler.h => src/euler.h | 0 gist.c => src/gist.c | 0 gist.h => src/gist.h | 0 gnomo.c => src/gnomo.c | 0 gnomo.h => src/gnomo.h | 0 gq_cache.c => src/gq_cache.c | 0 healpix.c => src/healpix.c | 0 key.c => src/key.c | 0 key.h => src/key.h | 0 line.c => src/line.c | 0 line.h => src/line.h | 0 moc.c => src/moc.c | 0 output.c => src/output.c | 0 path.c => src/path.c | 0 path.h => src/path.h | 0 pg_sphere.h => src/pg_sphere.h | 0 pgs_chealpix.h => src/pgs_chealpix.h | 0 pgs_healpix.h => src/pgs_healpix.h | 0 pgs_moc.h => src/pgs_moc.h | 0 pgs_process_moc.h => src/pgs_process_moc.h | 0 pgs_util.h => src/pgs_util.h | 0 point.c => src/point.c | 0 point.h => src/point.h | 0 polygon.c => src/polygon.c | 0 polygon.h => src/polygon.h | 0 process_moc.cpp => src/process_moc.cpp | 0 sbuffer.c => src/sbuffer.c | 0 sbuffer.h => src/sbuffer.h | 0 sparse.c => src/sparse.c | 0 sparse.h => src/sparse.h | 0 sparse.y => src/sparse.y | 0 sscan.c => src/sscan.c | 0 sscan.l => src/sscan.l | 0 types.h => src/types.h | 0 vector3d.c => src/vector3d.c | 0 vector3d.h => src/vector3d.h | 0 46 files changed, 9 insertions(+), 9 deletions(-) rename box.c => src/box.c (100%) rename box.h => src/box.h (100%) rename circle.c => src/circle.c (100%) rename circle.h => src/circle.h (100%) rename ellipse.c => src/ellipse.c (100%) rename ellipse.h => src/ellipse.h (100%) rename epochprop.c => src/epochprop.c (100%) rename epochprop.h => src/epochprop.h (100%) rename euler.c => src/euler.c (100%) rename euler.h => src/euler.h (100%) rename gist.c => src/gist.c (100%) rename gist.h => src/gist.h (100%) rename gnomo.c => src/gnomo.c (100%) rename gnomo.h => src/gnomo.h (100%) rename gq_cache.c => src/gq_cache.c (100%) rename healpix.c => src/healpix.c (100%) rename key.c => src/key.c (100%) rename key.h => src/key.h (100%) rename line.c => src/line.c (100%) rename line.h => src/line.h (100%) rename moc.c => src/moc.c (100%) rename output.c => src/output.c (100%) rename path.c => src/path.c (100%) rename path.h => src/path.h (100%) rename pg_sphere.h => src/pg_sphere.h (100%) rename pgs_chealpix.h => src/pgs_chealpix.h (100%) rename pgs_healpix.h => src/pgs_healpix.h (100%) rename pgs_moc.h => src/pgs_moc.h (100%) rename pgs_process_moc.h => src/pgs_process_moc.h (100%) rename pgs_util.h => src/pgs_util.h (100%) rename point.c => src/point.c (100%) rename point.h => src/point.h (100%) rename polygon.c => src/polygon.c (100%) rename polygon.h => src/polygon.h (100%) rename process_moc.cpp => src/process_moc.cpp (100%) rename sbuffer.c => src/sbuffer.c (100%) rename sbuffer.h => src/sbuffer.h (100%) rename sparse.c => src/sparse.c (100%) rename sparse.h => src/sparse.h (100%) rename sparse.y => src/sparse.y (100%) rename sscan.c => src/sscan.c (100%) rename sscan.l => src/sscan.l (100%) rename types.h => src/types.h (100%) rename vector3d.c => src/vector3d.c (100%) rename vector3d.h => src/vector3d.h (100%) diff --git a/Makefile b/Makefile index ade3a5f..7926e5a 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,11 @@ PGSPHERE_VERSION = 1.2.1 SRC_DIR = $(shell basename $(shell pwd)) MODULE_big = pg_sphere -OBJS = sscan.o sparse.o sbuffer.o vector3d.o point.o \ - euler.o circle.o line.o ellipse.o polygon.o \ - path.o box.o output.o gq_cache.o gist.o key.o \ - gnomo.o healpix.o moc.o process_moc.o healpix_bare/healpix_bare.o \ - epochprop.o +OBJS = src/sscan.o src/sparse.o src/sbuffer.o src/vector3d.o src/point.o \ + src/euler.o src/circle.o src/line.o src/ellipse.o src/polygon.o \ + src/path.o src/box.o src/output.o src/gq_cache.o src/gist.o src/key.o \ + src/gnomo.o src/healpix.o src/moc.o src/process_moc.o healpix_bare/healpix_bare.o \ + src/epochprop.o EXTENSION = pg_sphere RELEASE_SQL = $(EXTENSION)--$(PGSPHERE_VERSION).sql @@ -208,16 +208,16 @@ endif # end of local stuff -sscan.o : sparse.c +src/sscan.o : src/sparse.c -sparse.c: sparse.y +src/sparse.c: src/sparse.y ifdef YACC - $(YACC) -d $(YFLAGS) -p sphere_yy -o sparse.c $< + $(YACC) -d $(YFLAGS) -p sphere_yy -o $@ $< else @$(missing) bison $< $@ endif -sscan.c : sscan.l +src/sscan.c : src/sscan.l ifdef FLEX $(FLEX) $(FLEXFLAGS) -Psphere -o$@ $< else diff --git a/box.c b/src/box.c similarity index 100% rename from box.c rename to src/box.c diff --git a/box.h b/src/box.h similarity index 100% rename from box.h rename to src/box.h diff --git a/circle.c b/src/circle.c similarity index 100% rename from circle.c rename to src/circle.c diff --git a/circle.h b/src/circle.h similarity index 100% rename from circle.h rename to src/circle.h diff --git a/ellipse.c b/src/ellipse.c similarity index 100% rename from ellipse.c rename to src/ellipse.c diff --git a/ellipse.h b/src/ellipse.h similarity index 100% rename from ellipse.h rename to src/ellipse.h diff --git a/epochprop.c b/src/epochprop.c similarity index 100% rename from epochprop.c rename to src/epochprop.c diff --git a/epochprop.h b/src/epochprop.h similarity index 100% rename from epochprop.h rename to src/epochprop.h diff --git a/euler.c b/src/euler.c similarity index 100% rename from euler.c rename to src/euler.c diff --git a/euler.h b/src/euler.h similarity index 100% rename from euler.h rename to src/euler.h diff --git a/gist.c b/src/gist.c similarity index 100% rename from gist.c rename to src/gist.c diff --git a/gist.h b/src/gist.h similarity index 100% rename from gist.h rename to src/gist.h diff --git a/gnomo.c b/src/gnomo.c similarity index 100% rename from gnomo.c rename to src/gnomo.c diff --git a/gnomo.h b/src/gnomo.h similarity index 100% rename from gnomo.h rename to src/gnomo.h diff --git a/gq_cache.c b/src/gq_cache.c similarity index 100% rename from gq_cache.c rename to src/gq_cache.c diff --git a/healpix.c b/src/healpix.c similarity index 100% rename from healpix.c rename to src/healpix.c diff --git a/key.c b/src/key.c similarity index 100% rename from key.c rename to src/key.c diff --git a/key.h b/src/key.h similarity index 100% rename from key.h rename to src/key.h diff --git a/line.c b/src/line.c similarity index 100% rename from line.c rename to src/line.c diff --git a/line.h b/src/line.h similarity index 100% rename from line.h rename to src/line.h diff --git a/moc.c b/src/moc.c similarity index 100% rename from moc.c rename to src/moc.c diff --git a/output.c b/src/output.c similarity index 100% rename from output.c rename to src/output.c diff --git a/path.c b/src/path.c similarity index 100% rename from path.c rename to src/path.c diff --git a/path.h b/src/path.h similarity index 100% rename from path.h rename to src/path.h diff --git a/pg_sphere.h b/src/pg_sphere.h similarity index 100% rename from pg_sphere.h rename to src/pg_sphere.h diff --git a/pgs_chealpix.h b/src/pgs_chealpix.h similarity index 100% rename from pgs_chealpix.h rename to src/pgs_chealpix.h diff --git a/pgs_healpix.h b/src/pgs_healpix.h similarity index 100% rename from pgs_healpix.h rename to src/pgs_healpix.h diff --git a/pgs_moc.h b/src/pgs_moc.h similarity index 100% rename from pgs_moc.h rename to src/pgs_moc.h diff --git a/pgs_process_moc.h b/src/pgs_process_moc.h similarity index 100% rename from pgs_process_moc.h rename to src/pgs_process_moc.h diff --git a/pgs_util.h b/src/pgs_util.h similarity index 100% rename from pgs_util.h rename to src/pgs_util.h diff --git a/point.c b/src/point.c similarity index 100% rename from point.c rename to src/point.c diff --git a/point.h b/src/point.h similarity index 100% rename from point.h rename to src/point.h diff --git a/polygon.c b/src/polygon.c similarity index 100% rename from polygon.c rename to src/polygon.c diff --git a/polygon.h b/src/polygon.h similarity index 100% rename from polygon.h rename to src/polygon.h diff --git a/process_moc.cpp b/src/process_moc.cpp similarity index 100% rename from process_moc.cpp rename to src/process_moc.cpp diff --git a/sbuffer.c b/src/sbuffer.c similarity index 100% rename from sbuffer.c rename to src/sbuffer.c diff --git a/sbuffer.h b/src/sbuffer.h similarity index 100% rename from sbuffer.h rename to src/sbuffer.h diff --git a/sparse.c b/src/sparse.c similarity index 100% rename from sparse.c rename to src/sparse.c diff --git a/sparse.h b/src/sparse.h similarity index 100% rename from sparse.h rename to src/sparse.h diff --git a/sparse.y b/src/sparse.y similarity index 100% rename from sparse.y rename to src/sparse.y diff --git a/sscan.c b/src/sscan.c similarity index 100% rename from sscan.c rename to src/sscan.c diff --git a/sscan.l b/src/sscan.l similarity index 100% rename from sscan.l rename to src/sscan.l diff --git a/types.h b/src/types.h similarity index 100% rename from types.h rename to src/types.h diff --git a/vector3d.c b/src/vector3d.c similarity index 100% rename from vector3d.c rename to src/vector3d.c diff --git a/vector3d.h b/src/vector3d.h similarity index 100% rename from vector3d.h rename to src/vector3d.h From fb6e62d3fac7039e80f29d5e93b62c179f960bb9 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Tue, 20 Jun 2023 16:00:33 +0300 Subject: [PATCH 2/3] Angled braces in #include statement were replaced by quotes. --- src/epochprop.c | 2 +- src/gnomo.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/epochprop.c b/src/epochprop.c index 4c7af21..ab9abc8 100644 --- a/src/epochprop.c +++ b/src/epochprop.c @@ -8,7 +8,7 @@ Transformation: Rigorous Treatment'; cf. */ #include -#include +#include "pgs_util.h" #include "point.h" #include "epochprop.h" diff --git a/src/gnomo.c b/src/gnomo.c index c4c554b..a13c8dc 100644 --- a/src/gnomo.c +++ b/src/gnomo.c @@ -1,8 +1,8 @@ #include #include -#include -#include /* SPoint from pgsphere */ +#include "gnomo.h" +#include "point.h" /* SPoint from pgsphere */ #include From 9b1153c84d64b051d16f15a2771afc58eeeacf66 Mon Sep 17 00:00:00 2001 From: Vitaly Davydov Date: Wed, 21 Jun 2023 22:39:50 +0300 Subject: [PATCH 3/3] Wrapped long line. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7926e5a..bc82eb4 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ SRC_DIR = $(shell basename $(shell pwd)) MODULE_big = pg_sphere OBJS = src/sscan.o src/sparse.o src/sbuffer.o src/vector3d.o src/point.o \ src/euler.o src/circle.o src/line.o src/ellipse.o src/polygon.o \ - src/path.o src/box.o src/output.o src/gq_cache.o src/gist.o src/key.o \ - src/gnomo.o src/healpix.o src/moc.o src/process_moc.o healpix_bare/healpix_bare.o \ - src/epochprop.o + src/path.o src/box.o src/output.o src/gq_cache.o src/gist.o \ + src/key.o src/gnomo.o src/healpix.o src/moc.o src/process_moc.o \ + healpix_bare/healpix_bare.o src/epochprop.o EXTENSION = pg_sphere RELEASE_SQL = $(EXTENSION)--$(PGSPHERE_VERSION).sql