summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/xine-utils/xmllexer.c12
-rw-r--r--src/xine-utils/xmllexer.h3
-rw-r--r--src/xine-utils/xmlparser.c2
4 files changed, 15 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 41afdc595..09130f06b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,9 +49,9 @@ dnl are platform dependent
dnl * in Linux, the library will be named
dnl libname.so.(XINE_LT_CURRENT - XINE_LT_AGE).XINE_LT_AGE.XINE_LT_REVISION
-XINE_LT_CURRENT=19
+XINE_LT_CURRENT=20
XINE_LT_REVISION=0
-XINE_LT_AGE=18
+XINE_LT_AGE=19
dnl for a release tarball do "rm .cvsversion" before "make dist"
if test -f "${srcdir-.}/.cvsversion"; then
diff --git a/src/xine-utils/xmllexer.c b/src/xine-utils/xmllexer.c
index a77d6654a..be3bdd248 100644
--- a/src/xine-utils/xmllexer.c
+++ b/src/xine-utils/xmllexer.c
@@ -123,7 +123,7 @@ void lexer_init(const char * buf, int size) {
lprintf("buffer length %d\n", size);
}
-int lexer_get_token(char ** _tok, int * _tok_size) {
+int lexer_get_token_d(char ** _tok, int * _tok_size, int fixed) {
char *tok = *_tok;
int tok_size = *_tok_size;
@@ -458,12 +458,14 @@ int lexer_get_token(char ** _tok, int * _tok_size) {
/* pb */
if (tok_pos >= tok_size) {
+ if (fixed)
+ return T_ERROR;
*_tok_size *= 2;
*_tok = realloc (*_tok, *_tok_size);
lprintf("token buffer is too small\n");
lprintf("increasing buffer size to %d bytes\n", *_tok_size);
if (*_tok) {
- return lexer_get_token (_tok, _tok_size);
+ return lexer_get_token_d (_tok, _tok_size, 0);
} else {
return T_ERROR;
}
@@ -509,6 +511,12 @@ int lexer_get_token(char ** _tok, int * _tok_size) {
return T_ERROR;
}
+/* for ABI compatibility */
+int lexer_get_token (char *tok, int tok_size)
+{
+ return lexer_get_token_d (&tok, &tok_size, 1);
+}
+
static struct {
char code;
unsigned char namelen;
diff --git a/src/xine-utils/xmllexer.h b/src/xine-utils/xmllexer.h
index bf9948d2d..425d0e70a 100644
--- a/src/xine-utils/xmllexer.h
+++ b/src/xine-utils/xmllexer.h
@@ -51,7 +51,8 @@
/* public functions */
void lexer_init(const char * buf, int size) XINE_PROTECTED;
-int lexer_get_token(char ** tok, int * tok_size) XINE_PROTECTED;
+int lexer_get_token_d(char ** tok, int * tok_size, int fixed) XINE_PROTECTED;
+int lexer_get_token(char * tok, int tok_size) XINE_PROTECTED;
char *lexer_decode_entities (const char *tok) XINE_PROTECTED;
#endif
diff --git a/src/xine-utils/xmlparser.c b/src/xine-utils/xmlparser.c
index cc2bfe462..14ce35c54 100644
--- a/src/xine-utils/xmlparser.c
+++ b/src/xine-utils/xmlparser.c
@@ -175,7 +175,7 @@ static int _xml_parser_get_node (char ** token_buffer, int * token_buffer_size,
memset (tok, 0, *token_buffer_size);
- while ((bypass_get_token) || (res = lexer_get_token(token_buffer, token_buffer_size)) != T_ERROR) {
+ while ((bypass_get_token) || (res = lexer_get_token_d(token_buffer, token_buffer_size, 0)) != T_ERROR) {
tok = *token_buffer;
bypass_get_token = 0;
lprintf("info: %d - %d : '%s'\n", state, res, tok);