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

44 Commits

Author SHA1 Message Date
Nick Wellnhofer
8625db2892 xmlcatalog: Improved fix for #699 2024-08-19 21:14:04 +02:00
Nick Wellnhofer
6cc2387e1a shell: Only use readline on terminals
Should fix xmllint shell tests.
2024-07-24 12:26:39 +02:00
Nick Wellnhofer
2d96adb27b windows: fopen files with "wb" 2024-06-22 21:29:27 +02:00
Nick Wellnhofer
5589c9ea6f xmllint: Set stdin/stdout to binary on Windows 2024-06-22 21:23:15 +02:00
Nick Wellnhofer
3848802723 xmllint: Support libreadline without history 2024-06-17 00:54:47 +02:00
Nick Wellnhofer
699299cae3 globals: Stop including globals.h 2023-09-20 22:07:40 +02:00
Nick Wellnhofer
886bf4e63b Stop calling xmlMemoryDump
This was used to check for memory leaks but could potentially create a
.memdump file. These days, there are better ways to check for memory
leaks.
2023-04-30 15:48:41 +02:00
Nick Wellnhofer
c9e4c6d416 catalog: Fix memory leaks
Fixes #377.
2023-02-21 15:22:01 +01:00
David Seifert
865520f048 Respect --sysconfdir in source files
* Prefix installations need to point to a non-root `etc`
  - Gentoo Prefix has been patching this for over 10 years:
    https://bugs.gentoo.org/317891
  - MacPorts has to manually replace paths after patching:
    cc3bb736e9/textproc/libxml2/Portfile (L46)
2022-03-30 14:36:49 +00:00
Nick Wellnhofer
776d15d383 Don't check for standard C89 headers
Don't check for

- ctype.h
- errno.h
- float.h
- limits.h
- math.h
- signal.h
- stdarg.h
- stdlib.h
- string.h
- time.h

Stop including non-standard headers

- malloc.h
- strings.h
2022-03-02 00:43:54 +01:00
David King
91b3d3f95b Remove duplicated code in xmlcatalog
Found by Coverity.

https://bugzilla.redhat.com/show_bug.cgi?id=1938806
2022-01-16 14:28:45 +01:00
Nick Wellnhofer
20c60886e4 Fix typos
Resolves #133.
2020-03-08 17:41:53 +01:00
Jan Pokorný
6b780f65d8 xmlcatalog: restore ability to query system catalog easily
I've noticed that easy way of locating a DocBook XSLT in a configure
script of another project doesn't work anymore.  It is using something
like: xmlcatalog "" ${DOCBOOK_XSL_URI}/${DOCBOOK_XSL_PATH}.  The script
is then forced to a plain, suboptimal search using find utility.
Indeed, I retrospectively realize that the check was working just
by mere accident given that the window this presumably side-effect
was applicable had not lasted long, some 8 months between

  054c716ea1

introducing xmlInitializeCatalog in the LIBXML_TEST_VERSION-rooted
call chain, and

  f65128f382

reverting that again.

So while one can state /etc/xml/catalog constant explicitly, in
some use cases (such as the mentioned one -- that's why I wanted
to omit stating the full path in the first place), this is rather
an implementation detail, perhaps subject to change from that POV.
Therefore I propose to restore that behaviour in the targeted
manner without global disruptions this time around.

As a side-effect, this fixes indenting of the affected part.
2017-10-21 15:26:40 +02:00
Patrick Monnerat
2137326eda xmlcatalog: flush stdout before interactive shell input. 2016-05-01 18:34:13 +08:00
Philip Withnall
7746f2f609 xmlcatalog: Fix a memory leak on quit
Coverity issue: #60442

https://bugzilla.gnome.org/show_bug.cgi?id=731990
2014-07-26 20:11:35 +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
13cee4e37b Fix a bunch of scan 'dead increments' and cleanup
* HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c
  testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c:
  fix unused variables, or unneeded increments as well as a couple
  of space issues
* runtest.c: check for NULL before calling unlink()
2009-09-05 14:52:55 +02:00
Daniel Veillard
11ce4004d8 end of first pass on coverity reports. Daniel
* runtest.c schematron.c testAutomata.c tree.c valid.c xinclude.c
  xmlcatalog.c xmlreader.c xmlregexp.c xpath.c: end of first
  pass on coverity reports.
