diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-05-22 17:51:35 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-05-22 17:51:35 +0000 |
commit | 3f65a7051f489f141a39faaf85dc2af489b5123e (patch) | |
tree | 84c23e570424222240d394e24a58920b7ed8e6d4 | |
parent | b2ee5bc6b68316d3cf7e43923765788b114aa192 (diff) | |
download | rockbox-3f65a7051f489f141a39faaf85dc2af489b5123e.tar.gz rockbox-3f65a7051f489f141a39faaf85dc2af489b5123e.zip |
Move C linkage binding for c++ to exporting header files instead of includes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17609 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | rbutil/ipodpatcher/ipodpatcher.h | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/autodetection.h | 7 | ||||
-rw-r--r-- | rbutil/rbutilqt/encoders.h | 5 | ||||
-rw-r--r-- | rbutil/rbutilqt/installbootloader.h | 7 | ||||
-rw-r--r-- | rbutil/rbutilqt/voicefile.h | 11 | ||||
-rw-r--r-- | rbutil/sansapatcher/sansapatcher.h | 8 | ||||
-rw-r--r-- | tools/rbspeex/rbspeex.h | 8 | ||||
-rw-r--r-- | tools/voicefont.h | 10 | ||||
-rw-r--r-- | tools/wavtrim.h | 11 |
9 files changed, 50 insertions, 25 deletions
diff --git a/rbutil/ipodpatcher/ipodpatcher.h b/rbutil/ipodpatcher/ipodpatcher.h index 0d9222268f..91a28ecea9 100644 --- a/rbutil/ipodpatcher/ipodpatcher.h +++ b/rbutil/ipodpatcher/ipodpatcher.h | |||
@@ -20,6 +20,10 @@ | |||
20 | #ifndef _IPODPATCHER_H | 20 | #ifndef _IPODPATCHER_H |
21 | #define _IPODPATCHER_H | 21 | #define _IPODPATCHER_H |
22 | 22 | ||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
23 | #include "ipodio.h" | 27 | #include "ipodio.h" |
24 | 28 | ||
25 | /* Size of buffer for disk I/O - 8MB is large enough for any version | 29 | /* Size of buffer for disk I/O - 8MB is large enough for any version |
@@ -51,4 +55,8 @@ int read_aupd(struct ipod_t* ipod, char* filename); | |||
51 | int write_aupd(struct ipod_t* ipod, char* filename); | 55 | int write_aupd(struct ipod_t* ipod, char* filename); |
52 | off_t filesize(int fd); | 56 | off_t filesize(int fd); |
53 | 57 | ||
58 | #ifdef __cplusplus | ||
59 | } | ||
54 | #endif | 60 | #endif |
61 | #endif | ||
62 | |||
diff --git a/rbutil/rbutilqt/autodetection.h b/rbutil/rbutilqt/autodetection.h index ed0ba99bf8..e960305ea6 100644 --- a/rbutil/rbutilqt/autodetection.h +++ b/rbutil/rbutilqt/autodetection.h | |||
@@ -24,11 +24,8 @@ | |||
24 | #include <QtCore> | 24 | #include <QtCore> |
25 | #include "rbsettings.h" | 25 | #include "rbsettings.h" |
26 | 26 | ||
27 | extern "C" { | ||
28 | // Ipodpatcher | ||
29 | #include "../ipodpatcher/ipodpatcher.h" | 27 | #include "../ipodpatcher/ipodpatcher.h" |
30 | #include "../sansapatcher/sansapatcher.h" | 28 | #include "../sansapatcher/sansapatcher.h" |
31 | }; | ||
32 | 29 | ||
33 | class Autodetection :public QObject | 30 | class Autodetection :public QObject |
34 | { | 31 | { |
@@ -36,9 +33,9 @@ class Autodetection :public QObject | |||
36 | 33 | ||
37 | public: | 34 | public: |
38 | Autodetection(QObject* parent=0); | 35 | Autodetection(QObject* parent=0); |
39 | 36 | ||
40 | void setSettings(RbSettings* sett) {settings = sett;} | 37 | void setSettings(RbSettings* sett) {settings = sett;} |
41 | 38 | ||
42 | bool detect(); | 39 | bool detect(); |
43 | 40 | ||
44 | QString getDevice() {return m_device;} | 41 | QString getDevice() {return m_device;} |
diff --git a/rbutil/rbutilqt/encoders.h b/rbutil/rbutilqt/encoders.h index b5460de3ab..160041b4ac 100644 --- a/rbutil/rbutilqt/encoders.h +++ b/rbutil/rbutilqt/encoders.h | |||
@@ -24,10 +24,7 @@ | |||
24 | 24 | ||
25 | #include "rbsettings.h" | 25 | #include "rbsettings.h" |
26 | 26 | ||
27 | extern "C" | 27 | #include "rbspeex.h" |
28 | { | ||
29 | #include "rbspeex.h" | ||
30 | } | ||
31 | 28 | ||
32 | 29 | ||
33 | class EncBase : public QObject | 30 | class EncBase : public QObject |
diff --git a/rbutil/rbutilqt/installbootloader.h b/rbutil/rbutilqt/installbootloader.h index a026a35fad..727b8bfbe7 100644 --- a/rbutil/rbutilqt/installbootloader.h +++ b/rbutil/rbutilqt/installbootloader.h | |||
@@ -30,11 +30,8 @@ | |||
30 | #include "httpget.h" | 30 | #include "httpget.h" |
31 | #include "irivertools/irivertools.h" | 31 | #include "irivertools/irivertools.h" |
32 | 32 | ||
33 | extern "C" { | 33 | #include "../ipodpatcher/ipodpatcher.h" |
34 | // Ipodpatcher | 34 | #include "../sansapatcher/sansapatcher.h" |
35 | #include "../ipodpatcher/ipodpatcher.h" | ||
36 | #include "../sansapatcher/sansapatcher.h" | ||
37 | }; | ||
38 | 35 | ||
39 | bool initIpodpatcher(); | 36 | bool initIpodpatcher(); |
40 | bool initSansapatcher(); | 37 | bool initSansapatcher(); |
diff --git a/rbutil/rbutilqt/voicefile.h b/rbutil/rbutilqt/voicefile.h index 611203a134..b5d2a27767 100644 --- a/rbutil/rbutilqt/voicefile.h +++ b/rbutil/rbutilqt/voicefile.h | |||
@@ -29,18 +29,15 @@ | |||
29 | #include "httpget.h" | 29 | #include "httpget.h" |
30 | #include "rbsettings.h" | 30 | #include "rbsettings.h" |
31 | 31 | ||
32 | extern "C" | 32 | #include "wavtrim.h" |
33 | { | 33 | #include "voicefont.h" |
34 | #include "wavtrim.h" | 34 | |
35 | #include "voicefont.h" | ||
36 | } | ||
37 | |||
38 | class VoiceFileCreator :public QObject | 35 | class VoiceFileCreator :public QObject |
39 | { | 36 | { |
40 | Q_OBJECT | 37 | Q_OBJECT |
41 | public: | 38 | public: |
42 | VoiceFileCreator(QObject* parent=0); | 39 | VoiceFileCreator(QObject* parent=0); |
43 | 40 | ||
44 | //start creation | 41 | //start creation |
45 | bool createVoiceFile(ProgressloggerInterface* logger); | 42 | bool createVoiceFile(ProgressloggerInterface* logger); |
46 | 43 | ||
diff --git a/rbutil/sansapatcher/sansapatcher.h b/rbutil/sansapatcher/sansapatcher.h index 7f113ec083..d082e6b08b 100644 --- a/rbutil/sansapatcher/sansapatcher.h +++ b/rbutil/sansapatcher/sansapatcher.h | |||
@@ -20,6 +20,10 @@ | |||
20 | #ifndef _SANSAPATCHER_H | 20 | #ifndef _SANSAPATCHER_H |
21 | #define _SANSAPATCHER_H | 21 | #define _SANSAPATCHER_H |
22 | 22 | ||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
23 | #include "sansaio.h" | 27 | #include "sansaio.h" |
24 | 28 | ||
25 | /* Size of buffer for disk I/O - 8MB is large enough for any version | 29 | /* Size of buffer for disk I/O - 8MB is large enough for any version |
@@ -40,4 +44,8 @@ int sansa_update_of(struct sansa_t* sansa,char* filename); | |||
40 | int sansa_update_ppbl(struct sansa_t* sansa,char* filename); | 44 | int sansa_update_ppbl(struct sansa_t* sansa,char* filename); |
41 | void sansa_list_images(struct sansa_t* sansa); | 45 | void sansa_list_images(struct sansa_t* sansa); |
42 | 46 | ||
47 | #ifdef __cplusplus | ||
48 | } | ||
43 | #endif | 49 | #endif |
50 | #endif | ||
51 | |||
diff --git a/tools/rbspeex/rbspeex.h b/tools/rbspeex/rbspeex.h index 00d045c74a..2c5cb297fd 100644 --- a/tools/rbspeex/rbspeex.h +++ b/tools/rbspeex/rbspeex.h | |||
@@ -21,6 +21,10 @@ | |||
21 | 21 | ||
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | 23 | ||
24 | #ifdef __cplusplus | ||
25 | extern "C" { | ||
26 | #endif | ||
27 | |||
24 | unsigned int get_long_le(unsigned char *p); | 28 | unsigned int get_long_le(unsigned char *p); |
25 | bool get_wave_metadata(FILE *fd, int *numchan, int *bps, int *sr, int *numsamples); | 29 | bool get_wave_metadata(FILE *fd, int *numchan, int *bps, int *sr, int *numsamples); |
26 | bool encode_file(FILE *fin, FILE *fout, float quality, int complexity, | 30 | bool encode_file(FILE *fin, FILE *fout, float quality, int complexity, |
@@ -29,6 +33,8 @@ bool encode_file(FILE *fin, FILE *fout, float quality, int complexity, | |||
29 | void put_ushort_le(unsigned short x, unsigned char *out); | 33 | void put_ushort_le(unsigned short x, unsigned char *out); |
30 | void put_uint_le(unsigned int x, unsigned char *out); | 34 | void put_uint_le(unsigned int x, unsigned char *out); |
31 | 35 | ||
32 | 36 | #ifdef __cplusplus | |
37 | } | ||
38 | #endif | ||
33 | #endif | 39 | #endif |
34 | 40 | ||
diff --git a/tools/voicefont.h b/tools/voicefont.h index 9db6bcaf39..1f9c7fc326 100644 --- a/tools/voicefont.h +++ b/tools/voicefont.h | |||
@@ -27,7 +27,15 @@ | |||
27 | 27 | ||
28 | #include <stdio.h> | 28 | #include <stdio.h> |
29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | 30 | ||
31 | #ifdef __cplusplus | ||
32 | extern "C" { | ||
33 | #endif | ||
34 | |||
31 | int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output); | 35 | int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output); |
32 | 36 | ||
37 | #ifdef __cplusplus | ||
38 | } | ||
33 | #endif | 39 | #endif |
40 | #endif | ||
41 | |||
diff --git a/tools/wavtrim.h b/tools/wavtrim.h index 46c8ff871b..fe78c75818 100644 --- a/tools/wavtrim.h +++ b/tools/wavtrim.h | |||
@@ -21,7 +21,14 @@ | |||
21 | 21 | ||
22 | #ifndef WAVTRIM_H | 22 | #ifndef WAVTRIM_H |
23 | #define WAVTRIM_H | 23 | #define WAVTRIM_H |
24 | 24 | ||
25 | #ifdef __cplusplus | ||
26 | extern "C" { | ||
27 | #endif | ||
25 | int wavtrim(char * filename, int maxsilence ,char* errstring,int errsize); | 28 | int wavtrim(char * filename, int maxsilence ,char* errstring,int errsize); |
26 | 29 | ||
30 | #ifdef __cplusplus | ||
31 | } | ||
27 | #endif | 32 | #endif |
33 | #endif | ||
34 | |||