mirror of
https://github.com/rkd77/elinks.git
synced 2024-10-03 03:56:32 -04:00
Merge with http://elinks.cz/elinks.git
This commit is contained in:
commit
a7e465d785
@ -1,25 +1,20 @@
|
|||||||
# This is the automake's playground of our cool build system.
|
# This is the automake's playground of our cool build system.
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
# TODO: Make part of it autogenerated based on AC_SUBST() or something.
|
# TODO: Make part of it autogenerated based on AC_SUBST() or something.
|
||||||
|
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
|
|
||||||
CURPATH = $(shell pwd)
|
|
||||||
TOPPATH = $(shell cd $(top_builddir) && pwd)
|
TOPPATH = $(shell cd $(top_builddir) && pwd)
|
||||||
RELPATH = $(shell echo '$(CURPATH)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z0-9]\)$$,\1/,')
|
RELPATH = $(subst $(TOPPATH)/,,$(CURDIR)/)
|
||||||
|
PATHPREFIX = $(if $(patsubst /%,,@top_srcdir@),$(top_builddir)/)
|
||||||
PATHSCRIPT = case '@top_srcdir@' in /*) ;; *) echo $(top_builddir)/;; esac
|
|
||||||
PATHPREFIX = $(shell $(PATHSCRIPT))
|
|
||||||
|
|
||||||
top_srcdir = $(PATHPREFIX)@top_srcdir@
|
top_srcdir = $(PATHPREFIX)@top_srcdir@
|
||||||
|
|
||||||
SRCPATH = $(shell cd $(top_srcdir)/$(RELPATH) && pwd)
|
ifeq (@top_srcdir@,.)
|
||||||
ifeq ($(SRCPATH),$(CURPATH))
|
|
||||||
srcdir =
|
srcdir =
|
||||||
else
|
else
|
||||||
srcdir = $(top_srcdir)/$(RELPATH)
|
srcdir = $(top_srcdir)/$(RELPATH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
@ -93,11 +88,15 @@ XMLTO = @XMLTO@
|
|||||||
X_CFLAGS = @X_CFLAGS@
|
X_CFLAGS = @X_CFLAGS@
|
||||||
XGETTEXT = @XGETTEXT@
|
XGETTEXT = @XGETTEXT@
|
||||||
|
|
||||||
# :r !grep AC_SUBST\(CONFIG_ configure.in | sed 's/.*(\(.*\))$/\1 = @\1@/' | sort | uniq
|
#Warning: this one is not in configure.in so following line will not generate it
|
||||||
|
CONFIG_NLS = @CONFIG_NLS@
|
||||||
|
|
||||||
|
# :r !grep '(CONFIG_[A-Z0-9_]\+[^A-Z0-9_]' configure.in | sed 's/^.*(\(CONFIG_[A-Z0-9_]\+\)[^A-Z0-9_].*$/\1 = @\1@/' | sort | uniq
|
||||||
|
|
||||||
CONFIG_256_COLORS = @CONFIG_256_COLORS@
|
CONFIG_256_COLORS = @CONFIG_256_COLORS@
|
||||||
|
CONFIG_88_COLORS = @CONFIG_88_COLORS@
|
||||||
CONFIG_ASCIIDOC = @CONFIG_ASCIIDOC@
|
CONFIG_ASCIIDOC = @CONFIG_ASCIIDOC@
|
||||||
CONFIG_BACKTRACE = @CONFIG_BACKTRACE@
|
CONFIG_BACKTRACE = @CONFIG_BACKTRACE@
|
||||||
CONFIG_OS_BEOS = @CONFIG_OS_BEOS@
|
|
||||||
CONFIG_BITTORRENT = @CONFIG_BITTORRENT@
|
CONFIG_BITTORRENT = @CONFIG_BITTORRENT@
|
||||||
CONFIG_BOOKMARKS = @CONFIG_BOOKMARKS@
|
CONFIG_BOOKMARKS = @CONFIG_BOOKMARKS@
|
||||||
CONFIG_BZIP2 = @CONFIG_BZIP2@
|
CONFIG_BZIP2 = @CONFIG_BZIP2@
|
||||||
@ -106,8 +105,10 @@ CONFIG_COOKIES = @CONFIG_COOKIES@
|
|||||||
CONFIG_CSS = @CONFIG_CSS@
|
CONFIG_CSS = @CONFIG_CSS@
|
||||||
CONFIG_DATA = @CONFIG_DATA@
|
CONFIG_DATA = @CONFIG_DATA@
|
||||||
CONFIG_DEBUG = @CONFIG_DEBUG@
|
CONFIG_DEBUG = @CONFIG_DEBUG@
|
||||||
|
CONFIG_DOC = @CONFIG_DOC@
|
||||||
CONFIG_DOM = @CONFIG_DOM@
|
CONFIG_DOM = @CONFIG_DOM@
|
||||||
CONFIG_ECMASCRIPT = @CONFIG_ECMASCRIPT@
|
CONFIG_ECMASCRIPT = @CONFIG_ECMASCRIPT@
|
||||||
|
CONFIG_ECMASCRIPT_SEE = @CONFIG_ECMASCRIPT_SEE@
|
||||||
CONFIG_ECMASCRIPT_SMJS = @CONFIG_ECMASCRIPT_SMJS@
|
CONFIG_ECMASCRIPT_SMJS = @CONFIG_ECMASCRIPT_SMJS@
|
||||||
CONFIG_EXMODE = @CONFIG_EXMODE@
|
CONFIG_EXMODE = @CONFIG_EXMODE@
|
||||||
CONFIG_FASTMEM = @CONFIG_FASTMEM@
|
CONFIG_FASTMEM = @CONFIG_FASTMEM@
|
||||||
@ -116,44 +117,47 @@ CONFIG_FORMHIST = @CONFIG_FORMHIST@
|
|||||||
CONFIG_FTP = @CONFIG_FTP@
|
CONFIG_FTP = @CONFIG_FTP@
|
||||||
CONFIG_GLOBHIST = @CONFIG_GLOBHIST@
|
CONFIG_GLOBHIST = @CONFIG_GLOBHIST@
|
||||||
CONFIG_GNUTLS = @CONFIG_GNUTLS@
|
CONFIG_GNUTLS = @CONFIG_GNUTLS@
|
||||||
|
CONFIG_GNUTLS_OPENSSL_COMPAT = @CONFIG_GNUTLS_OPENSSL_COMPAT@
|
||||||
CONFIG_GOPHER = @CONFIG_GOPHER@
|
CONFIG_GOPHER = @CONFIG_GOPHER@
|
||||||
CONFIG_SCRIPTING_GUILE = @CONFIG_SCRIPTING_GUILE@
|
CONFIG_GPM = @CONFIG_GPM@
|
||||||
CONFIG_GZIP = @CONFIG_GZIP@
|
CONFIG_GZIP = @CONFIG_GZIP@
|
||||||
CONFIG_HTML_HIGHLIGHT = @CONFIG_HTML_HIGHLIGHT@
|
CONFIG_HTML_HIGHLIGHT = @CONFIG_HTML_HIGHLIGHT@
|
||||||
|
CONFIG_IDN = @CONFIG_IDN@
|
||||||
CONFIG_INTERLINK = @CONFIG_INTERLINK@
|
CONFIG_INTERLINK = @CONFIG_INTERLINK@
|
||||||
CONFIG_IPV6 = @CONFIG_IPV6@
|
CONFIG_IPV6 = @CONFIG_IPV6@
|
||||||
CONFIG_JW = @CONFIG_JW@
|
CONFIG_JW = @CONFIG_JW@
|
||||||
CONFIG_LEDS = @CONFIG_LEDS@
|
CONFIG_LEDS = @CONFIG_LEDS@
|
||||||
CONFIG_SCRIPTING_LUA = @CONFIG_SCRIPTING_LUA@
|
|
||||||
CONFIG_MAILCAP = @CONFIG_MAILCAP@
|
CONFIG_MAILCAP = @CONFIG_MAILCAP@
|
||||||
|
CONFIG_MANUAL = @CONFIG_MANUAL@
|
||||||
CONFIG_MARKS = @CONFIG_MARKS@
|
CONFIG_MARKS = @CONFIG_MARKS@
|
||||||
CONFIG_MD5 = @CONFIG_MD5@
|
CONFIG_MD5 = @CONFIG_MD5@
|
||||||
CONFIG_MIMETYPES = @CONFIG_MIMETYPES@
|
CONFIG_MIMETYPES = @CONFIG_MIMETYPES@
|
||||||
CONFIG_MOUSE = @CONFIG_MOUSE@
|
CONFIG_MOUSE = @CONFIG_MOUSE@
|
||||||
CONFIG_NLS = @CONFIG_NLS@
|
|
||||||
CONFIG_NNTP = @CONFIG_NNTP@
|
CONFIG_NNTP = @CONFIG_NNTP@
|
||||||
CONFIG_NO_ROOT_EXEC = @CONFIG_NO_ROOT_EXEC@
|
CONFIG_NO_ROOT_EXEC = @CONFIG_NO_ROOT_EXEC@
|
||||||
CONFIG_OPENSSL = @CONFIG_OPENSSL@
|
CONFIG_OPENSSL = @CONFIG_OPENSSL@
|
||||||
|
CONFIG_OS_BEOS = @CONFIG_OS_BEOS@
|
||||||
CONFIG_OS_OS2 = @CONFIG_OS_OS2@
|
CONFIG_OS_OS2 = @CONFIG_OS_OS2@
|
||||||
CONFIG_OWN_LIBC = @CONFIG_OWN_LIBC@
|
|
||||||
CONFIG_SCRIPTING_PERL = @CONFIG_SCRIPTING_PERL@
|
|
||||||
CONFIG_POD2HTML = @CONFIG_POD2HTML@
|
|
||||||
CONFIG_SCRIPTING_PYTHON = @CONFIG_SCRIPTING_PYTHON@
|
|
||||||
CONFIG_OS_RISCOS = @CONFIG_OS_RISCOS@
|
CONFIG_OS_RISCOS = @CONFIG_OS_RISCOS@
|
||||||
CONFIG_SCRIPTING_RUBY = @CONFIG_SCRIPTING_RUBY@
|
CONFIG_OS_UNIX = @CONFIG_OS_UNIX@
|
||||||
|
CONFIG_OS_WIN32 = @CONFIG_OS_WIN32@
|
||||||
|
CONFIG_OWN_LIBC = @CONFIG_OWN_LIBC@
|
||||||
|
CONFIG_POD2HTML = @CONFIG_POD2HTML@
|
||||||
CONFIG_SCANNER = @CONFIG_SCANNER@
|
CONFIG_SCANNER = @CONFIG_SCANNER@
|
||||||
CONFIG_SCRIPTING = @CONFIG_SCRIPTING@
|
CONFIG_SCRIPTING = @CONFIG_SCRIPTING@
|
||||||
CONFIG_SEE = @CONFIG_SEE@
|
CONFIG_SCRIPTING_GUILE = @CONFIG_SCRIPTING_GUILE@
|
||||||
|
CONFIG_SCRIPTING_LUA = @CONFIG_SCRIPTING_LUA@
|
||||||
|
CONFIG_SCRIPTING_PERL = @CONFIG_SCRIPTING_PERL@
|
||||||
|
CONFIG_SCRIPTING_PYTHON = @CONFIG_SCRIPTING_PYTHON@
|
||||||
|
CONFIG_SCRIPTING_RUBY = @CONFIG_SCRIPTING_RUBY@
|
||||||
|
CONFIG_SCRIPTING_SPIDERMONKEY = @CONFIG_SCRIPTING_SPIDERMONKEY@
|
||||||
CONFIG_SHA1 = @CONFIG_SHA1@
|
CONFIG_SHA1 = @CONFIG_SHA1@
|
||||||
CONFIG_SMALL = @CONFIG_SMALL@
|
CONFIG_SMALL = @CONFIG_SMALL@
|
||||||
CONFIG_SMB = @CONFIG_SMB@
|
CONFIG_SMB = @CONFIG_SMB@
|
||||||
CONFIG_SCRIPTING_SPIDERMONKEY = @CONFIG_SCRIPTING_SPIDERMONKEY@
|
|
||||||
CONFIG_SPIDERMONKEY = @CONFIG_SPIDERMONKEY@
|
CONFIG_SPIDERMONKEY = @CONFIG_SPIDERMONKEY@
|
||||||
CONFIG_SSL = @CONFIG_SSL@
|
CONFIG_SSL = @CONFIG_SSL@
|
||||||
CONFIG_SYSMOUSE = @CONFIG_SYSMOUSE@
|
CONFIG_SYSMOUSE = @CONFIG_SYSMOUSE@
|
||||||
CONFIG_OS_UNIX = @CONFIG_OS_UNIX@
|
|
||||||
CONFIG_URI_REWRITE = @CONFIG_URI_REWRITE@
|
CONFIG_URI_REWRITE = @CONFIG_URI_REWRITE@
|
||||||
CONFIG_OS_WIN32 = @CONFIG_OS_WIN32@
|
|
||||||
CONFIG_XBEL_BOOKMARKS = @CONFIG_XBEL_BOOKMARKS@
|
CONFIG_XBEL_BOOKMARKS = @CONFIG_XBEL_BOOKMARKS@
|
||||||
CONFIG_XMLTO = @CONFIG_XMLTO@
|
CONFIG_XMLTO = @CONFIG_XMLTO@
|
||||||
|
|
||||||
@ -170,6 +174,7 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
|
|||||||
|
|
||||||
MAKE_COLOR = @MAKE_COLOR@
|
MAKE_COLOR = @MAKE_COLOR@
|
||||||
|
|
||||||
|
LIB_O_NAME = lib.o
|
||||||
|
|
||||||
### This is here because Makefile.config is usually the first thing
|
### This is here because Makefile.config is usually the first thing
|
||||||
### we get and sometimes the all rule can be implicit, yet we want
|
### we get and sometimes the all rule can be implicit, yet we want
|
||||||
|
202
Makefile.lib
202
Makefile.lib
@ -1,19 +1,5 @@
|
|||||||
### The build commands and verbosity
|
### The build commands and verbosity
|
||||||
|
|
||||||
# If we are verbose, we will show commands prefixed by $(Q) (which acts as
|
|
||||||
# @ in the non-verbose mode), and we will show the "real" cmds instead of
|
|
||||||
# their quiet versions (which are used in the non-verbose mode).
|
|
||||||
# Inspired by the Linux kernel build system.
|
|
||||||
ifdef V
|
|
||||||
Q =
|
|
||||||
quiet =
|
|
||||||
mquiet = masq_
|
|
||||||
else
|
|
||||||
Q = @
|
|
||||||
quiet = quiet_
|
|
||||||
mquiet = quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Colorize the build.
|
# Colorize the build.
|
||||||
ifdef MAKE_COLOR
|
ifdef MAKE_COLOR
|
||||||
INFO_COLOR = $(shell tput setaf 5)
|
INFO_COLOR = $(shell tput setaf 5)
|
||||||
@ -25,6 +11,25 @@ ifdef MAKE_COLOR
|
|||||||
END_COLOR = $(shell tput sgr0)
|
END_COLOR = $(shell tput sgr0)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# sparse is architecture-neutral, which means that we need to tell it
|
||||||
|
# explicitly what architecture to check for. Fix this up for yours..
|
||||||
|
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Build recipies
|
||||||
|
|
||||||
|
# If we are verbose, we will show the "real" cmds instead of
|
||||||
|
# their quiet versions (which are used in the non-verbose mode).
|
||||||
|
# Inspired by the Linux kernel build system.
|
||||||
|
ifdef V
|
||||||
|
quiet =
|
||||||
|
mquiet = masq_
|
||||||
|
else
|
||||||
|
quiet = quiet_
|
||||||
|
mquiet = quiet_
|
||||||
|
endif
|
||||||
|
|
||||||
# Show the command (quiet or non-quiet version based on the assignment
|
# Show the command (quiet or non-quiet version based on the assignment
|
||||||
# just above) and then execute it.
|
# just above) and then execute it.
|
||||||
ncmd = $(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
|
ncmd = $(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
|
||||||
@ -40,7 +45,7 @@ quiet_cmd_compile = ' [$(CC_COLOR)CC$(END_COLOR)] $(RELPATH)$@'
|
|||||||
quiet_cmd_ld_objs = " [$(LD_COLOR)LD$(END_COLOR)] $(RELPATH)$@"
|
quiet_cmd_ld_objs = " [$(LD_COLOR)LD$(END_COLOR)] $(RELPATH)$@"
|
||||||
cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \
|
cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \
|
||||||
$(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), \
|
$(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), \
|
||||||
`test -e $(subdir)/lib.o && echo $(subdir)/lib.o`)
|
`test -e $(subdir)/$(LIB_O_NAME) && echo $(subdir)/$(LIB_O_NAME)`)
|
||||||
|
|
||||||
quiet_cmd_link = ' [$(LINK_COLOR)LINK$(END_COLOR)] $(RELPATH)$@'
|
quiet_cmd_link = ' [$(LINK_COLOR)LINK$(END_COLOR)] $(RELPATH)$@'
|
||||||
cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(2) $(LIBS)
|
cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(2) $(LIBS)
|
||||||
@ -59,32 +64,14 @@ quiet_cmd_installprog = " [$(INSTALL_COLOR)INSTALL$(END_COLOR)] $(RELPATH)
|
|||||||
cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3)
|
cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3)
|
||||||
|
|
||||||
|
|
||||||
### Internal build rules
|
#############################################################################
|
||||||
|
# Special handling of conditional variables
|
||||||
|
|
||||||
DEP_FILES_1 = $(foreach src,$(OBJS),.deps/$(src))
|
|
||||||
DEP_FILES = $(DEP_FILES_1:%.o=%.P)
|
|
||||||
|
|
||||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
|
||||||
|
|
||||||
ifdef OBJS
|
|
||||||
-include $(DEP_FILES)
|
|
||||||
endif
|
|
||||||
|
|
||||||
%.o: $(srcdir)%.c
|
|
||||||
$(call mcmd,compile)
|
|
||||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
|
||||||
tr ' ' '\012' < .deps/$(*F).pp \
|
|
||||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
|
||||||
>> .deps/$(*F).P; \
|
|
||||||
rm .deps/$(*F).pp
|
|
||||||
|
|
||||||
ifdef SUBDIRS-yes
|
|
||||||
SUBDIRS += $(SUBDIRS-yes)
|
SUBDIRS += $(SUBDIRS-yes)
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef OBJS-yes
|
|
||||||
OBJS += $(OBJS-yes)
|
OBJS += $(OBJS-yes)
|
||||||
endif
|
|
||||||
|
ALTDIRS = $(SUBDIRS-no) $(SUBDIRS-)
|
||||||
|
ALTOBJS = $(OBJS-no) $(OBJS-)
|
||||||
|
|
||||||
ifneq ($(findstring cleanall,$(MAKECMDGOALS)),)
|
ifneq ($(findstring cleanall,$(MAKECMDGOALS)),)
|
||||||
INCLUDE_ALL=1
|
INCLUDE_ALL=1
|
||||||
@ -97,33 +84,46 @@ INCLUDE_ALL=1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef INCLUDE_ALL
|
ifdef INCLUDE_ALL
|
||||||
ifdef SUBDIRS-no
|
SUBDIRS += $(ALTDIRS)
|
||||||
SUBDIRS += $(SUBDIRS-no)
|
OBJS += $(ALTOBJS)
|
||||||
endif
|
|
||||||
ifdef SUBDIRS-
|
|
||||||
SUBDIRS += $(SUBDIRS-)
|
|
||||||
endif
|
|
||||||
ifdef OBJS-no
|
|
||||||
OBJS += $(OBJS-no)
|
|
||||||
endif
|
|
||||||
ifdef OBJS-
|
|
||||||
OBJS += $(OBJS-)
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifdef OBJS
|
#############################################################################
|
||||||
lib.o: $(sort $(OBJS)) $(foreach subdir,$(sort $(filter-out src,$(SUBDIRS))), $(wildcard $(subdir)/lib.o))
|
# Internal build rules
|
||||||
|
|
||||||
|
# All files in $(OBJS) and any $(subdir)/lib.o are linked into lib.o
|
||||||
|
LIB_O_DEPS = \
|
||||||
|
$(sort $(filter-out $(LIB_O_NAME),$(OBJS))) \
|
||||||
|
$(foreach subdir,$(sort $(SUBDIRS)),$(wildcard $(subdir)/$(LIB_O_NAME)))
|
||||||
|
|
||||||
|
$(LIB_O_NAME): $(LIB_O_DEPS)
|
||||||
$(call cmd,ld_objs)
|
$(call cmd,ld_objs)
|
||||||
|
|
||||||
LIB_O = lib.o
|
DEP_FILES_1 = $(foreach src,$(OBJS),.deps/$(src))
|
||||||
CLEAN += $(OBJS) $(LIB_O)
|
DEP_FILES = $(DEP_FILES_1:%.o=%.P)
|
||||||
|
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||||
|
|
||||||
|
ifneq ($(strip $(OBJS)),)
|
||||||
|
-include $(DEP_FILES)
|
||||||
|
OBJS += $(LIB_O_NAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CLEAN += $(PROG)
|
%.o: $(srcdir)%.c
|
||||||
|
$(call mcmd,compile)
|
||||||
|
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||||
|
tr ' ' '\012' < .deps/$(*F).pp \
|
||||||
|
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||||
|
>> .deps/$(*F).P; \
|
||||||
|
rm .deps/$(*F).pp
|
||||||
|
|
||||||
all-default: $(LIB_O) $(PROGS) $(MAN1) $(MAN5)
|
CLEAN += $(PROG) $(OBJS)
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# The main default rules
|
||||||
|
|
||||||
|
all-default: $(OBJS) $(PROGS) $(MAN1) $(MAN5)
|
||||||
|
|
||||||
# Ensure that Makefiles in subdirs are created before we recursive into them
|
# Ensure that Makefiles in subdirs are created before we recursive into them
|
||||||
init-recursive: init-default
|
init-recursive: init-default
|
||||||
@ -133,23 +133,36 @@ init-default:
|
|||||||
$(MKINSTALLDIRS) $(subdir) >/dev/null; \
|
$(MKINSTALLDIRS) $(subdir) >/dev/null; \
|
||||||
echo 'include $(SRC)/$(RELPATH)/$(subdir)/Makefile' > $(subdir)/Makefile;)
|
echo 'include $(SRC)/$(RELPATH)/$(subdir)/Makefile' > $(subdir)/Makefile;)
|
||||||
|
|
||||||
clean-default: clean-test
|
clean-default cleanall-default:
|
||||||
@-test -z "$(CLEAN)" || $(RM) $(CLEAN)
|
@-test -z "$(CLEAN)" || $(RM) $(CLEAN)
|
||||||
|
|
||||||
cleanall-default: clean-default
|
|
||||||
|
|
||||||
check-default:
|
check-default:
|
||||||
ifneq ($(SPARSE),)
|
ifneq ($(SPARSE),)
|
||||||
@$(foreach file, $(wildcard *.c), \
|
@$(foreach file, $(wildcard *.c), \
|
||||||
$(call ncmd,sparse,$(file));)
|
$(call ncmd,sparse,$(file));)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
##############################################################################
|
install-default: all-default
|
||||||
#
|
ifdef PROGS
|
||||||
# Auto-testing infrastructure
|
@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
|
||||||
#
|
@$(foreach file,$(PROGS), \
|
||||||
|
$(call ncmd,installprog,$(file),$(DESTDIR)$(bindir));)
|
||||||
|
endif
|
||||||
|
ifdef MAN1
|
||||||
|
@$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
|
||||||
|
@$(foreach file,$(MAN1), \
|
||||||
|
$(call ncmd,installdata,$(file),$(DESTDIR)$(mandir)/man1);)
|
||||||
|
endif
|
||||||
|
ifdef MAN5
|
||||||
|
@$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man5
|
||||||
|
@$(foreach file,$(MAN5), \
|
||||||
|
$(call ncmd,installdata,$(file),$(DESTDIR)$(mandir)/man5);)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Auto-testing infrastructure
|
||||||
|
|
||||||
clean-test:
|
|
||||||
test-default:
|
test-default:
|
||||||
|
|
||||||
ifdef TEST_PROGS
|
ifdef TEST_PROGS
|
||||||
@ -173,58 +186,43 @@ clean-test:
|
|||||||
@rm -fr trash
|
@rm -fr trash
|
||||||
|
|
||||||
CLEAN += $(TEST_PROGS) $(addsuffix .o,$(TEST_PROGS))
|
CLEAN += $(TEST_PROGS) $(addsuffix .o,$(TEST_PROGS))
|
||||||
|
clean-default: clean-test
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: $(TESTS)
|
.PHONY: $(TESTS)
|
||||||
.NOPARALLEL:
|
.NOPARALLEL:
|
||||||
|
|
||||||
# sparse is architecture-neutral, which means that we need to tell it
|
|
||||||
# explicitly what architecture to check for. Fix this up for yours..
|
|
||||||
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
|
|
||||||
install-default: all-default
|
|
||||||
ifdef PROGS
|
|
||||||
@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
|
|
||||||
@$(foreach file,$(PROGS), \
|
|
||||||
$(call ncmd,installprog,$(file),$(DESTDIR)$(bindir));)
|
|
||||||
endif
|
|
||||||
ifdef MAN1
|
|
||||||
@$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
|
|
||||||
@$(foreach file,$(MAN1), \
|
|
||||||
$(call ncmd,installdata,$(file),$(DESTDIR)$(mandir)/man1);)
|
|
||||||
endif
|
|
||||||
ifdef MAN5
|
|
||||||
@$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man5
|
|
||||||
@$(foreach file,$(MAN5), \
|
|
||||||
$(call ncmd,installdata,$(file),$(DESTDIR)$(mandir)/man5);)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Recursion:
|
#############################################################################
|
||||||
|
# Basic recursion and dependencies setup
|
||||||
|
|
||||||
RULES = all install clean cleanall init check test
|
RULES = all install clean cleanall init check test
|
||||||
RECRULES = $(addsuffix -recursive,$(RULES))
|
|
||||||
|
|
||||||
.PHONY: $(RECRULES)
|
RULES_LOCAL = $(addsuffix -local,$(RULES))
|
||||||
|
RULES_REC = $(addsuffix -recursive,$(RULES))
|
||||||
|
|
||||||
|
.PHONY: $(RULES) $(RULES_LOCAL) $(RULES_REC) $(addsuffix -default,$(RULES))
|
||||||
|
|
||||||
# The -recursive rules decend all subdirs.
|
# The -recursive rules decend all subdirs.
|
||||||
$(RECRULES):
|
$(RULES_REC):
|
||||||
ifdef SUBDIRS
|
|
||||||
@$(foreach subdir,$(sort $(SUBDIRS)), \
|
@$(foreach subdir,$(sort $(SUBDIRS)), \
|
||||||
$(call ncmd,recmake,$(subdir),$(subst -recursive,,$@)) || exit 1;)
|
$(call ncmd,recmake,$(subdir),$(subst -recursive,,$@)) || exit 1;)
|
||||||
endif
|
|
||||||
|
|
||||||
# Setup the default sub commands dependency. First decend subdirs then do all
|
# Dummy -local rules
|
||||||
# the default stuff and finally do any local hooks.
|
$(RULES_LOCAL):
|
||||||
recdeps = $1-recursive $1-default $1-local
|
|
||||||
all: $(call recdeps,all)
|
|
||||||
check: $(call recdeps,check)
|
|
||||||
cleanall: $(call recdeps,cleanall)
|
|
||||||
clean: $(call recdeps,clean)
|
|
||||||
init: $(call recdeps,init)
|
|
||||||
install: $(call recdeps,install)
|
|
||||||
test: $(call recdeps,test)
|
|
||||||
|
|
||||||
# Dummy rules for local hooks
|
# Default deps
|
||||||
$(addsuffix -local,$(RULES)):
|
rule_deps = $(1)-recursive $(1)-default $(1)-local
|
||||||
|
all: $(call rule_deps,all)
|
||||||
|
install: $(call rule_deps,install)
|
||||||
|
clean: $(call rule_deps,clean)
|
||||||
|
cleanall: $(call rule_deps,cleanall)
|
||||||
|
init: $(call rule_deps,init)
|
||||||
|
check: $(call rule_deps,check)
|
||||||
|
test: $(call rule_deps,test)
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Misc
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
22
configure.in
22
configure.in
@ -16,8 +16,6 @@ AC_CHECK_PROG(ACLOCAL,[aclocal],[aclocal],[config/missing aclocal])
|
|||||||
AC_CHECK_PROG(AUTOCONF,[autoconf],[autoconf],[config/missing autoconf])
|
AC_CHECK_PROG(AUTOCONF,[autoconf],[autoconf],[config/missing autoconf])
|
||||||
AC_CHECK_PROG(AUTOHEADER,[autoheader],[autoheader],[config/missing autoheader])
|
AC_CHECK_PROG(AUTOHEADER,[autoheader],[autoheader],[config/missing autoheader])
|
||||||
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
|
|
||||||
MAKE=
|
MAKE=
|
||||||
|
|
||||||
for make in gnumake gmake make false; do
|
for make in gnumake gmake make false; do
|
||||||
@ -26,13 +24,15 @@ for make in gnumake gmake make false; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
builddir="`pwd`"
|
||||||
|
|
||||||
# Cleanup if we are configuring with a previous build in the tree
|
# Cleanup if we are configuring with a previous build in the tree
|
||||||
if test -e Makefile.config; then
|
if test -e Makefile.config; then
|
||||||
"$MAKE" -C "$builddir" cleanall >/dev/null 2>/dev/null
|
AC_MSG_CHECKING([for previous build to clean])
|
||||||
|
"$MAKE" -C "$builddir/src" cleanall >/dev/null 2>/dev/null
|
||||||
|
AC_MSG_RESULT(done)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
builddir="`pwd`"
|
|
||||||
|
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
dnl Load feature configuration file and start logging features.
|
dnl Load feature configuration file and start logging features.
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
@ -53,9 +53,7 @@ AC_PROG_RANLIB
|
|||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
AC_PATH_PROGS(CG_COMMIT_ID, "cg-commit-id")
|
AC_PATH_PROGS(CG_COMMIT_ID, "cg-commit-id")
|
||||||
|
|
||||||
AC_PATH_PROGS(SPARSE, "sparse")
|
AC_PATH_PROGS(SPARSE, "sparse")
|
||||||
AC_SUBST(SPARSE)
|
|
||||||
|
|
||||||
CONFIG_ASCIIDOC="no"
|
CONFIG_ASCIIDOC="no"
|
||||||
CONFIG_POD2HTML="no"
|
CONFIG_POD2HTML="no"
|
||||||
@ -529,9 +527,9 @@ if test "$enable_see" = "yes"; then
|
|||||||
SEE_CFLAGS="`$SEE_CONFIG --cppflags`"
|
SEE_CFLAGS="`$SEE_CONFIG --cppflags`"
|
||||||
LIBS="$SEE_LIBS $LIBS"
|
LIBS="$SEE_LIBS $LIBS"
|
||||||
CPPFLAGS="$CPPFLAGS $SEE_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $SEE_CFLAGS"
|
||||||
EL_CONFIG(CONFIG_SEE, [SEE])
|
EL_CONFIG(CONFIG_ECMASCRIPT_SEE, [SEE])
|
||||||
AC_SUBST(SEE_CFLAGS)
|
AC_SUBST(SEE_CFLAGS)
|
||||||
AC_SUBST(CONFIG_SEE)
|
AC_SUBST(CONFIG_ECMASCRIPT_SEE)
|
||||||
else
|
else
|
||||||
if test -n "$withval" && test "x$withval" != xno; then
|
if test -n "$withval" && test "x$withval" != xno; then
|
||||||
AC_MSG_ERROR([SEE not found])
|
AC_MSG_ERROR([SEE not found])
|
||||||
@ -596,14 +594,15 @@ else
|
|||||||
AC_SUBST(SPIDERMONKEY_CFLAGS)
|
AC_SUBST(SPIDERMONKEY_CFLAGS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$CONFIG_SEE" != yes; then
|
if test "$CONFIG_SPIDERMONKEY" = yes &&
|
||||||
|
test "$CONFIG_ECMASCRIPT_SEE" != yes; then
|
||||||
EL_CONFIG(CONFIG_ECMASCRIPT_SMJS, [SpiderMonkey document scripting])
|
EL_CONFIG(CONFIG_ECMASCRIPT_SMJS, [SpiderMonkey document scripting])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(CONFIG_SPIDERMONKEY)
|
AC_SUBST(CONFIG_SPIDERMONKEY)
|
||||||
AC_SUBST(CONFIG_ECMASCRIPT_SMJS)
|
AC_SUBST(CONFIG_ECMASCRIPT_SMJS)
|
||||||
|
|
||||||
EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_SEE CONFIG_ECMASCRIPT_SMJS], [ECMAScript (JavaScript)])
|
EL_CONFIG_DEPENDS(CONFIG_ECMASCRIPT, [CONFIG_ECMASCRIPT_SEE CONFIG_ECMASCRIPT_SMJS], [ECMAScript (JavaScript)])
|
||||||
|
|
||||||
|
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
@ -1018,6 +1017,7 @@ AC_MSG_RESULT($cf_result)
|
|||||||
dnl Final SSL setup
|
dnl Final SSL setup
|
||||||
|
|
||||||
EL_CONFIG_DEPENDS(CONFIG_SSL, [CONFIG_OPENSSL CONFIG_GNUTLS], [SSL])
|
EL_CONFIG_DEPENDS(CONFIG_SSL, [CONFIG_OPENSSL CONFIG_GNUTLS], [SSL])
|
||||||
|
AC_SUBST(CONFIG_GNUTLS_OPENSSL_COMPAT)
|
||||||
AC_SUBST(CONFIG_OPENSSL)
|
AC_SUBST(CONFIG_OPENSSL)
|
||||||
AC_SUBST(CONFIG_GNUTLS)
|
AC_SUBST(CONFIG_GNUTLS)
|
||||||
|
|
||||||
|
8
doc/.gitignore
vendored
8
doc/.gitignore
vendored
@ -1,12 +1,14 @@
|
|||||||
api
|
|
||||||
*.tmp
|
*.tmp
|
||||||
*.html
|
*.html
|
||||||
*.pdf
|
*.pdf
|
||||||
*.xml
|
*.xml
|
||||||
*.1
|
*.1
|
||||||
*.5
|
*.5
|
||||||
command-options.txt
|
api
|
||||||
import-features.conf.txt
|
web
|
||||||
|
features.txt
|
||||||
keymap-actions.txt
|
keymap-actions.txt
|
||||||
keymap-defaults.txt
|
keymap-defaults.txt
|
||||||
manual.html-chunked
|
manual.html-chunked
|
||||||
|
option-command.txt
|
||||||
|
option-config.txt
|
||||||
|
240
doc/Makefile
240
doc/Makefile
@ -3,62 +3,28 @@ include $(top_builddir)/Makefile.config
|
|||||||
|
|
||||||
SUBDIRS = man
|
SUBDIRS = man
|
||||||
|
|
||||||
|
# A little trick to simplify some of the rules.
|
||||||
VPATH = $(builddir):$(srcdir):$(top_srcdir)/contrib/perl
|
VPATH = $(builddir):$(srcdir):$(top_srcdir)/contrib/perl
|
||||||
|
|
||||||
#export PATH="tools:$(PATH)"
|
docdir = $(datadir)/doc
|
||||||
|
|
||||||
# TODO: perl.pod should be pod2ized during make install. --pasky
|
# Used by install-doc
|
||||||
|
HTML_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/html
|
||||||
|
PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf
|
||||||
|
|
||||||
### Script Dependencies
|
#############################################################################
|
||||||
#
|
# Build files
|
||||||
|
|
||||||
ELINKS = $(top_builddir)/src/elinks
|
|
||||||
FEATURES = $(top_srcdir)/features.conf
|
|
||||||
KBDBIND = $(top_srcdir)/src/config/kbdbind.c
|
|
||||||
|
|
||||||
|
|
||||||
### Locale env vars to override system one to ensure commands
|
|
||||||
# using elinks binary will generate texts in english
|
|
||||||
#
|
|
||||||
LOCALES = LC_ALL=C LANGUAGE=en
|
|
||||||
|
|
||||||
### Scripts
|
|
||||||
#
|
|
||||||
|
|
||||||
CODE2DOC = $(top_srcdir)/doc/tools/code2doc
|
|
||||||
HELP2DOC = $(top_srcdir)/doc/tools/help2doc
|
|
||||||
IMPORT_FEATURES_CONF = $(top_srcdir)/doc/tools/import-features.conf
|
|
||||||
|
|
||||||
TXT_DOCS = \
|
TXT_DOCS = \
|
||||||
bookmarks.txt \
|
features.txt \
|
||||||
ecmascript.txt \
|
keymap-actions.txt \
|
||||||
elinks.1.txt \
|
|
||||||
elinkskeys.5.txt \
|
|
||||||
exmode.txt \
|
|
||||||
faq.txt \
|
|
||||||
installation.txt \
|
|
||||||
introduction.txt \
|
|
||||||
lua-scripting.txt \
|
|
||||||
mailcap.txt \
|
|
||||||
manual.txt \
|
|
||||||
marks.txt \
|
|
||||||
mime.txt \
|
|
||||||
remote.txt \
|
|
||||||
small.txt \
|
|
||||||
tabs.txt \
|
|
||||||
terminals.txt \
|
|
||||||
urlshortcuts.txt
|
|
||||||
|
|
||||||
GEN_TXT_DOCS = \
|
|
||||||
command-options.txt \
|
|
||||||
import-features.conf.txt \
|
|
||||||
keymap-defaults.txt \
|
keymap-defaults.txt \
|
||||||
keymap-actions.txt
|
option-command.txt \
|
||||||
|
option-config.txt
|
||||||
TXT_DOCS += $(GEN_TXT_DOCS)
|
|
||||||
|
|
||||||
HTML_DOCS-$(CONFIG_ASCIIDOC) += \
|
HTML_DOCS-$(CONFIG_ASCIIDOC) += \
|
||||||
elinks.1.html \
|
elinks.1.html \
|
||||||
|
elinks.conf.5.html \
|
||||||
elinkskeys.5.html \
|
elinkskeys.5.html \
|
||||||
hacking.html \
|
hacking.html \
|
||||||
manual.html
|
manual.html
|
||||||
@ -68,109 +34,162 @@ HTML_DOCS-$(CONFIG_XMLTO) += \
|
|||||||
|
|
||||||
HTML_DOCS-$(CONFIG_POD2HTML) += \
|
HTML_DOCS-$(CONFIG_POD2HTML) += \
|
||||||
perl.html \
|
perl.html \
|
||||||
perl-hooks.html \
|
perl-hooks.html
|
||||||
|
|
||||||
MAN_DOCS-$(CONFIG_XMLTO) += \
|
MAN_DOCS-$(CONFIG_XMLTO) += \
|
||||||
elinks.1 \
|
elinks.1 \
|
||||||
|
elinks.conf.5 \
|
||||||
elinkskeys.5
|
elinkskeys.5
|
||||||
|
|
||||||
# Only jw is used for generating PDF.
|
# Use jw for generating PDF, since xmlto seems to freak out.
|
||||||
PDF_DOCS-$(CONFIG_JW) += \
|
PDF_DOCS-$(CONFIG_JW) += \
|
||||||
manual.pdf
|
manual.pdf
|
||||||
|
|
||||||
MAN_DOCS += elinks.conf.5
|
|
||||||
|
|
||||||
## API Docs
|
#############################################################################
|
||||||
#
|
## Set the default doc rules
|
||||||
|
|
||||||
|
MAN_DOCS = $(MAN_DOCS-yes)
|
||||||
|
HTML_DOCS = $(HTML_DOCS-yes)
|
||||||
|
PDF_DOCS = $(PDF_DOCS-yes)
|
||||||
|
|
||||||
|
txt: $(TXT_DOCS)
|
||||||
|
html: txt $(HTML_DOCS)
|
||||||
|
pdf: txt $(PDF_DOCS)
|
||||||
|
man: txt $(MAN_DOCS)
|
||||||
|
|
||||||
|
all-docs: man html pdf
|
||||||
|
|
||||||
|
install-doc: all-docs update-man install
|
||||||
|
$(foreach doc,$(HTML_DOCS), \
|
||||||
|
if test -d $(doc); then \
|
||||||
|
$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/html/$(doc); \
|
||||||
|
$(call ncmd,installdata,$(doc)/*,$(HTML_DIR)/$(doc)); \
|
||||||
|
else \
|
||||||
|
$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/html; \
|
||||||
|
$(call ncmd,installdata,$(doc),$(HTML_DIR)); \
|
||||||
|
fi;)
|
||||||
|
$(foreach doc,$(PDF_DOCS), \
|
||||||
|
$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/pdf; \
|
||||||
|
$(call ncmd,installdata,$(doc),$(PDF_DIR);))
|
||||||
|
|
||||||
|
update-man: man
|
||||||
|
$(if $(MAN_DOCS), \
|
||||||
|
$(call ncmd,installdata,elinks.1,man/man1/elinks.1.in); \
|
||||||
|
$(call ncmd,installdata,elinkskeys.5,man/man5/); \
|
||||||
|
$(call ncmd,installdata,elinks.conf.5,man/man5/))
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
@$(RM) -r api $(TXT_DOCS) $(MAN_DOCS) $(HTML_DOCS) $(PDF_DOCS) *.tmp *.xml
|
||||||
|
|
||||||
|
# TODO: perl.pod should be pod2ized during make install. --pasky
|
||||||
|
install-local:
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Generated asciidoc files
|
||||||
|
|
||||||
|
# Scripts and Dependencies
|
||||||
|
CODE2DOC = $(srcdir)tools/code2doc
|
||||||
|
HELP2DOC = $(srcdir)tools/help2doc
|
||||||
|
CONF2DOC = $(srcdir)tools/conf2doc
|
||||||
|
KEYS2DOC = $(srcdir)tools/make-elinkskeys-manpage
|
||||||
|
ELINKS = $(top_builddir)/src/elinks
|
||||||
|
FEATURES = $(top_srcdir)/features.conf
|
||||||
|
KBDBIND = $(top_srcdir)/src/config/kbdbind.c
|
||||||
|
|
||||||
|
# Locale env vars to override system one to ensure commands
|
||||||
|
# using elinks binary will generate texts in english
|
||||||
|
LOCALES = LC_ALL=C LANGUAGE=en
|
||||||
|
|
||||||
|
# FIXME: Keep generated .txt files relative to the source directory and files
|
||||||
|
# they are included in.
|
||||||
|
quiet_cmd_help2doc = ' [$(LINK_COLOR)HELP2DOC$(END_COLOR)] $(RELPATH)$@'
|
||||||
|
cmd_help2doc = $(LOCALES) $(HELP2DOC) $(ELINKS) $@ > $@
|
||||||
|
|
||||||
|
quiet_cmd_conf2doc = ' [$(LINK_COLOR)CONF2DOC$(END_COLOR)] $(RELPATH)$@'
|
||||||
|
cmd_conf2doc = $(LOCALES) $(CONF2DOC) > $@
|
||||||
|
|
||||||
|
quiet_cmd_keys2doc = ' [$(LINK_COLOR)KEYS2DOC$(END_COLOR)] $(RELPATH)$@'
|
||||||
|
cmd_keys2doc = $(LOCALES) $(KEYS2DOC) $(KBDBIND) $@ > $@
|
||||||
|
|
||||||
|
features.txt: $(FEATURES) $(CONF2DOC)
|
||||||
|
$(call cmd,conf2doc)
|
||||||
|
|
||||||
|
keymap-%.txt: $(KBDBIND) $(KEYS2DOC)
|
||||||
|
$(call cmd,keys2doc)
|
||||||
|
|
||||||
|
option-%.txt: $(ELINKS) $(HELP2DOC)
|
||||||
|
$(call cmd,help2doc)
|
||||||
|
|
||||||
|
|
||||||
|
# API Docs
|
||||||
|
|
||||||
|
ifeq ($(findstring api,$(MAKECMDGOALS)),api)
|
||||||
API = $(shell find $(top_srcdir)/src/ -name '*.h' -exec grep -q 'API Doc' \{\} \; -printf "%p " | sort)
|
API = $(shell find $(top_srcdir)/src/ -name '*.h' -exec grep -q 'API Doc' \{\} \; -printf "%p " | sort)
|
||||||
|
endif
|
||||||
|
|
||||||
define api_doc
|
define api_doc
|
||||||
api/$(2).txt: $(1)
|
api/$(2).txt: $(1) $(CODE2DOC)
|
||||||
|
@test -d api || $(MKINSTALLDIRS) api
|
||||||
@$(CODE2DOC) $(1) > $$@
|
@$(CODE2DOC) $(1) > $$@
|
||||||
API_TXT += api/$(2).txt
|
API_TXT += api/$(2).txt
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach api,$(API),$(eval $(call api_doc,$(api),$(shell sed -n 's/.*API Doc\s*::\s*\([^ ]*\).*/\1/p' < $(api)),)))
|
api_name = $(shell sed -n 's/.*API Doc\s*::\s*\([^ ]*\).*/\1/p' < $(1))
|
||||||
|
$(foreach api,$(API),$(eval $(call api_doc,$(api),$(call api_name,$(api)))))
|
||||||
|
|
||||||
|
api: $(patsubst %.txt,%.html,$(API_TXT))
|
||||||
|
|
||||||
|
|
||||||
## Se the default doc rules
|
#############################################################################
|
||||||
|
# Build commands and macros
|
||||||
MAN_DOCS = elinks.conf.5 $(MAN_DOCS-yes)
|
|
||||||
HTML_DOCS = $(HTML_DOCS-yes)
|
|
||||||
PDF_DOCS = $(PDF_DOCS-yes)
|
|
||||||
API_DOCS = $(patsubst %.txt,%.html,$(API_TXT))
|
|
||||||
|
|
||||||
api-dir:
|
|
||||||
@test -d api || $(MKINSTALLDIRS) api
|
|
||||||
|
|
||||||
txt: $(addprefix $(srcdir),$(TXT_DOCS))
|
|
||||||
html: txt $(HTML_DOCS)
|
|
||||||
pdf: txt $(PDF_DOCS)
|
|
||||||
man: txt $(MAN_DOCS) man-update
|
|
||||||
api: api-dir $(API_DOCS)
|
|
||||||
|
|
||||||
all-docs: man html pdf
|
|
||||||
|
|
||||||
man-update: $(MAN_DOCS)
|
|
||||||
@test "$(CONFIG_XMLTO)" = yes && \
|
|
||||||
sed 's/^\.TH "ELINKS" 1 .*/.TH "ELINKS" 1 "The ELinks text-browser" "$(shell date -I)" "The ELinks text-browser"/' \
|
|
||||||
< elinks.1 > $(srcdir)man/man1/elinks.1.in && \
|
|
||||||
$(RM) $(MAN_DIR)/man1/elinks.1
|
|
||||||
@test "$(CONFIG_XMLTO)" = yes && \
|
|
||||||
sed -e 's/\\fI\\fR'\''/\\fI\\'\''\\fR/' < elinkskeys.5 | \
|
|
||||||
sed 's/^\.TH "ELINKSKEYS" 5 .*/.TH "ELINKSKEYS" 5 "ELinks keybindings" "$(shell date -I)" "ELinks keybindings"/' \
|
|
||||||
> $(srcdir)man/man5/elinkskeys.5
|
|
||||||
@$(INSTALL) elinks.conf.5 $(srcdir)man/man5
|
|
||||||
|
|
||||||
clean-local:
|
|
||||||
@$(RM) -r api $(GEN_TXT_DOCS) $(MAN_DOCS) $(HTML_DOCS) $(PDF_DOCS) *.tmp
|
|
||||||
|
|
||||||
# Autogenerated files.
|
|
||||||
|
|
||||||
# FIXME: Keep generated .txt files relative to the source directory and files
|
|
||||||
# they are included in.
|
|
||||||
|
|
||||||
import-features.conf.txt: $(FEATURES) $(IMPORT_FEATURES_CONF)
|
|
||||||
$(IMPORT_FEATURES_CONF) > $@
|
|
||||||
|
|
||||||
keymap-defaults.txt keymap-actions.txt: $(MAKE_ELINKSKEYS_MANPAGE) $(KBDBIND)
|
|
||||||
$(LOCALES) $(srcdir)tools/make-elinkskeys-manpage $(KBDBIND)
|
|
||||||
|
|
||||||
command-options.txt: $(ELINKS) $(HELP2DOC)
|
|
||||||
$(LOCALES) $(HELP2DOC) --cmdoptions --elinks=$(ELINKS) > $@
|
|
||||||
|
|
||||||
elinks.conf.5: $(ELINKS) $(HELP2DOC)
|
|
||||||
$(LOCALES) $(HELP2DOC) --elinksconf --elinks=$(ELINKS) > $@
|
|
||||||
|
|
||||||
## Default build rules
|
|
||||||
#
|
|
||||||
|
|
||||||
quiet_cmd_asciidoc = ' [$(LINK_COLOR)ASCIIDOC$(END_COLOR)] $(RELPATH)$@'
|
|
||||||
cmd_asciidoc = $(ASCIIDOC) -f asciidoc.conf -b $(2) -d $(call doctype,$<) -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_xmlto = ' [$(LINK_COLOR)XMLTO$(END_COLOR)] $(RELPATH)$@'
|
|
||||||
cmd_xmlto = $(XMLTO) $(3) $(2) $<
|
|
||||||
|
|
||||||
quiet_cmd_jw = ' [$(LINK_COLOR)JW$(END_COLOR)] $(RELPATH)$@'
|
quiet_cmd_jw = ' [$(LINK_COLOR)JW$(END_COLOR)] $(RELPATH)$@'
|
||||||
cmd_jw = $(JW) -b $(2) $<
|
cmd_jw = $(JW) -b $(2) $<
|
||||||
|
|
||||||
|
quiet_cmd_xmlto = ' [$(LINK_COLOR)XMLTO$(END_COLOR)] $(RELPATH)$@'
|
||||||
|
cmd_xmlto = $(XMLTO) $(3) $(2) $<
|
||||||
|
|
||||||
quiet_cmd_pod2html = ' [$(LINK_COLOR)POD2HTML$(END_COLOR)] $(RELPATH)$@'
|
quiet_cmd_pod2html = ' [$(LINK_COLOR)POD2HTML$(END_COLOR)] $(RELPATH)$@'
|
||||||
cmd_pod2html = $(POD2HTML) --outfile=$@ < $<
|
cmd_pod2html = $(POD2HTML) --outfile=$@ < $<
|
||||||
|
|
||||||
|
quiet_cmd_asciidoc = ' [$(LINK_COLOR)ASCIIDOC$(END_COLOR)] $(RELPATH)$@'
|
||||||
|
cmd_asciidoc = $(ASCIIDOC) -f asciidoc.conf -b $(2) -d $(call doctype,$<) -o $@ $<
|
||||||
|
|
||||||
|
# Based on filename in $(1) find out asciidoc doctype.
|
||||||
doctype = $(if $(findstring .1.,$(1)),manpage,$(if $(findstring .5.,$(1)),manpage,book))
|
doctype = $(if $(findstring .1.,$(1)),manpage,$(if $(findstring .5.,$(1)),manpage,book))
|
||||||
|
|
||||||
|
# Loosely track dependencies via asciidoc includes.
|
||||||
|
asciidoc_dep = sed -n 's@include::\(.*\)\[.*@$@: \1@p' < $< > .deps/$(@F).asciidoc
|
||||||
|
|
||||||
|
-include .deps/*.asciidoc
|
||||||
|
|
||||||
|
# Do a little post-processing of man pages. Inserting title headers and date.
|
||||||
|
MAN_DATE = $(shell date -I)
|
||||||
|
man_desc = `sed -n 's/:Description:\s*\(.*\)/\1/p' < $(subst .xml,.txt,$<)`
|
||||||
|
man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\" \"$(1)\"/" < $@ | \
|
||||||
|
sed "s/@squote@/\\\\'/g" > $@.tmp && mv $@.tmp $@
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Build recipies
|
||||||
|
|
||||||
%.html: %.txt asciidoc.conf
|
%.html: %.txt asciidoc.conf
|
||||||
$(call cmd,asciidoc,xhtml11)
|
$(call cmd,asciidoc,xhtml11)
|
||||||
|
$(call asciidoc_dep)
|
||||||
|
|
||||||
%.xml: %.txt asciidoc.conf
|
%.xml: %.txt asciidoc.conf
|
||||||
$(call cmd,asciidoc,docbook)
|
$(call cmd,asciidoc,docbook)
|
||||||
|
$(call asciidoc_dep)
|
||||||
|
|
||||||
%.1: %.1.xml
|
%.1: %.1.xml
|
||||||
$(call cmd,xmlto,man)
|
$(call cmd,xmlto,man)
|
||||||
|
$(call man_hack,$(call man_desc))
|
||||||
|
|
||||||
%.5: %.5.xml
|
%.5: %.5.xml
|
||||||
$(call cmd,xmlto,man)
|
$(call cmd,xmlto,man)
|
||||||
|
$(call man_hack,$(call man_desc))
|
||||||
|
|
||||||
%.html-chunked: %.xml
|
%.html-chunked: %.xml
|
||||||
$(call cmd,xmlto,html,-o $@)
|
$(call cmd,xmlto,html,-o $@)
|
||||||
@ -184,4 +203,5 @@ doctype = $(if $(findstring .1.,$(1)),manpage,$(if $(findstring .5.,$(1)),manpag
|
|||||||
perl-%.html: %.pl
|
perl-%.html: %.pl
|
||||||
$(call cmd,pod2html)
|
$(call cmd,pod2html)
|
||||||
|
|
||||||
|
|
||||||
include $(top_srcdir)/Makefile.lib
|
include $(top_srcdir)/Makefile.lib
|
||||||
|
102
doc/README
102
doc/README
@ -4,25 +4,105 @@ There is only limited documentation available for ELinks so far, sorry. It
|
|||||||
basically consists of the documents in this directory and the features.conf,
|
basically consists of the documents in this directory and the features.conf,
|
||||||
README and INSTALL files in the project's root directory.
|
README and INSTALL files in the project's root directory.
|
||||||
|
|
||||||
The files you will find in this directory are manpages living in the man/
|
You are encouraged to get a copy of the ELinks manual. It tries to be a
|
||||||
directory and a bunch of .html and especially .txt (wait, you expect HTML
|
complete book of all there is to know about ELinks. For example, most files
|
||||||
browser to carry its documentation around in HTML?) documents. The index.txt
|
listed in the next section is in some way part of the ELinks manual.
|
||||||
file contains the table of contents which should help you navigating between
|
|
||||||
the files.
|
|
||||||
|
|
||||||
Tools
|
Instructions on building the manual is given below. If you do not intend to
|
||||||
-----
|
build it yourself either access it on the ELinks homepage or, if you
|
||||||
|
downloaded ELinks via a tarball, the manual should be in the html/ directory.
|
||||||
|
|
||||||
The manual is written in asciidoc, however you will also need xmlto to process
|
|
||||||
docbook XML generated by asciidoc into manpages and the html-chunked manual.
|
Where to start
|
||||||
If you want to translate .pod files you need pod2html.
|
--------------
|
||||||
|
|
||||||
|
This sections tries to give a quick overview of important files you will find
|
||||||
|
in this directory or it's children.
|
||||||
|
|
||||||
|
- Man pages:
|
||||||
|
|
||||||
|
elinks(1) ................................... man/man1/elinks.1
|
||||||
|
elinks.conf(5) .............................. man/man5/elinks.conf.5
|
||||||
|
elinkskeys(5) ............................... man/man5/elinkskeys.5
|
||||||
|
|
||||||
|
Man pages are best viewed with the man program. The easiest way to do this
|
||||||
|
is by telling the man program to look for man pages in the doc/man
|
||||||
|
directory by using the -M switch. If you are standing in the top-level
|
||||||
|
directory, you can do this by invoking the man program using:
|
||||||
|
|
||||||
|
man -M doc/man elinks.conf
|
||||||
|
|
||||||
|
- User's Guide:
|
||||||
|
|
||||||
|
Getting ELinks up and running................ installation.txt
|
||||||
|
Introduction to the World of ELinks ......... introduction.txt
|
||||||
|
Frequently Asked Questions .................. faq.txt
|
||||||
|
JavaScript/ECMAScript in ELinks ............. ecmascript.txt
|
||||||
|
Notes on User Feedback ...................... feedback.txt
|
||||||
|
The Smallest Binary Quest Spoilerbook ....... small.txt
|
||||||
|
|
||||||
|
Note: The ELinks manual really should be read in one of the generated
|
||||||
|
formats: html, html-chunked or pdf, however the entry point can be found in
|
||||||
|
manual.txt and might be of some help, when deciding what other .txt
|
||||||
|
documents to read in this directory.
|
||||||
|
|
||||||
|
- Developer's Guide:
|
||||||
|
|
||||||
|
Introduction to ELinks Developing ........... dev-intro.txt
|
||||||
|
The Demented Guide to Source Hacking ........ hacking.txt
|
||||||
|
|
||||||
|
The developing intro tries to explain some of the basic concepts in the
|
||||||
|
ELinks internal. While the hacking guide contains great deal about general
|
||||||
|
source code structure and especially guidelines regarding coding style,
|
||||||
|
submitting patches etc., thus every aspiring developer should take the
|
||||||
|
pains to read through it, do not forget to also look for README and similar
|
||||||
|
text files in the subdirectories containing the relevant sources for
|
||||||
|
detailed notes regarding given modules/subsystems.
|
||||||
|
|
||||||
|
The Lua Scripting Book ...................... lua-scripting.txt
|
||||||
|
Events Reference Sheet ...................... events.txt
|
||||||
|
|
||||||
|
The above covers internal scripting, by which we mean scripting of the
|
||||||
|
browser internals through embedded Lua, Guile or Perl scripts. ECMAScript
|
||||||
|
scripts embedded in documents have nothing to do with that.
|
||||||
|
|
||||||
|
|
||||||
|
Building documentation
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The following tools are used for generating documentation in various formats:
|
||||||
|
|
||||||
|
- asciidoc: the basic tool for lifting the .txt files to other formats.
|
||||||
|
- xmlto: used for outputting chunked HTML and man pages.
|
||||||
|
- jw: used for pdf documents.
|
||||||
|
- pod2html: used for perl docs.
|
||||||
|
|
||||||
All these tools are checked by configure, thus to successfully build all the
|
All these tools are checked by configure, thus to successfully build all the
|
||||||
possible documentation (with the tools available on the system), just run
|
possible documentation (with the tools available on the system), just run
|
||||||
|
|
||||||
$ make all-docs
|
$ make all-docs
|
||||||
|
|
||||||
in the doc/ directory.
|
in the doc/ directory. It will build, if possibly, the manual in the following
|
||||||
|
manual formats (with tool requirements listed):
|
||||||
|
|
||||||
|
- HTML one-file (asciidoc)
|
||||||
|
- HTML chunked / multiple files (asciidoc + xmlto)
|
||||||
|
- PDF (asciidoc + jw)
|
||||||
|
|
||||||
|
and the following man page formats:
|
||||||
|
|
||||||
|
- HTML (asciidoc)
|
||||||
|
- man / groff (asciidoc + xmlto)
|
||||||
|
|
||||||
|
Note: You do not need to build manpages. They are shipped with ELinks.
|
||||||
|
|
||||||
|
Note: You must first build the ELinks binary for "make all-docs" to work
|
||||||
|
successfully. The binary is used for getting option documentation.
|
||||||
|
|
||||||
|
The documentation can be installed with:
|
||||||
|
|
||||||
|
$ make install-doc
|
||||||
|
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
------------
|
------------
|
||||||
|
@ -1,17 +1,40 @@
|
|||||||
# AsciiDoc configuration file
|
# AsciiDoc configuration file
|
||||||
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2006
|
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2006
|
||||||
|
|
||||||
# The elink macro can have optional {0} value, that is what
|
# This file sets the following ELinks specific AsciiDoc macros:
|
||||||
|
#
|
||||||
|
# General purpose:
|
||||||
|
# - man:page[section]: which is used for linking between ELinks manpages.
|
||||||
|
#
|
||||||
|
# API Doc:
|
||||||
|
# - id:[]
|
||||||
|
# - enum:[]
|
||||||
|
# - func:[]
|
||||||
|
# - struct:[]
|
||||||
|
# - macro:[]
|
||||||
|
# - typedef:[]
|
||||||
|
# - ref:[]
|
||||||
|
|
||||||
|
# Some macros can have optional {0} value, that is what
|
||||||
# the {0%...} and {0#...} handles.
|
# the {0%...} and {0#...} handles.
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# DocBook
|
# DocBook
|
||||||
|
|
||||||
ifdef::backend-docbook[]
|
ifdef::backend-docbook[]
|
||||||
[man-inlinemacro]
|
|
||||||
{target}({0})
|
|
||||||
|
|
||||||
## For manpages use less verbose linking
|
# To be replaced later
|
||||||
|
[attributes]
|
||||||
|
squote=@squote@
|
||||||
|
|
||||||
|
# No interlinking between elinks manpages
|
||||||
|
[man-inlinemacro]
|
||||||
|
{0%{target}}
|
||||||
|
{0#<citerefentry>}
|
||||||
|
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
|
||||||
|
{0#</citerefentry>}
|
||||||
|
|
||||||
|
# For manpages use less verbose linking
|
||||||
ifdef::doctype-manpage[]
|
ifdef::doctype-manpage[]
|
||||||
[link-inlinemacro]
|
[link-inlinemacro]
|
||||||
{0%<{target}>}
|
{0%<{target}>}
|
||||||
@ -31,8 +54,16 @@ endif::backend-docbook[]
|
|||||||
# XHTML11
|
# XHTML11
|
||||||
|
|
||||||
ifdef::backend-xhtml11[]
|
ifdef::backend-xhtml11[]
|
||||||
|
|
||||||
|
[attributes]
|
||||||
|
squote='
|
||||||
|
|
||||||
|
# Use the man:[] macro to link between elinks manpages
|
||||||
[man-inlinemacro]
|
[man-inlinemacro]
|
||||||
<a href="{target}.{0}.html">{target}({0})</a>
|
{eval:re.match("elinks", "{target}") != None}<a href="{target}.{0}.html">{target}({0})</a>
|
||||||
|
{eval:re.match("elinks", "{target}") == None}<b>{target}({0})</b>
|
||||||
|
|
||||||
|
# API Doc macros
|
||||||
|
|
||||||
[id-inlinemacro]
|
[id-inlinemacro]
|
||||||
<a id="{0}" href="#{0}">{0}</a>
|
<a id="{0}" href="#{0}">{0}</a>
|
||||||
@ -54,4 +85,5 @@ ifdef::backend-xhtml11[]
|
|||||||
|
|
||||||
[ref-inlinemacro]
|
[ref-inlinemacro]
|
||||||
<a href="{target}#{0}">{0}</a>
|
<a href="{target}#{0}">{0}</a>
|
||||||
|
|
||||||
endif::backend-xhtml11[]
|
endif::backend-xhtml11[]
|
||||||
|
@ -60,7 +60,7 @@ If you start downloading a torrent which was previously active, the
|
|||||||
client will first try to resume downloaded data from the disk. The
|
client will first try to resume downloaded data from the disk. The
|
||||||
resume progress is shown in the resume dialog, depicted below:
|
resume progress is shown in the resume dialog, depicted below:
|
||||||
|
|
||||||
+----------------------------------------- Download -------------------------------------+
|
+--------------------------------------- Download ---------------------------------------+
|
||||||
| |
|
| |
|
||||||
| bittorrent:http://www.legaltorrents.com/bit/blue-a-short-film.torrent |
|
| bittorrent:http://www.legaltorrents.com/bit/blue-a-short-film.torrent |
|
||||||
| |
|
| |
|
||||||
@ -82,7 +82,7 @@ such as progress, and a summary of which places in the torrent pieces
|
|||||||
have been downloaded from. A view of the download dialog along with
|
have been downloaded from. A view of the download dialog along with
|
||||||
highlights of the most important parts of the dialog is given below:
|
highlights of the most important parts of the dialog is given below:
|
||||||
|
|
||||||
+---------------------------------------------- Download --------------------------------+
|
+--------------------------------------- Download ---------------------------------------+
|
||||||
| |
|
| |
|
||||||
| bittorrent:http://www.legaltorrents.com/bit/best-of-webbed-hand-vol-1.torrent |
|
| bittorrent:http://www.legaltorrents.com/bit/best-of-webbed-hand-vol-1.torrent |
|
||||||
| |
|
| |
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
elinks(1)
|
elinks(1)
|
||||||
=========
|
=========
|
||||||
|
:Description: The Elinks text-browser
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
----
|
----
|
||||||
@ -32,7 +33,7 @@ do not need to care about them. Note that this list is by no means complete
|
|||||||
and it is not kept up-to-date. To get complete list of commandline options,
|
and it is not kept up-to-date. To get complete list of commandline options,
|
||||||
start 'ELinks' with parameter `--help`.
|
start 'ELinks' with parameter `--help`.
|
||||||
|
|
||||||
include::command-options.txt[]
|
include::option-command.txt[]
|
||||||
|
|
||||||
ENVIRONMENT VARIABLES
|
ENVIRONMENT VARIABLES
|
||||||
---------------------
|
---------------------
|
||||||
@ -75,7 +76,7 @@ HOME::
|
|||||||
|
|
||||||
WWW_HOME::
|
WWW_HOME::
|
||||||
|
|
||||||
Homepage location (as in lynx(1)).
|
Homepage location (as in man:lynx[1]).
|
||||||
|
|
||||||
FILES
|
FILES
|
||||||
-----
|
-----
|
||||||
@ -150,7 +151,8 @@ was done by Jonas Fonseca mailto:fonseca@diku.dk[].
|
|||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
|
||||||
man:elinkskeys[5], elinks.conf(5), links(1), lynx(1), w3m(1), wget(1)
|
man:elinkskeys[5], man:elinks.conf[5], man:links[1], man:lynx[1], man:w3m[1],
|
||||||
|
man:wget[1]
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
# vim: tabstop=4 shiftwidth=4 textwidth=76
|
# vim: tabstop=4 shiftwidth=4 textwidth=76
|
||||||
|
63
doc/elinks.conf.5.txt
Normal file
63
doc/elinks.conf.5.txt
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
elinks.conf(5)
|
||||||
|
==============
|
||||||
|
:Description: ELinks configuration file
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
elinks.conf - ELinks configuration file
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
[verse]
|
||||||
|
set "<option>" = <value>
|
||||||
|
unset "<option>" = <value>
|
||||||
|
bind "<keymap>" "<key>" = "<action>"
|
||||||
|
include "<file>"
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The `elinks.conf` file contains configuration information for ELinks. It can
|
||||||
|
be used to configure the behaviour of ELinks in a wide variety of ways:
|
||||||
|
protocol behaviour, keybindings, colors used for rendering and for the user
|
||||||
|
interface.
|
||||||
|
|
||||||
|
It is read at startup and saved only when requested. All options described in
|
||||||
|
this document can be fully configured from within ELinks so no editing of
|
||||||
|
elinks.conf is needed.
|
||||||
|
|
||||||
|
Note that MIME-related options used for specifying handlers of various MIME
|
||||||
|
types are NOT described in this document. Documentation for these options can
|
||||||
|
be found at the ELinks homepage. Keybindings can also be specified in
|
||||||
|
elinks.conf. This is described in man:elinkskeys[5].
|
||||||
|
|
||||||
|
SYNTAX
|
||||||
|
------
|
||||||
|
|
||||||
|
The syntax of the configuration file is very simple. The elinks.conf file is a
|
||||||
|
free-form ASCII text file. The file may contain extra tabs and newlines for
|
||||||
|
formatting purposes. Keywords in the file are case-sensitive. Comments may be
|
||||||
|
placed anywhere within the file (except within quotes). Comments begin with
|
||||||
|
the # character and end at the end of the line.
|
||||||
|
|
||||||
|
EXAMPLES
|
||||||
|
--------
|
||||||
|
|
||||||
|
Some sample settings:
|
||||||
|
|
||||||
|
# Use asynchronous DNS resolver?
|
||||||
|
set connection.async_dns = 1
|
||||||
|
# horizontal text margin.
|
||||||
|
set document.browse.margin_width = 3
|
||||||
|
# Default document codepage.
|
||||||
|
set document.codepage.assume = "ISO-8859-1"
|
||||||
|
# User defined protocol handlers
|
||||||
|
set protocol.user.mailto.unix = "mutt %h -s \e\*(lq%s\e\*(rq"
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
include::option-config.txt[]
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
man:elinks[1], man:elinkskeys[5]
|
@ -1,5 +1,6 @@
|
|||||||
elinkskeys(5)
|
elinkskeys(5)
|
||||||
=============
|
=============
|
||||||
|
:Description: ELinks keybindings
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
----
|
----
|
||||||
@ -103,4 +104,4 @@ to asciidoc format and cleaned up by Jonas Fonseca.
|
|||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
|
||||||
man:elinks[1], elinks.conf(5)
|
man:elinks[1], man:elinks.conf[5]
|
||||||
|
@ -312,8 +312,8 @@ place it on the same line as the command, if it's
|
|||||||
place it on the preceding line.
|
place it on the preceding line.
|
||||||
|
|
||||||
|
|
||||||
3.2, More about style
|
More about style
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Note: We use short variables names and stupid examples here, do not take that
|
Note: We use short variables names and stupid examples here, do not take that
|
||||||
as a guideline for _REAL_ coding. Always use descriptive variables
|
as a guideline for _REAL_ coding. Always use descriptive variables
|
||||||
|
@ -1,91 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
The ELinks Manual
|
|
||||||
|
|
||||||
|
|
||||||
Welcome! This is the entry point for the current humble ELinks manual.
|
|
||||||
It is by no way complete, it is not even very homogeneous and it should
|
|
||||||
be eventually superseded by a complete ELinks Book, which you can find
|
|
||||||
in the book/ subdirectory in a very prenatal stage.
|
|
||||||
|
|
||||||
There was a complete (or from a large part complete) manual for the
|
|
||||||
Links 0.82 once, you can still find it at:
|
|
||||||
|
|
||||||
http://links.sourceforge.net/docs/manual-0.82-en/index.html
|
|
||||||
|
|
||||||
While large parts of it do not apply anymore, you may still find some
|
|
||||||
relevant information there.
|
|
||||||
|
|
||||||
You may also refer to the manual page for a very quick reference,
|
|
||||||
however little effort is done to keep it always up-to-date.
|
|
||||||
On the other hand, the built-in documentation is _always_ up-to-date.
|
|
||||||
Check the --long-help and --config-help ELinks command-line arguments.
|
|
||||||
|
|
||||||
|
|
||||||
Table of contents
|
|
||||||
~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Introduction and Table of Contents .......................... index.txt
|
|
||||||
|
|
||||||
User's Guide
|
|
||||||
The ELinks Manual (txt) ............................ manual.txt
|
|
||||||
The ELinks Manual (html) .......................... manual.html
|
|
||||||
Other Topics
|
|
||||||
Frequently Asked Questions ................... faq.html
|
|
||||||
JavaScript/ECMAScript in ELinks ........ ecmascript.txt
|
|
||||||
|
|
||||||
Man pages (*)
|
|
||||||
elinks(1) ................................... man/man1/elinks.1
|
|
||||||
elinks.conf(5) ......................... man/man5/elinks.conf.5
|
|
||||||
elinkskeys(5) ........................... man/man5/elinkskeys.5
|
|
||||||
|
|
||||||
Developer's Guide
|
|
||||||
Internal Scripting (**)
|
|
||||||
The Lua Scripting Book ................ elinks-lua.texi
|
|
||||||
On the Perl Scripting Interface ........ (***) perl.pod
|
|
||||||
Events Reference Sheet (****) .............. events.txt
|
|
||||||
The Demented Guide to Source Hacking (*****) ...... hacking.txt
|
|
||||||
The Smallest Binary Quest Spoilerbook ............... small.txt
|
|
||||||
A Discursus on Color Models ................... color-model.txt
|
|
||||||
|
|
||||||
Appendices
|
|
||||||
Appendix A - Notes on User Feedback .............. feedback.txt
|
|
||||||
|
|
||||||
(*) Man pages are best viewed with the man program. The easiest way to
|
|
||||||
do this is by telling the man program to look for man pages in the
|
|
||||||
doc/man directory by using the -M switch. If you are standing in the
|
|
||||||
top-level directory, you can do this by invoking the man program using:
|
|
||||||
|
|
||||||
man -M doc/man elinks.conf
|
|
||||||
|
|
||||||
(**) By internal scripting, we mean scripting of the browser internals
|
|
||||||
through embedded Lua, Guile or Perl scripts. ECMAScript scripts
|
|
||||||
embedded in documents have nothing to do with that.
|
|
||||||
|
|
||||||
(***) This document is written in the Plain Old Documentation format,
|
|
||||||
traditional for any Perl-related documentation. You can either view
|
|
||||||
it directly by the 'perldoc' tool or convert it to a more reading-
|
|
||||||
-friendly format by one of the numerous 'pod2' tools, most notably
|
|
||||||
'pod2text' and 'pod2html'. All those tools should be part of your
|
|
||||||
Perl distribution (some Linux distributions have a separate 'perldoc'
|
|
||||||
package).
|
|
||||||
|
|
||||||
(****) De iure, this is not restricted to internal scripting and should
|
|
||||||
be of general interest. De facto, it is currently interesting almost
|
|
||||||
exclusively to hackers in the internal scripting area - and shall it
|
|
||||||
be very useful resource for internal scripting power users.
|
|
||||||
|
|
||||||
(*****) While that file contains great deal about general source code
|
|
||||||
structure and especially guidelines regarding coding style, submitting
|
|
||||||
patches etc., thus every aspiring developer should take the pains
|
|
||||||
to read through it, do not forget to also look for README and similar
|
|
||||||
text files in the subdirectories containing the relevant sources for
|
|
||||||
detailed notes regarding given modules/subsystems.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(Note: Sometimes, I broke the lines manually earlier than gqap would,
|
|
||||||
for greater aesthetical effect. --pasky)
|
|
||||||
vim: textwidth=72
|
|
@ -19,7 +19,7 @@ required or recommended that you install.
|
|||||||
Requirements
|
Requirements
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
To succesfully install ELinks all that is required is GNU make and a C
|
To successfully install ELinks all that is required is GNU make and a C
|
||||||
compiler. If you want to install directly from GIT it is also required that
|
compiler. If you want to install directly from GIT it is also required that
|
||||||
automake and autoconf is installed on your system.
|
automake and autoconf is installed on your system.
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ xterm with 256 colors Program atleast patch level 179 or rxvt program \
|
|||||||
from version 2.7.9 for support of 256 colors. \
|
from version 2.7.9 for support of 256 colors. \
|
||||||
Newer PuTTY also has 256 color support.
|
Newer PuTTY also has 256 color support.
|
||||||
libidn For internationalized domain names.
|
libidn For internationalized domain names.
|
||||||
SpiderMonkey Mozilla's JavaScript engine for getting
|
SpiderMonkey Mozilla's JavaScript engine for getting \
|
||||||
JavaScript/ECMAScript support in ELinks. \
|
JavaScript/ECMAScript support in ELinks. \
|
||||||
See also <<ecmascript,notes on ECMAScript support>>.
|
See also <<ecmascript,notes on ECMAScript support>>.
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@ -71,6 +71,6 @@ include::small.txt[]
|
|||||||
|
|
||||||
include::ecmascript.txt[]
|
include::ecmascript.txt[]
|
||||||
|
|
||||||
include::import-features.conf.txt[]
|
include::features.txt[]
|
||||||
|
|
||||||
endif::installation-webpage[]
|
endif::installation-webpage[]
|
||||||
|
9
doc/man/man1/elinks.1.in
Executable file → Normal file
9
doc/man/man1/elinks.1.in
Executable file → Normal file
@ -17,7 +17,7 @@
|
|||||||
.el .ne 3
|
.el .ne 3
|
||||||
.IP "\\$1" \\$2
|
.IP "\\$1" \\$2
|
||||||
..
|
..
|
||||||
.TH "ELINKS" 1 "The ELinks text-browser" "2006-01-11" "The ELinks text-browser"
|
.TH "ELINKS" 1 "The Elinks text-browser" "2006-01-12" "The Elinks text-browser"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
elinks \- lynx-like alternative character mode WWW browser
|
elinks \- lynx-like alternative character mode WWW browser
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
@ -200,6 +200,9 @@ The verbose level controls what messages are shown at start up and while running
|
|||||||
\-version
|
\-version
|
||||||
Print \fIELinks\fR version information and exit\&.
|
Print \fIELinks\fR version information and exit\&.
|
||||||
|
|
||||||
|
|
||||||
|
Generated using output from ELinks version 0\&.12\&.GIT\&.
|
||||||
|
|
||||||
.SH "ENVIRONMENT VARIABLES"
|
.SH "ENVIRONMENT VARIABLES"
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
@ -236,7 +239,7 @@ The path to the users home directory\&. Used when expanding ~/\&.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
WWW_HOME
|
WWW_HOME
|
||||||
Homepage location (as in lynx(1))\&.
|
Homepage location (as in \fBlynx\fR(1))\&.
|
||||||
|
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
|
|
||||||
@ -305,5 +308,5 @@ This manual page was written by Peter Gervai <grin@tolna\&.net>, using excerpts
|
|||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
|
||||||
|
|
||||||
elinkskeys(5), elinks\&.conf(5), links(1), lynx(1), w3m(1), wget(1)
|
\fBelinkskeys\fR(5), \fBelinks\&.conf\fR(5), \fBlinks\fR(1), \fBlynx\fR(1), \fBw3m\fR(1), \fBwget\fR(1)
|
||||||
|
|
||||||
|
4142
doc/man/man5/elinks.conf.5
Executable file → Normal file
4142
doc/man/man5/elinks.conf.5
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
4
doc/man/man5/elinkskeys.5
Executable file → Normal file
4
doc/man/man5/elinkskeys.5
Executable file → Normal file
@ -17,7 +17,7 @@
|
|||||||
.el .ne 3
|
.el .ne 3
|
||||||
.IP "\\$1" \\$2
|
.IP "\\$1" \\$2
|
||||||
..
|
..
|
||||||
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2006-01-11" "ELinks keybindings"
|
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2006-01-12" "ELinks keybindings"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
elinkskeys \- keybindings for ELinks
|
elinkskeys \- keybindings for ELinks
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
@ -1316,5 +1316,5 @@ This manual page was finally written by Peter Wang (one and a half years after w
|
|||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
|
||||||
|
|
||||||
elinks(1), elinks\&.conf(5)
|
\fBelinks\fR(1), \fBelinks\&.conf\fR(5)
|
||||||
|
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
The ELinks Manual
|
The ELinks Manual
|
||||||
=================
|
=================
|
||||||
:Revision: $Revision: 1.18 $
|
|
||||||
:Date: $Date: 2005/05/18 18:55:14 $
|
|
||||||
|
|
||||||
Preface
|
Preface
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Welcome! This is the entry point for the humble ELinks manual. It is by no
|
Welcome! This is the entry point for the humble ELinks manual. It is by no
|
||||||
means complete, it is not even very homogeneous and it should eventually be
|
means complete, it is not even very homogeneous and it should eventually be
|
||||||
superseded by a complete ELinks Book.
|
superseded by a complete ELinks Book. Until this happens you may also find it
|
||||||
|
necessary to refer to the manual page for a very quick reference, or the
|
||||||
|
built-in documentation available via the --long-help and --config-help ELinks
|
||||||
|
command-line arguments. The built-in documentation is sure to be up-to-date.
|
||||||
|
|
||||||
There was a complete (or, for the most part complete) manual for Links 0.82 at
|
There was a complete (or, for the most part complete) manual for Links 0.82 at
|
||||||
one time, and you can still find it at:
|
one time, and you can still find it at:
|
||||||
|
@ -38,9 +38,9 @@ while (<>)
|
|||||||
{
|
{
|
||||||
my $end = s/\s*\*+\//\n/ ? 'yes' : undef;
|
my $end = s/\s*\*+\//\n/ ? 'yes' : undef;
|
||||||
|
|
||||||
if ($end and /[^=]*[\s*](\w+)[\s:,;].*\/\*:\s*(.*)/) {
|
if ($end and /[^=]*[\s*](\w+)[\s:,;].*\/\*:\s*(.*)([.]\s*)?$/) {
|
||||||
# Implicit id for enum values and struct members.
|
# Implicit id for enum values and struct members.
|
||||||
print "\nid:[$idpath$1]::\n\t$2\n";
|
print "\nid:[$idpath$1]::\n\t$2.\n";
|
||||||
|
|
||||||
} elsif ($inblock) {
|
} elsif ($inblock) {
|
||||||
# Redo the indentation, preserve empty lines.
|
# Redo the indentation, preserve empty lines.
|
||||||
@ -59,10 +59,13 @@ while (<>)
|
|||||||
|
|
||||||
my $orig_title = $title;
|
my $orig_title = $title;
|
||||||
|
|
||||||
if (not /^#define\s/) {
|
|
||||||
|
# Combine multi-line declarations to one. Break at empty
|
||||||
|
# for #define ...
|
||||||
while (not /(struct|enum|typedef|[^=])*[\s*](\w+).*[\[:,;{]/) {
|
while (not /(struct|enum|typedef|[^=])*[\s*](\w+).*[\[:,;{]/) {
|
||||||
|
my $line = $_;
|
||||||
$_ .= <>;
|
$_ .= <>;
|
||||||
}
|
last if $_ eq $line;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/struct\s+(\w+)\s*{/) {
|
if (/struct\s+(\w+)\s*{/) {
|
||||||
@ -73,37 +76,36 @@ while (<>)
|
|||||||
$title = "enum:$1" . "[$title]";
|
$title = "enum:$1" . "[$title]";
|
||||||
$idpath = "";
|
$idpath = "";
|
||||||
|
|
||||||
} elsif (/#define\s+(\w+)[(]/) {
|
} elsif (/#define/) {
|
||||||
|
if (/#define\s+(\w+)[(]/) {
|
||||||
$title = "func:$1" . "[$title]";
|
$title = "func:$1" . "[$title]";
|
||||||
$idpath = "";
|
|
||||||
|
|
||||||
} elsif (/#define\s+(\w+)/) {
|
} elsif (/#define\s+(\w+)/) {
|
||||||
$title = "macro:$1" . "[$title]";
|
$title = "macro:$1" . "[$title]";
|
||||||
|
}
|
||||||
$idpath = "";
|
$idpath = "";
|
||||||
|
|
||||||
} else {
|
} elsif (/typedef/) {
|
||||||
if (/typedef/) {
|
|
||||||
if (/.*\(\*(\w+)\)\(/) {
|
if (/.*\(\*(\w+)\)\(/) {
|
||||||
$title = "typedef:$1" . "[$title]";
|
$title = "typedef:$1" . "[$title]";
|
||||||
} elsif (/typedef.*\s(\w+);/) {
|
} elsif (/typedef.*\s(\w+);/) {
|
||||||
$title = "typedef:$1" . "[$title]";
|
$title = "typedef:$1" . "[$title]";
|
||||||
}
|
}
|
||||||
$idpath = "";
|
$idpath = "";
|
||||||
} else {
|
|
||||||
if (/.*[\s*](\w+)\(/) {
|
} elsif (/.*[\s*](\w+)\(/) {
|
||||||
$title = "func:$1" . "[$title]";
|
$title = "func:$1" . "[$title]";
|
||||||
$idpath = "";
|
$idpath = "";
|
||||||
|
|
||||||
} elsif (/.*\(\*(\w+)\)\(/) {
|
} elsif (/.*\(\*(\w+)\)\(/) {
|
||||||
$body = "#newline#" . $title if not $body;
|
$body = "#newline#" . $title if not $body;
|
||||||
$title = "id:[$idpath$1]::";
|
$title = "id:[$idpath$1]::";
|
||||||
$indent = "\t";
|
$indent = "\t";
|
||||||
|
|
||||||
} elsif (/[^=]*[\s*](\w+)[\[\s,:;]/) {
|
} elsif (/[^=]*[\s*](\w+)[\[\s,:;]/) {
|
||||||
$body = "#newline#" . $title if not $body;
|
$body = "#newline#" . $title if not $body;
|
||||||
$title = "id:[$idpath$1]::";
|
$title = "id:[$idpath$1]::";
|
||||||
$indent = "\t";
|
$indent = "\t";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
put_section if $orig_title ne $title;
|
put_section if $orig_title ne $title;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
@ -5,102 +5,25 @@
|
|||||||
# and hopefully other in the future.
|
# and hopefully other in the future.
|
||||||
|
|
||||||
# Updated by option handlind via --elinks=path/to/elinks option
|
# Updated by option handlind via --elinks=path/to/elinks option
|
||||||
elinks="elinks"
|
elinks="$1"
|
||||||
|
option="$2"
|
||||||
# Utility functions {{{1
|
|
||||||
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
msg="$1"
|
|
||||||
echo "$msg" >&2
|
|
||||||
echo "`basename $0` ($script_version)" >&2
|
|
||||||
echo "Usage: $0 [ --cmdoptions | --elinksconf | - | --elinks=path/to/elinks ]" >&2
|
|
||||||
cat >&2 <<END_OF_USAGE
|
|
||||||
--cmdoptions Print asciidoc markup with summary of the command options
|
|
||||||
--elinksconf Print the elinks.conf.5 manpage
|
|
||||||
- Read option info (elinks --config-help) from stdin
|
|
||||||
--elinks=path Use the elinks program with the given path
|
|
||||||
END_OF_USAGE
|
|
||||||
exit -1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Option handling {{{1
|
# Option handling {{{1
|
||||||
|
|
||||||
command=
|
command=
|
||||||
filter=cat
|
|
||||||
prev_option=
|
|
||||||
|
|
||||||
for option
|
|
||||||
do
|
|
||||||
# If the previous option needs an argument, assign it.
|
|
||||||
if test -n "$prev_option"; then
|
|
||||||
eval "$prev_option=\$option"
|
|
||||||
prev_option=
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$option" in
|
case "$option" in
|
||||||
--cmdoptions)
|
*command*)
|
||||||
command="$elinks -long-help"
|
|
||||||
filter="sed 0,/^Options:/d"
|
filter="sed 0,/^Options:/d"
|
||||||
backend="cmdoptions"
|
option=--long-help
|
||||||
;;
|
;;
|
||||||
--elinksconf)
|
*config*)
|
||||||
command="$elinks -config-help"
|
|
||||||
filter="sed 0,/^Configuration/d"
|
filter="sed 0,/^Configuration/d"
|
||||||
backend="elinksconf"
|
option=--config-help
|
||||||
;;
|
|
||||||
-)
|
|
||||||
command="cat /dev/stdin"
|
|
||||||
;;
|
|
||||||
--elinks=*)
|
|
||||||
elinks="`echo $option | sed -e 's/.*=//'`"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
usage "Unknown option"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
|
||||||
|
|
||||||
if test -z "$backend";
|
print_description_line()
|
||||||
then
|
|
||||||
usage "No backend defined"
|
|
||||||
fi
|
|
||||||
|
|
||||||
date_string=`date -I`
|
|
||||||
script_version=`echo "\\$Revision: 1.19 $" | sed -e 's/\\$\(.*\) \\$/\1/'`
|
|
||||||
elinks_version="`$elinks -version | head -n 1 | sed -e 's/ELinks \([0-9][^ ]*\).*/\1/'`"
|
|
||||||
script_info="Generated by `basename $0` ($script_version) on $date_string"
|
|
||||||
script_info="$script_info using output from ELinks version $elinks_version."
|
|
||||||
dist_info="`basename $0` is distributed with ELinks under the terms of the GPL."
|
|
||||||
|
|
||||||
# Backends {{{1
|
|
||||||
|
|
||||||
print_header="print_${backend}_header"
|
|
||||||
print_footer="print_${backend}_footer"
|
|
||||||
print_description_end="print_${backend}_description_end"
|
|
||||||
print_description_line="print_${backend}_description_line"
|
|
||||||
print_option_tree="print_${backend}_option_tree"
|
|
||||||
print_option_type="print_${backend}_option_type"
|
|
||||||
|
|
||||||
# --cmdoptions backend {{{2
|
|
||||||
|
|
||||||
print_cmdoptions_header()
|
|
||||||
{
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
print_cmdoptions_footer()
|
|
||||||
{
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
print_cmdoptions_description_end()
|
|
||||||
{
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
print_cmdoptions_description_line()
|
|
||||||
{
|
{
|
||||||
line="$1"
|
line="$1"
|
||||||
number="$2"
|
number="$2"
|
||||||
@ -124,12 +47,14 @@ print_cmdoptions_description_line()
|
|||||||
echo " $line"
|
echo " $line"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_cmdoptions_option_tree()
|
print_option_tree()
|
||||||
{
|
{
|
||||||
parse_description=
|
title="$1"
|
||||||
|
path="$2"
|
||||||
|
echo "$path::"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_cmdoptions_option_type()
|
print_option_type()
|
||||||
{
|
{
|
||||||
path="$1"
|
path="$1"
|
||||||
typeid="$2"
|
typeid="$2"
|
||||||
@ -153,130 +78,10 @@ print_cmdoptions_option_type()
|
|||||||
then
|
then
|
||||||
typestring="$default"
|
typestring="$default"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$typestring::"
|
echo "$typestring::"
|
||||||
}
|
}
|
||||||
|
|
||||||
# --elinksconf backend {{{2
|
|
||||||
|
|
||||||
print_elinksconf_header()
|
|
||||||
{
|
|
||||||
cat << __END__
|
|
||||||
.\" elinks.conf.5
|
|
||||||
.\"
|
|
||||||
.\" $script_info
|
|
||||||
.\"
|
|
||||||
.\" Copyleft (c) 2002-2004 The ELinks project
|
|
||||||
.\"
|
|
||||||
.\" This file may be distributed under the terms of the GNU
|
|
||||||
.\" General Public License. <www.gnu.org/licenses/gpl.html>
|
|
||||||
.\"
|
|
||||||
.\" Process this file with groff -man -Tascii elinks.conf.5
|
|
||||||
.TH ELINKS.CONF 5 "ELinks configuration file" "$date_string" "ELinks configuration file"
|
|
||||||
|
|
||||||
.SH NAME
|
|
||||||
elinks.conf \- ELinks configuration file
|
|
||||||
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
.B elinks.conf
|
|
||||||
file contains configuration information for ELinks. It can be used to configure
|
|
||||||
the behaviour of ELinks in a wide variety of ways: protocol behaviour,
|
|
||||||
keybindings, colors used for rendering and for the user interface.
|
|
||||||
.PP
|
|
||||||
It is read at startup and saved only when requested. All options described in
|
|
||||||
this document can be fully configured from within ELinks so no editing of
|
|
||||||
elinks.conf is needed.
|
|
||||||
.PP
|
|
||||||
Note that MIME-related options used for specifying handlers of various MIME
|
|
||||||
types are NOT described in this document. Documentation for these options can be
|
|
||||||
found at the ELinks homepage. Keybindings can also be specified in elinks.conf.
|
|
||||||
This is described in the elinkskeys(5) man page.
|
|
||||||
|
|
||||||
.SH SYNTAX
|
|
||||||
.PP
|
|
||||||
The syntax of the configuration file is very simple. The elinks.conf file is a
|
|
||||||
free-form ASCII text file. The file may contain extra tabs and newlines for
|
|
||||||
formatting purposes. Keywords in the file are case-sensitive. Comments may be
|
|
||||||
placed anywhere within the file (except within quotes). Comments begin with the
|
|
||||||
# character and end at the end of the line.
|
|
||||||
|
|
||||||
.SH EXAMPLES
|
|
||||||
.PP
|
|
||||||
Some sample settings:
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
# Use asynchronous DNS resolver?
|
|
||||||
set connection.async_dns = 1
|
|
||||||
# horizontal text margin.
|
|
||||||
set document.browse.margin_width = 3
|
|
||||||
# Default document codepage.
|
|
||||||
set document.codepage.assume = "ISO-8859-1"
|
|
||||||
# User defined protocol handlers
|
|
||||||
set protocol.user.mailto.unix = "mutt %h -s \e\*(lq%s\e\*(rq"
|
|
||||||
|
|
||||||
.SH OPTIONS
|
|
||||||
__END__
|
|
||||||
}
|
|
||||||
|
|
||||||
elinks=
|
|
||||||
|
|
||||||
print_elinksconf_footer()
|
|
||||||
{
|
|
||||||
version="$1"
|
|
||||||
echo ".SH \"DOCUMENT INFO\""
|
|
||||||
echo ".PP"
|
|
||||||
echo "$script_info"
|
|
||||||
echo "$dist_info"
|
|
||||||
echo ".SH \"SEE ALSO\""
|
|
||||||
echo ".BR elinks (1),"
|
|
||||||
echo ".BR elinkskeys (5)"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_elinksconf_description_end()
|
|
||||||
{
|
|
||||||
if test -n "$parse_int_option";
|
|
||||||
then
|
|
||||||
echo ".PD"
|
|
||||||
echo ".RE"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
print_elinksconf_description_line()
|
|
||||||
{
|
|
||||||
line="$1"
|
|
||||||
number="$2"
|
|
||||||
if test -n "$number";
|
|
||||||
then
|
|
||||||
if test "$parse_int_option" = "1";
|
|
||||||
then
|
|
||||||
echo ".RS"
|
|
||||||
echo ".PD 0"
|
|
||||||
parse_int_option=2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ".TP"
|
|
||||||
echo ".B $number"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$line"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_elinksconf_option_tree()
|
|
||||||
{
|
|
||||||
title="$1"
|
|
||||||
path="$2"
|
|
||||||
echo ".SS $title ($path)"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_elinksconf_option_type()
|
|
||||||
{
|
|
||||||
path="$1"
|
|
||||||
typeid="$2"
|
|
||||||
default="$3"
|
|
||||||
echo ".TP"
|
|
||||||
echo "\\f3$path\\f2 $typeid\\f1 ($default)"
|
|
||||||
}
|
|
||||||
|
|
||||||
# The main loop {{{1
|
# The main loop {{{1
|
||||||
|
|
||||||
@ -285,9 +90,7 @@ parse_description=
|
|||||||
parse_int_option=
|
parse_int_option=
|
||||||
use_log=
|
use_log=
|
||||||
|
|
||||||
$print_header
|
"$elinks" $option | $filter | while read line
|
||||||
|
|
||||||
$command | $filter | while read line
|
|
||||||
do
|
do
|
||||||
if test -n "$parse_description"
|
if test -n "$parse_description"
|
||||||
then
|
then
|
||||||
@ -295,7 +98,7 @@ do
|
|||||||
# the desciption is over.
|
# the desciption is over.
|
||||||
if test -z "$line"
|
if test -z "$line"
|
||||||
then
|
then
|
||||||
$print_description_end
|
echo
|
||||||
parse_description=
|
parse_description=
|
||||||
parse_int_option=
|
parse_int_option=
|
||||||
continue
|
continue
|
||||||
@ -318,7 +121,7 @@ do
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$print_description_line "$line" "$number"
|
print_description_line "$line" "$number"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -329,7 +132,7 @@ do
|
|||||||
parse_description=1
|
parse_description=1
|
||||||
title="`echo $line | sed -e 's/\([A-Z]*\):.*/\1/'`"
|
title="`echo $line | sed -e 's/\([A-Z]*\):.*/\1/'`"
|
||||||
path="`echo $line | sed -e 's/.*: (\([a-z_].*\))/\1/'`"
|
path="`echo $line | sed -e 's/.*: (\([a-z_].*\))/\1/'`"
|
||||||
$print_option_tree "$title" "$path"
|
print_option_tree "$title" "$path"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
[a-z_-]*[.a-z_-]*)
|
[a-z_-]*[.a-z_-]*)
|
||||||
@ -337,7 +140,7 @@ do
|
|||||||
path="`echo $line | sed -e 's/\([a-z-][^ ]*\).*/\1/'`"
|
path="`echo $line | sed -e 's/\([a-z-][^ ]*\).*/\1/'`"
|
||||||
typeid="`echo $line | sed -e 's/[ ]*[a-z-][^ ]* \([^ ]*\).*/\1/'`"
|
typeid="`echo $line | sed -e 's/[ ]*[a-z-][^ ]* \([^ ]*\).*/\1/'`"
|
||||||
default="`echo \"$line\" | sed -e 's/[^(]*(\(.*\))/\1/'`"
|
default="`echo \"$line\" | sed -e 's/[^(]*(\(.*\))/\1/'`"
|
||||||
$print_option_type "$path" "$typeid" "$default"
|
print_option_type "$path" "$typeid" "$default"
|
||||||
if test "$typeid" = "<num>";
|
if test "$typeid" = "<num>";
|
||||||
then
|
then
|
||||||
parse_int_option=1
|
parse_int_option=1
|
||||||
@ -349,6 +152,8 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
$print_footer
|
version="`$elinks -version | head -n 1 | sed -e 's/ELinks \([0-9][^ ]*\).*/\1/'`"
|
||||||
|
echo "Generated using output from ELinks version $version."
|
||||||
|
|
||||||
|
|
||||||
# vim: tabstop=4 shiftwidth=4
|
# vim: tabstop=4 shiftwidth=4
|
||||||
|
@ -16,12 +16,22 @@
|
|||||||
|
|
||||||
KBDBIND=$1
|
KBDBIND=$1
|
||||||
CONFIGDIR=$(dirname "$KBDBIND")
|
CONFIGDIR=$(dirname "$KBDBIND")
|
||||||
|
OUTPUT=$2
|
||||||
|
|
||||||
test -d "$CONFIGDIR" || exit
|
test -d "$CONFIGDIR" || exit
|
||||||
|
|
||||||
|
print_title()
|
||||||
|
{
|
||||||
|
echo "$1" | tr 'a-z' 'A-Z'
|
||||||
|
echo "$1" | sed 's/[^~]/~/g'
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
print_keymap_actions()
|
print_keymap_actions()
|
||||||
{
|
{
|
||||||
keymap=$1
|
keymap="$1"
|
||||||
|
|
||||||
|
print_title "$keymap ACTIONS"
|
||||||
|
|
||||||
echo 'ifdef::backend-xhtml11[]'
|
echo 'ifdef::backend-xhtml11[]'
|
||||||
echo '`----------------------------------`----------------------------------------------------------------------------'
|
echo '`----------------------------------`----------------------------------------------------------------------------'
|
||||||
@ -40,7 +50,9 @@ print_keymap_actions()
|
|||||||
[ "$action" = " *scripting-function*" ] && continue
|
[ "$action" = " *scripting-function*" ] && continue
|
||||||
|
|
||||||
echo 'ifdef::backend-docbook[]'
|
echo 'ifdef::backend-docbook[]'
|
||||||
echo "$action:: $caption."
|
echo "$action::"
|
||||||
|
echo " $caption."
|
||||||
|
echo
|
||||||
echo 'endif::backend-docbook[]'
|
echo 'endif::backend-docbook[]'
|
||||||
echo 'ifdef::backend-xhtml11[]'
|
echo 'ifdef::backend-xhtml11[]'
|
||||||
printf "%-34s %s\n" "$action" "$caption"
|
printf "%-34s %s\n" "$action" "$caption"
|
||||||
@ -57,6 +69,8 @@ print_keymap_defaults()
|
|||||||
keymap="$1"
|
keymap="$1"
|
||||||
KEYMAP=$(echo $1 | tr '[a-z]' '[A-Z]')
|
KEYMAP=$(echo $1 | tr '[a-z]' '[A-Z]')
|
||||||
|
|
||||||
|
print_title "$keymap KEYS"
|
||||||
|
|
||||||
echo 'ifdef::backend-xhtml11[]'
|
echo 'ifdef::backend-xhtml11[]'
|
||||||
echo '`-----------`-------------------------------------------------------------------------------'
|
echo '`-----------`-------------------------------------------------------------------------------'
|
||||||
echo 'Key Description (Action)'
|
echo 'Key Description (Action)'
|
||||||
@ -84,8 +98,8 @@ print_keymap_defaults()
|
|||||||
key="Space"
|
key="Space"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
key=$(echo "$key" | sed "s/^'\(.*\)'/\1/" \
|
key=$(echo "$key" | sed "s/^'\(.*\)'$/\1/" \
|
||||||
| sed "s/'/\\\\'/")
|
| sed "s/'/{squote}/")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -95,19 +109,10 @@ print_keymap_defaults()
|
|||||||
*) modifier="" ;;
|
*) modifier="" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$DOCTYPE" in
|
echo 'ifdef::backend-docbook[]'
|
||||||
man)
|
|
||||||
echo
|
|
||||||
echo "'$modifier$key'::"
|
echo "'$modifier$key'::"
|
||||||
echo " $action"
|
echo " $action"
|
||||||
;;
|
echo
|
||||||
html)
|
|
||||||
printf "%-11s %s\n" "$modifier$key" "$action"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo 'ifdef::backend-docbook[]'
|
|
||||||
echo "'$modifier$key':: $action"
|
|
||||||
echo 'endif::backend-docbook[]'
|
echo 'endif::backend-docbook[]'
|
||||||
echo 'ifdef::backend-xhtml11[]'
|
echo 'ifdef::backend-xhtml11[]'
|
||||||
printf "%-11s %s\n" "$modifier$key" "$action"
|
printf "%-11s %s\n" "$modifier$key" "$action"
|
||||||
@ -115,42 +120,18 @@ print_keymap_defaults()
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo 'ifdef::backend-xhtml11[]'
|
echo 'ifdef::backend-xhtml11[]'
|
||||||
|
|
||||||
echo '--------------------------------------------------------------------------------------------'
|
echo '--------------------------------------------------------------------------------------------'
|
||||||
echo 'endif::backend-xhtml11[]'
|
echo 'endif::backend-xhtml11[]'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cat > keymap-actions.txt << __END__
|
print_keymap_doc=
|
||||||
MAIN ACTIONS
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
$(print_keymap_actions main)
|
case "$OUTPUT" in
|
||||||
|
*default*) print_keymap_doc="print_keymap_defaults" ;;
|
||||||
|
*action*) print_keymap_doc="print_keymap_actions" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
EDIT ACTIONS
|
$print_keymap_doc main
|
||||||
~~~~~~~~~~~~
|
$print_keymap_doc edit
|
||||||
|
$print_keymap_doc menu
|
||||||
$(print_keymap_actions edit)
|
|
||||||
|
|
||||||
MENU ACTIONS
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
$(print_keymap_actions menu)
|
|
||||||
__END__
|
|
||||||
|
|
||||||
cat > keymap-defaults.txt << __END__
|
|
||||||
MAIN KEYS
|
|
||||||
~~~~~~~~~
|
|
||||||
|
|
||||||
$(print_keymap_defaults main)
|
|
||||||
|
|
||||||
EDIT KEYS
|
|
||||||
~~~~~~~~~
|
|
||||||
|
|
||||||
$(print_keymap_defaults edit)
|
|
||||||
|
|
||||||
MENU KEYS
|
|
||||||
~~~~~~~~~
|
|
||||||
|
|
||||||
$(print_keymap_defaults menu)
|
|
||||||
__END__
|
|
@ -3,11 +3,11 @@ include $(top_builddir)/Makefile.config
|
|||||||
|
|
||||||
SUBDIRS-$(CONFIG_BOOKMARKS) += bookmarks
|
SUBDIRS-$(CONFIG_BOOKMARKS) += bookmarks
|
||||||
SUBDIRS-$(CONFIG_COOKIES) += cookies
|
SUBDIRS-$(CONFIG_COOKIES) += cookies
|
||||||
|
SUBDIRS-$(CONFIG_DOM) += dom
|
||||||
|
SUBDIRS-$(CONFIG_ECMASCRIPT) += ecmascript
|
||||||
SUBDIRS-$(CONFIG_FORMHIST) += formhist
|
SUBDIRS-$(CONFIG_FORMHIST) += formhist
|
||||||
SUBDIRS-$(CONFIG_GLOBHIST) += globhist
|
SUBDIRS-$(CONFIG_GLOBHIST) += globhist
|
||||||
SUBDIRS-$(CONFIG_ECMASCRIPT) += ecmascript
|
|
||||||
SUBDIRS-$(CONFIG_SCRIPTING) += scripting
|
SUBDIRS-$(CONFIG_SCRIPTING) += scripting
|
||||||
SUBDIRS-$(CONFIG_DOM) += dom
|
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
bfu \
|
bfu \
|
||||||
@ -37,7 +37,7 @@ OBJS = vernum.o
|
|||||||
vernum.o: FORCE
|
vernum.o: FORCE
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
elinks: lib.o
|
elinks: $(LIB_O_NAME)
|
||||||
$(call cmd,link)
|
$(call cmd,link)
|
||||||
|
|
||||||
PROGS = elinks
|
PROGS = elinks
|
||||||
|
@ -981,7 +981,6 @@ render_dom_document(struct cache_entry *cached, struct document *document,
|
|||||||
unsigned char *string = struri(cached->uri);
|
unsigned char *string = struri(cached->uri);
|
||||||
size_t length = strlen(string);
|
size_t length = strlen(string);
|
||||||
struct dom_string uri = INIT_DOM_STRING(string, length);
|
struct dom_string uri = INIT_DOM_STRING(string, length);
|
||||||
struct dom_string source = INIT_DOM_STRING(buffer->source, buffer->length);
|
|
||||||
enum sgml_parser_code code;
|
enum sgml_parser_code code;
|
||||||
|
|
||||||
convert_table = get_convert_table(head, document->options.cp,
|
convert_table = get_convert_table(head, document->options.cp,
|
||||||
@ -1035,7 +1034,7 @@ render_dom_document(struct cache_entry *cached, struct document *document,
|
|||||||
* However, it will be useful when we will be able to also
|
* However, it will be useful when we will be able to also
|
||||||
* incrementally parse new data. This will require the parser to live
|
* incrementally parse new data. This will require the parser to live
|
||||||
* during the fetching of data. */
|
* during the fetching of data. */
|
||||||
code = parse_sgml(parser, &source, 1);
|
code = parse_sgml(parser, buffer->source, buffer->length, 1);
|
||||||
if (parser->root) {
|
if (parser->root) {
|
||||||
assert(parser->stack.depth == 1);
|
assert(parser->stack.depth == 1);
|
||||||
|
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
/* SGML node handling */
|
/* DocBook SGML info */
|
||||||
/* $Id: docbook.c,v 1.1.2.24 2004/02/29 02:47:30 jonas Exp $ */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "elinks.h"
|
#include "elinks.h"
|
||||||
|
|
||||||
#include "dom/sgml/docbook/docbook.h"
|
#include "dom/sgml/docbook/docbook.h"
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
/* SGML node handling */
|
/* HTML SGML info */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "elinks.h"
|
#include "elinks.h"
|
||||||
|
|
||||||
#include "dom/sgml/html/html.h"
|
#include "dom/sgml/html/html.h"
|
||||||
|
@ -19,20 +19,6 @@
|
|||||||
#include "util/memory.h"
|
#include "util/memory.h"
|
||||||
|
|
||||||
|
|
||||||
/* This holds info about a chunk of text being parsed. The SGML parser uses
|
|
||||||
* these to keep track of possible nested calls to parse_sgml(). This can be
|
|
||||||
* used to feed output of stuff like ECMAScripts document.write() from
|
|
||||||
* <script>-elements back to the SGML parser. */
|
|
||||||
struct sgml_parsing_state {
|
|
||||||
struct dom_scanner scanner;
|
|
||||||
struct dom_node *node;
|
|
||||||
size_t depth;
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct sgml_parsing_state *
|
|
||||||
init_sgml_parsing_state(struct sgml_parser *parser, struct dom_string *buffer);
|
|
||||||
|
|
||||||
|
|
||||||
/* When getting the sgml_parser struct it is _always_ assumed that the parser
|
/* When getting the sgml_parser struct it is _always_ assumed that the parser
|
||||||
* is the first to add it's context, which it is since it initializes the
|
* is the first to add it's context, which it is since it initializes the
|
||||||
* stack. */
|
* stack. */
|
||||||
@ -400,10 +386,11 @@ parse_sgml_plain(struct dom_stack *stack, struct dom_scanner *scanner)
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum sgml_parser_code
|
enum sgml_parser_code
|
||||||
parse_sgml(struct sgml_parser *parser, struct dom_string *buffer, int complete)
|
parse_sgml(struct sgml_parser *parser, unsigned char *buf, size_t bufsize,
|
||||||
|
int complete)
|
||||||
{
|
{
|
||||||
struct sgml_parsing_state *parsing;
|
struct dom_string source = INIT_DOM_STRING(buf, bufsize);
|
||||||
enum sgml_parser_code code;
|
struct dom_node *node;
|
||||||
|
|
||||||
if (complete)
|
if (complete)
|
||||||
parser->flags |= SGML_PARSER_COMPLETE;
|
parser->flags |= SGML_PARSER_COMPLETE;
|
||||||
@ -415,14 +402,13 @@ parse_sgml(struct sgml_parser *parser, struct dom_string *buffer, int complete)
|
|||||||
get_dom_stack_top(&parser->stack)->immutable = 1;
|
get_dom_stack_top(&parser->stack)->immutable = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
parsing = init_sgml_parsing_state(parser, buffer);
|
node = init_dom_node(DOM_NODE_TEXT, &source);
|
||||||
if (!parsing) return SGML_PARSER_CODE_MEM_ALLOC;
|
if (!node || !push_dom_node(&parser->parsing, node))
|
||||||
|
return SGML_PARSER_CODE_MEM_ALLOC;
|
||||||
code = parse_sgml_plain(&parser->stack, &parsing->scanner);
|
|
||||||
|
|
||||||
pop_dom_node(&parser->parsing);
|
pop_dom_node(&parser->parsing);
|
||||||
|
|
||||||
return code;
|
return parser->code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -433,6 +419,13 @@ parse_sgml(struct sgml_parser *parser, struct dom_string *buffer, int complete)
|
|||||||
* example this can allows output of the document.write() from DOM scripting
|
* example this can allows output of the document.write() from DOM scripting
|
||||||
* interface to be parsed. */
|
* interface to be parsed. */
|
||||||
|
|
||||||
|
/* This holds info about a chunk of text being parsed. */
|
||||||
|
struct sgml_parsing_state {
|
||||||
|
struct dom_scanner scanner;
|
||||||
|
struct dom_node *node;
|
||||||
|
size_t depth;
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sgml_parsing_push(struct dom_stack *stack, struct dom_node *node, void *data)
|
sgml_parsing_push(struct dom_stack *stack, struct dom_node *node, void *data)
|
||||||
{
|
{
|
||||||
@ -448,6 +441,7 @@ sgml_parsing_push(struct dom_stack *stack, struct dom_node *node, void *data)
|
|||||||
init_dom_scanner(&parsing->scanner, &sgml_scanner_info, &node->string,
|
init_dom_scanner(&parsing->scanner, &sgml_scanner_info, &node->string,
|
||||||
SGML_STATE_TEXT, count_lines, complete, incremental,
|
SGML_STATE_TEXT, count_lines, complete, incremental,
|
||||||
detect_errors);
|
detect_errors);
|
||||||
|
parser->code = parse_sgml_plain(&parser->stack, &parsing->scanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -502,22 +496,6 @@ static struct dom_stack_context_info sgml_parsing_context_info = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Create a new parsing state by pushing a new text node containing the*/
|
|
||||||
static struct sgml_parsing_state *
|
|
||||||
init_sgml_parsing_state(struct sgml_parser *parser, struct dom_string *buffer)
|
|
||||||
{
|
|
||||||
struct dom_stack_state *state;
|
|
||||||
struct dom_node *node;
|
|
||||||
|
|
||||||
node = init_dom_node(DOM_NODE_TEXT, buffer);
|
|
||||||
if (!node || !push_dom_node(&parser->parsing, node))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
state = get_dom_stack_top(&parser->parsing);
|
|
||||||
|
|
||||||
return get_dom_stack_state_data(parser->parsing.contexts[0], state);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
get_sgml_parser_line_number(struct sgml_parser *parser)
|
get_sgml_parser_line_number(struct sgml_parser *parser)
|
||||||
{
|
{
|
||||||
|
@ -101,6 +101,7 @@ struct sgml_parser {
|
|||||||
struct dom_string uri; /*: The URI of the DOM document */
|
struct dom_string uri; /*: The URI of the DOM document */
|
||||||
struct dom_node *root; /*: The document root node */
|
struct dom_node *root; /*: The document root node */
|
||||||
|
|
||||||
|
enum sgml_parser_code code; /*: The latest (error) code */
|
||||||
sgml_error_T error_func; /*: Called for detected errors */
|
sgml_error_T error_func; /*: Called for detected errors */
|
||||||
|
|
||||||
struct dom_stack stack; /*: A stack for tracking parsed nodes */
|
struct dom_stack stack; /*: A stack for tracking parsed nodes */
|
||||||
@ -137,14 +138,15 @@ void done_sgml_parser(struct sgml_parser *parser);
|
|||||||
* signals through the `complete` parameter.
|
* signals through the `complete` parameter.
|
||||||
*
|
*
|
||||||
* parser:: A parser created with ref:[init_sgml_parser].
|
* parser:: A parser created with ref:[init_sgml_parser].
|
||||||
* buffer:: A string containing the chunk to parse.
|
* buf:: A buffer containing the chunk to parse.
|
||||||
|
* bufsize:: The size of the buffer given in the buf parameter.
|
||||||
* complete:: Whether this is the last chunk to parse.
|
* complete:: Whether this is the last chunk to parse.
|
||||||
*
|
*
|
||||||
* The returned code is ref:[SGML_PARSER_CODE_OK] if the buffer was
|
* The returned code is ref:[SGML_PARSER_CODE_OK] if the buffer was
|
||||||
* successfully parserd, else a code hinting at the error.
|
* successfully parserd, else a code hinting at the error.
|
||||||
*/
|
*/
|
||||||
enum sgml_parser_code
|
enum sgml_parser_code
|
||||||
parse_sgml(struct sgml_parser *parser, struct dom_string *buffer, int complete);
|
parse_sgml(struct sgml_parser *parser, unsigned char *buf, size_t bufsize, int complete);
|
||||||
|
|
||||||
/** Get the line position in the source
|
/** Get the line position in the source
|
||||||
*
|
*
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
/* SGML node handling */
|
/* RSS SGML info */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "elinks.h"
|
#include "elinks.h"
|
||||||
|
|
||||||
#include "dom/sgml/rss/rss.h"
|
#include "dom/sgml/rss/rss.h"
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
/* SGML node handling */
|
/* XBEL SGML info */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "elinks.h"
|
#include "elinks.h"
|
||||||
|
|
||||||
#include "dom/sgml/xbel/xbel.h"
|
#include "dom/sgml/xbel/xbel.h"
|
||||||
|
@ -7,7 +7,7 @@ TEST_PROGS = \
|
|||||||
sgml-parser
|
sgml-parser
|
||||||
|
|
||||||
TESTDEPS = \
|
TESTDEPS = \
|
||||||
$(top_builddir)/src/dom/lib.o \
|
$(top_builddir)/src/dom/$(LIB_O_NAME) \
|
||||||
$(top_builddir)/src/util/error.o \
|
$(top_builddir)/src/util/error.o \
|
||||||
$(top_builddir)/src/osdep/stub.o \
|
$(top_builddir)/src/osdep/stub.o \
|
||||||
$(top_builddir)/src/util/hash.o \
|
$(top_builddir)/src/util/hash.o \
|
||||||
|
@ -312,7 +312,7 @@ main(int argc, char *argv[])
|
|||||||
parser->error_func = sgml_error_function;
|
parser->error_func = sgml_error_function;
|
||||||
add_dom_stack_context(&parser->stack, NULL, &sgml_parser_test_context_info);
|
add_dom_stack_context(&parser->stack, NULL, &sgml_parser_test_context_info);
|
||||||
|
|
||||||
code = parse_sgml(parser, &source, complete);
|
code = parse_sgml(parser, source.string, source.length, complete);
|
||||||
if (parser->root) {
|
if (parser->root) {
|
||||||
size_t root_offset = parser->stack.depth - 1;
|
size_t root_offset = parser->stack.depth - 1;
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@ top_builddir=../..
|
|||||||
include $(top_builddir)/Makefile.config
|
include $(top_builddir)/Makefile.config
|
||||||
INCLUDES += $(SPIDERMONKEY_CFLAGS)
|
INCLUDES += $(SPIDERMONKEY_CFLAGS)
|
||||||
|
|
||||||
|
SUBDIRS-$(CONFIG_ECMASCRIPT_SEE) += see
|
||||||
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
|
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
|
||||||
SUBDIRS-$(CONFIG_SEE) += see
|
|
||||||
|
|
||||||
|
OBJS-$(CONFIG_ECMASCRIPT_SEE) += see.o
|
||||||
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey.o
|
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey.o
|
||||||
OBJS-$(CONFIG_SEE) += see.o
|
|
||||||
|
|
||||||
OBJS = ecmascript.o
|
OBJS = ecmascript.o
|
||||||
|
|
||||||
|
@ -146,15 +146,17 @@ document_get(struct SEE_interpreter *interp, struct SEE_object *o,
|
|||||||
struct form_view *form_view;
|
struct form_view *form_view;
|
||||||
struct js_form *form_object;
|
struct js_form *form_object;
|
||||||
|
|
||||||
|
if (!string) return;
|
||||||
|
|
||||||
foreach (form, document->forms) {
|
foreach (form, document->forms) {
|
||||||
if (!form->name || strcasecmp(string, form->name))
|
if (!form->name || strcasecmp(string, form->name))
|
||||||
continue;
|
continue;
|
||||||
mem_free_if(string);
|
|
||||||
form_view = find_form_view(doc_view, form);
|
form_view = find_form_view(doc_view, form);
|
||||||
form_object = js_get_form_object(interp, doc, form_view);
|
form_object = js_get_form_object(interp, doc, form_view);
|
||||||
SEE_SET_OBJECT(res, (struct SEE_object *)form_object);
|
SEE_SET_OBJECT(res, (struct SEE_object *)form_object);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
mem_free(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -603,10 +603,10 @@ form_elems_get(struct SEE_interpreter *interp, struct SEE_object *o,
|
|||||||
}
|
}
|
||||||
SEE_SET_STRING(&argv, p);
|
SEE_SET_STRING(&argv, p);
|
||||||
if (string[0] >= '0' && string[1] <= '9') {
|
if (string[0] >= '0' && string[1] <= '9') {
|
||||||
js_form_elems_item(interp, o, NULL, 1,
|
js_form_elems_item(interp, o, o, 1,
|
||||||
(struct SEE_value **)&argv, res);
|
(struct SEE_value **)&argv, res);
|
||||||
} else {
|
} else {
|
||||||
js_form_elems_namedItem(interp, o, NULL, 1,
|
js_form_elems_namedItem(interp, o, o, 1,
|
||||||
(struct SEE_value **)&argv, res);
|
(struct SEE_value **)&argv, res);
|
||||||
}
|
}
|
||||||
mem_free(string);
|
mem_free(string);
|
||||||
@ -630,7 +630,7 @@ js_forms_item(struct SEE_interpreter *interp, struct SEE_object *self,
|
|||||||
{
|
{
|
||||||
struct global_object *g = (struct global_object *)interp;
|
struct global_object *g = (struct global_object *)interp;
|
||||||
struct view_state *vs = g->win->vs;
|
struct view_state *vs = g->win->vs;
|
||||||
struct js_forms_object *fo = (struct js_forms_object *)thisobj;
|
struct js_forms_object *fo = (struct js_forms_object *)self;
|
||||||
struct js_document_object *doc = fo->parent;
|
struct js_document_object *doc = fo->parent;
|
||||||
struct form_view *fv;
|
struct form_view *fv;
|
||||||
unsigned char *string;
|
unsigned char *string;
|
||||||
@ -668,7 +668,7 @@ js_forms_namedItem(struct SEE_interpreter *interp, struct SEE_object *self,
|
|||||||
struct view_state *vs = g->win->vs;
|
struct view_state *vs = g->win->vs;
|
||||||
struct document_view *doc_view = vs->doc_view;
|
struct document_view *doc_view = vs->doc_view;
|
||||||
struct document *document = doc_view->document;
|
struct document *document = doc_view->document;
|
||||||
struct js_forms_object *fo = (struct js_forms_object *)thisobj;
|
struct js_forms_object *fo = (struct js_forms_object *)self;
|
||||||
struct js_document_object *doc = fo->parent;
|
struct js_document_object *doc = fo->parent;
|
||||||
struct form *form;
|
struct form *form;
|
||||||
unsigned char *string;
|
unsigned char *string;
|
||||||
@ -716,18 +716,19 @@ forms_get(struct SEE_interpreter *interp, struct SEE_object *o,
|
|||||||
} else {
|
} else {
|
||||||
unsigned char *string = SEE_string_to_unsigned_char(p);
|
unsigned char *string = SEE_string_to_unsigned_char(p);
|
||||||
struct SEE_value argv;
|
struct SEE_value argv;
|
||||||
|
struct SEE_value *argv1 = &argv;
|
||||||
|
|
||||||
if (!string) {
|
if (!string) {
|
||||||
SEE_SET_UNDEFINED(res);
|
SEE_SET_UNDEFINED(res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SEE_SET_STRING(&argv, p);
|
SEE_SET_STRING(argv1, p);
|
||||||
if (string[0] >= '0' && string[1] <= '9') {
|
if (string[0] >= '0' && string[0] <= '9') {
|
||||||
js_forms_item(interp, o, NULL, 1,
|
js_forms_item(interp, o, fo->item, 1,
|
||||||
(struct SEE_value **)&argv, res);
|
(struct SEE_value **)&argv1, res);
|
||||||
} else {
|
} else {
|
||||||
js_forms_namedItem(interp, o, NULL, 1,
|
js_forms_namedItem(interp, o, fo->namedItem, 1,
|
||||||
(struct SEE_value **)&argv, res);
|
(struct SEE_value **)&argv1, res);
|
||||||
}
|
}
|
||||||
mem_free(string);
|
mem_free(string);
|
||||||
}
|
}
|
||||||
|
@ -172,15 +172,14 @@ window_get(struct SEE_interpreter *interp, struct SEE_object *o,
|
|||||||
} else {
|
} else {
|
||||||
unsigned char *frame = SEE_string_to_unsigned_char(p);
|
unsigned char *frame = SEE_string_to_unsigned_char(p);
|
||||||
struct document_view *doc_view = vs->doc_view;
|
struct document_view *doc_view = vs->doc_view;
|
||||||
struct js_window_object *obj =
|
struct js_window_object *obj;
|
||||||
js_try_resolve_frame(doc_view, frame);
|
|
||||||
|
|
||||||
mem_free_if(frame);
|
if (frame && (obj = js_try_resolve_frame(doc_view, frame))) {
|
||||||
if (obj) {
|
|
||||||
SEE_SET_OBJECT(res, (struct SEE_object *)obj);
|
SEE_SET_OBJECT(res, (struct SEE_object *)obj);
|
||||||
} else {
|
} else {
|
||||||
SEE_SET_UNDEFINED(res);
|
SEE_SET_UNDEFINED(res);
|
||||||
}
|
}
|
||||||
|
mem_free_if(frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,8 +237,10 @@ js_window_alert(struct SEE_interpreter *interp, struct SEE_object *self,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
string = SEE_value_to_unsigned_char(interp, argv[0]);
|
string = SEE_value_to_unsigned_char(interp, argv[0]);
|
||||||
if (!string || !*string)
|
if (!string || !*string) {
|
||||||
|
mem_free_if(string);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
info_box(vs->doc_view->session->tab->term, MSGBOX_FREE_TEXT,
|
info_box(vs->doc_view->session->tab->term, MSGBOX_FREE_TEXT,
|
||||||
N_("JavaScript Alert"), ALIGN_CENTER, string);
|
N_("JavaScript Alert"), ALIGN_CENTER, string);
|
||||||
@ -330,7 +331,6 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mem_free_if(target);
|
|
||||||
if (!get_cmd_opt_bool("no-connect")
|
if (!get_cmd_opt_bool("no-connect")
|
||||||
&& !get_cmd_opt_bool("no-home")
|
&& !get_cmd_opt_bool("no-home")
|
||||||
&& !get_cmd_opt_bool("anonymous")
|
&& !get_cmd_opt_bool("anonymous")
|
||||||
@ -350,6 +350,7 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
mem_free_if(target);
|
||||||
done_uri(uri);
|
done_uri(uri);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Output a system dependent table of character encoding aliases.
|
# Output a system dependent table of character encoding aliases.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
# Copyright (C) 2000-2004 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU Library General Public License as published
|
# under the terms of the GNU Library General Public License as published
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Library General Public
|
# You should have received a copy of the GNU Library General Public
|
||||||
# License along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||||
# USA.
|
# USA.
|
||||||
#
|
#
|
||||||
# The table consists of lines of the form
|
# The table consists of lines of the form
|
||||||
@ -30,21 +30,23 @@
|
|||||||
# MIME charset name is preferred.
|
# MIME charset name is preferred.
|
||||||
# The current list of GNU canonical charset names is as follows.
|
# The current list of GNU canonical charset names is as follows.
|
||||||
#
|
#
|
||||||
# name used by which systems a MIME name?
|
# name MIME? used by which systems
|
||||||
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
|
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
|
||||||
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
|
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
|
||||||
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
|
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
|
||||||
# ISO-8859-3 glibc yes
|
# ISO-8859-3 Y glibc solaris
|
||||||
# ISO-8859-4 osf solaris freebsd yes
|
# ISO-8859-4 Y osf solaris freebsd darwin
|
||||||
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
|
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
|
||||||
# ISO-8859-6 glibc aix hpux solaris yes
|
# ISO-8859-6 Y glibc aix hpux solaris
|
||||||
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
# ISO-8859-7 Y glibc aix hpux irix osf solaris darwin
|
||||||
# ISO-8859-8 glibc aix hpux osf solaris yes
|
# ISO-8859-8 Y glibc aix hpux osf solaris
|
||||||
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
|
||||||
# ISO-8859-13 glibc
|
# ISO-8859-13 glibc darwin
|
||||||
# ISO-8859-15 glibc aix osf solaris freebsd
|
# ISO-8859-14 glibc
|
||||||
# KOI8-R glibc solaris freebsd yes
|
# ISO-8859-15 glibc aix osf solaris freebsd darwin
|
||||||
# KOI8-U glibc freebsd yes
|
# KOI8-R Y glibc solaris freebsd darwin
|
||||||
|
# KOI8-U Y glibc freebsd darwin
|
||||||
|
# KOI8-T glibc
|
||||||
# CP437 dos
|
# CP437 dos
|
||||||
# CP775 dos
|
# CP775 dos
|
||||||
# CP850 aix osf dos
|
# CP850 aix osf dos
|
||||||
@ -56,37 +58,40 @@
|
|||||||
# CP862 dos
|
# CP862 dos
|
||||||
# CP864 dos
|
# CP864 dos
|
||||||
# CP865 dos
|
# CP865 dos
|
||||||
# CP866 freebsd dos
|
# CP866 freebsd darwin dos
|
||||||
# CP869 dos
|
# CP869 dos
|
||||||
# CP874 win32 dos
|
# CP874 woe32 dos
|
||||||
# CP922 aix
|
# CP922 aix
|
||||||
# CP932 aix win32 dos
|
# CP932 aix woe32 dos
|
||||||
# CP943 aix
|
# CP943 aix
|
||||||
# CP949 osf win32 dos
|
# CP949 osf woe32 dos
|
||||||
# CP950 win32 dos
|
# CP950 woe32 dos
|
||||||
# CP1046 aix
|
# CP1046 aix
|
||||||
# CP1124 aix
|
# CP1124 aix
|
||||||
|
# CP1125 dos
|
||||||
# CP1129 aix
|
# CP1129 aix
|
||||||
# CP1250 win32
|
# CP1250 woe32
|
||||||
# CP1251 glibc win32
|
# CP1251 glibc solaris darwin woe32
|
||||||
# CP1252 aix win32
|
# CP1252 aix woe32
|
||||||
# CP1253 win32
|
# CP1253 woe32
|
||||||
# CP1254 win32
|
# CP1254 woe32
|
||||||
# CP1255 win32
|
# CP1255 glibc woe32
|
||||||
# CP1256 win32
|
# CP1256 woe32
|
||||||
# CP1257 win32
|
# CP1257 woe32
|
||||||
# GB2312 glibc aix hpux irix solaris freebsd yes
|
# GB2312 Y glibc aix hpux irix solaris freebsd darwin
|
||||||
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
|
# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
|
||||||
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
|
# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
|
||||||
# EUC-TW glibc aix hpux irix osf solaris
|
# EUC-TW glibc aix hpux irix osf solaris
|
||||||
# BIG5 glibc aix hpux osf solaris freebsd yes
|
# BIG5 Y glibc aix hpux osf solaris freebsd darwin
|
||||||
# BIG5-HKSCS glibc
|
# BIG5-HKSCS glibc solaris
|
||||||
# GBK aix osf win32 dos
|
# GBK glibc aix osf solaris woe32 dos
|
||||||
# GB18030 glibc
|
# GB18030 glibc solaris
|
||||||
# SHIFT_JIS hpux osf solaris freebsd yes
|
# SHIFT_JIS Y hpux osf solaris freebsd darwin
|
||||||
# JOHAB glibc win32
|
# JOHAB glibc solaris woe32
|
||||||
# TIS-620 glibc aix hpux osf solaris
|
# TIS-620 glibc aix hpux osf solaris
|
||||||
# VISCII glibc yes
|
# VISCII Y glibc
|
||||||
|
# TCVN5712-1 glibc
|
||||||
|
# GEORGIAN-PS glibc
|
||||||
# HP-ROMAN8 hpux
|
# HP-ROMAN8 hpux
|
||||||
# HP-ARABIC8 hpux
|
# HP-ARABIC8 hpux
|
||||||
# HP-GREEK8 hpux
|
# HP-GREEK8 hpux
|
||||||
@ -95,7 +100,7 @@
|
|||||||
# HP-KANA8 hpux
|
# HP-KANA8 hpux
|
||||||
# DEC-KANJI osf
|
# DEC-KANJI osf
|
||||||
# DEC-HANYU osf
|
# DEC-HANYU osf
|
||||||
# UTF-8 glibc aix hpux osf solaris yes
|
# UTF-8 Y glibc aix hpux osf solaris darwin
|
||||||
#
|
#
|
||||||
# Note: Names which are not marked as being a MIME name should not be used in
|
# Note: Names which are not marked as being a MIME name should not be used in
|
||||||
# Internet protocols for information interchange (mail, news, etc.).
|
# Internet protocols for information interchange (mail, news, etc.).
|
||||||
@ -116,6 +121,105 @@ echo "# It was automatically generated from config.charset."
|
|||||||
# List of references, updated during installation:
|
# List of references, updated during installation:
|
||||||
echo "# Packages using this file: "
|
echo "# Packages using this file: "
|
||||||
case "$os" in
|
case "$os" in
|
||||||
|
linux-gnulibc1*)
|
||||||
|
# Linux libc5 doesn't have nl_langinfo(CODESET); therefore
|
||||||
|
# localcharset.c falls back to using the full locale name
|
||||||
|
# from the environment variables.
|
||||||
|
echo "C ASCII"
|
||||||
|
echo "POSIX ASCII"
|
||||||
|
for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
|
||||||
|
en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
|
||||||
|
en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
|
||||||
|
es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
|
||||||
|
et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
|
||||||
|
fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
|
||||||
|
it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
|
||||||
|
sv_FI sv_SE; do
|
||||||
|
echo "$l ISO-8859-1"
|
||||||
|
echo "$l.iso-8859-1 ISO-8859-1"
|
||||||
|
echo "$l.iso-8859-15 ISO-8859-15"
|
||||||
|
echo "$l.iso-8859-15@euro ISO-8859-15"
|
||||||
|
echo "$l@euro ISO-8859-15"
|
||||||
|
echo "$l.cp-437 CP437"
|
||||||
|
echo "$l.cp-850 CP850"
|
||||||
|
echo "$l.cp-1252 CP1252"
|
||||||
|
echo "$l.cp-1252@euro CP1252"
|
||||||
|
#echo "$l.atari-st ATARI-ST" # not a commonly used encoding
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
echo "$l.utf-8@euro UTF-8"
|
||||||
|
done
|
||||||
|
for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
|
||||||
|
sl_SI sr sr_CS sr_YU; do
|
||||||
|
echo "$l ISO-8859-2"
|
||||||
|
echo "$l.iso-8859-2 ISO-8859-2"
|
||||||
|
echo "$l.cp-852 CP852"
|
||||||
|
echo "$l.cp-1250 CP1250"
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
done
|
||||||
|
for l in mk mk_MK ru ru_RU; do
|
||||||
|
echo "$l ISO-8859-5"
|
||||||
|
echo "$l.iso-8859-5 ISO-8859-5"
|
||||||
|
echo "$l.koi8-r KOI8-R"
|
||||||
|
echo "$l.cp-866 CP866"
|
||||||
|
echo "$l.cp-1251 CP1251"
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
done
|
||||||
|
for l in ar ar_SA; do
|
||||||
|
echo "$l ISO-8859-6"
|
||||||
|
echo "$l.iso-8859-6 ISO-8859-6"
|
||||||
|
echo "$l.cp-864 CP864"
|
||||||
|
#echo "$l.cp-868 CP868" # not a commonly used encoding
|
||||||
|
echo "$l.cp-1256 CP1256"
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
done
|
||||||
|
for l in el el_GR gr gr_GR; do
|
||||||
|
echo "$l ISO-8859-7"
|
||||||
|
echo "$l.iso-8859-7 ISO-8859-7"
|
||||||
|
echo "$l.cp-869 CP869"
|
||||||
|
echo "$l.cp-1253 CP1253"
|
||||||
|
echo "$l.cp-1253@euro CP1253"
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
echo "$l.utf-8@euro UTF-8"
|
||||||
|
done
|
||||||
|
for l in he he_IL iw iw_IL; do
|
||||||
|
echo "$l ISO-8859-8"
|
||||||
|
echo "$l.iso-8859-8 ISO-8859-8"
|
||||||
|
echo "$l.cp-862 CP862"
|
||||||
|
echo "$l.cp-1255 CP1255"
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
done
|
||||||
|
for l in tr tr_TR; do
|
||||||
|
echo "$l ISO-8859-9"
|
||||||
|
echo "$l.iso-8859-9 ISO-8859-9"
|
||||||
|
echo "$l.cp-857 CP857"
|
||||||
|
echo "$l.cp-1254 CP1254"
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
done
|
||||||
|
for l in lt lt_LT lv lv_LV; do
|
||||||
|
#echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
|
||||||
|
echo "$l ISO-8859-13"
|
||||||
|
done
|
||||||
|
for l in ru_UA uk uk_UA; do
|
||||||
|
echo "$l KOI8-U"
|
||||||
|
done
|
||||||
|
for l in zh zh_CN; do
|
||||||
|
#echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
|
||||||
|
echo "$l GB2312"
|
||||||
|
done
|
||||||
|
for l in ja ja_JP ja_JP.EUC; do
|
||||||
|
echo "$l EUC-JP"
|
||||||
|
done
|
||||||
|
for l in ko ko_KR; do
|
||||||
|
echo "$l EUC-KR"
|
||||||
|
done
|
||||||
|
for l in th th_TH; do
|
||||||
|
echo "$l TIS-620"
|
||||||
|
done
|
||||||
|
for l in fa fa_IR; do
|
||||||
|
#echo "$l ISIRI-3342" # a broken encoding
|
||||||
|
echo "$l.utf-8 UTF-8"
|
||||||
|
done
|
||||||
|
;;
|
||||||
linux* | *-gnu*)
|
linux* | *-gnu*)
|
||||||
# With glibc-2.1 or newer, we don't need any canonicalization,
|
# With glibc-2.1 or newer, we don't need any canonicalization,
|
||||||
# because glibc has iconv and both glibc and libiconv support all
|
# because glibc has iconv and both glibc and libiconv support all
|
||||||
@ -217,6 +321,7 @@ case "$os" in
|
|||||||
echo "646 ASCII"
|
echo "646 ASCII"
|
||||||
echo "ISO8859-1 ISO-8859-1"
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
echo "ISO8859-2 ISO-8859-2"
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-3 ISO-8859-3"
|
||||||
echo "ISO8859-4 ISO-8859-4"
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
echo "ISO8859-5 ISO-8859-5"
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
echo "ISO8859-6 ISO-8859-6"
|
echo "ISO8859-6 ISO-8859-6"
|
||||||
@ -225,20 +330,27 @@ case "$os" in
|
|||||||
echo "ISO8859-9 ISO-8859-9"
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
echo "ISO8859-15 ISO-8859-15"
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
echo "koi8-r KOI8-R"
|
echo "koi8-r KOI8-R"
|
||||||
|
echo "ansi-1251 CP1251"
|
||||||
echo "BIG5 BIG5"
|
echo "BIG5 BIG5"
|
||||||
|
echo "Big5-HKSCS BIG5-HKSCS"
|
||||||
echo "gb2312 GB2312"
|
echo "gb2312 GB2312"
|
||||||
|
echo "GBK GBK"
|
||||||
|
echo "GB18030 GB18030"
|
||||||
echo "cns11643 EUC-TW"
|
echo "cns11643 EUC-TW"
|
||||||
echo "5601 EUC-KR"
|
echo "5601 EUC-KR"
|
||||||
|
echo "ko_KR.johap92 JOHAB"
|
||||||
echo "eucJP EUC-JP"
|
echo "eucJP EUC-JP"
|
||||||
echo "PCK SHIFT_JIS"
|
echo "PCK SHIFT_JIS"
|
||||||
echo "TIS620.2533 TIS-620"
|
echo "TIS620.2533 TIS-620"
|
||||||
#echo "sun_eu_greek ?" # what is this?
|
#echo "sun_eu_greek ?" # what is this?
|
||||||
echo "UTF-8 UTF-8"
|
echo "UTF-8 UTF-8"
|
||||||
;;
|
;;
|
||||||
freebsd*)
|
freebsd* | os2*)
|
||||||
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||||
# localcharset.c falls back to using the full locale name
|
# localcharset.c falls back to using the full locale name
|
||||||
# from the environment variables.
|
# from the environment variables.
|
||||||
|
# Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
|
||||||
|
# reuse FreeBSD's locale data for OS/2.
|
||||||
echo "C ASCII"
|
echo "C ASCII"
|
||||||
echo "US-ASCII ASCII"
|
echo "US-ASCII ASCII"
|
||||||
for l in la_LN lt_LN; do
|
for l in la_LN lt_LN; do
|
||||||
@ -270,6 +382,91 @@ case "$os" in
|
|||||||
echo "ja_JP.Shift_JIS SHIFT_JIS"
|
echo "ja_JP.Shift_JIS SHIFT_JIS"
|
||||||
echo "ko_KR.EUC EUC-KR"
|
echo "ko_KR.EUC EUC-KR"
|
||||||
;;
|
;;
|
||||||
|
netbsd*)
|
||||||
|
echo "646 ASCII"
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "eucCN GB2312"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "eucTW EUC-TW"
|
||||||
|
echo "BIG5 BIG5"
|
||||||
|
echo "SJIS SHIFT_JIS"
|
||||||
|
;;
|
||||||
|
darwin[56]*)
|
||||||
|
# Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
|
||||||
|
# localcharset.c falls back to using the full locale name
|
||||||
|
# from the environment variables.
|
||||||
|
echo "C ASCII"
|
||||||
|
for l in en_AU en_CA en_GB en_US la_LN; do
|
||||||
|
echo "$l.US-ASCII ASCII"
|
||||||
|
done
|
||||||
|
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||||
|
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
|
||||||
|
nl_NL no_NO pt_PT sv_SE; do
|
||||||
|
echo "$l ISO-8859-1"
|
||||||
|
echo "$l.ISO8859-1 ISO-8859-1"
|
||||||
|
echo "$l.ISO8859-15 ISO-8859-15"
|
||||||
|
done
|
||||||
|
for l in la_LN; do
|
||||||
|
echo "$l.ISO8859-1 ISO-8859-1"
|
||||||
|
echo "$l.ISO8859-15 ISO-8859-15"
|
||||||
|
done
|
||||||
|
for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
|
||||||
|
echo "$l.ISO8859-2 ISO-8859-2"
|
||||||
|
done
|
||||||
|
for l in la_LN lt_LT; do
|
||||||
|
echo "$l.ISO8859-4 ISO-8859-4"
|
||||||
|
done
|
||||||
|
for l in ru_RU; do
|
||||||
|
echo "$l.KOI8-R KOI8-R"
|
||||||
|
echo "$l.ISO8859-5 ISO-8859-5"
|
||||||
|
echo "$l.CP866 CP866"
|
||||||
|
done
|
||||||
|
for l in bg_BG; do
|
||||||
|
echo "$l.CP1251 CP1251"
|
||||||
|
done
|
||||||
|
echo "uk_UA.KOI8-U KOI8-U"
|
||||||
|
echo "zh_TW.BIG5 BIG5"
|
||||||
|
echo "zh_TW.Big5 BIG5"
|
||||||
|
echo "zh_CN.EUC GB2312"
|
||||||
|
echo "ja_JP.EUC EUC-JP"
|
||||||
|
echo "ja_JP.SJIS SHIFT_JIS"
|
||||||
|
echo "ko_KR.EUC EUC-KR"
|
||||||
|
;;
|
||||||
|
darwin*)
|
||||||
|
# Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
|
||||||
|
# - It returns the empty string when LANG is set to a locale of the
|
||||||
|
# form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
|
||||||
|
# LC_CTYPE file.
|
||||||
|
# - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
|
||||||
|
# the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
|
||||||
|
# - The documentation says:
|
||||||
|
# "... all code that calls BSD system routines should ensure
|
||||||
|
# that the const *char parameters of these routines are in UTF-8
|
||||||
|
# encoding. All BSD system functions expect their string
|
||||||
|
# parameters to be in UTF-8 encoding and nothing else."
|
||||||
|
# It also says
|
||||||
|
# "An additional caveat is that string parameters for files,
|
||||||
|
# paths, and other file-system entities must be in canonical
|
||||||
|
# UTF-8. In a canonical UTF-8 Unicode string, all decomposable
|
||||||
|
# characters are decomposed ..."
|
||||||
|
# but this is not true: You can pass non-decomposed UTF-8 strings
|
||||||
|
# to file system functions, and it is the OS which will convert
|
||||||
|
# them to decomposed UTF-8 before accessing the file system.
|
||||||
|
# - The Apple Terminal application displays UTF-8 by default.
|
||||||
|
# - However, other applications are free to use different encodings:
|
||||||
|
# - xterm uses ISO-8859-1 by default.
|
||||||
|
# - TextEdit uses MacRoman by default.
|
||||||
|
# We prefer UTF-8 over decomposed UTF-8-MAC because one should
|
||||||
|
# minimize the use of decomposed Unicode. Unfortunately, through the
|
||||||
|
# Darwin file system, decomposed UTF-8 strings are leaked into user
|
||||||
|
# space nevertheless.
|
||||||
|
echo "* UTF-8"
|
||||||
|
;;
|
||||||
beos*)
|
beos*)
|
||||||
# BeOS has a single locale, and it has UTF-8 encoding.
|
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||||
echo "* UTF-8"
|
echo "* UTF-8"
|
||||||
@ -284,7 +481,7 @@ case "$os" in
|
|||||||
echo "# country is not the one your DOS machine actually uses, just"
|
echo "# country is not the one your DOS machine actually uses, just"
|
||||||
echo "# correct it in this file, and send a mail to"
|
echo "# correct it in this file, and send a mail to"
|
||||||
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
||||||
echo "# and Bruno Haible <haible@clisp.cons.org>."
|
echo "# and Bruno Haible <bruno@clisp.org>."
|
||||||
echo "#"
|
echo "#"
|
||||||
echo "C ASCII"
|
echo "C ASCII"
|
||||||
# ISO-8859-1 languages
|
# ISO-8859-1 languages
|
||||||
@ -383,6 +580,7 @@ case "$os" in
|
|||||||
echo "sq CP852"
|
echo "sq CP852"
|
||||||
echo "sq_AL CP852"
|
echo "sq_AL CP852"
|
||||||
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
||||||
|
echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
|
||||||
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
||||||
# ISO-8859-3 languages
|
# ISO-8859-3 languages
|
||||||
echo "mt CP850"
|
echo "mt CP850"
|
||||||
@ -394,8 +592,10 @@ case "$os" in
|
|||||||
echo "bg_BG CP866" # not CP855 ??
|
echo "bg_BG CP866" # not CP855 ??
|
||||||
echo "mk CP866" # not CP855 ??
|
echo "mk CP866" # not CP855 ??
|
||||||
echo "mk_MK CP866" # not CP855 ??
|
echo "mk_MK CP866" # not CP855 ??
|
||||||
echo "ru KOI8-R" # not CP866 ??
|
echo "ru CP866"
|
||||||
echo "ru_RU KOI8-R" # not CP866 ??
|
echo "ru_RU CP866"
|
||||||
|
echo "uk CP1125"
|
||||||
|
echo "uk_UA CP1125"
|
||||||
# ISO-8859-6 languages
|
# ISO-8859-6 languages
|
||||||
echo "ar CP864"
|
echo "ar CP864"
|
||||||
echo "ar_AE CP864"
|
echo "ar_AE CP864"
|
||||||
|
@ -241,6 +241,7 @@ struct block_list {
|
|||||||
while (list != NULL) { \
|
while (list != NULL) { \
|
||||||
struct block_list *old = list; \
|
struct block_list *old = list; \
|
||||||
list = list->next; \
|
list = list->next; \
|
||||||
|
free (old->address); \
|
||||||
free (old); \
|
free (old); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@ -70,8 +70,12 @@
|
|||||||
* feature may disappear soon if none is interested in. Please report
|
* feature may disappear soon if none is interested in. Please report
|
||||||
* issues/comments/ideas/bugs on #elinks.
|
* issues/comments/ideas/bugs on #elinks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Set to 1 to make ELinks use a tcp socket bound to loopback address with
|
||||||
|
* port defined by ELINKS_PORT (setup.h) for internal communications
|
||||||
|
* instead of a socket file, which is the preferred way. */
|
||||||
#if 0
|
#if 0
|
||||||
#undef CONFIG_TCP_INTERLINK
|
#define CONFIG_TCP_INTERLINK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Common to both AF_UNIX and AF_INET stuff. */
|
/* Common to both AF_UNIX and AF_INET stuff. */
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include "elinks.h"
|
#include "elinks.h"
|
||||||
|
|
||||||
|
#include "osdep/stat.h"
|
||||||
#include "protocol/ftp/parse.h"
|
#include "protocol/ftp/parse.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
/* Error reporting. */
|
/* Error reporting. */
|
||||||
|
|
||||||
#if defined(CONFIG_SCRIPTING_RUBY) || defined(CONFIG_SEE) || defined(CONFIG_SCRIPTING_SPIDERMONKEY)
|
#if defined(CONFIG_SCRIPTING_RUBY) || defined(CONFIG_SCRIPTING_SPIDERMONKEY)
|
||||||
void
|
void
|
||||||
report_scripting_error(struct module *module, struct session *ses,
|
report_scripting_error(struct module *module, struct session *ses,
|
||||||
unsigned char *msg)
|
unsigned char *msg)
|
||||||
|
@ -170,7 +170,7 @@ void elinks_assertm(int x, unsigned char *fmt, ...)
|
|||||||
* paths will get hit (and since developers usually don't test CONFIG_FASTMEM mode
|
* paths will get hit (and since developers usually don't test CONFIG_FASTMEM mode
|
||||||
* extensively...). So better don't mess with it, even if you would do that
|
* extensively...). So better don't mess with it, even if you would do that
|
||||||
* with awareness of this fact. We don't want to iterate over tens of spots all
|
* with awareness of this fact. We don't want to iterate over tens of spots all
|
||||||
* over the code when we chane one detail regarding CONFIG_FASTMEM operation.
|
* over the code when we change one detail regarding CONFIG_FASTMEM operation.
|
||||||
*
|
*
|
||||||
* This is not that actual after introduction of if_assert_failed, but it's
|
* This is not that actual after introduction of if_assert_failed, but it's
|
||||||
* a safe recommendation anyway, so... ;-) */
|
* a safe recommendation anyway, so... ;-) */
|
||||||
|
20
test/css/css_media.html
Normal file
20
test/css/css_media.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="Stylesheet" type="text/css" media="projection, screen, tv"
|
||||||
|
href="css/default.css" title="Default Style">
|
||||||
|
<link rel="Alternate stylesheet" type="text/css" media="projection,
|
||||||
|
screen, tv"
|
||||||
|
href="css/flowers.css" title="Flower Power">
|
||||||
|
<link rel="Alternate stylesheet" type="text/css" media="projection,
|
||||||
|
screen, tv"
|
||||||
|
href="css/mouse.css" title="Of Mice and Men">
|
||||||
|
<link rel="Stylesheet" type="text/css" media="handheld"
|
||||||
|
href="css/mobile.css">
|
||||||
|
<link rel="Stylesheet" type="text/css" media="print"
|
||||||
|
href="css/print.css">
|
||||||
|
<link rel="Stylesheet" type="text/css" media="tty" href="css/tty.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
test css media
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user