Daniel
2006-03-10 00:36:23 +00:00
William M. Brack
b7b54de6c6 added code to handle <group>, including dumping to output (bug 151924).
* catalog.c: added code to handle <group>, including dumping
  to output (bug 151924).
* xmlcatalog.c, xmlstring.c, parser.c: minor compiler warning
  cleanup (no change to logic)
2004-10-06 16:38:01 +00:00
Daniel Veillard
1f8658a76f Dodji pointed out a bug in xmlGetNodePath() applied patch from Albert Chin
* tree.c: Dodji pointed out a bug in xmlGetNodePath()
* xmlcatalog.c: applied patch from Albert Chin to add a
  --no-super-update option to xmlcatalog see #145461
  and another patch also from Albert Chin to not crash
  on -sgml --del without args see #145462
* Makefile.am: applied another patch from Albert Chin to
  fix a problem with diff on Solaris #145511
* xmlstring.c: fix xmlCheckUTF8() according to the suggestion
  in bug #148115
* python/libxml.py: apply fix from Marc-Antoine Parent about
  the errors in libxml(2).py on the node wrapper #135547
Daniel
2004-08-14 21:46:31 +00:00
Daniel Veillard
cccd4a0524 allow fallback to URI lookup when SYSTEM fails, should close #134092
* xmlcatalog.c: allow fallback to URI lookup when SYSTEM fails,
  should close #134092
Daniel
2004-03-04 14:02:13 +00:00
Daniel Veillard
efe6c74dfb applied patch from Stefan Kost Daniel
* xmlcatalog.c: applied patch from Stefan Kost
Daniel
2003-12-12 14:56:03 +00:00
Daniel Veillard
a9cce9cd0d Okay this is scary but it is just adding a configure option to disable
* HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c
  encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c
  testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c
  testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c
  xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c
  example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h
  include/libxml/catalog.h include/libxml/debugXML.h
  include/libxml/entities.h include/libxml/nanohttp.h
  include/libxml/relaxng.h include/libxml/tree.h
  include/libxml/valid.h include/libxml/xmlIO.h
  include/libxml/xmlschemas.h include/libxml/xmlversion.h.in
  include/libxml/xpathInternals.h python/libxml.c:
  Okay this is scary but it is just adding a configure option
  to disable output, this touches most of the files.
Daniel
2003-09-29 13:20:24 +00:00
Daniel Veillard
4432df239b cleanup, creating a new legacy.c module, made sure make tests ran in
* Makefile.am: cleanup, creating a new legacy.c module,
  made sure make tests ran in reduced conditions
* SAX.c SAX2.c configure.in entities.c globals.c parser.c
  parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c
  xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in:
  increased the modularization, allow to configure out
  validation code and legacy code, added a configuration
  option --with-minimum compiling only the mandatory code
  which then shrink to 200KB.
Daniel
2003-09-28 18:58:27 +00:00
William M. Brack
c193956ee1 small changes to syntax to get rid of compiler warnings. No changes to
* error.c HTMLparser.c testC14N.c testHTML.c testURI.c
  xmlcatalog.c xmlmemory.c xmlreader.c xmlschemastypes.c
  python/libxml.c include/libxml/xmlmemory.h: small changes
  to syntax to get rid of compiler warnings.  No changes
  to logic.
2003-08-05 15:52:22 +00:00
Daniel Veillard
3be27518c9 applied patch for FreeBSD by Julio Merino, closing #104475 Daniel
* xmlcatalog.c xmllint.c: applied patch for FreeBSD by
  Julio Merino, closing #104475
Daniel
2003-01-26 19:49:04 +00:00
Daniel Veillard
9cdcf36e70 tried to fix some of the problem with --sgml Daniel
* xmlcatalog.c: tried to fix some of the problem with --sgml
Daniel
2002-10-22 14:23:59 +00:00
Daniel Veillard
9e537937a6 applied 2 fixups from Igor Daniel
* xmlcatalog.c include/libxml/xmlversion.h.in: applied 2 fixups
  from Igor
Daniel
2002-03-21 13:08:08 +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
0f5f162eeb Fixed bug #68830, xmlcatalog now provides return codes in case of errors
* doc/xmlcatalog_man.xml xmlcatalog.c: Fixed bug #68830, xmlcatalog
  now provides return codes in case of errors
Daniel
2002-01-20 12:42:06 +00:00
Daniel Veillard
572577e094 removed the last occurences of strdup usage in the code Daniel
* globals.c xmlIO.c xmlcatalog.c: removed the last occurences
  of strdup usage in the code
