1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-01 05:10:54 -08:00
Commit graph

28 commits

Author SHA1 Message Date
Juanma Barranquero
9209588f2d src/xml.c (init_libxml2_functions) [WINDOWSNT]: Remove unused local variable. 2012-04-07 22:54:50 +02:00
Paul Eggert
b5385551e3 Fix typo that broke non-Windows builds.
* xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
2012-04-07 08:15:22 -07:00
Eli Zaretskii
9078ead6ce Support building on MS-Windows with libxml2.
src/makefile.w32-in (OBJ2): Add xml.$(O).
 (GLOBAL_SOURCES): Add xml.c.
 ($(BLD)/xml.$(O)): New dependency list.
 src/xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
 [!WINDOWSNT]: New macros.
 (init_libxml2_functions, libxml2_loaded_p): New functions.
 (parse_region): Call fn_xmlCheckVersion instead of using the macro
 LIBXML_TEST_VERSION.  Call libxml2 functions via the fn_* macros.
 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
 Calls xmlCleanupParser only if libxml2 was loaded (or statically
 linked in).
 (Flibxml_parse_html_region, Flibxml_parse_xml_region): Call
 init_libxml2_functions before calling libxml2 functions.
 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
 src/emacs.c: Don't include libxml/parser.h.
 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
 xmlCleanupParser directly.
 src/ lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.

 nt/configure.bat: Support building with libxml2.
 nt/INSTALL:
 nt/README.W32: Add information about libxml2.

 lisp/term/w32-win.el (dynamic-library-alist): Add libxml2 DLLs.

 lib-src/makefile.w32-in (obj): Add xml.o.
2012-04-07 16:57:36 +03:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Lars Magne Ingebrigtsen
3134906c91 * xml.c (parse_region): Make the parsing work for non-comment-starting XML files again.
Fixes: debbugs:9144
2011-09-10 20:14:50 +02:00
Lars Magne Ingebrigtsen
fcb901a77a Fix up xmlCleanupParser sequence.
* xml.c (parse_region): Don't call xmlCleanupParser after parsing,
since this reportedly can destroy thread storage.

* emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
2011-09-03 23:59:25 +02:00
Stefan Monnier
14486a1036 * src/xml.c: Fix Lisp_Object/int mixup. 2011-07-24 10:01:58 -04:00
Paul Eggert
04c4b52e0a * xml.c (parse_region): Remove unused local
that was recently introduced.
2011-07-23 11:31:25 -07:00
Lars Magne Ingebrigtsen
9abd053219 * xml.c (parse_region): Make sure we always return a tree. 2011-07-20 22:45:13 +02:00
HAMANO Kiyoto
36881d164d * xml.c (parse_region): If a document contains only comments, return that, too. 2011-07-20 22:05:02 +02:00
Lars Magne Ingebrigtsen
1e98674d93 * xml.c (make_dom): Return comments, too. 2011-07-20 21:58:46 +02:00
T.V. Raman
87302331c2 * src/xml.c (parse_region): Avoid creating spurious whiespace nodes.
See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00200.html
2011-04-08 12:15:30 -04:00
Paul Eggert
c9735e30ca * xml.c (make_dom): Now static. 2011-03-18 19:43:47 -07:00
Paul Eggert
c45e52762b * xml.c: conform to C89 pointer rules 2011-02-06 22:15:32 -08:00
Paul Eggert
42a5b22fc0 Use SSDATA when the context wants char *.
* alloc.c, buffer.c, bytecode.c, callproc.c, dired.c:
* dispnew.c, doc.c, editfns.c, emacs.c, fileio.c, filelock.c:
* fns.c, font.c, frame.c, image.c, indent.c, keyboard.c:
* lread.c, minibuf.c, print.c, process.c, search.c, widget.c:
* xdisp.c, xfaces.c, xfns.c, xml.c, xselect.c, xterm.c:
Use SSDATA (not SDATA) when the context of the expression wants
char * (not unsigned char *).
2011-01-30 14:17:44 -08:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
d0d4361dba Add 2011 to remaining FSF/AIST copyright years. 2011-01-15 14:10:37 -08:00
Lars Magne Ingebrigtsen
3c2317e891 Return CDATA sections (like <style>foo</style>) as text nodes.
Also ignore blank HTML nodes.
2010-12-06 17:59:52 +01:00
Lars Magne Ingebrigtsen
20a5e99685 Clean up trailing whitespace. 2010-10-02 02:39:15 +02:00
Lars Magne Ingebrigtsen
1b21784963 xml.c: Rework the functions to take regions instead of strings,
and rename the functions to reflect clearly that they come from the
libxml package.
2010-10-02 02:36:47 +02:00
Dan Nicolaescu
55e572ef89 * src/xml.c (parse_string): Use const. 2010-09-30 16:26:40 -07:00
Chong Yidong
4b9832a6f2 Rename libxml2 functions, and make parse tree format consistent with xml.el.
* xml.c: Switch to GNU indentation.
(make_dom): Change parse tree format to match xml.el.
(Fxml_parse_html_string_internal): Rename from html-parse-string.
(Fxml_parse_string_internal): Rename from xml-parse-string.

* configure.in: Announce whether libxml2 is linked to.
2010-09-21 23:10:16 -04:00
Lars Magne Ingebrigtsen
c97c655f5f * xml.c (parse_string): Renamed to parse_string(), since that's
what it does.
(parse_string): Return nil when the document can't be parsed.
2010-09-14 20:37:26 +02:00
Andreas Schwab
1da70e9968 * xml.c (Fxml_parse_string, Fxml_parse_string): Revert last
change.  Don't make first argument optional.  Doc fix.
2010-09-14 09:53:39 +02:00
Lars Magne Ingebrigtsen
26632d8d41 * xml.c (Fxml_parse_string, Fhtml_parse_string): Fix up the parameters
for the doc string.

From  Leo  <sdl.web@gmail.com>  (tiny change)
2010-09-14 02:08:02 +02:00
Lars Magne Ingebrigtsen
21fa8e37fd * xml.c (Fhtml_parse_string, Fxml_parse_string): Mention BASE-URL. 2010-09-12 19:16:25 +02:00
Lars Magne Ingebrigtsen
8b620f1169 Remove some trailing white space. 2010-09-10 19:45:22 +02:00
Lars Magne Ingebrigtsen
381408e219 Add support for the libxml2 library.
This adds the html-parse-string and xml-parse-string functions in the
new file src/xml.c, as well as autoconf detection of the library.
2010-09-10 18:44:35 +02:00