mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks with ecmascript support, you must compile using g++ with -fpermissive . There is a lot of warnings. There are some memleaks in ecmascript code, especially related to JSAutoCompartment. I don't know yet, where and how to free it. Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
This commit is contained in:
parent
0c337dd30a
commit
1f57e72212
15
configure.ac
15
configure.ac
@ -60,6 +60,7 @@ echo "Feature summary:" > features.log
|
||||
# ===================================================================
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_CHECK_TOOL([LD], [ld])
|
||||
AC_PROG_AWK
|
||||
AC_PATH_PROGS(AWK, "$AWK")
|
||||
@ -611,17 +612,18 @@ case "$with_spidermonkey" in
|
||||
;;
|
||||
esac
|
||||
|
||||
for package in mozjs-17.0; do
|
||||
for package in mozjs-24; do
|
||||
if test -n "$CONFIG_SPIDERMONKEY"; then
|
||||
break
|
||||
else
|
||||
AC_MSG_CHECKING([for SpiderMonkey (mozjs-17.0) in pkg-config $package])
|
||||
AC_MSG_CHECKING([for SpiderMonkey (mozjs-24) in pkg-config $package])
|
||||
if $PKG_CONFIG --cflags --libs $package > /dev/null 2>&AS_MESSAGE_LOG_FD; then
|
||||
SPIDERMONKEY_LIBS="$($PKG_CONFIG --libs $package)"
|
||||
SPIDERMONKEY_CFLAGS="$($PKG_CONFIG --cflags $package)"
|
||||
LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
|
||||
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
/* mozilla-js.pc may have -DXP_UNIX or similar in Cflags.
|
||||
@ -635,6 +637,7 @@ for package in mozjs-17.0; do
|
||||
AC_MSG_RESULT([yes])],
|
||||
[# Leave CONFIG_SPIDERMONKEY blank, to continue the search.
|
||||
AC_MSG_RESULT([found but unusable])])
|
||||
AC_LANG_POP([C++])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
@ -646,14 +649,6 @@ if test -z "$CONFIG_SPIDERMONKEY"; then
|
||||
CONFIG_SPIDERMONKEY=no
|
||||
fi
|
||||
|
||||
if test "$CONFIG_SPIDERMONKEY" = "yes"; then
|
||||
# LIBS, CFLAGS, and CPPFLAGS still include the SpiderMonkey options.
|
||||
AC_CHECK_FUNCS([JS_ReportAllocationOverflow])
|
||||
AC_CHECK_FUNCS([JS_SetBranchCallback])
|
||||
AC_CHECK_FUNCS([JS_TriggerOperationCallback], [HAVE_JS_TRIGGEROPERATIONCALLBACK=yes])
|
||||
elif test -n "$with_spidermonkey" && test "x$with_spidermonkey" != "xno"; then
|
||||
AC_MSG_WARN([SpiderMonkey was not found even though you specified --with-spidermonkey.])
|
||||
fi
|
||||
EL_RESTORE_FLAGS
|
||||
|
||||
if test "x$CONFIG_SPIDERMONKEY" = xyes; then
|
||||
|
@ -44,7 +44,7 @@ var smartprefixes = {
|
||||
sdp: "http://www.slashdot.org/search.pl?query=%s&op=polls",
|
||||
sdj: "http://www.slashdot.org/search.pl?query=%s&op=journals",
|
||||
dbug: "http://bugs.debian.org/%s",
|
||||
dix: "http://dix.osola.com/index.de.php?trans=1&search=%s",
|
||||
//dix: "http://dix.osola.com/index.de.php?trans=1&search=%s",
|
||||
dixgram: "http://dix.osola.com/v.php?language=german&search=%s",
|
||||
dpkg: "http://packages.debian.org/%s",
|
||||
emacs: "http://www.emacswiki.org/cgi-bin/wiki.pl?search=%s",
|
||||
|
@ -102,15 +102,15 @@ function gmane (url)
|
||||
}
|
||||
|
||||
/* javascript:bugzilla('http://bugzilla.elinks.cz/', "%s"); */
|
||||
function bugzilla (base_url, arguments)
|
||||
function bugzilla (base_url, args)
|
||||
{
|
||||
if (!arguments || arguments == '') return base_url;
|
||||
if (!args || args == '') return base_url;
|
||||
|
||||
if (arguments.match(/^[\d]+$/))
|
||||
return base_url + 'show_bug.cgi?id=' + arguments;
|
||||
if (args.match(/^[\d]+$/))
|
||||
return base_url + 'show_bug.cgi?id=' + args;
|
||||
|
||||
return base_url + 'buglist.cgi?short_desc_type=allwordssubstr'
|
||||
+ '&short_desc=' + escape(arguments);
|
||||
+ '&short_desc=' + escape(args);
|
||||
}
|
||||
|
||||
/* javascript:babelfish("%s"); */
|
||||
@ -130,18 +130,18 @@ function babelfish (url)
|
||||
"Deutsch": 'de',
|
||||
"english": 'en',
|
||||
"french": 'fr',
|
||||
"fran\231ais": 'fr',
|
||||
"fran\x99ais": 'fr',
|
||||
"greek": 'el',
|
||||
"italian": 'it',
|
||||
"italiano": 'it',
|
||||
"japanese": 'ja',
|
||||
"korean": 'ko',
|
||||
"portuguese": 'pt',
|
||||
"portugu\234s": 'pt',
|
||||
"portugu\x9Cs": 'pt',
|
||||
"russian": 'ru',
|
||||
"spanish": 'es',
|
||||
"espanol": 'es',
|
||||
"espa\241ol": 'es',
|
||||
"espa\xA1ol": 'es',
|
||||
};
|
||||
|
||||
var parts = url.match(/^(\S+)\s+(\S+)\s*(.*)/);
|
||||
|
27
meson.build
27
meson.build
@ -1,4 +1,4 @@
|
||||
project('felinks', 'c', version:'0.14.GIT', license:'GPLv2')
|
||||
project('felinks', ['c','cpp'], version:'0.14.GIT', license:'GPLv2')
|
||||
srcs=[]
|
||||
|
||||
srcdir = meson.source_root()
|
||||
@ -92,12 +92,15 @@ conf_data.set('CONFIG_LIBDOM', get_option('libdom'))
|
||||
#CONFIG_XBEL_BOOKMARKS=true
|
||||
#CONFIG_COOKIES=true
|
||||
#CONFIG_DOM=true
|
||||
if conf_data.get('CONFIG_SCRIPTING_SPIDERMONKEY') or conf_data.get('CONFIG_ECMASCRIPT_SMJS')
|
||||
if conf_data.get('CONFIG_SCRIPTING_SPIDERMONKEY') == 1 or conf_data.get('CONFIG_ECMASCRIPT_SMJS')
|
||||
conf_data.set('CONFIG_ECMASCRIPT', true)
|
||||
else
|
||||
conf_data.set('CONFIG_ECMASCRIPT', false)
|
||||
endif
|
||||
conf_data.set('CONFIG_ECMASCRIPT_SMJS_HEARTBEAT', true)
|
||||
|
||||
|
||||
|
||||
#CONFIG_FORMHIST', true)
|
||||
#CONFIG_GLOBHIST', true)
|
||||
conf_data.set('CONFIG_SCRIPTING', true)
|
||||
@ -154,6 +157,12 @@ conf_data.set10('HAVE_SYS_TIME_H', 1)
|
||||
|
||||
compiler = meson.get_compiler('c')
|
||||
|
||||
if conf_data.get('CONFIG_ECMASCRIPT')
|
||||
extracflags = ['-xc++', '-fpermissive']
|
||||
else
|
||||
extracflags = []
|
||||
endif
|
||||
|
||||
conf_data.set10('HAVE_WCHAR_H', compiler.has_header('wchar.h'))
|
||||
conf_data.set10('HAVE_WCTYPE_H', compiler.has_header('wctype.h'))
|
||||
conf_data.set10('HAVE_FCNTL_H', compiler.has_header('fcntl.h'))
|
||||
@ -262,7 +271,7 @@ if conf_data.get('CONFIG_BZIP2')
|
||||
endif
|
||||
|
||||
if conf_data.get('CONFIG_ECMASCRIPT')
|
||||
mozjsdeps = dependency('mozjs-17.0')
|
||||
mozjsdeps = dependency('mozjs-24')
|
||||
deps += mozjsdeps
|
||||
endif
|
||||
|
||||
@ -328,7 +337,11 @@ endif
|
||||
#AC_C_CONST
|
||||
#AC_C_INLINE
|
||||
|
||||
if conf_data.get('CONFIG_ECMASCRIPT')
|
||||
conf_data.set('NONSTATIC_INLINE', '')
|
||||
else
|
||||
conf_data.set('NONSTATIC_INLINE', 'inline')
|
||||
endif
|
||||
|
||||
#AC_SYS_LARGEFILE
|
||||
|
||||
@ -412,17 +425,9 @@ if compiler.has_function('strcasestr', prefix : '#include <string.h>', args: '-D
|
||||
conf_data.set10('HAVE_STRCASESTR', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_function('strstr', prefix : '#include <string.h>')
|
||||
conf_data.set10('HAVE_STRSTR', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_function('strchr', prefix : '#include <string.h>')
|
||||
conf_data.set10('HAVE_STRCHR', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_function('strrchr', prefix : '#include <string.h>')
|
||||
conf_data.set10('HAVE_STRRCHR', 1)
|
||||
endif
|
||||
|
||||
if compiler.has_function('memmove', prefix : '#include <string.h>')
|
||||
conf_data.set10('HAVE_MEMMOVE', 1)
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "bfu/common.h"
|
||||
#include "util/align.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog;
|
||||
struct dialog_data;
|
||||
struct terminal;
|
||||
@ -92,4 +96,8 @@ void add_dlg_button_do(struct dialog *dlg, unsigned char *text, int flags, widge
|
||||
extern const struct widget_ops button_ops;
|
||||
void dlg_format_buttons(struct dialog_data *, struct widget_data *, int, int, int *, int, int *, enum format_align, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__BFU_CHECKBOX_H
|
||||
#define EL__BFU_CHECKBOX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog;
|
||||
struct dialog_data;
|
||||
struct terminal;
|
||||
@ -39,4 +43,8 @@ dlg_format_checkbox(struct dialog_data *dlg_data,
|
||||
#define widget_has_group(widget_data) ((widget_data)->widget->type == WIDGET_CHECKBOX \
|
||||
? (widget_data)->widget->info.checkbox.gid : -1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__BFU_COMMON_H
|
||||
#define EL__BFU_COMMON_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog_data;
|
||||
struct widget_data;
|
||||
|
||||
@ -47,4 +51,8 @@ enum widget_type {
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EL__BFU_COMMON_H */
|
||||
|
@ -8,6 +8,9 @@
|
||||
#include "terminal/window.h" /* dialog_data->win->term is so common that... */
|
||||
#include "util/memlist.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog_data;
|
||||
struct term_event;
|
||||
@ -222,4 +225,8 @@ struct widget_data *select_widget_by_id(struct dialog_data *dlg_data, int i);
|
||||
assert(n == (dlg)->number_of_widgets); \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__BFU_GROUP_H
|
||||
#define EL__BFU_GROUP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog_data;
|
||||
struct terminal;
|
||||
struct widget_data;
|
||||
@ -11,4 +15,8 @@ void dlg_format_group(struct dialog_data *dlg_data,
|
||||
|
||||
void group_layouter(struct dialog_data *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,10 @@
|
||||
#include "bfu/listbox.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
|
||||
/** BFU hierbox browser button */
|
||||
@ -146,4 +150,8 @@ widget_handler_status_T push_hierbox_delete_button(struct dialog_data *dlg_data,
|
||||
widget_handler_status_T push_hierbox_clear_button(struct dialog_data *dlg_data, struct widget_data *button);
|
||||
widget_handler_status_T push_hierbox_search_button(struct dialog_data *dlg_data, struct widget_data *button);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,10 @@
|
||||
|
||||
#include "terminal/kbd.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct menu;
|
||||
struct terminal;
|
||||
|
||||
@ -18,4 +22,8 @@ void refresh_hotkeys(struct terminal *term, struct menu *menu);
|
||||
int check_hotkeys(struct menu *menu, term_event_char_T hotkey, struct terminal *term);
|
||||
int check_not_so_hot_keys(struct menu *menu, term_event_char_T key, struct terminal *term);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,9 @@
|
||||
#include "util/lists.h"
|
||||
#include "util/align.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog;
|
||||
struct dialog_data;
|
||||
@ -115,4 +118,8 @@ input_field_line(struct session *ses, unsigned char *prompt, void *data,
|
||||
#define widget_is_textfield(widget_data) ((widget_data)->widget->type == WIDGET_FIELD \
|
||||
|| (widget_data)->widget->type == WIDGET_FIELD_PASS)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog_data;
|
||||
|
||||
|
||||
@ -58,4 +62,8 @@ int save_input_history(struct input_history *history, unsigned char *filename);
|
||||
|
||||
void dlg_set_history(struct widget_data *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,10 @@
|
||||
#include "main/module.h"
|
||||
#include "util/color.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
struct terminal;
|
||||
|
||||
@ -50,4 +54,9 @@ unsigned char get_led_value(struct led *led);
|
||||
void unset_led_value(struct led *led);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "util/align.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog;
|
||||
struct listbox_data;
|
||||
struct listbox_item;
|
||||
@ -144,4 +148,8 @@ struct listbox_data *get_listbox_widget_data(struct widget_data *widget_data);
|
||||
#define get_dlg_listbox_data(dlg_data) \
|
||||
get_listbox_widget_data(dlg_data->widgets_data)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2,6 +2,10 @@
|
||||
#ifndef EL__BFU_LISTMENU_H
|
||||
#define EL__BFU_LISTMENU_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
struct string;
|
||||
struct terminal;
|
||||
@ -20,4 +24,8 @@ void menu_labels(struct menu_item *m, unsigned char *base, unsigned char **lbls)
|
||||
void do_select_submenu(struct terminal *term, void *menu_, void *ses_);
|
||||
void free_menu(struct menu_item *m);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EL__BFU_LISTMENU_H */
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "config/kbdbind.h"
|
||||
#include "util/box.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct terminal;
|
||||
struct window;
|
||||
|
||||
@ -177,4 +181,8 @@ void do_menu_selected(struct terminal *, struct menu_item *, void *, int, int);
|
||||
void do_mainmenu(struct terminal *, struct menu_item *, void *, int);
|
||||
void deselect_mainmenu(struct terminal *term, struct menu *menu);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "util/align.h"
|
||||
#include "util/memlist.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct terminal;
|
||||
|
||||
|
||||
@ -133,5 +137,8 @@ info_box(struct terminal *term, enum msgbox_flags flags,
|
||||
unsigned char *title, enum format_align align,
|
||||
unsigned char *text);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__BFU_STYLE_H
|
||||
#define EL__BFU_STYLE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct color_pair;
|
||||
struct terminal;
|
||||
|
||||
@ -27,4 +31,8 @@ get_bfu_color(struct terminal *term, unsigned char *stylename);
|
||||
*/
|
||||
void done_bfu_colors(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "util/color.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog;
|
||||
struct dialog_data;
|
||||
struct terminal;
|
||||
@ -60,4 +64,8 @@ dlg_format_text(struct dialog_data *dlg_data, struct widget_data *widget_data,
|
||||
&& (widget_data)->info.text.lines > 0 \
|
||||
&& (widget_data)->box.height < (widget_data)->info.text.lines)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -16,6 +16,10 @@
|
||||
#include "util/lists.h"
|
||||
#include "util/box.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dialog_data;
|
||||
|
||||
|
||||
@ -87,5 +91,8 @@ widget_is_focusable(struct widget_data *widget_data)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,10 @@
|
||||
#include "util/lists.h"
|
||||
#include "util/secsave.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct bookmarks_backend {
|
||||
/* Order matters here. --Zas. */
|
||||
unsigned char *(*filename)(int);
|
||||
@ -16,4 +20,8 @@ struct bookmarks_backend {
|
||||
void bookmarks_read(void);
|
||||
void bookmarks_write(LIST_OF(struct bookmark) *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,14 @@
|
||||
|
||||
#include "bookmarks/backend/common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct bookmarks_backend default_bookmarks_backend;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,14 @@
|
||||
|
||||
#include "bookmarks/backend/common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct bookmarks_backend xbel_bookmarks_backend;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !EL__BOOKMARKS_BACKEND_XBEL_H */
|
||||
|
@ -5,6 +5,10 @@
|
||||
#include "main/object.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct listbox_item;
|
||||
struct terminal;
|
||||
|
||||
@ -57,4 +61,8 @@ int update_bookmark(struct bookmark *, int,
|
||||
unsigned char *, unsigned char *);
|
||||
void open_bookmark_folder(struct session *ses, unsigned char *foldername);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,10 @@
|
||||
#include "terminal/terminal.h"
|
||||
#include "session/session.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct hierbox_browser bookmark_browser;
|
||||
|
||||
/* Launch the bookmark manager */
|
||||
@ -35,4 +39,8 @@ void bookmark_terminal_tabs_dialog(struct terminal *term);
|
||||
/* Free search memorization */
|
||||
void free_last_searched_bookmark(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
8
src/cache/cache.h
vendored
8
src/cache/cache.h
vendored
@ -5,6 +5,10 @@
|
||||
#include "util/lists.h"
|
||||
#include "util/time.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct listbox_item;
|
||||
struct uri;
|
||||
|
||||
@ -149,4 +153,8 @@ int get_cache_entry_count(void);
|
||||
int get_cache_entry_used_count(void);
|
||||
int get_cache_entry_loading_count(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
8
src/cache/dialogs.h
vendored
8
src/cache/dialogs.h
vendored
@ -3,10 +3,18 @@
|
||||
|
||||
#include "bfu/hierbox.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
struct terminal;
|
||||
|
||||
extern struct hierbox_browser cache_browser;
|
||||
void cache_manager(struct session *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,7 +4,15 @@
|
||||
#include "main/main.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum retval parse_options(int, unsigned char *[],
|
||||
LIST_OF(struct string_list_item) *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "terminal/terminal.h"
|
||||
#include "util/string.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum parse_error {
|
||||
ERROR_NONE,
|
||||
ERROR_COMMAND,
|
||||
@ -28,4 +32,8 @@ create_config_string(unsigned char *prefix, unsigned char *name);
|
||||
struct string *wrap_option_desc(struct string *out, const unsigned char *src,
|
||||
const struct string *indent, int maxwidth);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,10 @@
|
||||
#include "terminal/terminal.h"
|
||||
#include "util/memlist.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct hierbox_browser option_browser;
|
||||
extern struct hierbox_browser keybinding_browser;
|
||||
|
||||
@ -20,4 +24,8 @@ void init_keybinding_listboxes(struct keymap keymap_table[],
|
||||
const struct action_list actions[]);
|
||||
void done_keybinding_listboxes(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "config/options.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
|
||||
|
||||
@ -26,4 +30,8 @@ struct option *get_domain_option_from_session(unsigned char *,
|
||||
|
||||
void done_domain_trees(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,10 +1,18 @@
|
||||
#ifndef EL__CONFIG_HOME_H
|
||||
#define EL__CONFIG_HOME_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern unsigned char *elinks_home;
|
||||
extern int first_use;
|
||||
|
||||
void init_home(void);
|
||||
void done_home(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,10 @@
|
||||
#include "terminal/terminal.h"
|
||||
#include "util/string.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct listbox_item;
|
||||
struct module;
|
||||
|
||||
@ -199,4 +203,8 @@ void add_actions_to_string(struct string *string, action_id_T actions[],
|
||||
|
||||
extern struct module kbdbind_module;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -8,6 +8,10 @@
|
||||
#include "util/memory.h"
|
||||
#include "util/string.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* TODO: We should provide some generic mechanism for options caching. */
|
||||
|
||||
/* Fix namespace clash on Cygwin. */
|
||||
@ -555,4 +559,8 @@ enum verbose_level {
|
||||
VERBOSE_LEVELS,
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "config/options.h"
|
||||
#include "util/string.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct option_type_info {
|
||||
unsigned char *name;
|
||||
unsigned char *(*cmdline)(struct option *, unsigned char ***, int *);
|
||||
@ -22,4 +26,8 @@ extern int commandline;
|
||||
|
||||
unsigned char *get_option_type_name(enum option_type type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,8 +1,16 @@
|
||||
#ifndef EL__CONFIG_TIMER_H
|
||||
#define EL__CONFIG_TIMER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct module;
|
||||
|
||||
extern struct module periodic_saving_module;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,9 +3,17 @@
|
||||
|
||||
#include "bfu/inphist.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct module;
|
||||
|
||||
extern struct input_history goto_url_history;
|
||||
extern struct module goto_url_history_module;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -16,6 +16,10 @@
|
||||
#include "util/string.h"
|
||||
#include "util/time.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct listbox_item;
|
||||
struct terminal;
|
||||
|
||||
@ -66,4 +70,8 @@ struct string *send_cookies_js(struct uri *uri);
|
||||
|
||||
extern struct module cookies_module;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,10 +6,18 @@
|
||||
#include "terminal/terminal.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern LIST_OF(struct cookie) cookie_queries;
|
||||
|
||||
void accept_cookie_dialog(struct session *ses, void *data);
|
||||
extern struct hierbox_browser cookie_browser;
|
||||
void cookie_manager(struct session *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__COOKIES_PARSER_H
|
||||
#define EL__COOKIES_PARSER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct cookie_str {
|
||||
unsigned char *str;
|
||||
unsigned char *nam_end, *val_start, *val_end;
|
||||
@ -8,4 +12,8 @@ struct cookie_str {
|
||||
|
||||
struct cookie_str *parse_cookie_str(struct cookie_str *cstr, unsigned char *str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* Cookie path matching */
|
||||
|
||||
#include <string.h>
|
||||
#include "cookies/path.h"
|
||||
|
||||
int
|
||||
is_path_prefix(unsigned char *cookiepath, unsigned char *requestpath)
|
||||
|
@ -1,6 +1,14 @@
|
||||
#ifndef EL__COOKIES_PATH_H
|
||||
#define EL__COOKIES_PATH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int is_path_prefix(unsigned char *d, unsigned char *s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -3,10 +3,18 @@
|
||||
|
||||
#include "session/session.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void nowhere_box(struct terminal *term, unsigned char *title);
|
||||
void link_info_dialog(struct session *ses);
|
||||
void document_info_dialog(struct session *);
|
||||
void cached_header_dialog(struct session *ses, struct cache_entry *cached);
|
||||
void protocol_header_dialog(struct session *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__DIALOGS_DOWNLOAD_H
|
||||
#define EL__DIALOGS_DOWNLOAD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct file_download;
|
||||
struct session;
|
||||
struct terminal;
|
||||
@ -11,4 +15,8 @@ void done_download_display(struct file_download *file_download);
|
||||
void display_download(struct terminal *, struct file_download *, struct session *);
|
||||
void download_manager(struct session *ses);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,10 @@
|
||||
#include "session/session.h"
|
||||
#include "terminal/terminal.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum edit_dialog_type {
|
||||
EDIT_DLG_SEARCH, /* search dialog */
|
||||
EDIT_DLG_ADD /* edit/add dialog */
|
||||
@ -17,4 +21,8 @@ void do_edit_dialog(struct terminal *, int, unsigned char *,
|
||||
void when_cancel(struct dialog *),
|
||||
void *, enum edit_dialog_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,10 +3,18 @@
|
||||
|
||||
#include "main/module.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
|
||||
extern struct module exmode_module;
|
||||
|
||||
void exmode_start(struct session *ses);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__DIALOGS_INFO_H
|
||||
#define EL__DIALOGS_INFO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
struct terminal;
|
||||
|
||||
@ -11,4 +15,8 @@ void menu_copying(struct terminal *, void *, void *);
|
||||
void resource_info(struct terminal *term);
|
||||
void memory_inf(struct terminal *, void *, struct session *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,10 @@
|
||||
#include "terminal/terminal.h"
|
||||
#include "viewer/action.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document_view;
|
||||
struct open_in_new;
|
||||
struct session;
|
||||
@ -57,4 +61,8 @@ void
|
||||
auto_complete_file(struct terminal *term, int no_elevator, unsigned char *path,
|
||||
menu_func_T file_func, menu_func_T dir_func, void *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,9 +4,17 @@
|
||||
#include "session/session.h"
|
||||
#include "terminal/terminal.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void charset_list(struct terminal *, void *, void *);
|
||||
void terminal_options(struct terminal *, void *, struct session *);
|
||||
void menu_language_list(struct terminal *, void *, void *);
|
||||
void resize_terminal_dialog(struct terminal *term);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "elinks.h"
|
||||
|
||||
#include "bfu/dialog.h"
|
||||
#include "dialogs/progress.h"
|
||||
#include "intl/gettext/libintl.h"
|
||||
#include "network/progress.h"
|
||||
#include "terminal/draw.h"
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__DIALOGS_PROGRESS_H
|
||||
#define EL__DIALOGS_PROGRESS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct progress;
|
||||
struct terminal;
|
||||
|
||||
@ -20,4 +24,8 @@ draw_progress_bar(struct progress *progress, struct terminal *term,
|
||||
int x, int y, int width,
|
||||
unsigned char *text, struct color_pair *meter_color);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__DIALOGS_STATUS_H
|
||||
#define EL__DIALOGS_STATUS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct download;
|
||||
struct session;
|
||||
struct terminal;
|
||||
@ -13,4 +17,8 @@ unsigned char *
|
||||
get_download_msg(struct download *download, struct terminal *term,
|
||||
int wide, int full, unsigned char *separator);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,10 @@
|
||||
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct css_stylesheet;
|
||||
struct html_context;
|
||||
struct html_element;
|
||||
@ -33,4 +37,8 @@ css_apply(struct html_context *html_context, struct html_element *element,
|
||||
struct css_stylesheet *css,
|
||||
LIST_OF(struct html_element) *html_stack);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2,6 +2,10 @@
|
||||
#ifndef EL__DOCUMENT_CSS_CSS_H
|
||||
#define EL__DOCUMENT_CSS_CSS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct css_stylesheet;
|
||||
struct module;
|
||||
struct uri;
|
||||
@ -26,4 +30,8 @@ void import_css(struct css_stylesheet *css, struct uri *uri);
|
||||
int supports_css_media_type(const unsigned char *optstr,
|
||||
const unsigned char *token, size_t token_length);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,11 @@
|
||||
#define EL__DOCUMENT_CSS_PARSER_H
|
||||
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct scanner;
|
||||
struct css_stylesheet;
|
||||
struct uri;
|
||||
@ -25,4 +30,8 @@ void css_parse_properties(LIST_OF(struct css_property) *props,
|
||||
void css_parse_stylesheet(struct css_stylesheet *css, struct uri *base_uri,
|
||||
const unsigned char *string, const unsigned char *end);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -8,6 +8,10 @@
|
||||
#include "util/color.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum css_property_type {
|
||||
CSS_PT_NONE,
|
||||
CSS_PT_BACKGROUND,
|
||||
@ -137,4 +141,8 @@ struct css_property_info {
|
||||
/** This table contains info about all the known CSS properties. */
|
||||
extern struct css_property_info css_property_info[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "util/scanner.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** The various token types and what they contain. Patterns taken from
|
||||
* the flex scanner declarations in the CSS 2 Specification.
|
||||
*
|
||||
@ -115,4 +119,8 @@ check_css_precedence(int type, int skipto)
|
||||
return get_css_precedence(type) < get_css_precedence(skipto);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,10 @@
|
||||
#include "protocol/uri.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* #define DEBUG_CSS */
|
||||
|
||||
/** @file
|
||||
@ -195,4 +199,8 @@ void del_css_selector_from_set(struct css_selector *);
|
||||
void dump_css_selector_tree(struct css_selector_set *set);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -8,6 +8,9 @@
|
||||
#include "document/css/property.h"
|
||||
#include "document/css/scanner.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** This function takes a value of a specified type from the given
|
||||
* scanner and converts it to a reasonable struct css_property-ready
|
||||
@ -65,4 +68,9 @@ int css_parse_text_align_value(struct css_property_info *propinfo,
|
||||
int css_parse_white_space_value(struct css_property_info *propinfo,
|
||||
union css_property_value *value,
|
||||
struct scanner *scanner);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "document/document.h"
|
||||
#include "util/memory.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LINES_GRANULARITY 0x7F
|
||||
#define LINE_GRANULARITY 0x0F
|
||||
#define LINK_GRANULARITY 0x7F
|
||||
@ -17,4 +21,8 @@
|
||||
|
||||
struct line *realloc_lines(struct document *document, int y);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -10,6 +10,10 @@
|
||||
#include "util/lists.h"
|
||||
#include "util/box.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct cache_entry;
|
||||
struct document_refresh;
|
||||
struct el_form_control;
|
||||
@ -319,4 +323,8 @@ extern struct module document_module;
|
||||
|
||||
int find_tag(struct document *document, unsigned char *name, int namelen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2,10 +2,18 @@
|
||||
#ifndef EL__DOCUMENT_DOM_RENDERER_H
|
||||
#define EL__DOCUMENT_DOM_RENDERER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct cache_entry;
|
||||
struct document;
|
||||
struct string;
|
||||
|
||||
void render_dom_document(struct cache_entry *cached, struct document *document, struct string *buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,10 +4,17 @@
|
||||
|
||||
#include "dom/stack.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RSS_CONFIG_FLAGS \
|
||||
(DOM_CONFIG_NORMALIZE_WHITESPACE | DOM_CONFIG_NORMALIZE_CHARACTERS)
|
||||
|
||||
extern struct dom_stack_context_info dom_rss_renderer_context_info;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,7 +4,14 @@
|
||||
|
||||
#include "dom/stack.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct dom_stack_context_info dom_source_renderer_context_info;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "intl/charsets.h"
|
||||
#include "terminal/draw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document;
|
||||
struct uri;
|
||||
@ -51,4 +54,8 @@ void render_dom_text(struct dom_renderer *renderer, struct screen_char *template
|
||||
struct link *add_dom_link(struct dom_renderer *renderer, unsigned char *string,
|
||||
int length, unsigned char *uristring, int urilength);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "util/color.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document_options;
|
||||
struct screen_char;
|
||||
|
||||
@ -35,5 +39,9 @@ struct text_style {
|
||||
|
||||
void get_screen_char_template(struct screen_char *template_, struct document_options *options, struct text_style style);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document;
|
||||
struct menu_item;
|
||||
|
||||
@ -119,4 +123,8 @@ int has_form_submit(struct form *form);
|
||||
int get_form_control_link(struct document *document, struct el_form_control *fc);
|
||||
void done_form_control(struct el_form_control *fc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "util/box.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document_options;
|
||||
struct session;
|
||||
struct uri;
|
||||
@ -48,4 +52,8 @@ void format_frames(struct session *ses, struct frameset_desc *fsd, struct docume
|
||||
void parse_frame_widths(unsigned char *str, int max_value, int pixels_per_char,
|
||||
int **new_values, int *new_values_count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,10 @@
|
||||
#include "document/html/parser.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document_options;
|
||||
struct uri;
|
||||
|
||||
@ -145,4 +149,8 @@ void
|
||||
import_css_stylesheet(struct css_stylesheet *css, struct uri *base_uri,
|
||||
const unsigned char *unterminated_url, int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__DOCUMENT_HTML_PARSE_META_REFRESH_H
|
||||
#define EL__DOCUMENT_HTML_PARSE_META_REFRESH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Parses a \<meta http-equiv="refresh" content="..."> element.
|
||||
*
|
||||
* @param[in] content
|
||||
@ -18,4 +22,8 @@ int html_parse_meta_refresh(const unsigned char *content,
|
||||
unsigned long *delay,
|
||||
unsigned char **url);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -10,6 +10,10 @@
|
||||
#include "util/color.h"
|
||||
#include "util/lists.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document_options;
|
||||
struct el_form_control;
|
||||
struct frameset_desc;
|
||||
@ -205,4 +209,8 @@ void ln_break(struct html_context *html_context, int n);
|
||||
|
||||
int get_color(struct html_context *html_context, unsigned char *a, unsigned char *c, color_T *rgb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "document/html/parser/parse.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct html_context;
|
||||
|
||||
element_handler_T html_button;
|
||||
@ -13,4 +17,8 @@ element_handler_T html_select;
|
||||
element_handler_T html_option;
|
||||
element_handler_T html_textarea;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "document/html/parser/parse.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
element_handler_T html_address;
|
||||
element_handler_T html_base;
|
||||
element_handler_T html_blockquote;
|
||||
@ -61,4 +65,8 @@ element_handler_T html_xmp_close;
|
||||
void html_apply_canvas_bgcolor(struct html_context *);
|
||||
void html_handle_body_meta(struct html_context *, unsigned char *, unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "document/html/parser/parse.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct html_context;
|
||||
|
||||
void put_link_line(unsigned char *prefix, unsigned char *linkname, unsigned char *link, unsigned char *target, struct html_context *html_context);
|
||||
@ -19,4 +23,8 @@ element_handler_T html_audio;
|
||||
element_handler_T html_video;
|
||||
element_handler_T html_embed;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2,6 +2,10 @@
|
||||
#ifndef EL__DOCUMENT_HTML_PARSER_PARSE_H
|
||||
#define EL__DOCUMENT_HTML_PARSER_PARSE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct html_context;
|
||||
struct document_options;
|
||||
struct part;
|
||||
@ -76,4 +80,8 @@ int supports_html_media_attr(const unsigned char *media);
|
||||
void free_tags_lookup(void);
|
||||
void init_tags_lookup(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "document/html/parser.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct html_context;
|
||||
|
||||
struct html_element *search_html_stack(struct html_context *html_context,
|
||||
@ -20,4 +24,8 @@ void kill_html_stack_until(struct html_context *html_context, int ls, ...);
|
||||
|
||||
/* void dump_html_stack(struct html_context *html_context); */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "util/color.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct html_context;
|
||||
struct part;
|
||||
|
||||
@ -122,4 +126,8 @@ parse_table(unsigned char *html, unsigned char *eof, unsigned char **end,
|
||||
|
||||
void free_table(struct table *table);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "document/document.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct el_box;
|
||||
struct cache_entry;
|
||||
struct html_context;
|
||||
@ -70,4 +74,9 @@ struct part *format_html_part(struct html_context *html_context, unsigned char *
|
||||
|
||||
int dec2qwerty(int num, unsigned char *link_sym, const unsigned char *key, int base);
|
||||
int qwerty2dec(const unsigned char *link_sym, const unsigned char *key, int base);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2,8 +2,16 @@
|
||||
#ifndef EL__DOCUMENT_HTML_TABLES_H
|
||||
#define EL__DOCUMENT_HTML_TABLES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct html_context;
|
||||
|
||||
void format_table(unsigned char *, unsigned char *, unsigned char *, unsigned char **, struct html_context *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2,10 +2,18 @@
|
||||
#ifndef EL__DOCUMENT_LIBDOM_RENDERER_H
|
||||
#define EL__DOCUMENT_LIBDOM_RENDERER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct cache_entry;
|
||||
struct document;
|
||||
struct string;
|
||||
|
||||
void render_source_document(struct cache_entry *cached, struct document *document, struct string *buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,10 @@
|
||||
#include "util/color.h"
|
||||
#include "util/box.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
|
||||
/** Active link coloring options */
|
||||
@ -144,6 +148,7 @@ struct document_options {
|
||||
#ifdef CONFIG_UTF8
|
||||
unsigned int utf8:1;
|
||||
#endif /* CONFIG_UTF8 */
|
||||
unsigned int dump:1;
|
||||
/** Active link coloring.
|
||||
* This is mostly here to make use of this option cache so
|
||||
* link drawing is faster. --jonas */
|
||||
@ -182,4 +187,8 @@ int compare_opt(struct document_options *o1, struct document_options *o2);
|
||||
* and redraws the document. */
|
||||
void toggle_document_option(struct session *ses, unsigned char *option_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -2,10 +2,18 @@
|
||||
#ifndef EL__DOCUMENT_PLAIN_RENDERER_H
|
||||
#define EL__DOCUMENT_PLAIN_RENDERER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct cache_entry;
|
||||
struct document;
|
||||
struct string;
|
||||
|
||||
void render_plain_document(struct cache_entry *cached, struct document *document, struct string *buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "main/timer.h" /* timer_id_T */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct session;
|
||||
struct uri;
|
||||
|
||||
@ -18,4 +22,8 @@ void done_document_refresh(struct document_refresh *refresh);
|
||||
void kill_document_refresh(struct document_refresh *refresh);
|
||||
void start_document_refreshes(struct session *ses);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -388,7 +388,7 @@ render_document(struct view_state *vs, struct document_view *doc_view,
|
||||
#ifdef CONFIG_ECMASCRIPT
|
||||
if (!vs->ecmascript_fragile)
|
||||
assert(vs->ecmascript);
|
||||
if (!options->gradual_rerendering) {
|
||||
if (!options->dump && !options->gradual_rerendering) {
|
||||
/* We also reset the state if the underlying document changed
|
||||
* from the last time we did the snippets. This may be
|
||||
* triggered i.e. when redrawing a document which has been
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "document/document.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct conv_table;
|
||||
struct document_options;
|
||||
struct document_view;
|
||||
@ -15,4 +19,8 @@ void render_document_frames(struct session *ses, int no_cache);
|
||||
struct conv_table *get_convert_table(unsigned char *head, int to_cp, int default_cp, int *from_cp, enum cp_status *cp_status, int ignore_server_cp);
|
||||
void sort_links(struct document *document);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,9 @@
|
||||
#include "util/lists.h"
|
||||
#include "util/box.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct document;
|
||||
struct view_state;
|
||||
@ -38,4 +41,8 @@ struct document_view {
|
||||
&& (doc_view)->vs->current_link < (doc_view)->document->nlinks) \
|
||||
? &(doc_view)->document->links[(doc_view)->vs->current_link] : NULL)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL_DOM_CODE_H
|
||||
#define EL_DOM_CODE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** DOM status, error, and exception codes
|
||||
*
|
||||
* These enum values are used for return codes throughout the DOM engine.
|
||||
@ -76,4 +80,8 @@ enum dom_code {
|
||||
DOM_CODE_TYPE_MISMATCH_ERR = 17,
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef EL__DOM_CONFIGURATION_H
|
||||
#define EL__DOM_CONFIGURATION_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dom_node;
|
||||
struct dom_stack;
|
||||
|
||||
@ -92,4 +96,8 @@ add_dom_config_normalizer(struct dom_stack *stack, struct dom_config *config,
|
||||
enum dom_config_flag
|
||||
parse_dom_config(unsigned char *flaglist, unsigned char separator);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "dom/scanner.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The various token types and what they contain. Patterns taken from
|
||||
* the flex scanner declarations in the CSS 2 Specification. */
|
||||
enum css_token_type {
|
||||
@ -108,4 +112,8 @@ check_css_precedence(int type, int skipto)
|
||||
return get_css_precedence(type) < get_css_precedence(skipto);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -58,6 +58,10 @@
|
||||
|
||||
#include "dom/string.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dom_node_list;
|
||||
struct dom_document;
|
||||
|
||||
@ -475,4 +479,8 @@ get_dom_node_list_by_type(struct dom_node *parent, enum dom_node_type type)
|
||||
#define get_dom_node_list(parent, node) \
|
||||
get_dom_node_list_by_type(parent, (node)->type)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "dom/string.h"
|
||||
#include "util/error.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define if you want a talking scanner */
|
||||
/* #define DEBUG_DOM_SCANNER */
|
||||
|
||||
@ -292,4 +296,8 @@ end_dom_token_scanning(struct dom_scanner *scanner, struct dom_scanner_token *en
|
||||
return get_dom_scanner_token(scanner);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,9 @@
|
||||
|
||||
#include "dom/node.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* FIXME: Namespaces; *|E */
|
||||
|
||||
@ -354,4 +357,8 @@ select_dom_nodes(struct dom_select *select, struct dom_node *root);
|
||||
* +------------------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "dom/stack.h"
|
||||
#include "dom/sgml/sgml.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct sgml_info sgml_docbook_info;
|
||||
|
||||
#define DOCBOOK_(node, name, flags) \
|
||||
@ -27,4 +31,8 @@ enum docbook_attribute_type {
|
||||
|
||||
#undef DOCBOOK_
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,10 +3,18 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dom_stack;
|
||||
struct dom_stack_context;
|
||||
|
||||
struct dom_stack_context *
|
||||
add_sgml_file_dumper(struct dom_stack *stack, FILE *file);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "dom/sgml/sgml.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct sgml_info sgml_html_info;
|
||||
|
||||
#undef VERSION
|
||||
@ -28,4 +32,8 @@ enum html_attribute_type {
|
||||
#undef HTML_
|
||||
#undef HTM2_
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,10 @@
|
||||
#include "dom/sgml/sgml.h"
|
||||
#include "dom/scanner.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct sgml_parser;
|
||||
struct string;
|
||||
struct uri;
|
||||
@ -144,4 +148,8 @@ parse_sgml(struct sgml_parser *parser, unsigned char *buf, size_t bufsize, int c
|
||||
*/
|
||||
unsigned int get_sgml_parser_line_number(struct sgml_parser *parser);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "dom/sgml/sgml.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct sgml_info sgml_rss_info;
|
||||
|
||||
#define RSS_(node, name, flags) SGML_NODE_INFO_TYPE(RSS, node, name)
|
||||
@ -25,4 +29,8 @@ enum rss_attribute_type {
|
||||
|
||||
#undef RSS_
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "dom/scanner.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum sgml_token_type {
|
||||
/* Char tokens: */
|
||||
|
||||
@ -87,4 +91,8 @@ extern struct dom_scanner_info sgml_scanner_info;
|
||||
#define skip_sgml_tokens(scanner, type) \
|
||||
skip_dom_scanner_tokens(scanner, type, get_sgml_precedence(type))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,10 @@
|
||||
#include "dom/node.h"
|
||||
#include "dom/string.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The flags stored in the attribute sgml node info data */
|
||||
/* TODO: Other potential flags (there can be only 16)
|
||||
*
|
||||
@ -91,4 +95,8 @@ struct sgml_info {
|
||||
|
||||
struct sgml_info *get_sgml_info(enum sgml_document_type doctype);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user