Daniel
2002-01-18 16:23:55 +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
6eb1772423 avoid unlink() and use remove() instead. Daniel
* xmlcatalog.c: avoid unlink() and use remove() instead.
Daniel
2001-11-04 22:19:27 +00:00
Daniel Veillard
cd21dc7848 Fixed SGML catalogs breakage of 2.4.7, added a couple of really needed
* include/libxml/catalog.h catalog.c: Fixed SGML catalogs
  breakage of 2.4.7, added a couple of really needed APIs
  like xmlCatalogIsEmpty() and xmlNewCatalog()
* xmlcatalog.c: updated --sgml --noout to be a suitable replacement
  for install-catalog
* configure.in: preparing 2.4.8
Daniel
2001-11-04 20:03:38 +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
b847864fc2 started integrating the core of the thread support not activated yet but
* Makefile.am include/libxml/Makefile.am
  include/libxml/globals.h globals.c  include/libxml/threads.h
  threads.c build_glob.py global.data xmlcatalog.c acconfig.h
  configure.in: started integrating the core of the thread support
  not activated yet but half integrated. The code should still
  compile and work anyway.
Daniel
2001-10-12 17:29:10 +00:00
Daniel Veillard
82d7533880 adding SGML super catalog support adding one API and one flag --sgml to
* include/libxml/catalog.h catalog.c xmlcatalog.c: adding SGML
  super catalog support adding one API and one flag --sgml to
  xmlcatalog
Daniel
2001-10-08 15:01:59 +00:00
Daniel Veillard
c0631a608f removed a couple of warning try to solve the linking problem on platforms
* catalog.c xmlcatalog.c: removed a couple of warning
* xpath.c: try to solve the linking problem on platforms
  needing trio to compile
Daniel
2001-09-20 13:56:06 +00:00
Daniel Veillard
6c5f9d14cc added a --convert option to xmlcatalog to convert SGML ones to the XML
* include/libxml/catalog.h catalog.c xmlcatalog.c: added a
  --convert option to xmlcatalog to convert SGML ones to
  the XML syntax.
* xmllint.c: small cleanup for $SGML_CATALOG_FILES support.
Daniel
2001-08-25 13:33:14 +00:00
Daniel Veillard
e7ead2d237 added documentation about Catalog support, misses an API description
* doc/catalog.html doc/xml.html: added documentation about
  Catalog support, misses an API description
* doc/html/*: reextracted the API pages
Daniel
2001-08-22 23:44:09 +00:00
Daniel Veillard
e2940ddb35 starts to look okay, really plugged the new framework, cleaned a lot of
* catalog.c parser.c xmlIO.c xmlcatalog.c xmllint.c
  include/libxml/catalog.h: starts to look okay, really
  plugged the new framework, cleaned a lot of stuff,
  added some APIs, except the PI's support missing this
  should be mostly complete
* result/catalogs/* test/catalogs/*: added new test, enriched
  the existing one with URN ID tests
Daniel
2001-08-22 00:06:49 +00:00
Daniel Veillard
cda969218b more work on the XML catalog support. small cleanup seems using list as a
* Makefile.am catalog.c xmlcatalog.c include/libxml/catalog.h:
  more work on the XML catalog support.
* parser.c include/libxml/parser.h: small cleanup seems using
  list as a public parameter name can give portability troubles
* trionan.c trionan.h xpath.c include/libxml/trionan.h
  include/libxml/xpath.h include/libxml/Makefile.am: removed
  trionan from the libxml API, added xmlXPathIsInf and xmlXPathIsNaN
  wrappers
Daniel
2001-08-21 10:56:31 +00:00
Bjorn Reese
450296070e Re-worked NaN and Inf support 2001-08-21 09:23:53 +00:00
Daniel Veillard
344cee76a6 renaming testCatalog as xmlcatalog, making it an installed app adding a
* Makefile.am xmlcatalog.c libxml.spec.in: renaming
  testCatalog as xmlcatalog, making it an installed app
  adding a shell, and preparing it to be a /etc/xml/catalog
  management tool, though not ready yet
* catalog.c include/libxml/catalog.h: adding support for
  XML Catalogs http://www.oasis-open.org/committees/entity/
  not finished, there is some interesting tradeoffs and a
  few open questions left.
Daniel
2001-08-20 00:08:40 +00:00