summaryrefslogtreecommitdiff
path: root/testapi.c
Commit message (Collapse)AuthorAgeFilesLines
* Release of libxml2-2.9.8v2.9.8Daniel Veillard2018-03-051-1/+39
| | | | * configure.ac doc/* libxml2.syms testapi.c: updated for the new release
* Fix callback signature in testapi.cNick Wellnhofer2017-11-141-1/+2
|
* Release of libxml2-2.9.5v2.9.5Daniel Veillard2017-09-041-8/+8
| | | | | * configure.ac, doc/xslt.html: updated for the release * doc/*, python/setup.py, testapi.c: regenerated
* Avoid out-of-bound array access in API testsNick Wellnhofer2017-06-011-0/+174
| | | | | | | | | | | The API tests combine string buffers with arbitrary length values which makes ASan detect out-of-bound array accesses. Even without ASan, this could lead to unwanted test failures. Add a check for "len", "size", and "start" arguments, assuming they apply to the nearest char pointer. Skip the test if they exceed the buffer size. This is a somewhat naive heuristic but it seems to work well.
* Fix apibuild for a recently added constructv2.9.4-rc2Daniel Veillard2016-05-091-52/+49
| | | | | | commit c71f9305a99b6aa03cb08fab31106c9c56f1be4f added __XML_EXTERNC cpp construct which not understood by apibuild, leading to make dist failures, ask to ignore that construct.
* Fix typos: dictio{ nn -> n }ar{y,ies}Jan Pokorný2016-04-151-7/+7
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Bug 758572: ASAN crash in make check ↵David Kilzer2016-04-081-49/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <https://bugzilla.gnome.org/show_bug.cgi?id=758572> Instead of sending a random string length into API methods, compute the string length properly to fix out-of-bounds accesses caught with AddressSanitizer turned on. * testapi.c: (test_htmlCreateMemoryParserCtxt): (test_htmlCreatePushParserCtxt): (test_htmlCtxtReadMemory): (test_htmlParseChunk): (test_htmlReadMemory): (test_xmlDictExists): (test_xmlDictLookup): (test_xmlCreatePushParserCtxt): (test_xmlCtxtReadMemory): (test_xmlCtxtResetPush): (test_xmlParseChunk): (test_xmlParseInNodeContext): (test_xmlParseMemory): (test_xmlReadMemory): (test_xmlRecoverMemory): (test_xmlSAXParseMemory): (test_xmlSAXParseMemoryWithData): (test_xmlSAXUserParseMemory): (test_xmlCreateMemoryParserCtxt): (test_xmlRelaxNGNewMemParserCtxt): (test_xmlBufferAdd): (test_xmlBufferAddHead): (test_xmlBuildQName): (test_xmlDocDumpFormatMemory): (test_xmlDocDumpFormatMemoryEnc): (test_xmlDocDumpMemory): (test_xmlNewCDataBlock): (test_xmlNewDocTextLen): (test_xmlNewTextLen): (test_xmlNodeAddContentLen): (test_xmlNodeSetContentLen): (test_xmlSplitQName3): (test_xmlStringLenGetNodeList): (test_xmlTextConcat): (test_xmlOutputBufferWrite): (test_xmlParserInputBufferCreateMem): (test_xmlParserInputBufferCreateStatic): (test_xmlParserInputBufferPush): (test_xmlReaderForMemory): (test_xmlReaderNewMemory): (test_xmlSchemaNewMemParserCtxt): (test_xmlCharStrndup): (test_xmlStrncatNew): (test_xmlStrncmp): (test_xmlStrndup): (test_xmlStrsub): (test_xmlTextWriterWriteBase64): (test_xmlTextWriterWriteBinHex): (test_xmlTextWriterWriteRawLen):
* Release of libxml2-2.9.3v2.9.3Daniel Veillard2015-11-201-4/+4
| | | | | * configure.ac: updated * doc/*: regenerated
* Python generator bug raised by the const changev2.9.2-rc2Daniel Veillard2014-10-131-191/+212
| | | | the doc methode for xmlDocGetRootElement wasn't generated anymore
* Regenerated API, and testapi, rebuild documentationDaniel Veillard2013-04-011-1/+92
| | | | After the previous commit adding 2 new entry points
* Fix spelling of "length".Michael Wood2012-10-301-4/+4
|
* Release of libxml2-2.9.0v2.9.0Daniel Veillard2012-09-111-8/+56
| | | | | | * libxml.spec.in: update * doc/*: updated and regenerated * libxml2.syms testapi.c: regenerated
* Big space and tab cleanupDaniel Veillard2012-09-111-8/+8
| | | | Remove all space before tabs and space and tabs at end of lines.
* Expose xmlBufShrink in the public tree APIDaniel Veillard2012-08-221-1/+12
| | | | | | | | | | | | | | | | | | | | | | | As suggested by Andrew W. Nosenko: Proposal: expose the new xmlBufShrink() to the "public" API for compatibility with xmlBufUse(). Reason: the following scenario: 1. Read something into xmlParserInputBuffer (e.g. using xmlParserInputBufferRead()) 2. Extract content through xmlBufContent() 3. Extract content length through xmlBufUse(). Result have type 'size_t'. 4. Use this content 5. Now, you need to shrink the buffer. How to do it? Doing that through legacy xmlBufferShrink() is unsafe because it uses 'unsigned int' and the whole point of introducing the new API was handling the cases, when 'unsigned int' is not enough. Therefore, need to use the new xmlBufShrink(). But it is "private". Therefore, I propose to expose the new xmlBufShrink() in the same way, as xmlBufContent() and xmlBufUse() are exposed.
* Patch for portability of latin characters in C filesDaniel Veillard2012-08-201-2/+2
| | | | | Coming from LibreOffice repository: http://cgit.freedesktop.org/libreoffice/core/plain/libxml2/libxml2-latin.patch
* Regenerated testapi.cDaniel Veillard2012-08-151-4/+265
|
* clean redefinition of {v}snprintf in C-sourceRoumen Petrov2012-08-131-3/+0
| | | | as those from *config.h are preferable (e.g. win32config.h)
* minimize use of HAVE_CONFIG_HRoumen Petrov2012-08-131-3/+0
| | | | as build process for supported platforms provide "config.h" header file
* Various "make distcheck" and portability fixupsDaniel Richard G2012-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.am: * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make variable, it allows overriding the value at the command line, and (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS assignment when @MODULE_PLATFORM_LIBS@ is empty * Changed how the THREADS_W32 mechanism switches the build between testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL allows this to work cleanly and plays well with dependencies * testapi.c should be specified as BUILT_SOURCES * Create symlinks to the test/ and result/ subdirs so that the runtests target is usable in out-of-source-tree builds * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f" instead of just "rm" is good form * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to pass configure.in: * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been superceded by LT_INIT * Don't rebuild docs by default, as this requires GNU Make (as implemented) * Check for uint32_t as some platforms don't provide it * Check for some more functions, and undefine HAVE_MMAP if we don't also HAVE_MUNMAP (one system I tested on actually needed this) * Changed THREADS_W32 from a filename insert into an Automake conditional * The "Copyright" file will not be in the current directory if builddir != srcdir doc/Makefile.am: * EXTRA_DIST cannot use wildcards when they refer to generated files; this breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU Make $(wildcard) directives to build up a list of files, and EXTRA_DIST, as a literal expansion of EXTRA_DIST_wc. I also added a new rule, "check-extra-dist", to simplify checking that the two variables are equivalent. (Note that this works only when builddir == srcdir) (I can implement this differently if desired; this is just one way of doing it) * Don't define an "all" target; this steps on Automake's toes * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for dependencies (as Make doesn't process the wildcards otherwise) and qualifying appropriate files with $(srcdir) (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH, which we can count on as this is GNU-Make-only code anyway) doc/devhelp/Makefile.am: * Qualified appropriate files with $(srcdir) * Added an "uninstall-local" rule so that "make distcheck" passes doc/examples/Makefile.am: * Rather than use a wildcard that doesn't work, use a substitution that most Make programs can handle doc/examples/index.py: * Do the same here include/libxml/nanoftp.h: * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET: user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\ Include$ grep -R INVALID_SOCKET . ./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0) ./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0) include/libxml/xmlversion.h.in: * Support ancient GCCs (I was actually able to build the library with 2.5 but for this bit) python/Makefile.am: * Expanded CLEANFILES to allow "make distcheck" to pass python/tests/Makefile.am: * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow "make distcheck" to pass testRelax.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some systems have the header but not the function) testSchemas.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H testapi.c: * Don't use putenv() if it's not available threads.c: * This fixes the following build error on Solaris 8: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \ -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \ -xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o "threads.c", line 442: controlling expressions must have scalar type "threads.c", line 512: controlling expressions must have scalar type cc: acomp failed for threads.c *** Error code 1 trio.c: * Define isascii() if the system doesn't provide it trio.h: * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion win32/configure.js: * Added support for the LZMA compression option win32/Makefile.{bcb,mingw,msvc}: * Added appropriate bits to support WITH_LZMA=1 * Install the header files under $(INCPREFIX)\libxml2\libxml instead of $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools xml2-config.in: * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for `xml2-config --libs` to provide a complete set of dependencies xmllint.c: * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
* Release of libxml2-2.8.0v2.8.0Daniel Veillard2012-05-231-1/+27
| | | | | | | - Makefile.am: don't package .git - configure.in : update to new release - doc/xml.html: added the new release - doc/* testapi.c: regenerated
* Restore code for Windows compilationDaniel Veillard2012-05-231-1/+1
| | | | | Try to keep as close to rc1 but still allow the change from Roumen for mingw
* Fix various bugs in new code raised by the API checkingDaniel Veillard2012-05-151-7/+87
| | | | | | * testapi.c: regenerated and covering new APIs * tree.c: xmlBufferDetach can't work on immutable buffers * xzlib.c: fix a deallocation error
* testapi: use the right type for the checkStefan Kost2011-05-251-2/+4
| | | | Fixes a compiler warning. Also wrap the long line if statement.
* 614087 Fix Socket API usage to allow Windows64 compilationOzkan Sezer2010-11-041-58/+3
| | | | | | | In Windows 64 a socket is no more represented by an int, this breaks the nanoftp API and nanoftp/nanohttp, the patch changes this and fix the API for Win64 Regenerated the XML and documentation as a result too.
* Regenerated API and symbolsDaniel Veillard2009-08-241-1/+50
| | | | | | * doc/Makefile.am: make the check for symbols pbm a make api failure * doc/symbols.xml: added xmlXIncludeProcessTreeFlagsData * doc//* elfgcchack.h libxml2.syms testapi.c: regenerated
* Rebuilt the API and regenerated docsDaniel Veillard2009-08-211-12/+8
|
* 545579 doesn't compile without schema supportDaniel Veillard2009-08-101-6/+7
| | | | * testapi.c: fix to get gen_nb_void_ptr_ptr() generated unconditionally
* Fixed apibuild.py, regenerated doc and interfacesDaniel Veillard2009-07-241-21/+21
| | | | | | * doc/apibuild.py: fixed the parsing after the change of macro name * doc/* testapi.c: regenerated
* updated SVN URL for GNOME as pointed by Vincent Lefevre and regeneratedDaniel Veillard2009-03-251-1/+1
| | | | | | | | * doc/*: updated SVN URL for GNOME as pointed by Vincent Lefevre and regenerated docs daniel svn path=/trunk/; revision=3824
* apply patch from Marcus Meissner to add gcc attribute alloc_size shouldDaniel Veillard2009-01-181-2/+2
| | | | | | | | | | | | * include/libxml/xmlversion.h.in include/libxml/xmlmemory.h: apply patch from Marcus Meissner to add gcc attribute alloc_size should fix #552505 * doc/apibuild.py doc/* testapi.c: regenerate the API * include/libxml/parserInternals.h: fix a comment problem raised by apibuild.py daniel svn path=/trunk/; revision=3811
* adds element traversal support avoid a warning regenerated danielDaniel Veillard2008-11-271-1/+176
| | | | | | | | | | * include/libxml/tree.h tree.c python/generator.py: adds element traversal support * valid.c: avoid a warning * doc/*: regenerated daniel svn path=/trunk/; revision=3804
* Borland C fix from Moritz Both regenerate, workaround a problem for bufferDaniel Veillard2008-09-011-1/+3
| | | | | | | | | | | | | | | | | | | * trionan.c: Borland C fix from Moritz Both * testapi.c: regenerate, workaround a problem for buffer testing * xmlIO.c HTMLtree.c: new internal entry point to hide even better xmlAllocOutputBufferInternal * tree.c: harden the code around buffer allocation schemes * parser.c: restore the warning when namespace names are not absolute URIs * runxmlconf.c: continue regression tests if we get the expected number of errors * Makefile.am: run the python tests on make check * xmlsave.c: handle the HTML documents and trees * python/libxml.c: convert python serialization to the xmlSave APIs and avoid some horrible hacks Daniel svn path=/trunk/; revision=3790
* preparing 2.7.0 release remove some testing traces remove some warningsLIBXML2.7.0Daniel Veillard2008-08-301-1/+2
| | | | | | | | | * configure.in, doc/*: preparing 2.7.0 release * tree.c: remove some testing traces * parser.c xmlIO.c xmlschemas.c: remove some warnings Daniel svn path=/trunk/; revision=3788
* regenerated DanielDaniel Veillard2008-08-301-1/+3
| | | | | | | * doc/* testapi.c: regenerated Daniel svn path=/trunk/; revision=3786
* fix a small initialization problem raised by Ashwin increase testingDaniel Veillard2008-08-271-4/+73
| | | | | | | | | | | | | * threads.c: fix a small initialization problem raised by Ashwin * testapi.c gentest.py: increase testing especially for document with an internal subset, and entities * tree.c: fix a deallocation issue when unlinking entities from a document. * valid.c: fix a missing entry point test not found previously. * doc/*: regenerated the APIs, docs etc. daniel svn path=/trunk/; revision=3778
* rewrite the URI parser to update to rfc3986 (from 2396) removed the errorDaniel Veillard2008-08-041-1/+1
| | | | | | | | | | | * uri.c include/libxml/uri.h: rewrite the URI parser to update to rfc3986 (from 2396) * test/errors/webdav.xml result/errors/webdav.xml*: removed the error test, 'DAV:' is a correct URI under 3986 * Makefile.am: small cleanup in make check Daniel svn path=/trunk/; revision=3763
* implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stickDaniel Veillard2008-07-291-21/+0
| | | | | | | | | | | * include/libxml/parser.h include/libxml/xmlerror.h parser.c: implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stick to old behaviour * testapi.c gentest.py: modified slightly and regenerated * Makefile.am: add testchar Daniel svn path=/trunk/; revision=3755
* fx compilation when configured without the reader should fix #513110Daniel Veillard2008-05-121-48/+45
| | | | | | | | | | * xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h python/types.c python/libxml_wrap.h python/libxml.c: fx compilation when configured without the reader should fix #513110 * doc/*: regenerated Daniel svn path=/trunk/; revision=3743
* added new function xmlSchemaValidCtxtGetParserCtxt based on HolgerDaniel Veillard2008-04-111-1/+36
| | | | | | | | | | | | | | | | * include/libxml/xmlschemas.h xmlschemas.c: added new function xmlSchemaValidCtxtGetParserCtxt based on Holger Kaelberer patch * doc/apibuild.py doc/*: regenerated the doc, chased why the new function didn't got any documentation, added more checking in the generator * include/libxml/relaxng.h include/libxml/schematron.h include/libxml/xmlschemas.h include/libxml/c14n.h include/libxml/xmlregexp.h include/libxml/globals.h include/libxml/xmlreader.h threads.c xmlschemas.c: various changes and cleanups following the new reports Daniel svn path=/trunk/; revision=3738
* trying to clarify even more the xmlCleanupParser() use and the memoryDaniel Veillard2008-03-311-1/+12
| | | | | | | | * parser.c docs/*: trying to clarify even more the xmlCleanupParser() use and the memory documentation Daniel svn path=/trunk/; revision=3719
* Fixed typo in xmlCharEncFirstLine pointed out by Mark Rowe (bug #440159)William M. Brack2007-05-221-1/+1
| | | | | | | | | | | | * encoding.c: Fixed typo in xmlCharEncFirstLine pointed out by Mark Rowe (bug #440159) * include/libxml/xmlversion.h.in: Added check for definition of _POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from Wendy Doyle and Mark Rowe, bug #346675) * schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor changes to fix compilation warnings - no change to logic. svn path=/trunk/; revision=3618
* regeneratedWilliam M. Brack2007-02-081-1/+0
| | | | svn path=/trunk/; revision=3580
* Re-generated the documentation (API chunks 27-29 were missing) (alsoWilliam M. Brack2007-01-111-1/+64
| | | | | | | | * Re-generated the documentation (API chunks 27-29 were missing) (also causes changes to testapi.c, elfgcchack.h and win32/libxml2.def.src) svn path=/trunk/; revision=3574
* preparing release of libxml2-2.6.27 fix a small problem with preproc flagsLIBXML2_2_6_27Daniel Veillard2006-10-251-3/+3
| | | | | | | * NEWS configure.in testapi.c doc//*: preparing release of libxml2-2.6.27 * include/libxml/tree.h: fix a small problem with preproc flags Daniel
* added --html --memory to test htmlReadMemory to test #321632 added variousDaniel Veillard2006-10-131-1/+1
| | | | | | | | | | | * xmllint.c: added --html --memory to test htmlReadMemory to test #321632 * HTMLparser.c: added various initialization calls which may help #321632 but not conclusive * testapi.c tree.c include/libxml/tree.h: fixed compilation with --with-minimum --with-sax1 and --with-minimum --with-schemas fixing #326442 Daniel
* fixed xmlIOParseDTD handling of @input in error case, Should fix #335085Daniel Veillard2006-10-131-0/+4
| | | | | | | | * parser.c: fixed xmlIOParseDTD handling of @input in error case, Should fix #335085 * testapi.c: reset the http_proxy env variable to not waste time on regression tests Daniel
* fixed a weird error where validity context whould not show up if warningsDaniel Veillard2006-10-111-4/+114
| | | | | | | | * valid.c: fixed a weird error where validity context whould not show up if warnings were disabled pointed out by Bob Stayton * xmlIO.c doc/generator.py: cleanup and fix to regenerate the docs * doc//* testapi.c: rebuilt the docs Daniel
* applied patch from Marton Illes to fix an allocation bug inDaniel Veillard2006-08-121-4/+46
| | | | | | * xmlschemas.c: applied patch from Marton Illes to fix an allocation bug in xmlSchemaXPathEvaluate should close #351032 Daniel
* applied patch from Felipe Contreras when compiling with --with-minimumDaniel Veillard2006-06-181-3/+3
| | | | | | * testapi.c: applied patch from Felipe Contreras when compiling with --with-minimum Daniel
* preparing release of 2.6.25 DanielDaniel Veillard2006-06-061-1/+57
| | | | | * configure.ini NEWS doc//* libxml.spec.in : preparing release of 2.6.25 Daniel