mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Patched warning issued on SGI by Stephane.Conversy@lri.fr, Daniel.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Mon Aug 30 13:22:26 CEST 1999
|
||||||
|
|
||||||
|
* parser.c valid.[ch] xpath.c: patched compilation warnings reported
|
||||||
|
on SGI by Stephane.Conversy@lri.fr
|
||||||
|
|
||||||
Sun Aug 29 22:27:29 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
|
Sun Aug 29 22:27:29 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
* all .h : changed the prototype declaration indent as in gtk
|
* all .h : changed the prototype declaration indent as in gtk
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
|
|
||||||
#ifndef __XML_VALID_H__
|
#ifndef __XML_VALID_H__
|
||||||
#define __XML_VALID_H__
|
#define __XML_VALID_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -95,7 +100,8 @@ void xmlDumpNotationTable(xmlBufferPtr buf,
|
|||||||
xmlNotationTablePtr table);
|
xmlNotationTablePtr table);
|
||||||
|
|
||||||
/* Element Content */
|
/* Element Content */
|
||||||
xmlElementContentPtr xmlNewElementContent (CHAR *name, int type);
|
xmlElementContentPtr xmlNewElementContent (CHAR *name,
|
||||||
|
xmlElementContentType type);
|
||||||
xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
|
xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
|
||||||
void xmlFreeElementContent(xmlElementContentPtr cur);
|
void xmlFreeElementContent(xmlElementContentPtr cur);
|
||||||
|
|
||||||
@ -103,7 +109,7 @@ void xmlFreeElementContent(xmlElementContentPtr cur);
|
|||||||
xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
|
xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
|
||||||
xmlDtdPtr dtd,
|
xmlDtdPtr dtd,
|
||||||
const CHAR *name,
|
const CHAR *name,
|
||||||
int type,
|
xmlElementContentType type,
|
||||||
xmlElementContentPtr content);
|
xmlElementContentPtr content);
|
||||||
xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table);
|
xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table);
|
||||||
void xmlFreeElementTable (xmlElementTablePtr table);
|
void xmlFreeElementTable (xmlElementTablePtr table);
|
||||||
@ -120,8 +126,8 @@ xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
|
|||||||
xmlDtdPtr dtd,
|
xmlDtdPtr dtd,
|
||||||
const CHAR *elem,
|
const CHAR *elem,
|
||||||
const CHAR *name,
|
const CHAR *name,
|
||||||
int type,
|
xmlAttributeType type,
|
||||||
int def,
|
xmlAttributeDefault def,
|
||||||
const CHAR *defaultValue,
|
const CHAR *defaultValue,
|
||||||
xmlEnumerationPtr tree);
|
xmlEnumerationPtr tree);
|
||||||
xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
||||||
@ -187,4 +193,8 @@ xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd,
|
|||||||
const CHAR *name);
|
const CHAR *name);
|
||||||
xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd,
|
xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd,
|
||||||
const CHAR *name);
|
const CHAR *name);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif /* __XML_VALID_H__ */
|
#endif /* __XML_VALID_H__ */
|
||||||
|
33
parser.c
33
parser.c
@ -4658,7 +4658,7 @@ xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt) {
|
|||||||
while ((CUR == 0) && (ctxt->inputNr > 1))
|
while ((CUR == 0) && (ctxt->inputNr > 1))
|
||||||
xmlPopInput(ctxt);
|
xmlPopInput(ctxt);
|
||||||
|
|
||||||
if ((CUR_PTR == check) && (cons = ctxt->input->consumed)) {
|
if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"xmlParseDocTypeDecl: error detected in Markup declaration\n");
|
"xmlParseDocTypeDecl: error detected in Markup declaration\n");
|
||||||
@ -5146,15 +5146,20 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
|
|||||||
const CHAR *openTag = CUR_PTR;
|
const CHAR *openTag = CUR_PTR;
|
||||||
CHAR *name;
|
CHAR *name;
|
||||||
xmlParserNodeInfo node_info;
|
xmlParserNodeInfo node_info;
|
||||||
|
xmlNodePtr ret;
|
||||||
|
|
||||||
/* Capture start position */
|
/* Capture start position */
|
||||||
node_info.begin_pos = CUR_PTR - ctxt->input->base;
|
if (ctxt->record_info) {
|
||||||
node_info.begin_line = ctxt->input->line;
|
node_info.begin_pos = ctxt->input->consumed +
|
||||||
|
(CUR_PTR - ctxt->input->base);
|
||||||
|
node_info.begin_line = ctxt->input->line;
|
||||||
|
}
|
||||||
|
|
||||||
name = xmlParseStartTag(ctxt);
|
name = xmlParseStartTag(ctxt);
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ret = ctxt->node;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* [ VC: Root Element Type ]
|
* [ VC: Root Element Type ]
|
||||||
@ -5188,6 +5193,17 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
|
|||||||
*/
|
*/
|
||||||
nodePop(ctxt);
|
nodePop(ctxt);
|
||||||
free(name);
|
free(name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Capture end position and add node
|
||||||
|
*/
|
||||||
|
if ( ret != NULL && ctxt->record_info ) {
|
||||||
|
node_info.end_pos = ctxt->input->consumed +
|
||||||
|
(CUR_PTR - ctxt->input->base);
|
||||||
|
node_info.end_line = ctxt->input->line;
|
||||||
|
node_info.node = ret;
|
||||||
|
xmlParserAddNodeInfo(ctxt, &node_info);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5214,6 +5230,17 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
|
|||||||
*/
|
*/
|
||||||
xmlParseEndTag(ctxt, name);
|
xmlParseEndTag(ctxt, name);
|
||||||
free(name);
|
free(name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Capture end position and add node
|
||||||
|
*/
|
||||||
|
if ( ret != NULL && ctxt->record_info ) {
|
||||||
|
node_info.end_pos = ctxt->input->consumed +
|
||||||
|
(CUR_PTR - ctxt->input->base);
|
||||||
|
node_info.end_line = ctxt->input->line;
|
||||||
|
node_info.node = ret;
|
||||||
|
xmlParserAddNodeInfo(ctxt, &node_info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
9
valid.c
9
valid.c
@ -43,7 +43,7 @@ xmlAttributePtr xmlScanAttributeDecl(xmlDtdPtr dtd, const CHAR *elem);
|
|||||||
* Returns NULL if not, othervise the new element content structure
|
* Returns NULL if not, othervise the new element content structure
|
||||||
*/
|
*/
|
||||||
xmlElementContentPtr
|
xmlElementContentPtr
|
||||||
xmlNewElementContent(CHAR *name, int type) {
|
xmlNewElementContent(CHAR *name, xmlElementContentType type) {
|
||||||
xmlElementContentPtr ret;
|
xmlElementContentPtr ret;
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
@ -296,7 +296,7 @@ xmlCreateElementTable(void) {
|
|||||||
*/
|
*/
|
||||||
xmlElementPtr
|
xmlElementPtr
|
||||||
xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *name,
|
xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *name,
|
||||||
int type, xmlElementContentPtr content) {
|
xmlElementContentType type, xmlElementContentPtr content) {
|
||||||
xmlElementPtr ret, cur;
|
xmlElementPtr ret, cur;
|
||||||
xmlElementTablePtr table;
|
xmlElementTablePtr table;
|
||||||
int i;
|
int i;
|
||||||
@ -741,8 +741,9 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
|
|||||||
*/
|
*/
|
||||||
xmlAttributePtr
|
xmlAttributePtr
|
||||||
xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *elem,
|
xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *elem,
|
||||||
const CHAR *name, int type, int def,
|
const CHAR *name, xmlAttributeType type,
|
||||||
const CHAR *defaultValue, xmlEnumerationPtr tree) {
|
xmlAttributeDefault def, const CHAR *defaultValue,
|
||||||
|
xmlEnumerationPtr tree) {
|
||||||
xmlAttributePtr ret, cur;
|
xmlAttributePtr ret, cur;
|
||||||
xmlAttributeTablePtr table;
|
xmlAttributeTablePtr table;
|
||||||
xmlElementPtr elemDef;
|
xmlElementPtr elemDef;
|
||||||
|
18
valid.h
18
valid.h
@ -9,6 +9,11 @@
|
|||||||
|
|
||||||
#ifndef __XML_VALID_H__
|
#ifndef __XML_VALID_H__
|
||||||
#define __XML_VALID_H__
|
#define __XML_VALID_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -95,7 +100,8 @@ void xmlDumpNotationTable(xmlBufferPtr buf,
|
|||||||
xmlNotationTablePtr table);
|
xmlNotationTablePtr table);
|
||||||
|
|
||||||
/* Element Content */
|
/* Element Content */
|
||||||
xmlElementContentPtr xmlNewElementContent (CHAR *name, int type);
|
xmlElementContentPtr xmlNewElementContent (CHAR *name,
|
||||||
|
xmlElementContentType type);
|
||||||
xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
|
xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
|
||||||
void xmlFreeElementContent(xmlElementContentPtr cur);
|
void xmlFreeElementContent(xmlElementContentPtr cur);
|
||||||
|
|
||||||
@ -103,7 +109,7 @@ void xmlFreeElementContent(xmlElementContentPtr cur);
|
|||||||
xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
|
xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
|
||||||
xmlDtdPtr dtd,
|
xmlDtdPtr dtd,
|
||||||
const CHAR *name,
|
const CHAR *name,
|
||||||
int type,
|
xmlElementContentType type,
|
||||||
xmlElementContentPtr content);
|
xmlElementContentPtr content);
|
||||||
xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table);
|
xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table);
|
||||||
void xmlFreeElementTable (xmlElementTablePtr table);
|
void xmlFreeElementTable (xmlElementTablePtr table);
|
||||||
@ -120,8 +126,8 @@ xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
|
|||||||
xmlDtdPtr dtd,
|
xmlDtdPtr dtd,
|
||||||
const CHAR *elem,
|
const CHAR *elem,
|
||||||
const CHAR *name,
|
const CHAR *name,
|
||||||
int type,
|
xmlAttributeType type,
|
||||||
int def,
|
xmlAttributeDefault def,
|
||||||
const CHAR *defaultValue,
|
const CHAR *defaultValue,
|
||||||
xmlEnumerationPtr tree);
|
xmlEnumerationPtr tree);
|
||||||
xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
||||||
@ -187,4 +193,8 @@ xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd,
|
|||||||
const CHAR *name);
|
const CHAR *name);
|
||||||
xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd,
|
xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd,
|
||||||
const CHAR *name);
|
const CHAR *name);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif /* __XML_VALID_H__ */
|
#endif /* __XML_VALID_H__ */
|
||||||
|
2
xpath.c
2
xpath.c
@ -3930,11 +3930,9 @@ xmlXPathEvalBasis(xmlXPathParserContextPtr ctxt) {
|
|||||||
int nodetest = NODE_TEST_NONE;
|
int nodetest = NODE_TEST_NONE;
|
||||||
int nodetype = 0;
|
int nodetype = 0;
|
||||||
xmlNodeSetPtr newset = NULL;
|
xmlNodeSetPtr newset = NULL;
|
||||||
int attribute = 0;
|
|
||||||
|
|
||||||
if (CUR == '@') {
|
if (CUR == '@') {
|
||||||
NEXT;
|
NEXT;
|
||||||
attribute = 1;
|
|
||||||
axis = AXIS_ATTRIBUTE;
|
axis = AXIS_ATTRIBUTE;
|
||||||
goto parse_NodeTest;
|
goto parse_NodeTest;
|
||||||
} else if (CUR == '*') {
|
} else if (CUR == '*') {
|
||||||
|
Reference in New Issue
Block a user