diff --git a/Makefile.config.in b/Makefile.config.in index 1b02df80..0b3bbce5 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -135,7 +135,6 @@ CONFIG_GNUTLS_OPENSSL_COMPAT = @CONFIG_GNUTLS_OPENSSL_COMPAT@ CONFIG_GOPHER = @CONFIG_GOPHER@ CONFIG_GPM = @CONFIG_GPM@ CONFIG_GZIP = @CONFIG_GZIP@ -CONFIG_HTMLCXX = @CONFIG_HTMLCXX@ CONFIG_HTML_HIGHLIGHT = @CONFIG_HTML_HIGHLIGHT@ CONFIG_IDN = @CONFIG_IDN@ CONFIG_INTERLINK = @CONFIG_INTERLINK@ diff --git a/configure.ac b/configure.ac index 6502f498..f819e137 100644 --- a/configure.ac +++ b/configure.ac @@ -643,7 +643,6 @@ AC_ARG_WITH([spidermonkey], # when we know for sure whether we're going to use SpiderMonkey or not. # (features.conf is not supposed to define it.) CONFIG_SPIDERMONKEY= -CONFIG_HTMLCXX= EL_SAVE_FLAGS case "$with_spidermonkey" in @@ -668,14 +667,9 @@ for package in mozjs-52; do AC_MSG_CHECKING([for SpiderMonkey (mozjs-52) in pkg-config $package]) if $PKG_CONFIG $pkg_config_static --cflags --libs $package > /dev/null 2>&AS_MESSAGE_LOG_FD; then DB_LOCALSTORAGE_LIBS="$($PKG_CONFIG $pkg_config_static --libs sqlite3)" - HTMLCXX_LIBS="$($PKG_CONFIG $pkg_config_static --libs htmlcxx)" - if test -n "$HTMLCXX_LIBS"; then - CONFIG_HTMLCXX=yes - fi - SPIDERMONKEY_LIBS="$($PKG_CONFIG $pkg_config_static --libs $package) $DB_LOCALSTORAGE_LIBS $HTMLCXX_LIBS" + SPIDERMONKEY_LIBS="$($PKG_CONFIG $pkg_config_static --libs $package) $DB_LOCALSTORAGE_LIBS" DB_LOCALSTORAGE_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags sqlite3)" - HTMLCXX_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags htmlcxx)" - SPIDERMONKEY_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags $package) $DB_LOCALSTORAGE_CFLAGS $HTMLCXX_CFLAGS" + SPIDERMONKEY_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags $package) $DB_LOCALSTORAGE_CFLAGS" LIBS="$SPIDERMONKEY_LIBS $LIBS_X" CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS" CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS" @@ -703,7 +697,6 @@ done if test -z "$CONFIG_SPIDERMONKEY"; then # Didn't find SpiderMonkey anywhere. CONFIG_SPIDERMONKEY=no - CONFIG_HTMLCXX=no fi EL_RESTORE_FLAGS @@ -716,7 +709,6 @@ fi EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_ECMASCRIPT_SMJS], [ECMAScript (JavaScript)]) AC_SUBST(CONFIG_ECMASCRIPT_SMJS) -EL_CONFIG(CONFIG_HTMLCXX, [HTMLcxx]) if test "x$CONFIG_ECMASCRIPT_SMJS" = xyes && test "x$HAVE_JS_TRIGGEROPERATIONCALLBACK" = xyes && diff --git a/meson.build b/meson.build index b82687b8..a7e60a7f 100644 --- a/meson.build +++ b/meson.build @@ -87,7 +87,6 @@ conf_data.set('CONFIG_LIBEV', get_option('libev')) conf_data.set('CONFIG_LIBEVENT', get_option('libevent')) conf_data.set('CONFIG_X', get_option('x')) conf_data.set('CONFIG_LIBDOM', get_option('libdom')) -conf_data.set('CONFIG_HTMLCXX', get_option('htmlcxx')) conf_data.set('CONFIG_XML', get_option('xml')) #CONFIG_BOOKMARKS=true @@ -158,7 +157,7 @@ conf_data.set10('HAVE_SYS_TIME_H', 1) compiler = meson.get_compiler('c') -if conf_data.get('CONFIG_ECMASCRIPT') or conf_data.get('CONFIG_HTMLCXX') +if conf_data.get('CONFIG_ECMASCRIPT') extracflags = ['-xc++', '-fpermissive'] else extracflags = [] @@ -297,11 +296,6 @@ if conf_data.get('CONFIG_LIBDOM') deps += domdeps endif -if conf_data.get('CONFIG_HTMLCXX') - htmlcxxdeps = dependency('htmlcxx') - deps += htmlcxxdeps -endif - if conf_data.get('CONFIG_XML') xml2deps = dependency('libxml2') deps += xml2deps diff --git a/meson_options.txt b/meson_options.txt index a5f82b24..535876ef 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -61,5 +61,4 @@ option('libev', type: 'boolean', value: false, description: 'compile with libev option('libevent', type: 'boolean', value: false, description: 'compile with libevent. Note that libev has precedence') option('x', type: 'boolean', value: false, description: 'use the X Window System') option('libdom', type: 'boolean', value: false, description: 'libdom') -option('htmlcxx', type: 'boolean', value: false, description: 'htmlcxx') option('xml', type: 'boolean', value: false, description: 'libxml++') diff --git a/src/document/Makefile b/src/document/Makefile index e41c69c3..59541e0d 100644 --- a/src/document/Makefile +++ b/src/document/Makefile @@ -3,7 +3,6 @@ include $(top_builddir)/Makefile.config SUBDIRS-$(CONFIG_CSS) += css SUBDIRS-$(CONFIG_DOM) += dom -SUBDIRS-$(CONFIG_HTMLCXX) += htmlcxx SUBDIRS-$(CONFIG_LIBDOM) += libdom SUBDIRS = html plain diff --git a/src/document/htmlcxx/Makefile b/src/document/htmlcxx/Makefile deleted file mode 100644 index 1e1b4a70..00000000 --- a/src/document/htmlcxx/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -top_builddir=../../.. -include $(top_builddir)/Makefile.config - -INCLUDES += $(HTMLCXX_CFLAGS) - -OBJS = renderer.o - -include $(top_srcdir)/Makefile.lib diff --git a/src/document/htmlcxx/meson.build b/src/document/htmlcxx/meson.build deleted file mode 100644 index 6a2e1242..00000000 --- a/src/document/htmlcxx/meson.build +++ /dev/null @@ -1 +0,0 @@ -srcs += files('renderer.c') diff --git a/src/document/htmlcxx/renderer.c b/src/document/htmlcxx/renderer.c deleted file mode 100644 index 11dac033..00000000 --- a/src/document/htmlcxx/renderer.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Plain text document renderer */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -#include "elinks.h" - -#include "bookmarks/bookmarks.h" -#include "cache/cache.h" -#include "config/options.h" -#include "document/docdata.h" -#include "document/document.h" -#include "document/format.h" -#include "document/options.h" -#include "document/htmlcxx/renderer.h" -#include "document/plain/renderer.h" -#include "document/renderer.h" -#include "globhist/globhist.h" -#include "intl/charsets.h" -#include "protocol/protocol.h" -#include "protocol/uri.h" -#include "terminal/color.h" -#include "terminal/draw.h" -#include "util/color.h" -#include "util/error.h" -#include "util/memory.h" -#include "util/string.h" - -#include -using namespace htmlcxx; - -struct source_renderer { - struct string tmp_buffer; - struct string *source; - char *enc; -}; - -static void -walk_tree(struct string *buf, tree const &dom) -{ - tree::iterator it = dom.begin(); - add_to_string(buf, it->text().c_str()); - - for (tree::sibling_iterator childIt = dom.begin(it); childIt != dom.end(it); ++childIt) - { - walk_tree(buf, childIt); - } - add_to_string(buf, it->closingText().c_str()); -} - -static int -htmlcxx_main(struct source_renderer *renderer) -{ - std::string html = renderer->source->source; - HTML::ParserDom parser; - tree dom = parser.parseTree(html); - walk_tree(&renderer->tmp_buffer, dom); - - return 0; -} - -void -render_source_document_cxx(struct cache_entry *cached, struct document *document, - struct string *buffer) -{ - struct source_renderer renderer; - char *head = empty_string_or_(cached->head); - - (void)get_convert_table(head, document->options.cp, - document->options.assume_cp, - &document->cp, - &document->cp_status, - document->options.hard_assume); - - init_string(&renderer.tmp_buffer); - renderer.source = buffer; - renderer.enc = get_cp_mime_name(document->cp); - htmlcxx_main(&renderer); - render_plain_document(cached, document, &renderer.tmp_buffer); - done_string(&renderer.tmp_buffer); -} diff --git a/src/document/htmlcxx/renderer.h b/src/document/htmlcxx/renderer.h deleted file mode 100644 index 7c523747..00000000 --- a/src/document/htmlcxx/renderer.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef EL__DOCUMENT_HTMLCXX_RENDERER_H -#define EL__DOCUMENT_HTMLCXX_RENDERER_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct cache_entry; -struct document; -struct string; - -void render_source_document_cxx(struct cache_entry *cached, struct document *document, struct string *buffer); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/document/meson.build b/src/document/meson.build index 52a72ce7..65d29271 100644 --- a/src/document/meson.build +++ b/src/document/meson.build @@ -7,9 +7,6 @@ endif if conf_data.get('CONFIG_LIBDOM') subdir('libdom') endif -if conf_data.get('CONFIG_HTMLCXX') - subdir('htmlcxx') -endif subdir('html') subdir('plain') srcs += files('docdata.c', 'document.c', 'format.c', 'forms.c', 'options.c', 'refresh.c', 'renderer.c') diff --git a/src/document/renderer.c b/src/document/renderer.c index d84ee5ad..41fa4f24 100644 --- a/src/document/renderer.c +++ b/src/document/renderer.c @@ -18,7 +18,6 @@ #include "document/dom/renderer.h" #include "document/html/frames.h" #include "document/html/renderer.h" -#include "document/htmlcxx/renderer.h" #include "document/libdom/renderer.h" #include "document/plain/renderer.h" #include "document/renderer.h" @@ -257,14 +256,6 @@ render_encoded_document(struct cache_entry *cached, struct document *document) render_source_document(cached, document, &buffer); } else -#endif -#ifdef CONFIG_HTMLCXX - if (document->options.plain && cached->content_type - && (!c_strcasecmp("text/html", cached->content_type) - || !c_strcasecmp("application/xhtml+xml", cached->content_type))) { - render_source_document_cxx(cached, document, &buffer); - } - else #endif if (document->options.plain) { #ifdef CONFIG_DOM diff --git a/src/ecmascript/spidermonkey/element.c b/src/ecmascript/spidermonkey/element.c index 2a61a3d1..fd026b2d 100644 --- a/src/ecmascript/spidermonkey/element.c +++ b/src/ecmascript/spidermonkey/element.c @@ -12,7 +12,6 @@ #include "ecmascript/spidermonkey/util.h" #include -#include #include "bfu/dialog.h" #include "cache/cache.h" diff --git a/src/ecmascript/spidermonkey/element.h b/src/ecmascript/spidermonkey/element.h index 4906b6c3..c60a49d7 100644 --- a/src/ecmascript/spidermonkey/element.h +++ b/src/ecmascript/spidermonkey/element.h @@ -3,8 +3,6 @@ #define EL__ECMASCRIPT_SPIDERMONKEY_ELEMENT_H #include "ecmascript/spidermonkey/util.h" -#include -using namespace htmlcxx; extern JSClass element_class; extern JSPropertySpec element_props[];