GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 3c558c37 authored by Daniel Veillard's avatar Daniel Veillard

- fix for PIs name starting with xml

 - fixed a potential problem with || and && ops
 - generate win32config.h for those on the Other Side !
Daniel
parent 0caf07a7
Wed Dec 22 12:20:53 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* parser.c: fix for PIs name starting with xml
* tree.c: fixed a potential problem with || and && ops
Tue Dec 21 17:22:17 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* parser.c: fixed a stupid = vs. == bug :-(
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -7,7 +7,9 @@
*/
#ifndef WIN32
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
#include <stdio.h>
......
......@@ -7,6 +7,11 @@
*/
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include "xmlmemory.h"
......
......@@ -142,5 +142,5 @@ AC_SUBST(HAVE_ISINF)
AC_SUBST(Z_LIBS)
AC_SUBST(M_LIBS)
AC_OUTPUT(libxml.spec Makefile doc/Makefile example/Makefile xml-config)
AC_OUTPUT(libxml.spec Makefile doc/Makefile example/Makefile xml-config win32config.h)
......@@ -7,6 +7,11 @@
* Daniel Veillard <Daniel.Veillard@w3.org>
*/
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
#include <stdio.h>
#include "tree.h"
#include "parser.h"
......
......@@ -19,7 +19,9 @@
* Daniel.Veillard@w3.org
*/
#ifndef WIN32
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -6,7 +6,9 @@
* Daniel.Veillard@w3.org
*/
#ifndef WIN32
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -6,6 +6,12 @@
* Daniel Veillard <Daniel.Veillard@w3.org>
*/
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
#include <stdio.h>
#include <stdarg.h>
#include "parser.h"
......
......@@ -14,10 +14,13 @@
/* TODO add compression support, Send the Accept- , and decompress on the
fly with ZLIB if found at compile-time */
#ifndef WIN32
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
#include <stdio.h>
#include <string.h>
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......@@ -46,6 +45,14 @@
const char *xmlParserVersion = LIBXML_VERSION;
/*
* List of XML prefixed PI allowed by W3C specs
*/
const char *xmlW3CPIs[] = {
"xml-stylesheet",
NULL
};
/************************************************************************
* *
......@@ -3321,17 +3328,21 @@ xmlParsePITarget(xmlParserCtxtPtr ctxt) {
xmlChar *name;
name = xmlParseName(ctxt);
if ((name != NULL) && (name[3] == 0) &&
if ((name != NULL) &&
((name[0] == 'x') || (name[0] == 'X')) &&
((name[1] == 'm') || (name[1] == 'M')) &&
((name[2] == 'l') || (name[2] == 'L'))) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) {
ctxt->sax->error(ctxt->userData,
int i;
for (i = 0;;i++) {
if (xmlW3CPIs[i] == NULL) break;
if (!xmlStrcmp(name, (const xmlChar *)xmlW3CPIs[i]))
return(name);
}
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) {
ctxt->sax->warning(ctxt->userData,
"xmlParsePItarget: invalid name prefix 'xml'\n");
ctxt->errNo = XML_ERR_RESERVED_XML_NAME;
/* ctxt->wellFormed = 0; !!! ? */
}
return(NULL);
}
return(name);
}
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......@@ -3000,7 +2999,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
if ((!xmlStrcmp(prop->name, name)) &&
(((prop->ns == NULL) && (node->ns != NULL) &&
(!xmlStrcmp(node->ns->href, namespace))) ||
(prop->ns != NULL) && (!xmlStrcmp(prop->ns->href, namespace)))) {
((prop->ns != NULL) && (!xmlStrcmp(prop->ns->href, namespace))))) {
xmlChar *ret;
ret = xmlNodeListGetString(node->doc, prop->val, 1);
......
......@@ -8,8 +8,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
#define HAVE_CTYPE_H
#define HAVE_STDLIB_H
#define HAVE_MALLOC_H
#define HAVE_TIME_H
#define HAVE_FCNTL_H
#define LIBXML_VERSION "@LIBXML_VERSION@"
#include <io.h>
#include <winsock2.h>
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EINPROGRESS WSAEINPROGRESS
#define EALREADY WSAEALREADY
#define ENOTSOCK WSAENOTSOCK
#define EDESTADDRREQ WSAEDESTADDRREQ
#define EMSGSIZE WSAEMSGSIZE
#define EPROTOTYPE WSAEPROTOTYPE
#define ENOPROTOOPT WSAENOPROTOOPT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
#define EOPNOTSUPP WSAEOPNOTSUPP
#define EPFNOSUPPORT WSAEPFNOSUPPORT
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#define EADDRINUSE WSAEADDRINUSE
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
#define ENETDOWN WSAENETDOWN
#define ENETUNREACH WSAENETUNREACH
#define ENETRESET WSAENETRESET
#define ECONNABORTED WSAECONNABORTED
#define ECONNRESET WSAECONNRESET
#define ENOBUFS WSAENOBUFS
#define EISCONN WSAEISCONN
#define ENOTCONN WSAENOTCONN
#define ESHUTDOWN WSAESHUTDOWN
#define ETOOMANYREFS WSAETOOMANYREFS
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#define ELOOP WSAELOOP
#define ENAMETOOLONG WSAENAMETOOLONG
#define EHOSTDOWN WSAEHOSTDOWN
#define EHOSTUNREACH WSAEHOSTUNREACH
#define ENOTEMPTY WSAENOTEMPTY
#define EPROCLIM WSAEPROCLIM
#define EUSERS WSAEUSERS
#define EDQUOT WSAEDQUOT
#define ESTALE WSAESTALE
#define EREMOTE WSAEREMOTE
#include <math.h>
static int isinf (double d) {
int expon = 0;
double val = frexp (d, &expon);
if (expon == 1025) {
if (val == 0.5) {
return 1;
} else if (val == -0.5) {
return -1;
} else {
return 0;
}
} else {
return 0;
}
}
static int isnan (double d) {
int expon = 0;
double val = frexp (d, &expon);
if (expon == 1025) {
if (val == 0.5) {
return 0;
} else if (val == -0.5) {
return 0;
} else {
return 1;
}
} else {
return 0;
}
}
......@@ -9,8 +9,7 @@
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -7,8 +7,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -5,8 +5,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
......@@ -14,8 +14,7 @@
*/
#ifdef WIN32
#define HAVE_FCNTL_H
#include <io.h>
#include "win32config.h"
#else
#include "config.h"
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment