1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-27 13:25:05 +03:00
Commit Graph

892 Commits

Author SHA1 Message Date
Nick Wellnhofer
e03f0a199a Fix hash callback signatures
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.
2017-11-09 16:42:47 +01:00
Daniel Veillard
bc5a5d6583 Release of libxnl2-2.9.7
* configure.ac doc/news.html : update for release
* doc/news.html doc/xmlcatalog.1 doc/xmlcatalog_man.html: regenerated
2017-11-02 21:26:55 +01:00
Nick Wellnhofer
09f51ecbc5 Add Makefile rules to rebuild HTML man pages
This should make sure that the online version of the man pages for
xmllint and xmlcatalog stay up to date. Also rebuild both HTML
documents.
2017-10-24 14:29:26 +02:00
Jan Pokorný
ca01f8133e xmlcatalog: refresh man page wrt. quering system catalog easily
Also normalize "lookup" spelling.
2017-10-24 13:57:43 +02:00
Nick Wellnhofer
03a238f954 Use __linux__ macro in generated code 2017-10-07 15:22:57 +02:00
Daniel Veillard
4b4d3d8516 Release of libxml2-2.9.6
* configure.ac doc/xml.html doc/news.html: updated for release
2017-10-06 09:00:53 +02:00
Daniel Veillard
2960178fe8 Release of libxml2-2.9.5
* configure.ac, doc/xslt.html: updated for the release
* doc/*, python/setup.py, testapi.c: regenerated
2017-09-04 15:38:47 +02:00
Nick Wellnhofer
8bbe4508ef Spelling and grammar fixes
Fixes bug 743172, bug 743489, bug 769632, bug 782400 and a few other
misspellings.
2017-06-17 16:34:23 +02:00
Nick Wellnhofer
988a5a3b6b Build test programs only when needed
Add test programs to 'check_PROGRAMS' instead of 'noinst_PROGRAMS'.

Fixes bug 760457.
2017-06-17 15:44:50 +02:00
Nick Wellnhofer
b9b4b6b513 Fix doc/examples/index.py
In my previous commit that silenced some test output I didn't realize
that doc/examples/Makefile.am was autogenerated.

Also make index.py output deterministic by sorting the glob results.
2017-06-17 15:43:29 +02:00
Nick Wellnhofer
1ce1f7852c Fix invalid-source-encoding warnings in testWriter.c
Use hex escapes instead of binary data in source file.
2017-06-17 14:11:03 +02:00
Nick Wellnhofer
67f9f9d6c8 Misc fixes for 'make tests'
- Silence test output.
- Clean up after doc/examples tests.
- Adjust expected output for script tests.
- Add missing results for relaxng/pattern3

There are still two test failures I can't comment on:

- regexp/bug316338
- schemas/any4_0
2017-06-12 19:46:56 +02:00
Nick Wellnhofer
94613f64c0 Remove unused variables 2016-10-12 13:23:08 +02:00
Daniel Veillard
bdec2183f3 Release of libxml2-2.9.4
* doc/xml.html libxml.spec.in: updated for the release
* doc/*: regenerated but no API additions
2016-05-23 16:04:52 +08:00
Daniel Veillard
8effcb578e Fix apibuild for a recently added construct
commit c71f9305a9 added __XML_EXTERNC
cpp construct which not understood by apibuild, leading to make dist
failures, ask to ignore that construct.
2016-05-09 10:31:09 +08:00
Jan Pokorný
27aae65156 Fix typo: s{ ec -> cr }cipt
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2016-04-15 22:22:52 +08:00
Jan Pokorný
bb654feb9a Fix typos: dictio{ nn -> n }ar{y,ies}
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2016-04-15 22:22:48 +08:00
David Kilzer
c5ddd09537 Bug 760921: REGRESSION (8eb55d78): doc/examples/io1 test fails after fix for "xmlSaveUri() incorrectly recomposes URIs with rootless paths" <https://bugzilla.gnome.org/show_bug.cgi?id=760921>
* doc/examples/io1.res: Update expected result.
2016-04-08 10:33:30 +08:00
Daniel Veillard
6657afe83a Release of libxml2-2.9.3
* configure.ac: updated
* doc/*: regenerated
2015-11-20 17:55:11 +08:00
Daniel Veillard
73b2d73df8 Avoid XSS on the search of xmlsoft.org
query string need to be escaped before being displayed back
2015-07-03 20:58:33 +08:00
Daniel Veillard
726f67e2f1 Release of libxml2-2.9.2 2014-10-16 15:40:16 +08:00
Daniel Veillard
af62eb4fab Python generator bug raised by the const change
the doc methode for xmlDocGetRootElement wasn't generated anymore
2014-10-13 16:40:56 +08:00
Patrick Monnerat
ea8c89b9b5 doc/news.html: small update to avoid line join while generating NEWS. 2014-10-04 21:13:47 +08:00
Daniel Veillard
4e73bfaee6 Fix a link to James SAX documentation old page 2014-07-12 17:46:46 +08:00
Daniel Veillard
e59c244e73 Add limitations about encoding conversion 2013-12-11 00:01:38 +08:00
Daniel Veillard
e38217ae82 Forgot to document 2.9.1 release, regenerate docs 2013-05-10 15:40:13 +08:00
Daniel Veillard
f4e5a6994e Release of libxml2-2.9.1
* configure.in: bumped version
* doc/*: updated the symbols file and regenerated
2013-04-19 15:36:36 +08:00
Roumen Petrov
4d7a32959b rebuild docs:Makefile.am 2013-04-01 16:53:27 +08:00
Daniel Veillard
54ae471c14 Regenerated API, and testapi, rebuild documentation
After the previous commit adding 2 new entry points
2013-04-01 16:42:12 +08:00
Daniel Veillard
d8a75bffa4 Converting apibuild.py to python3
not finished ....
2013-03-30 22:33:06 +08:00
Daniel Veillard
113384f126 Add documentation for xmllint --xpath
https://bugzilla.gnome.org/show_bug.cgi?id=694822

this wasn't documented in the man page, and there was a typo in
xmllint help output.
2013-03-27 11:43:41 +08:00
Daniel Veillard
f7aeda24f6 Fix the URL of the SAX docuemntation from James
as it has moved
2013-03-23 10:31:26 +08:00
Michael Wood
fb27e2cd20 Fix spelling of "length". 2012-10-30 10:18:49 +08:00
Daniel Veillard
38bbd3412d Release of libxml2-2.9.0
* libxml.spec.in: update
* doc/*: updated and regenerated
* libxml2.syms testapi.c: regenerated
2012-09-11 15:00:08 +08:00
Daniel Veillard
f8e3db0445 Big space and tab cleanup
Remove all space before tabs and space and tabs at end of lines.
2012-09-11 13:26:36 +08:00
Daniel Veillard
e00778b492 Followup to LibXML2 docs/examples cleanup patch 2012-09-08 21:09:26 +08:00
Daniel Richard
878ec9db9d Second round of cleanups for LibXML2 docs/examples
configure.am:

* Explicitly disallow --enable-rebuild-docs when builddir != srcdir, per
   what you said about needing to build docs with an in-source build

doc/Makefile.am:

* Ensure that xmlversion.h is in the source tree before running
   apibuild.py, to avoid generating an incomplete libxml2-api.xml

* Update the .PHONY target (forgot to do this earlier)

doc/devhelp/Makefile.am:

* Wrap the doc-generating rule in an "if REBUILD_DOCS" conditional so it
   doesn't cause trouble for regular users

* Added a handy-dandy "rebuild" target

doc/examples/index.py:

* NOTE: You need to run this script to regenerate the files it creates,
   and then commit the newly-updated files! The generated files currently
   in git master (e.g. doc/examples/Makefile.am) are out of date even
   before this patch!

* index.html really needs to be in EXTRA_DIST

* Wrap the doc-generating rules in an "if REBUILD_DOCS" conditional,
   because they shouldn't be active otherwise
2012-09-07 14:52:17 +08:00
Daniel Veillard
857104cd49 Remove all .cvsignore as they are not used anymore
For https://bugzilla.gnome.org/show_bug.cgi?id=682985
suggested by Adrian Bunk <bunk@stusta.de>
2012-09-04 14:25:23 +08:00
Vojtech Fried
3e031b7dae Switching XPath node sorting to Timsort
I use libxml xpath engine on quite large (and mostly "flat") xml files.
It seems that Shellsort, that is used in xmlXPathNodeSetSort is a
performance bottleneck for my case. I have read some posts about sorting
in libxml in the libxml archive, but I agree that qsort was not the way
to go. I experimented with Timsort instead and my results were good for
me. For about 10000 nodes, my test was about 5x faster with Timsort,
for 1000 nodes about 10% faster, for small data files, the difference
was not measurable.
* timsort.h: the algorithm, kept in a separate header
* xpath.c: plug in the new algorithm in xmlXPathNodeSetSort
* Makefile.am: add the header to the EXTRA_DIST
* doc/apibuild.py: avoid indexing the new header
2012-08-24 16:52:44 +08:00
Daniel Veillard
82cdfc4eb3 Expose xmlBufShrink in the public tree API
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.
2012-08-22 11:05:09 +08:00
Daniel Richard G
6842ee810e More cleanups to the documentation part of libxml2
doc/Makefile.am:

* Build what's in doc/ before doc/devhelp/, as the dependency graph flows
   that way

* Add "--path $(srcdir)" so that xsltproc can find DTDs in srcdir

* Replaced $(top_srcdir)/doc with an equivalent $(srcdir)

* Qualified libxml2-api.xml with $(srcdir) as it's always generated there

* Rewrote the dependencies for libxml2-api.xml so that xmlversion.h
   doesn't throw everything off

doc/devhelp/Makefile.am:

* Use Automake constructs to install the HTML files instead of an
   install-data-local rule

* Reorganized the file a bit (hello whitespace!)

* EXTRA_DIST doesn't need to list so many files now that dist_devhelp_DATA
   is being used

* Only print "Rebuilding devhelp files" if rebuilding is actually
   occurring

doc/examples/index.py:

* Make the "this file is auto-generated" banner more prominent

* Autotools updates: Use AM_CPPFLAGS/AM_CFLAGS instead of INCLUDES

* Got rid of DEPS as it's not needed (Automake already sees the dependency
   on libxml2.la by way of LDADD(S))

* Replaced LDADDS with LDADD, which is applied to all programs listed
   in the file. Since all the test programs have the same link
   dependencies, this way is more concise yet equivalent.

* Remove the *.tmp files via "make clean" instead of having the test
   programs do it themselves (more on this later)

* Invoke index.py in srcdir, as it pretty much needs to run there

* Restructured the index.html rule so that only the xmllint invocation is
   allowed to fail

* Use $(MKDIR_P) instead of $(mkinstalldirs), $(VAR) instead of @VAR@

* Remove symlinks for test?.xml in an out-of-source build

* Sort lists for neatness

* Better formatting for EXTRA_DIST and noinst_PROGRAMS variables

* Simplified the Automake bits printed for each program: *_LDFLAGS doesn't
   need to be specified as it's empty anyway, *_DEPENDENCIES is redundant,
   *_LDADD isn't needed due to the global LDADD

* Added a bit that symlinks in test?.xml from srcdir in out-of-source
   builds. This allows the reader4 test to read these files in the current
   directory, which ensures that the output always looks the same (i.e.
   does not contain references to srcdir)

* Don't hide the test program invocation (or else it's hard to tell which
   test failed), and don't use superfluous parentheses

* NOTE: If you check in these changes, be sure to run this script and also
   check in the updated files that it generates!

doc/examples/*.c:

* Updated the test: lines so that

   + "&&" is used to separate commands instead of ";" so that errors are
     not masked

   + reference files are qualified with $(srcdir)/

   + no "rm" takes place -- these are a problem because (1) if a test
     fails, it's useful to have the output file ready for inspection; (2)
     the "rm" invocation masks a potential non-zero exit status from diff

     (This is why I added the CLEANFILES line above)

doc/examples/io1.res:

* Updated this ref file so that the test passes. (This is correct, right?)

doc/examples/reader4.res:

* Changed this back to its original form, as the symlinking of test?.xml
   means this file no longer has to contain path prefixes on the filenames

doc/examples/testWriter.c:

* Changed the output filenames to *.tmp instead of *.res, partly for
   consistency, partly to not have to add special cases to CLEANFILES

doc/examples/xpath1.c:

* Removed the "./" prefix on the test invocation, which is redundant as
   index.py already adds one
2012-08-17 09:58:38 +08:00
Daniel Veillard
64d11249a5 Fix missing xmlsave.h module which was ignored in recent builds
due to "save.h" rule discarding it too
2012-08-15 09:15:30 +08:00
Daniel Veillard
97fa5b3c8f Fix file and line report for XSD SAX and reader streaming validation
Things now work correctly at the xmllint level:
thinkpad:~/XML -> xmllint --sax --noout --schema test_schema.xsd
test_xml.xml
test_xml.xml:72721: Schemas validity error : Element 'level1': Missing
child element(s). Expected is ( level2 ).
test_xml.xml fails to validate
thinkpad:~/XML -> xmllint --stream --schema test_schema.xsd test_xml.xml
test_xml.xml:72721: Schemas validity error : Element 'level1': Missing
child element(s). Expected is ( level2 ).
test_xml.xml fails to validate
thinkpad:~/XML ->

* error.c: fix a corner case of not reporting lines when we should
* include/libxml/xmlschemas.h doc/symbols.xml: had to add new entry
  points to set the filename on a validation context and a locator
  callback used to fetch the line and file from the context
* xmlschemas.c: add the new entry points xmlSchemaValidateSetFilename()
  and xmlSchemaValidateSetLocator(), plus make sure the error reporting
  routine gets the information if available. Add a locator for SAX.
* xmlreader.c: add and plug a locator for readers.
2012-08-14 11:01:07 +08:00
Daniel Veillard
aa017c54dd Release candidate 1 of libxml2-2.9.0
* configure.in libxml.spec.in python/setup.py: bumped release numbers
* doc//*: regenerated as part of the release
2012-08-10 10:42:56 +08:00
Daniel Veillard
28cc42d068 Regenerating docs and API files
Various cleanups
* configure.in: force regeneration of APIs in my environment
* buf.c buf.h enc.h encoding.c include/libxml/tree.h
  include/libxml/xmlerror.h save.h tree.c: various comment cleanups
  pointed by apibuild
* doc/apibuild.py: added the 3 new internal headers in the excludes
* doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated the API
* doc/symbols.xml: listing new entry points for 2.9.0
* doc/devhelp/*: regenerated
2012-08-10 10:00:18 +08:00
Daniel Richard G
5d6c02ba61 Various "make distcheck" and portability fixups 2nd part
doc/examples/Makefile.am:

* Use $(VAR), not @VAR@

* Use $(MKDIR_P) instead of $(mkinstalldirs), as the latter is an
* obsolete
  name

* Added $(srcdir) qualification to the various test program invocations
* in
  the "tests" target. More work is needed here (notably, when the
  reference output contains the path to the input file), but this gets
  things a lot closer to working correctly in an out-of-source build.

doc/examples/reader4.res:

* Added "./" path qualifiers so that the reader4 test continues to pass
  cleanly for in-source builds

python/tests/Makefile.am:

* Symlink in test input files for out-of-source builds
2012-08-07 10:05:34 +08:00
Daniel Richard G
5706b6d876 Various "make distcheck" and portability fixups
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
2012-08-06 11:32:54 +08:00
Daniel Veillard
c943f708f1 Release of libxml2-2.8.0
- Makefile.am: don't package .git
- configure.in : update to new release
- doc/xml.html: added the new release
- doc/* testapi.c: regenerated
2012-05-23 17:10:59 +08:00
Daniel Veillard
ee8f1d4cda Cleanups before 2.8.0-rc2
new symbols, a missing comment and a fix on symbol release
2012-05-21 11:16:12 +08:00
Daniel Veillard
79ee284abb Fix various problems with "make dist"
* tree.c: missing documentation for xmlBufferDetach
* doc/symbols.xml: add two new symbols xmlTextReaderRelaxNGValidateCtxt
                   and xmlBufferDetach
* doc/apibuild.py: ignore internal header xzlib.h
2012-05-15 10:25:31 +08:00