diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-07-25 17:18:57 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-07-25 17:18:57 +0000 |
commit | a53c688b2e275cccfb13f46876aeae4a33fa4f5a (patch) | |
tree | f62e0ec3979c9cc885b90f5be3e117608dc42b73 /xpath.c | |
parent | d9bad13bb2d5894eb03f0cd36d26fffa81dd6f47 (diff) | |
download | libxml2-a53c688b2e275cccfb13f46876aeae4a33fa4f5a.tar.gz |
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
Diffstat (limited to 'xpath.c')
-rw-r--r-- | xpath.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; } |