From cceba11d6878f17731d88d820a05b7448b1fd2fc Mon Sep 17 00:00:00 2001 From: kazer_ Date: Tue, 9 Oct 2007 16:48:44 +0000 Subject: Added include checks git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@448 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- callback.h | 6 ++++++ color.h | 5 +++++ compass.h | 5 +++++ coord.h | 4 ++-- country.h | 5 +++++ cursor.h | 5 +++++ data.h | 5 +++++ data_window.h | 6 ++++++ data_window_int.h | 5 +++++ debug.h | 6 ++++++ destination.h | 6 ++++++ draw_info.h | 6 ++++++ file.h | 6 ++++++ graphics.h | 6 ++++++ gtkext.h | 5 +++++ gui.h | 6 ++++++ item.h | 5 +++++ layer.h | 6 ++++++ layout.h | 6 ++++++ log.h | 6 ++++++ main.h | 6 ++++++ map-share.h | 6 ++++++ map.h | 5 +++++ map_data.h | 5 +++++ mapset.h | 6 ++++++ maptype.h | 6 ++++++ menu.h | 6 ++++++ navigation.h | 5 +++++ navit.h | 6 ++++++ osd.h | 6 ++++++ param.h | 6 ++++++ phrase.h | 6 ++++++ plugin.h | 2 ++ point.h | 4 ++-- popup.h | 5 +++++ profile.h | 6 ++++++ projection.h | 6 ++++++ route.h | 18 +++++++++++++++++- search.h | 6 ++++++ speech.h | 6 ++++++ statusbar.h | 6 ++++++ track.h | 5 +++++ transform.h | 5 +++++ types.h | 4 ++-- util.h | 6 ++++++ vehicle.h | 5 +++++ xmlconfig.h | 5 +++++ 47 files changed, 261 insertions(+), 7 deletions(-) diff --git a/callback.h b/callback.h index c3fe4017..50cc3e16 100644 --- a/callback.h +++ b/callback.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_CALLBACK_H +#define NAVIT_CALLBACK_H + #ifdef __cplusplus extern "C" { #endif @@ -72,3 +75,6 @@ static inline void callback_list_call_2(struct callback_list *l, void *p1, void #ifdef __cplusplus } #endif + +#endif + diff --git a/color.h b/color.h index 9fdfd3b7..1e7345f8 100644 --- a/color.h +++ b/color.h @@ -1,3 +1,8 @@ +#ifndef NAVIT_COLOR_H +#define NAVIT_COLOR_H + struct color { int r,g,b; }; + +#endif diff --git a/compass.h b/compass.h index 3bc8ad7b..cb864170 100644 --- a/compass.h +++ b/compass.h @@ -1,2 +1,7 @@ +#ifndef NAVIT_COMPASS_H +#define NAVIT_COMPASS_H + struct compass * compass_new(struct container *co); void compass_draw(struct compass *comp, struct container *co); + +#endif diff --git a/coord.h b/coord.h index 13491d22..c388be73 100644 --- a/coord.h +++ b/coord.h @@ -1,5 +1,5 @@ -#ifndef COORD_H -#define COORD_H +#ifndef NAVIT_COORD_H +#define NAVIT_COORD_H /*! A integer mercator coordinate */ struct coord { diff --git a/country.h b/country.h index 83be5b95..68fe6968 100644 --- a/country.h +++ b/country.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_COUNTRY_H +#define NAVIT_COUNTRY_H + /* prototypes */ struct attr; struct country_search; @@ -5,3 +8,5 @@ struct item; struct country_search *country_search_new(struct attr *search, int partial); struct item *country_search_get_item(struct country_search *this); void country_search_destroy(struct country_search *this); + +#endif diff --git a/cursor.h b/cursor.h index ff14f05c..ee64d8f5 100644 --- a/cursor.h +++ b/cursor.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_CURSOR_H +#define NAVIT_CURSOR_H + /* prototypes */ struct callback; struct color; @@ -14,3 +17,5 @@ int cursor_get_speed(struct cursor *this); struct cursor *cursor_new(struct graphics *gra, struct vehicle *v, struct color *c, struct transformation *t); void cursor_add_callback(struct cursor *this, struct callback *cb); /* end of prototypes */ + +#endif diff --git a/data.h b/data.h index e2af6f96..45174267 100644 --- a/data.h +++ b/data.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_DATA_H +#define NAVIT_DATA_H + static inline unsigned char get_u8(unsigned char **p) { @@ -59,3 +62,5 @@ get_string(unsigned char **p) #define L(x) ({ unsigned char *t=(unsigned char *)&(x); t[0] | (t[1] << 8) | (t[2] << 16) | (t[3] << 24); }) +#endif + diff --git a/data_window.h b/data_window.h index 2a96174d..103697db 100644 --- a/data_window.h +++ b/data_window.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_DATA_WINDOW_H +#define NAVIT_DATA_WINDOW_H + struct datawindow; struct param_list; struct datawindow_priv; @@ -17,3 +20,6 @@ struct datawindow { void datawindow_destroy(struct datawindow *win); void datawindow_add(struct datawindow *win, struct param_list *param, int count); void datawindow_mode(struct datawindow *win, int start); + +#endif + diff --git a/data_window_int.h b/data_window_int.h index fdf33544..f455a3a3 100644 --- a/data_window_int.h +++ b/data_window_int.h @@ -1,3 +1,5 @@ +#ifndef NAVIT_DATA_WINDOW_INT_H +#define NAVIT_DATA_WINDOW_INT_H struct data_window { GtkWidget *window; @@ -5,3 +7,6 @@ struct data_window { GtkWidget *treeview; void(*callback)(struct data_window *, char **cols); }; + +#endif + diff --git a/debug.h b/debug.h index 57eb5eda..3fa0437e 100644 --- a/debug.h +++ b/debug.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_DEBUG_H +#define NAVIT_DEBUG_H + #ifdef __cplusplus extern "C" { #endif @@ -17,3 +20,6 @@ void debug_printf(int level, const char *module, const char *function, int prefi #ifdef __cplusplus } #endif + +#endif + diff --git a/destination.h b/destination.h index 263cc920..b019fc06 100644 --- a/destination.h +++ b/destination.h @@ -1,4 +1,10 @@ +#ifndef NAVIT_DESTINATION_H +#define NAVIT_DESTINATION_H + /* prototypes */ struct navit; int destination_address(struct navit *nav); /* end of prototypes */ + +#endif + diff --git a/draw_info.h b/draw_info.h index 6acee92c..863b0017 100644 --- a/draw_info.h +++ b/draw_info.h @@ -1,5 +1,11 @@ +#ifndef NAVIT_DRAW_INFO_H +#define NAVIT_DRAW_INFO_H + struct draw_info { struct container *co; int display; int limit; }; + +#endif + diff --git a/file.h b/file.h index da69e245..ba56874e 100644 --- a/file.h +++ b/file.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_FILE_H +#define NAVIT_FILE_H + #include "param.h" struct file { @@ -31,3 +34,6 @@ char **file_wordexp_get_array(struct file_wordexp *wexp); void file_wordexp_destroy(struct file_wordexp *wexp); int file_get_param(struct file *file, struct param_list *param, int count); /* end of prototypes */ + +#endif + diff --git a/graphics.h b/graphics.h index 5c2fc37f..7e3eeeca 100644 --- a/graphics.h +++ b/graphics.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_GRAPHICS_H +#define NAVIT_GRAPHICS_H + #ifdef __cplusplus extern "C" { #endif @@ -128,3 +131,6 @@ int graphics_displayitem_within_dist(struct displayitem *di, struct point *p, in #ifdef __cplusplus } #endif + +#endif + diff --git a/gtkext.h b/gtkext.h index 34059d9b..572057ba 100644 --- a/gtkext.h +++ b/gtkext.h @@ -1 +1,6 @@ +#ifndef NAVIT_GTKEXT_H +#define NAVIT_GTKEXT_H + void gdk_gc_set_fill_rule(GdkGC *gc, GdkFillRule fill_rule); + +#endif diff --git a/gui.h b/gui.h index c477d4da..c5141029 100644 --- a/gui.h +++ b/gui.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_GUI_H +#define NAVIT_GUI_H + struct navit; struct gui_priv; struct menu_methods; @@ -45,3 +48,6 @@ int gui_set_graphics(struct gui *this_, struct graphics *gra); int gui_has_main_loop(struct gui *this_); int gui_run_main_loop(struct gui *this_); /* end of prototypes */ + +#endif + diff --git a/item.h b/item.h index fe24dd87..2d971ba0 100644 --- a/item.h +++ b/item.h @@ -1,3 +1,5 @@ +#ifndef NAVIT_ITEM_H +#define NAVIT_ITEM_H enum item_type { @@ -51,3 +53,6 @@ int item_hash_remove(struct item_hash *h, struct item *item); void *item_hash_lookup(struct item_hash *h, struct item *item); void item_hash_destroy(struct item_hash *h); /* end of prototypes */ + +#endif + diff --git a/layer.h b/layer.h index 3415cf94..4d602126 100644 --- a/layer.h +++ b/layer.h @@ -1,6 +1,12 @@ +#ifndef NAVIT_LAYER_H +#define NAVIT_LAYER_H + enum layer_type { layer_town=0, layer_street, layer_poly, layer_end, }; + +#endif + diff --git a/layout.h b/layout.h index 91bfe27c..083022c2 100644 --- a/layout.h +++ b/layout.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_LAYOUT_H +#define NAVIT_LAYOUT_H + #include "item.h" #include "color.h" @@ -57,3 +60,6 @@ struct element *circle_new(struct color *color, int radius, int width, int label struct element *label_new(int label_size); struct element *icon_new(const char *src); struct element *image_new(void); + +#endif + diff --git a/log.h b/log.h index 2bf04429..3f2658a4 100644 --- a/log.h +++ b/log.h @@ -1,2 +1,8 @@ +#ifndef NAVIT_LOG_H +#define NAVIT_LOG_H + void log_write(char *message, struct file *file, void *data, int size); void log_apply(struct map_data *map, int files); + +#endif + diff --git a/main.h b/main.h index 312a4340..d1310d89 100644 --- a/main.h +++ b/main.h @@ -1,6 +1,12 @@ +#ifndef NAVIT_MAIN_H +#define NAVIT_MAIN_H + /* prototypes */ struct navit; void main_add_navit(struct navit *nav); void main_remove_navit(struct navit *nav); int main(int argc, char **argv); /* end of prototypes */ + +#endif + diff --git a/map-share.h b/map-share.h index c540f30e..2b534a63 100644 --- a/map-share.h +++ b/map-share.h @@ -1,2 +1,8 @@ +#ifndef NAVIT_MAP_SHARE_H +#define NAVIT_MAP_SHARE_H + void map_srv_start_poa(CORBA_ORB orb, CORBA_Environment * ev); CORBA_Object map_srv_start_object(CORBA_Environment * ev, struct container *co); + +#endif + diff --git a/map.h b/map.h index 84e5b022..0377c49a 100644 --- a/map.h +++ b/map.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_MAP_H +#define NAVIT_MAP_H + struct map_priv; struct attr; #include "coord.h" @@ -48,3 +51,5 @@ struct map_search *map_search_new(struct map *m, struct item *item, struct attr struct item *map_search_get_item(struct map_search *this); void map_search_destroy(struct map_search *this); /* end of prototypes */ + +#endif diff --git a/map_data.h b/map_data.h index a38bd085..bb2aab9c 100644 --- a/map_data.h +++ b/map_data.h @@ -1,3 +1,5 @@ +#ifndef NAVIT_MAP_DATA_H +#define NAVIT_MAP_DATA_H enum file_index { file_border_ply=0, @@ -28,3 +30,6 @@ struct block_info; void map_data_foreach(struct map_data *mdata, int file, struct transformation *t, int limit, void(*func)(struct block_info *, unsigned char *, unsigned char *, void *), void *data); + +#endif + diff --git a/mapset.h b/mapset.h index 6998486d..894dee12 100644 --- a/mapset.h +++ b/mapset.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_MAPSET_H +#define NAVIT_MAPSET_H + /* prototypes */ struct attr; struct item; @@ -14,3 +17,6 @@ void mapset_close(struct mapset_handle *msh); struct mapset_search *mapset_search_new(struct mapset *ms, struct item *item, struct attr *search_attr, int partial); struct item *mapset_search_get_item(struct mapset_search *this); void mapset_search_destroy(struct mapset_search *this); + +#endif + diff --git a/maptype.h b/maptype.h index b04d260e..bfaf4e29 100644 --- a/maptype.h +++ b/maptype.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_MAPTYPE_H +#define NAVIT_MAPTYPE_H + struct map_methods; struct maptype { @@ -13,3 +16,6 @@ struct map_priv; struct maptype; void maptype_register(char *name, struct map_priv *(*map_new)(struct map_methods *meth, char *data, char **charset, enum projection *pro)); struct maptype *maptype_get(const char *name); + +#endif + diff --git a/menu.h b/menu.h index 8f40fbc4..df36005c 100644 --- a/menu.h +++ b/menu.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_MENU_H +#define NAVIT_MENU_H + enum menu_type { menu_type_submenu, menu_type_menu, @@ -25,3 +28,6 @@ void menu_route_update(struct container *co); struct menu *menu_add(struct menu *menu, char *name, enum menu_type type, void (*callback)(struct menu *menu, void *data1, void *data2), void *data1, void *data2); void menu_set_toggle(struct menu *menu, int active); int menu_get_toggle(struct menu *menu); + +#endif + diff --git a/navigation.h b/navigation.h index a6df8875..8e46e89e 100644 --- a/navigation.h +++ b/navigation.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_NAVIGATION_H +#define NAVIT_NAVIGATION_H + #ifdef __cplusplus extern "C" { #endif @@ -24,3 +27,5 @@ void navigation_unregister_callback(struct navigation *this_, enum attr_type typ #ifdef __cplusplus } #endif + +#endif diff --git a/navit.h b/navit.h index 64a83a5f..beb6de15 100644 --- a/navit.h +++ b/navit.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_NAVIT_H +#define NAVIT_NAVIT_H + #ifdef __cplusplus extern "C" { #endif @@ -81,3 +84,6 @@ void navit_destroy(struct navit *this_); #ifdef __cplusplus } #endif + +#endif + diff --git a/osd.h b/osd.h index 0f28d12d..9a50e99b 100644 --- a/osd.h +++ b/osd.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_OSD_H +#define NAVIT_OSD_H + struct osd_methods { void (*osd_destroy)(struct osd_priv *osd); }; @@ -8,3 +11,6 @@ struct navit; struct osd; struct osd *osd_new(struct navit *nav, const char *type, struct attr **attrs); /* end of prototypes */ + +#endif + diff --git a/param.h b/param.h index 496c0542..e450cc72 100644 --- a/param.h +++ b/param.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_PARAM_H +#define NAVIT_PARAM_H + struct param_list { char *name; char *value; @@ -7,3 +10,6 @@ void param_add_string(char *name, char *value, struct param_list **param, int *c void param_add_dec(char *name, unsigned long value, struct param_list **param, int *count); void param_add_hex(char *name, unsigned long value, struct param_list **param, int *count); void param_add_hex_sig(char *name, long value, struct param_list **param, int *count); + +#endif + diff --git a/phrase.h b/phrase.h index 9f357388..5fd1af26 100644 --- a/phrase.h +++ b/phrase.h @@ -1,2 +1,8 @@ +#ifndef NAVIT_PHRASE_H +#define NAVIT_PHRASE_H + void phrase_route_calc(void *speech); void phrase_route_calculated(void *speech, void *route); + +#endif + diff --git a/plugin.h b/plugin.h index 7cd1a8ab..9614b19e 100644 --- a/plugin.h +++ b/plugin.h @@ -125,3 +125,5 @@ void *plugin_get_type(enum plugin_type type, const char *name); #ifdef __cplusplus } #endif + + diff --git a/point.h b/point.h index 6672f3d5..1ea5fd29 100644 --- a/point.h +++ b/point.h @@ -1,5 +1,5 @@ -#ifndef POINT_H -#define POINT_H +#ifndef NAVIT_POINT_H +#define NAVIT_POINT_H struct point { int x; diff --git a/popup.h b/popup.h index 13be9802..3738c35d 100644 --- a/popup.h +++ b/popup.h @@ -1,3 +1,8 @@ +#ifndef NAVIT_POPUP_H +#define NAVIT_POPUP_H + struct navit; struct point; void popup(struct navit *nav, int button, struct point *p); + +#endif diff --git a/profile.h b/profile.h index 0a548d6b..f5e853ed 100644 --- a/profile.h +++ b/profile.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_PROFILE_H +#define NAVIT_PROFILE_H + #ifdef __cplusplus extern "C" { #endif @@ -6,3 +9,6 @@ void profile_timer(int level, const char *module, const char *function, const ch #ifdef __cplusplus } #endif + +#endif + diff --git a/projection.h b/projection.h index 9d73f1b0..361de789 100644 --- a/projection.h +++ b/projection.h @@ -1,3 +1,9 @@ +#ifndef NAVIT_PROJECTION_H +#define NAVIT_PROJECTION_H + enum projection { projection_none, projection_mg, projection_garmin }; + +#endif + diff --git a/route.h b/route.h index 1ba758c5..6ac7685a 100644 --- a/route.h +++ b/route.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_ROUTE_H +#define NAVIT_ROUTE_H + struct route_crossing { long segid; int dir; @@ -11,12 +14,22 @@ struct route_crossings { #define route_item_first type_street_0 #define route_item_last type_ferry - /* prototypes */ enum item_type; struct coord; struct displaylist; struct item; + +#ifndef STREETDATA +#define STREETDATA +struct street_data { + struct item item; + int count; + int limit; + struct coord c[0]; +}; +#endif + struct map_selection; struct mapset; struct route; @@ -60,3 +73,6 @@ struct coord *route_info_get(struct route_info_handle *h); void route_info_close(struct route_info_handle *h); void route_draw(struct route *this, struct transformation *t, struct displaylist *dsp); /* end of prototypes */ + +#endif + diff --git a/search.h b/search.h index 0a09494e..6043c504 100644 --- a/search.h +++ b/search.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_SEARCH_H +#define NAVIT_SEARCH_H + #ifdef __cplusplus extern "C" { #endif @@ -43,3 +46,6 @@ void search_list_destroy(struct search_list *this_); #ifdef __cplusplus } #endif + +#endif + diff --git a/speech.h b/speech.h index 0542d828..46f199ef 100644 --- a/speech.h +++ b/speech.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_SPEECH_H +#define NAVIT_SPEECH_H + struct speech_priv; struct speech_methods { @@ -11,3 +14,6 @@ int speech_say(struct speech *this_, const char *text); int speech_sayf(struct speech *this_, const char *format, ...); void speech_destroy(struct speech *this_); /* end of prototypes */ + +#endif + diff --git a/statusbar.h b/statusbar.h index 1411ef76..c315de7f 100644 --- a/statusbar.h +++ b/statusbar.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_STATUSBAR_H +#define NAVIT_STATUSBAR_H + struct route; struct statusbar_priv; struct point; @@ -16,3 +19,6 @@ struct statusbar { }; /* prototypes */ + +#endif + diff --git a/track.h b/track.h index 2c476a86..d6885bc9 100644 --- a/track.h +++ b/track.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_TRACK_H +#define NAVIT_TRACK_H + #ifdef __cplusplus extern "C" { #endif @@ -18,3 +21,5 @@ void tracking_destroy(struct tracking *tr); #ifdef __cplusplus } #endif + +#endif diff --git a/transform.h b/transform.h index 6c9059e1..ec0402d4 100644 --- a/transform.h +++ b/transform.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_TRANSFORM_H +#define NAVIT_TRANSFORM_H + #ifdef __cplusplus extern "C" { #endif @@ -45,3 +48,5 @@ int transform_within_border(struct transformation *this_, struct point *p, int b #ifdef __cplusplus } #endif + +#endif diff --git a/types.h b/types.h index f9ee6abd..0fa5b5a9 100644 --- a/types.h +++ b/types.h @@ -1,5 +1,5 @@ -#ifndef _TYPES_H_ -#define _TYPES_H_ +#ifndef NAVIT_TYPES_H +#define NAVIT_TYPES_H #include typedef int8_t s8; diff --git a/util.h b/util.h index 18c62acf..8e9690a1 100644 --- a/util.h +++ b/util.h @@ -1,5 +1,11 @@ +#ifndef NAVIT_types_H +#define NAVIT_types_H + #include void strtoupper(char *dest, const char *src); void strtolower(char *dest, const char *src); GList * g_hash_to_list(GHashTable *h); + +#endif + diff --git a/vehicle.h b/vehicle.h index a4fc70bf..b958379c 100644 --- a/vehicle.h +++ b/vehicle.h @@ -1,3 +1,6 @@ +#ifndef NAVIT_VEHICLE_H +#define NAVIT_VEHICLE_H + #ifdef __cplusplus extern "C" { #endif @@ -26,3 +29,5 @@ void vehicle_destroy(struct vehicle *this_); } #endif +#endif + diff --git a/xmlconfig.h b/xmlconfig.h index 036eab52..2e03aa62 100644 --- a/xmlconfig.h +++ b/xmlconfig.h @@ -1,3 +1,8 @@ +#ifndef NAVIT_XMLCONFIG_H +#define NAVIT_XMLCONFIG_H struct container; gboolean config_load(char *filename,GError **error); + +#endif + -- cgit v1.2.1