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

63 Commits

Author SHA1 Message Date
Daniel Veillard
de2a67b430 Applying IPv6 patch from Archana Shah <archana.shah@wipro.com>
closing bug #114837

* configure.in: Added checks for IPv6 support and getaddrinfo().

* acconfig.h: Defined HAVE_GETADDRINFO and SUPPORT_IP6.

* config.h.in: Defined HAVE_GETADDRINFO and SUPPORT_IP6.

* nanoftp.c: Structure xmlNanoFTPCtxt contains either sockaddr_storage
  field or sockaddr_in field, depending upon the availability of IPv6
  support.
  have_ipv6(): Added to check for run-time IPv6 support.
  (xmlNanoFTPScanURL), (xmlNanoFTPUpdateURL), (xmlNanoFTPScanProxy):
  Modified to parse a URI with IPv6 address given in [].
  (xmlNanoFTPConnect): Changed to use getaddrinfo for address
  resolution, if it is available on the system, as gethostbyname
  does not return IPv6 addresses on some platforms.
  (xmlNanoFTPGetConnection): Modified type of dataAddr variable to
  sockaddr_storage or sockaddr_in depending upon the IPv6 support.
  Sending EPSV, EPRT or PASV, PORT depending upon the type of address
  we are dealing with.

* nanohttp.c: (have_ipv6): Added to check for run-time IPv6 support.
  (xmlNanoHTTPScanURL), (xmlNanoHTTPScanProxy): Modified to parse
  a URI with IPv6 address given in [].
  (xmlNanoHTTPConnectHost): Modified to use getaddrinfo if it is
  available on the system. Also IPv6 addresses will be resolved by
  gethostbyname only if IPv6 run-time support is available.
  (xmlNanoHTTPConnectAttempt): Modified to deal with IPv6 address.

Daniel
2003-06-21 14:20:04 +00:00
Daniel Veillard
3c908dca47 added xmlMallocAtomic() to be used when allocating blocks which do not
* DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c
  nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c
  xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c
  include/libxml/globals.h include/libxml/xmlmemory.h: added
  xmlMallocAtomic() to be used when allocating blocks which
  do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet()
  to allow registering the full set of functions needed by
  a garbage collecting allocator like libgc, ref #109944
Daniel
2003-04-19 00:07:51 +00:00
Daniel Veillard
cacbe5d110 patch from Stefano Zacchiroli to fix some URI/file escaping problems
* nanoftp.c nanohttp.c xmlIO.c: patch from Stefano Zacchiroli
  to fix some URI/file escaping problems
Daniel
2003-01-10 16:09:51 +00:00
Daniel Veillard
a9b66d00b5 new API building Python script, does the C parsing directly, generates a
* doc/apibuild.py doc/libxml2-api.xml doc/Makefile.am: new API
  building Python script, does the C parsing directly, generates
  a better API description including structure fieds defs and
  enums. Still a couple of bugs, but good enough for the python
  wrappers now.
* DOCBparser.c SAX.c nanohttp.c parser.c parserInternals.c tree.c
  valid.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c
  include/libxml/schemasInternals.h include/libxml/tree.h: more
  cleanup based on the python analysis script reports.
* libxml.spec.in: make sure the API XML description is part of the
  devel package.
Daniel
2002-12-11 14:23:49 +00:00
Daniel Veillard
01c13b5be2 code cleanup, especially the function comments. fixed a small bug when
* 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
2002-12-10 15:19:08 +00:00
Daniel Veillard
8efff67157 handle HTTP URL escaping, problem reported by Glen Nakamura and Stefano
* nanhttp.c: handle HTTP URL escaping, problem reported by
  Glen Nakamura and Stefano Zacchiroli
Daniel
2002-12-04 11:44:48 +00:00
Aleksey Sanin
49cc97565f replaced sprintf() with snprintf() to prevent possible buffer overflow
* DOCBparser.c HTMLparser.c debugXML.c encoding.c
nanoftp.c nanohttp.c parser.c tree.c uri.c xmlIO.c
xmllint.c xpath.c: replaced sprintf() with snprintf()
to prevent possible buffer overflow (the bug was pointed
out by Anju Premachandran)
2002-06-14 17:07:10 +00:00
Daniel Veillard
9b731d709e trying to fix #77441 Daniel
* configure.in: trying to fix #77441
Daniel
2002-04-14 12:56:08 +00:00
Daniel Veillard
dd4b912f4c applied patch from Allan Clark for UnixWare/OpenServer Daniel
* configure.in nanohttp.c: applied patch from Allan Clark for
  UnixWare/OpenServer
