Fix:Core:Better c++ compatibility
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 9 Mar 2010 13:31:14 +0000 (13:31 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 9 Mar 2010 13:31:14 +0000 (13:31 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@2987 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/coord.h
navit/navit/linguistics.h
navit/navit/map.h
navit/navit/mapset.h
navit/navit/track.h
navit/navit/vehicleprofile.h

index a8221fa..8d08c03 100644 (file)
 #ifndef NAVIT_COORD_H
 #define NAVIT_COORD_H
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 #include <stdio.h>
 #include "config.h"
 #include "projection.h"
@@ -131,7 +135,6 @@ int coord_rect_contains(struct coord_rect *r, struct coord *c);
 void coord_rect_extend(struct coord_rect *r, struct coord *c);
 void coord_format(float lat,float lng, enum coord_format, char * buffer, int size);
 
-#endif
 /* prototypes */
 enum coord_format;
 enum projection;
@@ -155,3 +158,7 @@ void coord_format(float lat, float lng, enum coord_format fmt, char *buffer, int
 unsigned int coord_hash(const void *key);
 int coord_equal(const void *a, const void *b);
 /* end of prototypes */
+#ifdef __cplusplus
+}
+#endif
+#endif
index 5fe534f..e3e52c2 100644 (file)
@@ -1,4 +1,9 @@
+#ifdef __cplusplus
+extern "C" {
+#endif
 char *linguistics_expand_special(char *str, int mode);
 char *linguistics_next_word(char *str);
 void linguistics_init(void);
-
+#ifdef __cplusplus
+}
+#endif
index dda18e1..a1b8f1d 100644 (file)
 #ifndef NAVIT_MAP_H
 #define NAVIT_MAP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct map_priv;
 struct attr;
 #include "coord.h"
@@ -261,4 +265,7 @@ void map_dump_file(struct map *map, const char *file);
 void map_dump(struct map *map);
 /* end of prototypes */
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 9ad7942..6f3be40 100644 (file)
 #ifndef NAVIT_MAPSET_H
 #define NAVIT_MAPSET_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* prototypes */
 enum attr_type;
 struct attr;
@@ -39,7 +43,10 @@ struct mapset_handle *mapset_open(struct mapset *ms);
 struct map *mapset_next(struct mapset_handle *msh, int active);
 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);
+struct item *mapset_search_get_item(struct mapset_search *this_);
+void mapset_search_destroy(struct mapset_search *this_);
 /* end of prototypes */
+#ifdef __cplusplus
+}
+#endif
 #endif
index 8a8e085..bd68a59 100644 (file)
@@ -47,8 +47,8 @@ struct item *tracking_get_current_item(struct tracking *_this);
 int *tracking_get_current_flags(struct tracking *_this);
 void tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *vehicleprofile, enum projection pro);
 struct tracking *tracking_new(struct attr *parent, struct attr **attrs);
-void tracking_set_mapset(struct tracking *this, struct mapset *ms);
-void tracking_set_route(struct tracking *this, struct route *rt);
+void tracking_set_mapset(struct tracking *_this, struct mapset *ms);
+void tracking_set_route(struct tracking *_this, struct route *rt);
 void tracking_destroy(struct tracking *tr);
 struct map *tracking_get_map(struct tracking *this_);
 void tracking_init(void);
index 209815e..3765af9 100644 (file)
  * Boston, MA  02110-1301, USA.
  */
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 struct vehicleprofile {
        int mode;                                               /**< 0 = Auto, 1 = On-Road, 2 = Off-Road */
        int flags_forward_mask;                 /**< Flags mask for moving in positive direction */
@@ -39,3 +43,6 @@ struct roadprofile * vehicleprofile_get_roadprofile(struct vehicleprofile *this_
 
 //! Returns the vehicle profile's name.
 char * vehicleprofile_get_name(struct vehicleprofile *this_);
+#ifdef __cplusplus
+}
+#endif