From 66c0749df63ab6ab996b340bb70583c5fbc41e15 Mon Sep 17 00:00:00 2001 From: bieber Date: Mon, 31 May 2010 17:39:58 +0000 Subject: [PATCH] Theme Editor: Added extern C declarations to header files git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26433 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/main.cpp | 3 --- utils/themeeditor/parsetreemodel.h | 3 --- utils/themeeditor/parsetreenode.h | 3 --- utils/themeeditor/skin_debug.h | 9 +++++++++ utils/themeeditor/skin_parser.h | 10 ++++++++++ utils/themeeditor/skin_scan.h | 10 ++++++++++ utils/themeeditor/symbols.h | 10 ++++++++++ utils/themeeditor/tag_table.h | 6 ++++-- 8 files changed, 43 insertions(+), 11 deletions(-) diff --git a/utils/themeeditor/main.cpp b/utils/themeeditor/main.cpp index f876b1906..a3a5daaa6 100644 --- a/utils/themeeditor/main.cpp +++ b/utils/themeeditor/main.cpp @@ -19,11 +19,8 @@ * ****************************************************************************/ -extern "C" -{ #include "skin_parser.h" #include "skin_debug.h" -} #include #include diff --git a/utils/themeeditor/parsetreemodel.h b/utils/themeeditor/parsetreemodel.h index eedfe3f6b..2d1945254 100644 --- a/utils/themeeditor/parsetreemodel.h +++ b/utils/themeeditor/parsetreemodel.h @@ -19,11 +19,8 @@ * ****************************************************************************/ -extern "C" -{ #include "skin_parser.h" #include "skin_debug.h" -} #ifndef PARSETREEMODEL_H #define PARSETREEMODEL_H diff --git a/utils/themeeditor/parsetreenode.h b/utils/themeeditor/parsetreenode.h index 822924ace..49f89c19d 100644 --- a/utils/themeeditor/parsetreenode.h +++ b/utils/themeeditor/parsetreenode.h @@ -22,10 +22,7 @@ #ifndef PARSETREENODE_H #define PARSETREENODE_H -extern "C" -{ #include "skin_parser.h" -} #include #include diff --git a/utils/themeeditor/skin_debug.h b/utils/themeeditor/skin_debug.h index c100eb1d2..6b2a1bd1f 100644 --- a/utils/themeeditor/skin_debug.h +++ b/utils/themeeditor/skin_debug.h @@ -23,6 +23,11 @@ #ifndef SKIN_DEBUG_H #define SKIN_DEBUG_H +#ifdef __cplusplus +extern "C" +{ +#endif + #include "skin_parser.h" /* Debugging functions */ @@ -33,4 +38,8 @@ void skin_debug_tree(struct skin_element* root); void skin_debug_params(int count, struct skin_tag_parameter params[]); void skin_debug_indent(); +#ifdef __cplusplus +} +#endif + #endif // SKIN_DEBUG_H diff --git a/utils/themeeditor/skin_parser.h b/utils/themeeditor/skin_parser.h index 7b3ab13ad..201e06c25 100644 --- a/utils/themeeditor/skin_parser.h +++ b/utils/themeeditor/skin_parser.h @@ -22,6 +22,12 @@ #ifndef GENERIC_PARSER_H #define GENERIC_PARSER_H +#ifdef __cplusplus +extern "C" +{ +#endif + + #define SKIN_MAX_MEMORY 1048576 /******************************************************************** @@ -124,4 +130,8 @@ char* skin_alloc_string(int length); void skin_free_tree(struct skin_element* root); +#ifdef __cplusplus +} +#endif + #endif /* GENERIC_PARSER_H */ diff --git a/utils/themeeditor/skin_scan.h b/utils/themeeditor/skin_scan.h index 210f39cdf..682e32b3a 100644 --- a/utils/themeeditor/skin_scan.h +++ b/utils/themeeditor/skin_scan.h @@ -22,10 +22,20 @@ #ifndef SCANNING_H #define SCANNING_H +#ifdef __cplusplus +extern "C" +{ +#endif + + /* Scanning functions */ void skip_comment(char** document); void skip_whitespace(char** document); char* scan_string(char** document); int scan_int(char** document); +#ifdef __cplusplus +} +#endif + #endif // SCANNING_H diff --git a/utils/themeeditor/symbols.h b/utils/themeeditor/symbols.h index cc82890a1..b4f31289e 100644 --- a/utils/themeeditor/symbols.h +++ b/utils/themeeditor/symbols.h @@ -22,6 +22,12 @@ #ifndef SYMBOLS_H #define SYMBOLS_H +#ifdef __cplusplus +extern "C" +{ +#endif + + /* Symbol definitions for WPS parsing */ #define TAGSYM '%' @@ -36,4 +42,8 @@ #define ENUMLISTCLOSESYM '>' #define DEFAULTSYM '-' +#ifdef __cplusplus +} +#endif + #endif /* SYMBOLS_H */ diff --git a/utils/themeeditor/tag_table.h b/utils/themeeditor/tag_table.h index 4c54832a6..81d07a2a3 100644 --- a/utils/themeeditor/tag_table.h +++ b/utils/themeeditor/tag_table.h @@ -25,8 +25,6 @@ #ifdef __cplusplus extern "C" { -namespace wps -{ #endif @@ -298,4 +296,8 @@ char* find_tag(char* name); */ int find_escape_character(char lookup); +#ifdef __cplusplus +} +#endif + #endif /* TAG_TABLE_H */ -- 2.11.4.GIT