summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-02-13 10:37:27 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-02-13 10:37:27 +0100
commit7949793f001d8df78a34748ae706571e234618be (patch)
tree8da2382c23b3b7d8b4f0440ff81743f3ef12d04b
parent24a2b4680cef85329b9e7d30c1e6fb4f2f3d6de6 (diff)
downloadvdr-7949793f001d8df78a34748ae706571e234618be.tar.gz
vdr-7949793f001d8df78a34748ae706571e234618be.tar.bz2
Exported some libsi functions
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--libsi/si.c15
-rw-r--r--libsi/si.h9
4 files changed, 18 insertions, 8 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 6f01a941..696a8ef2 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1683,6 +1683,7 @@ Lucian Muresan <lucianm@users.sourceforge.net>
for suggesting to make the function ExchangeChars()
for reporting duplicate texts in i18n.c
for suggesting to use 'gettext' for internationalization
+ for exporting some libsi functions
Mattias Grönlund <Mattias@Gronlund.net>
for pointing out a missing cleanup at program exit in case there is a problem
diff --git a/HISTORY b/HISTORY
index 463771f5..8f6d51c4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6359,3 +6359,4 @@ Video Disk Recorder Revision History
without the folder path (if any). Otherwise with long folder paths the actual
recording name was not visible at all.
- Updated the Romanian OSD texts (thanks to Lucian Muresan).
+- Exported some libsi functions (thanks to Lucian Muresan).
diff --git a/libsi/si.c b/libsi/si.c
index 01ab9bf2..0fd832d8 100644
--- a/libsi/si.c
+++ b/libsi/si.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.c 2.1 2009/12/05 16:20:12 kls Exp $
+ * $Id: si.c 2.2 2010/02/13 10:31:52 kls Exp $
* *
***************************************************************************/
@@ -311,6 +311,11 @@ static const char *CharacterTables2[] = {
static const char *SystemCharacterTable = NULL;
bool SystemCharacterTableIsSingleByte = true;
+bool systemCharacterTableIsSingleByte(void)
+{
+ return SystemCharacterTableIsSingleByte;
+}
+
bool SetSystemCharacterTable(const char *CharacterTable) {
if (CharacterTable) {
for (unsigned int i = 0; i < NumEntries(CharacterTables1); i++) {
@@ -335,11 +340,7 @@ bool SetSystemCharacterTable(const char *CharacterTable) {
return false;
}
-// Determines the character table used in the given buffer and returns
-// a string indicating that table. If no table can be determined, the
-// default ISO6937 is returned. If a table can be determined, the buffer
-// and length are adjusted accordingly.
-static const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte = NULL) {
+const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte) {
const char *cs = "ISO6937";
// Workaround for broadcaster stupidity: according to
// "ETSI EN 300 468" the default character set is ISO6937. But unfortunately some
@@ -375,7 +376,7 @@ static const char *getCharacterTable(const unsigned char *&buffer, int &length,
return cs;
}
-static bool convertCharacterTable(const char *from, size_t fromLength, char *to, size_t toLength, const char *fromCode)
+bool convertCharacterTable(const char *from, size_t fromLength, char *to, size_t toLength, const char *fromCode)
{
if (SystemCharacterTable) {
iconv_t cd = iconv_open(SystemCharacterTable, fromCode);
diff --git a/libsi/si.h b/libsi/si.h
index b28b14ab..d6a1dc19 100644
--- a/libsi/si.h
+++ b/libsi/si.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.h 2.2 2009/12/06 11:37:35 kls Exp $
+ * $Id: si.h 2.3 2010/02/13 10:31:34 kls Exp $
* *
***************************************************************************/
@@ -492,6 +492,13 @@ protected:
// like "iso8859-15" or "utf-8" (case insensitive).
// Returns true if the character table was recognized.
bool SetSystemCharacterTable(const char *CharacterTable);
+// Determines the character table used in the given buffer and returns
+// a string indicating that table. If no table can be determined, the
+// default ISO6937 is returned. If a table can be determined, the buffer
+// and length are adjusted accordingly.
+const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte = NULL);
+bool convertCharacterTable(const char *from, size_t fromLength, char *to, size_t toLength, const char *fromCode);
+bool systemCharacterTableIsSingleByte(void);
} //end of namespace