1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

fixed the xmlLineNumbersDefault() errors, lesson don't add new functions

* parser.c parserInternals.c: fixed the xmlLineNumbersDefault()
  errors, lesson don't add new functions at 1am before a release
* xpath.c: integrated fix from Bjorn to avoid divide by zero
  from XPath initialization when possible.
Daniel
This commit is contained in:
Daniel Veillard
2001-07-25 17:18:57 +00:00
parent d9bad13bb2
commit a53c688b2e
4 changed files with 128 additions and 105 deletions

View File

@ -194,9 +194,16 @@ xmlXPathInit(void) {
if (initialized) return;
#if defined(HUGE_VAL) && defined(DBL_MAX)
xmlXPathPINF = (HUGE_VAL == DBL_MAX) ?
xmlXPathDivideBy(1.0, 0.0) : HUGE_VAL;
xmlXPathNINF = -xmlXPathPINF;
xmlXPathNAN = xmlXPathDivideBy(xmlXPathPINF, xmlXPathPINF);
#else
xmlXPathNAN = xmlXPathDivideBy(0.0, 0.0);
xmlXPathPINF = xmlXPathDivideBy(1.0, 0.0);
xmlXPathNINF = xmlXPathDivideBy(-1.0, 0.0);
#endif
initialized = 1;
}