Daniel
2002-03-26 07:58:43 +00:00
Daniel Veillard
56b2db7478 fixing #76043, got fed up with non-portability of that piece of code.
* nanohttp.c: fixing #76043, got fed up with non-portability
  of that piece of code.
Daniel
2002-03-25 16:35:28 +00:00
Daniel Veillard
d85f4f437c fixed bug #76168, attribute redeclared in the internal subset should not
* valid.c SAX.c: fixed bug #76168, attribute redeclared in
  the internal subset should not raise duplicate ID errors,
  also there was a small bug in conjunction to namespace
  declarations defaulted and xml:xxx attributes DTD definitions.
Daniel
2002-03-25 10:48:46 +00:00
Daniel Veillard
34ce8bece2 preparing 2.4.18 updated and rebuilt the web site implement the new
* 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
2002-03-18 19:37:11 +00:00
Daniel Veillard
5c39654822 applied patch from Aleksey Sanin fixing a problem in the canonicalization
* c14n.c: applied patch from Aleksey Sanin fixing a problem in the
  canonicalization algorithm
* doc/xml.html doc/index.html: added the C14N references on the
  index page.
Daniel
2002-03-15 07:57:50 +00:00
Daniel Veillard
75be013085 speedup some node selection operations, this can have a significant impact
* xpath.c: speedup some node selection operations, this can
  have a significant impact on DocBook Norm's stylesheets
* nanohttp.c: someone reported that SOCKLEN_T may not be defined
  make sure it's always the case
