summaryrefslogtreecommitdiff
path: root/hash.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix hash callback signaturesNick Wellnhofer2017-11-091-2/+17
| | | | | | | | | Make sure that all parameters and return values of hash callback functions exactly match the callback function type. This is required to pass clang's Control Flow Integrity checks and to allow compilation to asm.js with Emscripten. Fixes bug 784861.
* Spelling and grammar fixesNick Wellnhofer2017-06-171-2/+2
| | | | | Fixes bug 743172, bug 743489, bug 769632, bug 782400 and a few other misspellings.
* Fix various Missing Null checksGaurav Gupta2014-07-141-0/+3
| | | | For https://bugzilla.gnome.org/show_bug.cgi?id=732823
* Improve the hashing functionsDaniel Franke2013-04-121-0/+4
|
* Big space and tab cleanupDaniel Veillard2012-09-111-22/+22
| | | | Remove all space before tabs and space and tabs at end of lines.
* Cleanup on randomizationDaniel Veillard2012-05-181-9/+1
| | | | | | | tsan reported that rand() is not thread safe, so create a thread safe wrapper, use rand_r() if available. Consolidate the function, initialization and cleanup in dict.c and make sure it is initialized in xmlInitParser()
* Add hash randomization to hash and dict structuresDaniel Veillard2012-02-131-1/+37
| | | | | | | | | Following http://www.ocert.org/advisories/ocert-2011-003.html it seems that having hash randomization might be a good idea when using XML with untrusted data * configure.in: lookup for rand, srand and time * dict.c: add randomization to dictionaries hash tables * hash.c: add randomization to normal hash tables
* Chasing dead assignments reported by clang-scanDaniel Veillard2009-09-071-1/+0
| | | | | | | | * SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
* handle a erroneous parsing of attributes in case said attribute has beenDaniel Veillard2008-01-111-2/+13
| | | | | | | | | | | * parser.c: handle a erroneous parsing of attributes in case said attribute has been redeclared in the DTD with a different type * hash.c: fix the hash scanner to not crash if a first element from the hash list is been removed in the callback Daniel svn path=/trunk/; revision=3669
* revamped the elfgcchack.h format to cope with gcc4 change of aliasingDaniel Veillard2005-04-011-0/+2
| | | | | | | | | | | * doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h format to cope with gcc4 change of aliasing allowed scopes, had to add extra informations to doc/libxml2-api.xml to separate the header from the c module source. * *.c: updated all c library files to add a #define bottom_xxx and reimport elfgcchack.h thereafter, and a bit of cleanups. * doc//* testapi.c: regenerated when rebuilding the API Daniel
* added xmlHashCreateDict where the hash reuses the dictionnary for internalDaniel Veillard2005-01-231-36/+164
| | | | | | | | * hash.c include/libxml/hash.h: added xmlHashCreateDict where the hash reuses the dictionnary for internal strings * entities.c valid.c parser.c: reuse that new API, leads to a decent speedup when parsing for example DocBook documents. Daniel
* change suggested by Anthony Carrico when unregistering a namespace prefixDaniel Veillard2003-10-291-4/+5
| | | | | | | * xpath.c: change suggested by Anthony Carrico when unregistering a namespace prefix to a context * hash.c: be more careful about calling callbacks with NULL payloads. Daniel
* preparing a beta3 solving the ABI problems make sure the global variablesDaniel Veillard2003-09-251-1/+1
| | | | | | | | | | | * configure.in: preparing a beta3 solving the ABI problems * globals.c parser.c parserInternals.c testHTML.c HTMLparser.c SAX.c include/libxml/globals.h include/libxml/SAX.h: make sure the global variables for the default SAX handler are V1 ones to avoid ABI compat problems. * xmlreader.c: cleanup of uneeded code * hash.c: fix a comment Daniel
* fixing some comments to avoid warnings from apibuild.py DanielDaniel Veillard2003-09-251-1/+1
| | | | | | | * SAX2.c hash.c parser.c include/libxml/xmlexports.h include/libxml/xmlmemory.h include/libxml/xmlversion.h.in: fixing some comments to avoid warnings from apibuild.py Daniel
* 2.6.0beta1 changes Fixing attribute normalization, might not be totallyDaniel Veillard2003-09-101-3/+3
| | | | | | | | | | | | | | | * configure.in doc/* : 2.6.0beta1 changes * SAX2.c hash.c parser.c parserInternals.c: Fixing attribute normalization, might not be totally fixed but this should make sure SAX event provide the right strings for attributes except entities for which libxml2 is different by default This should fix #109564 * result/attrib.xml.sax result/ent3.sax result/p3p.sax: minor changes in attribute callback values * result/c14n/with-comments/example-4 result/c14n/without-comments/example-4: this also fixes a subtle bug in the canonicalization tests. Daniel
* Time to commit 3 days of work rewriting the parser internal,Daniel Veillard2003-09-101-1/+124
| | | | | | | | | | | | | | | | | | | | | fixing bugs and migrating to SAX2 interface by default. There is some work letf TODO, like namespace validation and attributes normalization (this break C14N right now) * Makefile.am: fixed the test rules * include/libxml/SAX2.h include/libxml/parser.h include/libxml/parserInternals.h SAX2.c parser.c parserInternals.c: changing the parser, migrating to SAX2, adding new interface to switch back to SAX1 or initialize a SAX block for v1 or v2. Most of the namespace work is done below SAX, as well as attribute defaulting * globals.c: changed initialization of the default SAX handlers * hash.c tree.c include/libxml/hash.h: added QName specific handling * xmlIO.c: small fix * xmllint.c testSAX.c: provide a --sax1 switch to test the old version code path * result/p3p result/p3p.sax result/noent/p3p test/p3p: the new code pointed out a typo in a very old test namespace Daniel
* optimization when freeing hash tables. some tuning of buffer allocationsDaniel Veillard2003-08-191-1/+4
| | | | | | | | | | | | * dict.c hash.c: optimization when freeing hash tables. * parser.c xmlIO.c include/libxml/tree.h: some tuning of buffer allocations * parser.c parserInternals.c include/libxml/parser.h: keep a single allocated block for all the attributes callbacks, avoid useless malloc()/free() * tree.c: do not realloc() when growing a buffer if the buffer ain't full, malloc/memcpy/free avoid copying memory. Daniel
* code cleanup, especially the function comments. fixed a small bug whenDaniel Veillard2002-12-101-11/+13
| | | | | | | | | | * DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c nanoftp.c nanohttp.c parser.c parserInternals.c testC14N.c testDocbook.c threads.c tree.c valid.c xmlIO.c xmllint.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c: code cleanup, especially the function comments. * tree.c: fixed a small bug when freeing nodes which are XInclude ones. Daniel
* cosmetic cleanup started integrating a DTD validation layer based on theDaniel Veillard2002-09-131-2/+2
| | | | | | | * hash.c: cosmetic cleanup * valid.c include/libxml/tree.h include/libxml/valid.h: started integrating a DTD validation layer based on the regexps Daniel
* applied patch from Richard Jinks for the namespace axis + fixed a memoryDaniel Veillard2002-07-011-39/+90
| | | | | | | | | | | * xpath.c: applied patch from Richard Jinks for the namespace axis + fixed a memory error. * parser.c parserInternals.c: applied patches from Peter Jacobi removing ctxt->token for good. * xmlschemas.c xmlschemastypes.c: fixed a few memory leaks popped out by the regression tests. * Makefile.am: patch for threads makefile from Gary Pennington Daniel
* applied a patch from Peter Jacobi to solve a problem when compiling withDaniel Veillard2002-06-181-1/+17
| | | | | | | | * hash.c: applied a patch from Peter Jacobi to solve a problem when compiling with the Watcom C on Win32 * result/schemas/*.err: the change of hashing algo generated permutations in the output Daniel
* applied patch from Sander Vesik improving the quality of the hashDaniel Veillard2002-06-171-6/+3
| | | | | | * hash.c: applied patch from Sander Vesik improving the quality of the hash function. Daniel
* preparing 2.4.18 updated and rebuilt the web site implement the newLIBXML_2_4_18Daniel Veillard2002-03-181-0/+1
| | | | | | | | | | | | | * configure.in: preparing 2.4.18 * doc/*: updated and rebuilt the web site * *.c libxml.h: implement the new IN_LIBXML scheme discussed with the Windows and Cygwin maintainers. * parser.c: humm, changed the way the SAX parser work when xmlSubstituteEntitiesDefault(1) is set, it will then do the entity registration and loading by itself in case the user provided SAX getEntity() returns NULL. * testSAX.c: added --noent to test the behaviour. Daniel
* patch from Anthony Jones for hash.c allocation size trying to work aroundDaniel Veillard2002-01-141-4/+4
| | | | | | | * hash.c: patch from Anthony Jones for hash.c allocation size * Makefile.am: trying to work around Yet Another Libtool Madness and build the 2.4.13 release finally ... daniel
* applied 42 documentation patches from Charlie Bozeman. Regenerated theDaniel Veillard2001-12-311-31/+31
| | | | | | * *.c include/libxml/*.h doc/html/*: applied 42 documentation patches from Charlie Bozeman. Regenerated the HTML docs. Daniel
* - include/libxml/globals.h include/libxml/threads.h threads.cDaniel Veillard2001-10-171-0/+1
| | | | | | testThreads.c: far more testing, cleaning up bugs - *.c : make sure globals.h is always included. Daniel
* added xmlHashScannerFull, xmlHashScanFull and xmlHashScannFull3 to getThomas Broyer2001-07-221-2/+38
| | | | | | * hash.c include/libxml/hash.h: added xmlHashScannerFull, xmlHashScanFull and xmlHashScannFull3 to get passed the three keys as arguments to the callback function
* Cleanup, cleanup .. removed libxml softlink for good cleanup to get 100%Daniel Veillard2001-07-181-3/+5
| | | | | | | | Cleanup, cleanup .. * configure.in Makefile.am: removed libxml softlink for good * include/libxml/*.h *.c doc/Makefile.am: cleanup to get 100% coverage by gtk-doc Daniel
* - HTMLparser.c: Closed bug #54891Daniel Veillard2001-05-191-0/+3
| | | | | | | | | | - result/HTML/cf_128.html* test/HTML/cf_128.html: added the test to the suite forgot to commit this one yesterday - encoding.h hash.c nanoftp.h parser.h tree.h uri.h xlink.h xpointer.c: applied a documentation patch from LotR and filled in a few missing descriptions Daniel
* trio upgrade and integrationBjorn Reese2001-04-211-6/+2
|
* Geez, this one was painful ! I still need to handle entities referencesDaniel Veillard2001-04-201-1/+1
| | | | | | | | | | | | | | for the validation step but I have a clean way to add this without touching the algorithm: - valid.[ch] tree.h: worked *hard* to get non-determinist content validation without using an ugly NFA -> DFA algo in the source. Made a specific algorithm easier to maintain, using a single stack and without recursion. - Makefile.am test/VCM/*.xml: added more tests to "make Validtests" - hash.c: made the growing routine static - tree.h parser.c: added the parent information to an xmlElementContent node. Daniel
* - debugXML.c hash.c tree.h valid.c : some changes related toDaniel Veillard2001-04-181-50/+146
| | | | | | | the validation suport to improve speed with DocBook - result/VC/OneID2 result/VC/OneID3 : this slightly changes the way validation errors get reported Daniel
* Completely changed the way the XPath evaluation is done, likely to breakDaniel Veillard2001-03-181-1/+2
| | | | | | | | | | | | | | | stuff like libxslt right now: - Makefile.am: detect XPath memleaks in regreson tests - error.c: fixed and error w.r.t. error reporting still using stderr - hash.c: added new line at end of file - tree.h: minor cleanup - xpath.[ch] xpointer.[ch]: Major changes ! Separated XPath expression parsing from evaluation, resulted in a number of changes internally, and in XPointer. Likely to break stuff using xpathInternals.h but should remain binary compatible, new interfaces will be added. Daniel
* Revert directory structure changesOwen Taylor2001-02-231-0/+620
|
* moved to libxml directory - this allow simplify automake/autoconf. NowCET 2001 Tomasz Kłoczko2001-02-231-620/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Thu Feb 23 02:03:56 CET 2001 Tomasz Kłoczko <kloczek@pld.org.pl> * *.c *.h libxml files: moved to libxml directory - this allow simplify automake/autoconf. Now isn't neccessary hack on am/ac level for make and remove libxml symlink (modified for this also configure.in and main Makefile.am). Now automake abilities are used in best way (like in many other projects with libraries). * include/win32config.h: moved to libxml directory (now include directory isn't neccessary). * Makefile.am, examples/Makefile.am, libxml/Makefile.am: added empty DEFS and in INCLUDES rest only -I$(top_builddir) - this allow minimize parameters count passed to libtool script (now compilation is also slyghtly more quiet). * configure.in: simplifies libzdetestion - prepare separated variables for keep libz name and path to libz header files isn't realy neccessary (if someone have libz installed in non standard prefix path to header files ald library can be passed as: $ CFALGS="-I</libz.h/path>" LDFLAGS="-L</libz/path>" ./configure * autogen.sh: check now for libxml/entities.h. After above building libxml pass correctly and also pass "make install DESTDIR=</install/prefix>" from tar ball generated by "make dist". Seems ac/am reorganization is finished. This changes not touches any other things on *.{c,h} files level.
* - hash.[ch]: added Paolo Casarini patch to provide Delete fromDaniel Veillard2001-02-141-0/+87
| | | | | | hash functionnalities. - doc/html/* : rebuild the doc Daniel
* - hash.[ch]: added a first version of xmlHashSize()Daniel Veillard2001-02-081-0/+18
| | | | | - valid.c: another bug fix from Gary Pennington Daniel
* Various patches and bug fixes, and XInclude progresses:Daniel Veillard2000-11-071-0/+6
| | | | | | | | | | | | | | | - nanohttp.[ch]: applied Wayne Davison patches to access the WWW-Authorization header. - parser.c: Closed Bug#30847: Problems when switching encoding in short files by applying Simon Berg's patch. - valid.c: fixed a validation problem - hash.c parser.h parserInternals.h testHTML.c testSAX.c tree.h xmlerror.h xmlmemory.h xmlversion.h.in: applied a DLL patch from Wayne Davison - xpointer.[ch]: added first version of xmlXPtrBuildNodeList() need to be extended to non full nodes selections. - xinclude.c: starts to work decently Daniel
* XInclude and other stuff while travelling. Contributed patches:Daniel Veillard2000-11-061-0/+1
| | | | | | | | | | | | - tree.[ch] xinclude.[ch] xmllint.c configure.in valid.c debugXML.c xmlversion.h.in: Started adding XInclude support, this is a new xmllint option - tree.c xpath.c: applied TOM patches for XPath - xpointer.c: fixed a couple of errors. - uri.c: added an escaping function needed for xinclude - testXPath.c hash.c HTMLtree.c: minor cleanups raised by new warning from RH70 gcc's version Daniel
* Bunch of fixes, finishing moving datastructures to the hash stuff:Daniel Veillard2000-10-241-17/+214
| | | | | | | | | | | | | | | | | | | - hash.[ch] debugXML.c: expanded/enhanced the API, added multikey tuples, made hash structure opaque - valid.[ch]: moved elements, attributes, notations decalarations as well as ID and refs to hash tables. - entities.c: hash cleanup - xmlmemory.c: fixed a dump problem in debug mode - include/Makefile.am: problem passing in DESTDIR= values patch from Marc Christensen <marc@calderasystems.com> - nanohttp.c: removed debugging remains - HTMLparser.c: the bogus tag should be ignored (Wayne) - HTMLparser.c parser.c: fixing a number of problems with the macros in the *parser.c files (Wayne). - HTMLparser.c: close the previous option when opening a new one (Marc Sanfacon). - result/HTML/*: updated the HTML results accordingly Daniel
* Ooops forgot the hash module on last commit, Daniel.Daniel Veillard2000-10-231-0/+311