diff options
author | Matt Kraai <kraai@ftbfs.org> | 2009-10-15 22:01:24 +0100 |
---|---|---|
committer | Matt Kraai <kraai@ftbfs.org> | 2009-10-15 22:01:24 +0100 |
commit | 6efc8270ef8f75a842930a0f703cb3539f106d4b (patch) | |
tree | 441ef4577e24fe4dfef3ee823fbbf74f9920b2ab /src/xine-utils/xmllexer.h | |
parent | 93d452a4570cf3f4dd81c6c2cab66aa604f39e05 (diff) | |
download | xine-lib-6efc8270ef8f75a842930a0f703cb3539f106d4b.tar.gz xine-lib-6efc8270ef8f75a842930a0f703cb3539f106d4b.tar.bz2 |
Make the XML lexer and parser re-entrant
Diffstat (limited to 'src/xine-utils/xmllexer.h')
-rw-r--r-- | src/xine-utils/xmllexer.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/xine-utils/xmllexer.h b/src/xine-utils/xmllexer.h index 425d0e70a..bcea7d6b4 100644 --- a/src/xine-utils/xmllexer.h +++ b/src/xine-utils/xmllexer.h @@ -23,6 +23,10 @@ #ifndef XML_LEXER_H #define XML_LEXER_H +#ifndef XINE_DEPRECATED +#define XINE_DEPRECATED +#endif + #ifndef XINE_PROTECTED #define XINE_PROTECTED #endif @@ -49,10 +53,25 @@ #define T_DOCTYPE_STOP 17 /* > */ +/* public structure */ +struct lexer +{ + const char * lexbuf; + int lexbuf_size; + int lexbuf_pos; + int lex_mode; + int in_comment; + char *lex_malloc; +}; + + /* public functions */ -void lexer_init(const char * buf, int 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; +void lexer_init(const char * buf, int size) XINE_DEPRECATED XINE_PROTECTED; +struct lexer *lexer_init_r(const char * buf, int size) XINE_PROTECTED; +void lexer_finalize_r(struct lexer * lexer) XINE_PROTECTED; +int lexer_get_token_d_r(struct lexer * lexer, char ** tok, int * tok_size, int fixed) XINE_PROTECTED; +int lexer_get_token_d(char ** tok, int * tok_size, int fixed) XINE_DEPRECATED XINE_PROTECTED; +int lexer_get_token(char * tok, int tok_size) XINE_DEPRECATED XINE_PROTECTED; char *lexer_decode_entities (const char *tok) XINE_PROTECTED; #endif |