* debugXML.c: distinguish CDATA and comments in ls operations
Daniel
2002-03-13 10:03:35 +00:00
Daniel Veillard
cbaf399537 applied 42 documentation patches from Charlie Bozeman. Regenerated the
* *.c include/libxml/*.h doc/html/*: applied 42 documentation
  patches from Charlie Bozeman. Regenerated the HTML docs.
Daniel
2001-12-31 16:16:02 +00:00
Daniel Veillard
3c01b1d81b - include/libxml/globals.h include/libxml/threads.h threads.c
testThreads.c: far more testing, cleaning up bugs
- *.c : make sure globals.h is always included.
Daniel
2001-10-17 15:58:35 +00:00
Daniel Veillard
d046356030 Applied the last patches from Gary, cleanup, activated threading all user
* include/libxml/SAX.h include/libxml/globals.h include/libxml/parser.h
  include/libxml/parserInternals.h include/libxml/tree.h
  include/libxml/xmlerror.h HTMLparser.c SAX.c error.c globals.c
  nanoftp.c nanohttp.c parser.c parserInternals.c testDocbook.c
  testHTML.c testSAX.c tree.c uri.c xlink.c xmlmemory.c:
  Applied the last patches from Gary, cleanup, activated threading
  all user accessible global variables are now handled in globals.[ch]
  Still a bit rought but make tests passes with either
  --with-threads defined at configure time or not.
* Makefile.am example/Makefile.am: added globals.[ch] and threads
  linking options
Daniel
2001-10-13 09:15:48 +00:00
Daniel Veillard
50f3437111 applied Win32 Facelift No.2 patches from Igor Zlatkovic for Windows/MSC
* DOCBparser.c Makefile.am nanohttp.c parser.c testHTML.c
  testSAX.c xmlIO.c xmllint.c include/win32config.h
  include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h
  include/libxml/xmlwin32version.h.in win32/README.MSDev
  win32/dsp/*: applied Win32 Facelift No.2 patches from
  Igor Zlatkovic for Windows/MSC
Daniel
2001-08-03 12:06:36 +00:00
Daniel Veillard
ba6db03c40 protected an use of EAGAIN, Brian Stafford Daniel
* nanohttp.c: protected an use of EAGAIN, Brian Stafford
Daniel
2001-07-31 16:25:45 +00:00
Daniel Veillard
e392497e4c John Kroll provided a small fix to xmlNanoHTTPSave Daniel
* nanohttp.c: John Kroll provided a small fix to xmlNanoHTTPSave
Daniel
2001-07-25 20:25:21 +00:00
Daniel Veillard
f012a64d13 get rid of the readline and libhistory dependancies by default, release
* configure.in: get rid of the readline and libhistory
  dependancies by default, release 2.4.1 with IA64 fix
* nanohttp.c tree.c xmlIO.c include/libxml/nanohttp.h
  include/libxml/tree.h include/libxml/xmlIO.h: incorporated
  John Kroll fixes to allow saving to HTTP via PUT (or
  POST of needed).
* doc/html/*.html: regenerated the docs
Daniel
2001-07-23 19:10:52 +00:00
Daniel Veillard
5e2dace1ca Cleanup, cleanup .. removed libxml softlink for good cleanup to get 100%
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
2001-07-18 19:30:27 +00:00
Daniel Veillard
c5d64345cf Summer's cleanup, a really big one:
* AUTHORS: added William and Bjorn
* include/libxml/*.h *.c README doc/*.html etc.: changed old email to
  daniel@veillard.com hopefully I won't have to do this again
* doc/Makefile.am doc/html/*.html: cleanup makefile, checked that
  docs can be rebuilt cleanly now
* include/libxml/xml*version.h*: removed include/libxml/xmlversion.h
  from CVs it's generated, added include/libxml/xmlwin32version.h
  also generated but which should change far less frequently.
* catalog.c nanoftp.c: made sure to include libxml.h not
  libxml/xmlversion.h directly
* include/libxml/*.h: include xmlwin32version.h instead of xmlversion.h
  when compiling on WIN32 and MSC
Daniel
2001-06-24 12:13:24 +00:00
Daniel Veillard
f3afa7dd4e - nanoftp.c nanohttp.c uri.c include/win32config.h: Igor Zlatkovic
provided fixes to compile on MSCC again
- win32/libxml2/libxml2.def.src win32/libxml2/libxml2*.dsp: he
  also provided an update for the project files.
Daniel
2001-06-09 13:52:58 +00:00
Daniel Veillard
9403a0495d - TODO: updated - nanohttp.[ch] : started adding APIs to get the
- TODO: updated
- nanohttp.[ch] : started adding APIs to get the redirected URL
  when this occurs (needed for further base computation
- tree.h: cleanup
- encoding.c: cleanup
- SAX.c: minor change around ctxt->loadsubset
Daniel
2001-05-28 11:00:53 +00:00
Bjorn Reese
70a9da54eb trio upgrade and integration 2001-04-21 16:57:29 +00:00
Daniel Veillard
56a4cb8c4d Huge cleanup, I switched to compile with
-Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit
-Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat
-Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow
-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
- HTMLparser.[ch] HTMLtree.c SAX.c debugXML.c encoding.[ch]
  encoding.h entities.c error.c list.[ch] nanoftp.c
  nanohttp.c parser.[ch] parserInternals.[ch] testHTML.c
  testSAX.c testURI.c testXPath.c tree.[ch] uri.c
  valid.[ch] xinclude.c xmlIO.[ch] xmllint.c xmlmemory.c
  xpath.c xpathInternals.h xpointer.[ch] example/gjobread.c:
  Cleanup, staticfied a number of non-exported functions,
  detected and cleaned up a dozen of problem found this way,
  avoided a lot of public function name/typedef/system names clashes
- doc/xml.html: updated
- configure.in: switched private flags to the really pedantic ones.
Daniel
2001-03-24 17:00:36 +00:00
Owen Taylor
3473f88a7a Revert directory structure changes 2001-02-23 17:55:21 +00:00
CET 2001 Tomasz Koczko
64636e7f6e moved to libxml directory - this allow simplify automake/autoconf. Now
Thu Feb 23 02:03:56 CET 2001 Tomasz Koczko <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.
2001-02-23 01:37:32 +00:00
Daniel Veillard
389e6b7227 Patches bug fixes and on new function:
- xpath.c: fixed the comaprision of values and nodelists,
  need to compare nodelist still ...
- debugXML.c: avoided a possible core dump
- HTMLparser.c: cleanup
- nanohttp.c: contributed fix.
- tree.c: fixes in properties handling added xmlSetNsProp
  needed by libxslt
- xpathInternals.h: exported xmlXPathBooleanFunction, added a
  comment
- TODO: updated
Daniel
2001-01-15 19:41:13 +00:00
Daniel Veillard
45cff696cf Patches: - HTMLparser.c: htmlCheckParagraph to check
Patches:
- HTMLparser.c: htmlCheckParagraph to check htmlOmittedDefaultValue,
  reported by Jonas Borgstrm
- nanohttp.c: Applied Bjorn Reese' IPV6 first patch
Daniel
2001-01-03 18:02:04 +00:00
Daniel Veillard
ce6e98d693 Big OpenVMS patch: - nanohttp.c parser.[ch] tree.[ch] xmlIO.[ch] xmllint.c
Big OpenVMS patch:
- nanohttp.c parser.[ch] tree.[ch] xmlIO.[ch] xmllint.c xpath.c
  parserInternals.h vms/build_libxml.com vms/config.vms Makefile.am:
  integrated a set of OpenVMS changes from Howard Taylor
  <Howard.Taylor@pacoast.com>
Daniel
2000-11-25 09:54:49 +00:00
Daniel Veillard
c2def84b48 Various patches and bug fixes, and XInclude progresses:
- 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
2000-11-07 14:21:01 +00:00
Daniel Veillard
d6d7f7bf96 patched to redirrect all "out of context" error messages to
a reconfigurable routine. The changes are:
* xmlerror.h : added the export of an error context type (void *)
  an error handler type xmlGenericErrorFunc there is an interface
  xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
  to reset the error handling routine and its argument
  (by default it's equivalent to respectively fprintf and stderr.
* all the c files: all wild accesses to stderr or stdout within
  the library have been replaced to calls to the handler.
Daniel
2000-10-25 19:56:55 +00:00
Daniel Veillard
be9ec4b6cd Applying provided patches :-)
- nanohttp.c : applied Wayne HTTP cleanup patch
- tree.[ch]: applied TOM <ptittom@free.fr> for xmlNodeSetBase()
  and xmlNodeSetSpacePreserve()
Daniel
2000-10-25 11:01:53 +00:00
Daniel Veillard
126f27992d Bunch of fixes, finishing moving datastructures to the hash stuff:
- 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
2000-10-24 17:10:12 +00:00
Daniel Veillard
683cb02636 Patches added during last week on W3C CVS base:
- tree.c: coalesce adjacent text nodes
- valid.c: handling of blank nodes in DTd validation (raised
  by problems with a posteriori validation).
- nanohttp.c: changing behaviour on HTTP write stuff.
- HTMLtree.c: forced body and html to be explicitely closed.
- xpath.h: exported more XPath functions.
Daniel
2000-10-22 12:04:13 +00:00
Daniel Veillard
2f971a26da Another patch from Wayne Davison:
- nanoftp.c nanohttp.c xmlIO.c: Win32 patch nanoftp code work now
Daniel
2000-10-12 23:26:32 +00:00
Daniel Veillard
19d6111574 - nanohttp.c: added xmlNanoHTTPTimeout(int delay), removed a bug
xmlNanoHTTPMethod on input MimeType Tony Lam <Tony.Lam@eng.sun.com>
- xpointer.c: slight extension of xmlXPtrLocationSetMerge
Daniel
2000-10-11 23:50:35 +00:00
Daniel Veillard
b0426caeb9 patch for socklen_t detection by Albert Chin-A-Young <china@thewrittenword.com>
Daniel
2000-10-11 23:39:43 +00:00
Daniel Veillard
e8282edd45 More work toward 2.2.5, integrated a number of patches
- configure.in Makefile.am win32config.h.in: trying to cleanup
  make distcheck .... huh ...
- include/Makefile.am include/win32config.h: new directory
  for includes
- win32/Makefile.mingw win32/README.MSDev win32/libxml2/libxml2.dsp
  updated teh makefiles and instructions for WIN32
- xpath.c: small fixes
- test/XPath/ results/XPath: updated the testcases and results
- HTMLparser.c nanohttp.c testXPath.c: incorporated provided or
  suggested patches
- valid.c: fixed an ID bug
Daniel
2000-10-10 23:01:31 +00:00
Daniel Veillard
b71379b796 - moved xml-error.h to xmlerror.h: seems this allowed to bypass
the automake bug where wrong dependancies were generated.
- xpath.[ch]: worked on XPointer
Daniel
2000-10-09 12:30:39 +00:00
Daniel Veillard
281f8ff431 Got an OSF/1 bug report fixing related problems:
- xmlversion.h.in nanoftp.c nanohttp.c: traying to work out the
  problem of socklen_t being undefined on a number of platforms
- debugXML.c: fixed a compilation problem when without snprintf
Daniel
2000-09-24 08:12:14 +00:00
Daniel Veillard
8ddb5a7aef Small bugfixes: - HTMLparser.c uri.c: Another patch from Wayne Davison,
Small bugfixes:
- HTMLparser.c uri.c: Another patch from Wayne Davison, correcting
  an URI bug and a fix for the control-character-induced infinite loop
- nanohttp.c: preventive fix for compiling on WIN32
Daniel
2000-09-23 10:28:52 +00:00
Daniel Veillard
20cdd5e484 avoid possible future probs on Win32, daniel. 2000-09-22 18:42:33 +00:00
Daniel Veillard
b656ebe456 Cleanup, patch from Wayne Davison:
- xmlIO.h tree.h: made xmlNodeDump() and xmlNodeDumpOutput() public
- parser.[ch] nanohttp.c HTMLtree.c HTMLparser.c tree.c: applied and
  modified slightly Wayne Davison patch adding xmlStrcasecmp and
  related function, fixing xmlStrncmp(), and associated cleanup
- result/HTML/entities.html.sax: updating result
Daniel
2000-09-22 13:51:48 +00:00
Daniel Veillard
39c7d71a3b Jumbo patch, resync of W3C/Gnome CVS trees:
- uri.c tree.c SAX.c parser.c entities.c debugXML.c: finished
  the cleanup of the computation of URI references when seeking
  external entities. The URI reference string and the resulting
  URI are both stored now.
- parser.c HTMLparser.c valid.c nanoftp.c nanohttp.c xpath.c:
  large s(n)printf checks and cleanup from Denis Barbier
  <barbier@imacs.polytechnique.fr>
- xmlversion.h.in tree.h: couple of SGML declarations for a
  possible docbook module.
- result/VC/ : a couple of test output changed due to the change
  of the entities URI
Daniel
2000-09-10 16:14:55 +00:00
Daniel Veillard
2f2bf417f8 Small cleanups, updates, Daniel 2000-08-20 15:11:02 +00:00
Daniel Veillard
3665069745 - nanohttp.c: fixed socklen_t replacement to unsigned int
- parser.c: fixed a space handdling missing at the end of
  production 28 DOCTYPE.
- xmlmemory.c: fixed a stupid bug on the routine to override
  allocation functions
- TODO: updated
Daniel
2000-07-21 15:16:39 +00:00
Daniel Veillard
32bc74ef98 - doc/encoding.html doc/xml.html: added I18N doc
- encoding.[ch] HTMLtree.[ch] parser.c HTMLparser.c: I18N encoding
  improvements, both parser and filters, added ASCII & HTML,
  fixed the ISO-Latin-1 one
- xmllint.c testHTML.c: added/made visible --encode
- debugXML.c : cleanup
- most .c files: applied patches due to warning on Windows and
  when using Sun Pro cc compiler
- xpath.c : cleanup memleaks
- nanoftp.c : added a TESTING preprocessor flag for standalong
  compile so that people can report bugs more easilly
- nanohttp.c : ditched socklen_t which was a portability mess
  and replaced it with unsigned int.
- tree.[ch]: added xmlHasProp()
- TODO: updated
- test/ : added more test for entities, NS, encoding, HTML, wap
- configure.in: preparing for 2.2.0 release
Daniel
2000-07-14 14:49:25 +00:00