version 1.1.1.1, 2012/02/21 23:37:57
|
version 1.1.1.2, 2013/07/22 01:22:19
|
Line 1372 xmlFreeInputStream(xmlParserInputPtr input) {
|
Line 1372 xmlFreeInputStream(xmlParserInputPtr input) {
|
* xmlNewInputStream: |
* xmlNewInputStream: |
* @ctxt: an XML parser context |
* @ctxt: an XML parser context |
* |
* |
* Create a new input stream structure | * Create a new input stream structure. |
| * |
* Returns the new input stream or NULL |
* Returns the new input stream or NULL |
*/ |
*/ |
xmlParserInputPtr |
xmlParserInputPtr |
xmlNewInputStream(xmlParserCtxtPtr ctxt) { |
xmlNewInputStream(xmlParserCtxtPtr ctxt) { |
xmlParserInputPtr input; |
xmlParserInputPtr input; |
static int id = 0; |
|
|
|
input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput)); |
input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput)); |
if (input == NULL) { |
if (input == NULL) { |
Line 1389 xmlNewInputStream(xmlParserCtxtPtr ctxt) {
|
Line 1389 xmlNewInputStream(xmlParserCtxtPtr ctxt) {
|
input->line = 1; |
input->line = 1; |
input->col = 1; |
input->col = 1; |
input->standalone = -1; |
input->standalone = -1; |
|
|
/* |
/* |
* we don't care about thread reentrancy unicity for a single | * If the context is NULL the id cannot be initialized, but that |
* parser context (and hence thread) is sufficient. | * should not happen while parsing which is the situation where |
| * the id is actually needed. |
*/ |
*/ |
input->id = id++; | if (ctxt != NULL) |
| input->id = ctxt->input_id++; |
| |
return(input); |
return(input); |
} |
} |
|
|
Line 1757 xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
|
Line 1761 xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
|
ctxt->charset = XML_CHAR_ENCODING_UTF8; |
ctxt->charset = XML_CHAR_ENCODING_UTF8; |
ctxt->catalogs = NULL; |
ctxt->catalogs = NULL; |
ctxt->nbentities = 0; |
ctxt->nbentities = 0; |
|
ctxt->input_id = 1; |
xmlInitNodeInfoSeq(&ctxt->node_seq); |
xmlInitNodeInfoSeq(&ctxt->node_seq); |
return(0); |
return(0); |
} |
} |