diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-05-25 12:37:42 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-05-25 12:37:42 +0000 |
commit | 704e8aa339f0c1a4236639c48888d48e4fb3c964 (patch) | |
tree | a5b0be276fcc17afa52f43f31c495d23c6e09d75 | |
parent | b3b7128f0d7470059ed0e8539e2e6ce655654ea2 (diff) | |
download | navit-svn-704e8aa339f0c1a4236639c48888d48e4fb3c964.tar.gz |
Fix:Core:Make c++ happy
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3294 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | navit/Makefile.am | 2 | ||||
-rw-r--r-- | navit/atom.h | 6 | ||||
-rw-r--r-- | navit/command.c | 4 | ||||
-rw-r--r-- | navit/file.h | 7 | ||||
-rw-r--r-- | navit/main.h | 7 | ||||
-rw-r--r-- | navit/xmlconfig.h | 11 |
6 files changed, 33 insertions, 4 deletions
diff --git a/navit/Makefile.am b/navit/Makefile.am index fbd88b7c..9daa3729 100644 --- a/navit/Makefile.am +++ b/navit/Makefile.am @@ -7,7 +7,7 @@ endif DIST_SUBDIRS=binding map maptool fib-1.1 font fonts gui graphics osd plugin speech support vehicle xpm maps SUBDIRS+=binding map font gui graphics osd plugin speech vehicle xpm -MODULES = $(wildcard $(top_builddir)/navit/graphics/*/*.la $(top_builddir)/navit/gui/*/*.la $(top_builddir)/navit/map/*/*.la $(top_builddir)/navit/osd/*/*.la $(top_builddir)/navit/speech/*/*.la $(top_builddir)/navit/vehicle/*/*.la) +MODULES = $(wildcard $(top_builddir)/navit/binding/*/*.la $(top_builddir)/navit/font/*/*.la $(top_builddir)/navit/graphics/*/*.la $(top_builddir)/navit/gui/*/*.la $(top_builddir)/navit/map/*/*.la $(top_builddir)/navit/osd/*/*.la $(top_builddir)/navit/speech/*/*.la $(top_builddir)/navit/vehicle/*/*.la) if FONTS SUBDIRS += fonts diff --git a/navit/atom.h b/navit/atom.h index 0cad37e1..cf77057d 100644 --- a/navit/atom.h +++ b/navit/atom.h @@ -1,3 +1,9 @@ +#ifdef __cplusplus +extern "C" { +#endif char * atom_lookup(char *name); char * atom(char *name); void atom_init(void); +#ifdef __cplusplus +} +#endif diff --git a/navit/command.c b/navit/command.c index 07a03066..9e01bb5b 100644 --- a/navit/command.c +++ b/navit/command.c @@ -389,9 +389,9 @@ command_call_function(struct context *ctx, struct result *res) enum attr_type attr_type=attr_from_name(function+4); if (attr_type != attr_none) { struct object_func *func=object_func_lookup(attr_type); - if (func && func->new) { + if (func && func->create) { res->attr.type=attr_type; - res->attr.u.data=func->new(NULL, list); + res->attr.u.data=func->create(NULL, list); } } } else { diff --git a/navit/file.h b/navit/file.h index fde1aba3..f2bbc314 100644 --- a/navit/file.h +++ b/navit/file.h @@ -20,6 +20,10 @@ #ifndef NAVIT_FILE_H #define NAVIT_FILE_H +#ifdef __cplusplus +extern "C" { +#endif + #ifndef PATH_MAX #define PATH_MAX 4096 #endif @@ -88,5 +92,8 @@ void *file_get_os_handle(struct file *file); void file_init(void); /* end of prototypes */ +#ifdef __cplusplus +} #endif +#endif diff --git a/navit/main.h b/navit/main.h index 4c631fe3..3f4dc098 100644 --- a/navit/main.h +++ b/navit/main.h @@ -20,6 +20,10 @@ #ifndef NAVIT_MAIN_H #define NAVIT_MAIN_H +#ifdef __cplusplus +extern "C" { +#endif + /* prototypes */ struct navit; struct iter; @@ -36,5 +40,8 @@ void main_init_nls(void); int main(int argc, char **argv); /* end of prototypes */ +#ifdef __cplusplus +} #endif +#endif diff --git a/navit/xmlconfig.h b/navit/xmlconfig.h index 8ae89e9f..6be3893b 100644 --- a/navit/xmlconfig.h +++ b/navit/xmlconfig.h @@ -20,9 +20,13 @@ #ifndef NAVIT_XMLCONFIG_H #define NAVIT_XMLCONFIG_H +#ifdef __cplusplus +extern "C" { +#endif + struct object_func { enum attr_type type; - void *(*new)(struct attr *parent, struct attr **attrs); + void *(*create)(struct attr *parent, struct attr **attrs); int (*get_attr)(void *, enum attr_type type, struct attr *attr, struct attr_iter *iter); struct attr_iter *(*iter_new)(void *); void (*iter_destroy)(struct attr_iter *); @@ -43,4 +47,9 @@ struct object_func *object_func_lookup(enum attr_type type); void xml_parse_text(const char *document, void *data, void (*start)(void *, const char *, const char **, const char **, void *, void *), void (*end)(void *, const char *, void *, void *), void (*text)(void *, const char *, int, void *, void *)); gboolean config_load(const char *filename, xmlerror **error); /* end of prototypes */ + +#ifdef __cplusplus +} +#endif + #endif |