Apologies for that - Attached the wrong patch file (honest). (Don't know about learning how to use CVS, I think I need to learn how to use Outlook Express!!!) Attached cleaned patch file - Theres a change to xmlXPathValueFlipSign() as well. I'm not sure what's best to do with the unused line / file parameters - I didn't want to take them out completely in case they came in useful - I need to check if the xmlXPatherror() function reports only syntax errors, or major "Something drastic has gone wrong here" errors. In the case of the latter, the line number may come in useful... Richard ----- Original Message ----- From: "Daniel Veillard" <veillard redhat com> To: "Richard Jinks" <cyberthymia yahoo co uk> Cc: <xml gnome org> Sent: Tuesday, March 26, 2002 4:15 PM Subject: Re: [xml] XPath Fix (part 1)
On Tue, Mar 26, 2002 at 03:49:36PM -0000, Richard Jinks wrote:Hi Attached is the patch file for the first set of fixes for XPath. As mentioned earlier, these cover -I've added two new functions to trionan.c to check / set the sign of a double (VC++6 doesn't like double a=-0.0 as Bjorn suggested, so I put a
function
into set it). I've also made the mods to the XPath math functions so they return -0
in
thecorrect places, and does floating point mods. As a temporary fix, I've modified xmlXPatherror so that it doesn't
report
the filename / line numberApplied, but they're aren't very clean :-)
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -g -O -pedantic -W - Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wc har-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast -align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prot otypes -Wnested-externs -Winline -Wredundant-decls -Wp,-MD,.deps/xpath.pp -c xpath.c -o xpath.o
xpath.c:4778:2: warning: C++ style comments are not allowed in ISO C89 xpath.c:4778:2: warning: (this will be reported only once per input file) xpath.c:159: warning: no previous prototype for `xmlXPathGetSign' xpath.c: In function `xmlXPatherror': xpath.c:1278: warning: unused parameter `file' xpath.c:1279: warning: unused parameter `line' I will have to do a bit of cleanup it seems ...I generated the patch file by running "cvs -z3 diff -c" as suggested,
and it
put the changes for both files in the one output file. Is this alright,
or
That's allright !WRT the changes to trionan.c - The two new functions (trio_get_sign() and trio_nzero()) are protected
by
the #if defined (USE_IEEE754) guard. I'm afraid that someone else will need to look into a more generic implementation of these two functions as I can't get hold of any
platforms
that don't go through this guard to test on. My understanding of different hardware and floating point maths isn't
good
enough to warrant trying to guess what might work. I would need to call upon some outside
assistance
to help with this.BTW trio is actually imported from a separate project, Bjorn is the one maintaining this code. Daniel -- Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml gnome org http://mail.gnome.org/mailman/listinfo/xml
Attachment:
xpath_new.patch
Description: Binary data