From 2670a6706d5e2c7a6ade0f0987b6fabeb3ca1508 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Fri, 30 Jan 2009 19:34:50 +0200 Subject: [PATCH] Rename files and fix includes according to coding styles --- champlain/Makefile.am | 88 ++++++++++--------- ...champlaindefines.h => champlain-defines.h} | 2 +- .../{champlainlayer.c => champlain-layer.c} | 5 +- .../{champlainlayer.h => champlain-layer.h} | 3 +- champlain/{map.c => champlain-map.c} | 6 +- champlain/{map.h => champlain-map.h} | 8 +- .../{champlainmarker.c => champlain-marker.c} | 13 +-- .../{champlainmarker.h => champlain-marker.h} | 3 +- ...champlainprivate.h => champlain-private.h} | 0 champlain/{tile.c => champlain-tile.c} | 7 +- champlain/{tile.h => champlain-tile.h} | 3 +- .../{champlainview.c => champlain-view.c} | 13 +-- .../{champlainview.h => champlain-view.h} | 5 +- .../{zoomlevel.c => champlain-zoom-level.c} | 8 +- .../{zoomlevel.h => champlain-zoom-level.h} | 3 +- champlain/champlain.h | 8 +- champlain/sources/debugmap.h | 2 +- champlain/sources/googlemap.c | 4 +- champlain/sources/googlemap.h | 2 +- champlain/sources/googlesat.c | 6 +- champlain/sources/googlesat.h | 2 +- champlain/sources/googleterrain.c | 6 +- champlain/sources/googleterrain.h | 2 +- champlain/sources/mffrelief.c | 4 +- champlain/sources/mffrelief.h | 2 +- champlain/sources/oam.c | 6 +- champlain/sources/oam.h | 2 +- champlain/sources/osmmapnik.c | 4 +- champlain/sources/osmmapnik.h | 2 +- configure.ac | 2 +- 30 files changed, 127 insertions(+), 94 deletions(-) rename champlain/{champlaindefines.h => champlain-defines.h} (99%) rename champlain/{champlainlayer.c => champlain-layer.c} (97%) rename champlain/{champlainlayer.h => champlain-layer.h} (96%) rename champlain/{map.c => champlain-map.c} (98%) rename champlain/{map.h => champlain-map.h} (94%) rename champlain/{champlainmarker.c => champlain-marker.c} (98%) rename champlain/{champlainmarker.h => champlain-marker.h} (98%) rename champlain/{champlainprivate.h => champlain-private.h} (100%) rename champlain/{tile.c => champlain-tile.c} (98%) rename champlain/{tile.h => champlain-tile.h} (97%) rename champlain/{champlainview.c => champlain-view.c} (99%) rename champlain/{champlainview.h => champlain-view.h} (98%) rename champlain/{zoomlevel.c => champlain-zoom-level.c} (95%) rename champlain/{zoomlevel.h => champlain-zoom-level.h} (97%) diff --git a/champlain/Makefile.am b/champlain/Makefile.am index 38d7ef5..19208c2 100644 --- a/champlain/Makefile.am +++ b/champlain/Makefile.am @@ -1,57 +1,59 @@ BUILT_SOURCES = \ - champlain-marshal.h \ - champlain-marshal.c + champlain-marshal.h \ + champlain-marshal.c CLEANFILES = $(BUILT_SOURCES) CHAMPLAIN_MARSHAL = champlain-marshal -CHAMPLAIN_MARSHAL_LIST = champlain-marshal.list +CHAMPLAIN_MARSHAL_LIST = champlain-marshal.list lib_LTLIBRARIES = libchamplain-0.2.la -libchamplain_0_2_la_SOURCES = $(CHAMPLAIN_MARSHAL_LIST) \ - $(BUILT_SOURCES) \ - champlainview.c \ - champlainlayer.c \ - champlainmarker.c \ - map.c \ - zoomlevel.c \ - tile.c \ - sources/oam.c \ - sources/osmmapnik.c \ - sources/mffrelief.c \ - sources/googlemap.c \ - sources/googlesat.c \ - sources/googleterrain.c \ - sources/debugmap.c - -noinst_HEADERS = champlainview.h \ - champlainmarker.c \ - champlainprivate.h \ - map.h \ - zoomlevel.h \ - tile.h \ - sources/oam.h \ - sources/osmmapnik.h \ - sources/mffrelief.h \ - sources/googlemap.h \ - sources/googlesat.h \ - sources/googleterrain.h \ - sources/debugmap.h +libchamplain_0_2_la_SOURCES = \ + $(CHAMPLAIN_MARSHAL_LIST) \ + $(BUILT_SOURCES) \ + champlain-view.c \ + champlain-layer.c \ + champlain-marker.c \ + champlain-map.c \ + champlain-zoom-level.c \ + champlain-tile.c \ + sources/oam.c \ + sources/osmmapnik.c \ + sources/mffrelief.c \ + sources/googlemap.c \ + sources/googlesat.c \ + sources/googleterrain.c \ + sources/debugmap.c -libchamplain_0_2_la_LIBADD = $(DEPS_LIBS) ../tidy/libtidy-1.0.la +noinst_HEADERS = \ + champlain-view.h \ + champlain-marker.c \ + champlain-private.h \ + champlain-map.h \ + champlain-zoom-level.h \ + champlain-tile.h \ + sources/oam.h \ + sources/osmmapnik.h \ + sources/mffrelief.h \ + sources/googlemap.h \ + sources/googlesat.h \ + sources/googleterrain.h \ + sources/debugmap.h -champlain-marshal.h: $(CHAMPLAIN_MARSHAL_LIST) - @GLIB_GENMARSHAL@ --header --prefix=cpl_marshal $< > $(CHAMPLAIN_MARSHAL).h +libchamplain_include_HEADERS = \ + champlain.h \ + champlain-view.h \ + champlain-defines.h \ + champlain-layer.h \ + champlain-marker.h -champlain-marshal.c: $(CHAMPLAIN_MARSHAL_LIST) - @GLIB_GENMARSHAL@ --body --prefix=cpl_marshal $< > $(CHAMPLAIN_MARSHAL).c +libchamplain_0_2_la_LIBADD = $(DEPS_LIBS) ../tidy/libtidy-1.0.la -libchamplain_includedir=$(includedir)/libchamplain-0.2/champlain -libchamplain_include_HEADERS = champlain.h champlainview.h champlaindefines.h champlainlayer.h champlainmarker.h +libchamplain_includedir = $(includedir)/libchamplain-0.2/champlain -libchamplain_0_2_la_LDFLAGS= -version-info $(LIBRARY_VERSION) +libchamplain_0_2_la_LDFLAGS = -version-info $(LIBRARY_VERSION) AM_CPPFLAGS = $(DEPS_CFLAGS) -DDATADIR=\""$(datadir)"\" -I$(top_srcdir)/tidy -I$(top_srcdir) -DCHAMPLAIN_COMPILATION AM_LDFLAGS = $(DEPS_LIBS) -export-dynamic -export-symbols-regex ^champlain_.* @@ -60,3 +62,9 @@ svgdir = $(datadir)/champlain svg_DATA = error.svg EXTRA_DIST = $(svg_DATA) $(CHAMPLAIN_MARSHAL_LIST) + +champlain-marshal.h: $(CHAMPLAIN_MARSHAL_LIST) + @GLIB_GENMARSHAL@ --header --prefix=cpl_marshal $< > $(CHAMPLAIN_MARSHAL).h + +champlain-marshal.c: $(CHAMPLAIN_MARSHAL_LIST) + @GLIB_GENMARSHAL@ --body --prefix=cpl_marshal $< > $(CHAMPLAIN_MARSHAL).c diff --git a/champlain/champlaindefines.h b/champlain/champlain-defines.h similarity index 99% rename from champlain/champlaindefines.h rename to champlain/champlain-defines.h index 9c3ea97..78c3885 100644 --- a/champlain/champlaindefines.h +++ b/champlain/champlain-defines.h @@ -39,5 +39,5 @@ typedef struct _ChamplainMarkerClass ChamplainMarkerClass; #define CHAMPLAIN_PARAM_READWRITE \ (G_PARAM_READABLE | G_PARAM_WRITABLE | \ G_PARAM_STATIC_NICK | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB) - + #endif diff --git a/champlain/champlainlayer.c b/champlain/champlain-layer.c similarity index 97% rename from champlain/champlainlayer.c rename to champlain/champlain-layer.c index f9304e2..34bfa53 100644 --- a/champlain/champlainlayer.c +++ b/champlain/champlain-layer.c @@ -29,8 +29,9 @@ #include "config.h" -#include "champlainlayer.h" -#include "champlaindefines.h" +#include "champlain-layer.h" + +#include "champlain-defines.h" #include #include diff --git a/champlain/champlainlayer.h b/champlain/champlain-layer.h similarity index 96% rename from champlain/champlainlayer.h rename to champlain/champlain-layer.h index f22e4b3..7a30c89 100644 --- a/champlain/champlainlayer.h +++ b/champlain/champlain-layer.h @@ -23,7 +23,8 @@ #ifndef CHAMPLAIN_LAYER_H #define CHAMPLAIN_LAYER_H -#include +#include + #include #include diff --git a/champlain/map.c b/champlain/champlain-map.c similarity index 98% rename from champlain/map.c rename to champlain/champlain-map.c index a7ddf3f..58a2d08 100644 --- a/champlain/map.c +++ b/champlain/champlain-map.c @@ -16,12 +16,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "map.h" -#include "zoomlevel.h" +#include "champlain-map.h" + +#include "champlain-zoom-level.h" #include "sources/osmmapnik.h" #include "sources/mffrelief.h" #include "sources/oam.h" #include "sources/debugmap.h" + #include Map* diff --git a/champlain/map.h b/champlain/champlain-map.h similarity index 94% rename from champlain/map.h rename to champlain/champlain-map.h index 3c68bbb..e011d8b 100644 --- a/champlain/map.h +++ b/champlain/champlain-map.h @@ -20,10 +20,10 @@ #define MAP_H #include "champlain.h" -#include "champlainview.h" -#include "champlainprivate.h" -#include "zoomlevel.h" -#include "tile.h" +#include "champlain-private.h" +#include "champlain-tile.h" +#include "champlain-view.h" +#include "champlain-zoom-level.h" #include #include diff --git a/champlain/champlainmarker.c b/champlain/champlain-marker.c similarity index 98% rename from champlain/champlainmarker.c rename to champlain/champlain-marker.c index b938e77..ed4c11f 100644 --- a/champlain/champlainmarker.c +++ b/champlain/champlain-marker.c @@ -35,14 +35,15 @@ #include "config.h" -#include "champlaindefines.h" -#include "champlainmarker.h" -#include "champlainprivate.h" +#include "champlain-marker.h" + #include "champlain.h" +#include "champlain-defines.h" #include "champlain-marshal.h" -#include "map.h" -#include "tile.h" -#include "zoomlevel.h" +#include "champlain-private.h" +#include "champlain-map.h" +#include "champlain-tile.h" +#include "champlain-zoom-level.h" #include #include diff --git a/champlain/champlainmarker.h b/champlain/champlain-marker.h similarity index 98% rename from champlain/champlainmarker.h rename to champlain/champlain-marker.h index 887fea2..cc5a9ed 100644 --- a/champlain/champlainmarker.h +++ b/champlain/champlain-marker.h @@ -23,7 +23,8 @@ #ifndef CHAMPLAIN_MARKER_H #define CHAMPLAIN_MARKER_H -#include +#include + #include #include diff --git a/champlain/champlainprivate.h b/champlain/champlain-private.h similarity index 100% rename from champlain/champlainprivate.h rename to champlain/champlain-private.h diff --git a/champlain/tile.c b/champlain/champlain-tile.c similarity index 98% rename from champlain/tile.c rename to champlain/champlain-tile.c index de1ae37..fe57660 100644 --- a/champlain/tile.c +++ b/champlain/champlain-tile.c @@ -16,9 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "tile.h" -#include "map.h" -#include "champlainprivate.h" +#include "champlain-tile.h" + +#include "champlain-map.h" +#include "champlain-private.h" #include #include diff --git a/champlain/tile.h b/champlain/champlain-tile.h similarity index 97% rename from champlain/tile.h rename to champlain/champlain-tile.h index e92e33e..a74146d 100644 --- a/champlain/tile.h +++ b/champlain/champlain-tile.h @@ -19,9 +19,10 @@ #ifndef CHAMPLAIN_MAP_TILE_H #define CHAMPLAIN_MAP_TILE_H +#include + #include #include -#include struct _Tile { diff --git a/champlain/champlainview.c b/champlain/champlain-view.c similarity index 99% rename from champlain/champlainview.c rename to champlain/champlain-view.c index bca6db4..8625aad 100644 --- a/champlain/champlainview.c +++ b/champlain/champlain-view.c @@ -48,14 +48,15 @@ #include "config.h" -#include "champlaindefines.h" -#include "champlainprivate.h" +#include "champlain-view.h" + #include "champlain.h" +#include "champlain-defines.h" +#include "champlain-map.h" #include "champlain-marshal.h" -#include "champlainview.h" -#include "map.h" -#include "tile.h" -#include "zoomlevel.h" +#include "champlain-private.h" +#include "champlain-tile.h" +#include "champlain-zoom-level.h" #include #include diff --git a/champlain/champlainview.h b/champlain/champlain-view.h similarity index 98% rename from champlain/champlainview.h rename to champlain/champlain-view.h index ab627c5..3dea328 100644 --- a/champlain/champlainview.h +++ b/champlain/champlain-view.h @@ -18,12 +18,13 @@ #if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION) #error "Only can be included directly." -#endif +#endif #ifndef CHAMPLAIN_VIEW_H #define CHAMPLAIN_VIEW_H -#include +#include + #include #include #include diff --git a/champlain/zoomlevel.c b/champlain/champlain-zoom-level.c similarity index 95% rename from champlain/zoomlevel.c rename to champlain/champlain-zoom-level.c index 899912d..1d1ffe1 100644 --- a/champlain/zoomlevel.c +++ b/champlain/champlain-zoom-level.c @@ -16,9 +16,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include "map.h" +#include "champlain-zoom-level.h" + +#include "champlain-map.h" +#include "champlain-tile.h" + #include ZoomLevel* diff --git a/champlain/zoomlevel.h b/champlain/champlain-zoom-level.h similarity index 97% rename from champlain/zoomlevel.h rename to champlain/champlain-zoom-level.h index 63e8d74..75bee95 100644 --- a/champlain/zoomlevel.h +++ b/champlain/champlain-zoom-level.h @@ -19,9 +19,10 @@ #ifndef CHAMPLAIN_MAP_ZOOM_LEVEL_H #define CHAMPLAIN_MAP_ZOOM_LEVEL_H +#include "champlain-private.h" + #include #include -#include "champlainprivate.h" typedef struct { diff --git a/champlain/champlain.h b/champlain/champlain.h index 4acdb2b..1af2859 100644 --- a/champlain/champlain.h +++ b/champlain/champlain.h @@ -28,10 +28,10 @@ #include -#include -#include -#include -#include +#include "champlain/champlain-defines.h" +#include "champlain/champlain-layer.h" +#include "champlain/champlain-marker.h" +#include "champlain/champlain-view.h" #undef __CHAMPLAIN_CHAMPLAIN_H_INSIDE__ diff --git a/champlain/sources/debugmap.h b/champlain/sources/debugmap.h index a8232ca..f296955 100644 --- a/champlain/sources/debugmap.h +++ b/champlain/sources/debugmap.h @@ -20,7 +20,7 @@ #ifndef OPENSTREETMAP_H #define OPENSTREETMAP_H -#include +#include "champlain-map.h" void debugmap_init(Map* map); diff --git a/champlain/sources/googlemap.c b/champlain/sources/googlemap.c index a111e63..8b7ce0b 100644 --- a/champlain/sources/googlemap.c +++ b/champlain/sources/googlemap.c @@ -23,7 +23,9 @@ */ #include "sources/googlemap.h" -#include "map.h" + +#include "champlain-map.h" + #include #include diff --git a/champlain/sources/googlemap.h b/champlain/sources/googlemap.h index e3d6ac1..38a1eda 100644 --- a/champlain/sources/googlemap.h +++ b/champlain/sources/googlemap.h @@ -20,7 +20,7 @@ #ifndef GOOGLE_MAP_H #define GOOGLE_MAP_H -#include +#include "champlain-map.h" void google_map_init(Map* map); diff --git a/champlain/sources/googlesat.c b/champlain/sources/googlesat.c index 31d172e..9083e48 100644 --- a/champlain/sources/googlesat.c +++ b/champlain/sources/googlesat.c @@ -23,9 +23,11 @@ */ #include "sources/googlesat.h" -#include "map.h" -#include + +#include "champlain-map.h" + #include +#include guint google_sat_row_count(Map *map, guint zoom_level); guint google_sat_column_count(Map *map, guint zoom_level); diff --git a/champlain/sources/googlesat.h b/champlain/sources/googlesat.h index d866793..ab13fef 100644 --- a/champlain/sources/googlesat.h +++ b/champlain/sources/googlesat.h @@ -20,7 +20,7 @@ #ifndef GOOGLE_SAT_H #define GOOGLE_SAT_H -#include +#include "champlain-map.h" void google_sat_init(Map* map); diff --git a/champlain/sources/googleterrain.c b/champlain/sources/googleterrain.c index 8f9524a..6811c6a 100644 --- a/champlain/sources/googleterrain.c +++ b/champlain/sources/googleterrain.c @@ -23,9 +23,11 @@ */ #include "sources/googleterrain.h" -#include "map.h" -#include + +#include "champlain-map.h" + #include +#include guint google_terrain_row_count(Map *map, guint zoom_level); guint google_terrain_column_count(Map *map, guint zoom_level); diff --git a/champlain/sources/googleterrain.h b/champlain/sources/googleterrain.h index edbf2a1..f82d0f0 100644 --- a/champlain/sources/googleterrain.h +++ b/champlain/sources/googleterrain.h @@ -20,7 +20,7 @@ #ifndef GOOGLE_TERRAIN_H #define GOOGLE_TERRAIN_H -#include +#include "champlain-map.h" void google_terrain_init(Map* map); diff --git a/champlain/sources/mffrelief.c b/champlain/sources/mffrelief.c index 220436b..cbac1e3 100644 --- a/champlain/sources/mffrelief.c +++ b/champlain/sources/mffrelief.c @@ -18,7 +18,9 @@ */ #include "sources/mffrelief.h" -#include "map.h" + +#include "champlain-map.h" + #include #include diff --git a/champlain/sources/mffrelief.h b/champlain/sources/mffrelief.h index a26c0a5..196dbfe 100644 --- a/champlain/sources/mffrelief.h +++ b/champlain/sources/mffrelief.h @@ -20,7 +20,7 @@ #ifndef MFF_RELIEF_H #define MFF_RELIEF_H -#include +#include "champlain-map.h" void mff_relief_init(Map* map); diff --git a/champlain/sources/oam.c b/champlain/sources/oam.c index de72b5d..2a5f3a7 100644 --- a/champlain/sources/oam.c +++ b/champlain/sources/oam.c @@ -18,9 +18,11 @@ */ #include "sources/oam.h" -#include "map.h" -#include + +#include "champlain-map.h" + #include +#include guint oam_row_count(Map *map, guint zoom_level); guint oam_column_count(Map *map, guint zoom_level); diff --git a/champlain/sources/oam.h b/champlain/sources/oam.h index a8bb862..c3650d7 100644 --- a/champlain/sources/oam.h +++ b/champlain/sources/oam.h @@ -20,7 +20,7 @@ #ifndef OAM_H #define OAM_H -#include +#include "champlain-map.h" void oam_init(Map* map); diff --git a/champlain/sources/osmmapnik.c b/champlain/sources/osmmapnik.c index 45dda6e..f700ee0 100644 --- a/champlain/sources/osmmapnik.c +++ b/champlain/sources/osmmapnik.c @@ -18,7 +18,9 @@ */ #include "sources/osmmapnik.h" -#include "map.h" + +#include "champlain-map.h" + #include #include diff --git a/champlain/sources/osmmapnik.h b/champlain/sources/osmmapnik.h index 2162872..25af08b 100644 --- a/champlain/sources/osmmapnik.h +++ b/champlain/sources/osmmapnik.h @@ -20,7 +20,7 @@ #ifndef OSM_MAPNIK_H #define OSM_MAPNIK_H -#include +#include "champlain-map.h" void osm_mapnik_init(Map* map); diff --git a/configure.ac b/configure.ac index 87b455c..c1d0c45 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.61) AC_INIT(libchamplain, 0.2.8, pierre-luc@pierlux.com) -AC_CONFIG_SRCDIR([champlain/champlainview.h]) +AC_CONFIG_SRCDIR([champlain/champlain.h]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE -- 2.39.5