1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-02 02:15:28 +00:00
This commit is contained in:
Kalle Olavi Niemitalo 2006-01-14 21:38:13 +02:00 committed by Kalle Olavi Niemitalo
commit a7e465d785
48 changed files with 3193 additions and 2757 deletions

View File

@ -1,25 +1,20 @@
# This is the automake's playground of our cool build system.
# $Id$
#
# TODO: Make part of it autogenerated based on AC_SUBST() or something.
SHELL = @SHELL@
CURPATH = $(shell pwd)
TOPPATH = $(shell cd $(top_builddir) && pwd)
RELPATH = $(shell echo '$(CURPATH)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z0-9]\)$$,\1/,')
PATHSCRIPT = case '@top_srcdir@' in /*) ;; *) echo $(top_builddir)/;; esac
PATHPREFIX = $(shell $(PATHSCRIPT))
TOPPATH = $(shell cd $(top_builddir) && pwd)
RELPATH = $(subst $(TOPPATH)/,,$(CURDIR)/)
PATHPREFIX = $(if $(patsubst /%,,@top_srcdir@),$(top_builddir)/)
top_srcdir = $(PATHPREFIX)@top_srcdir@
SRCPATH = $(shell cd $(top_srcdir)/$(RELPATH) && pwd)
ifeq ($(SRCPATH),$(CURPATH))
srcdir =
ifeq (@top_srcdir@,.)
srcdir =
else
srcdir = $(top_srcdir)/$(RELPATH)
endif
prefix = @prefix@
exec_prefix = @exec_prefix@
@ -93,11 +88,15 @@ XMLTO = @XMLTO@
X_CFLAGS = @X_CFLAGS@
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_88_COLORS = @CONFIG_88_COLORS@
CONFIG_ASCIIDOC = @CONFIG_ASCIIDOC@
CONFIG_BACKTRACE = @CONFIG_BACKTRACE@
CONFIG_OS_BEOS = @CONFIG_OS_BEOS@
CONFIG_BITTORRENT = @CONFIG_BITTORRENT@
CONFIG_BOOKMARKS = @CONFIG_BOOKMARKS@
CONFIG_BZIP2 = @CONFIG_BZIP2@
@ -106,8 +105,10 @@ CONFIG_COOKIES = @CONFIG_COOKIES@
CONFIG_CSS = @CONFIG_CSS@
CONFIG_DATA = @CONFIG_DATA@
CONFIG_DEBUG = @CONFIG_DEBUG@
CONFIG_DOC = @CONFIG_DOC@
CONFIG_DOM = @CONFIG_DOM@
CONFIG_ECMASCRIPT = @CONFIG_ECMASCRIPT@
CONFIG_ECMASCRIPT_SEE = @CONFIG_ECMASCRIPT_SEE@
CONFIG_ECMASCRIPT_SMJS = @CONFIG_ECMASCRIPT_SMJS@
CONFIG_EXMODE = @CONFIG_EXMODE@
CONFIG_FASTMEM = @CONFIG_FASTMEM@
@ -116,44 +117,47 @@ CONFIG_FORMHIST = @CONFIG_FORMHIST@
CONFIG_FTP = @CONFIG_FTP@
CONFIG_GLOBHIST = @CONFIG_GLOBHIST@
CONFIG_GNUTLS = @CONFIG_GNUTLS@
CONFIG_GNUTLS_OPENSSL_COMPAT = @CONFIG_GNUTLS_OPENSSL_COMPAT@
CONFIG_GOPHER = @CONFIG_GOPHER@
CONFIG_SCRIPTING_GUILE = @CONFIG_SCRIPTING_GUILE@
CONFIG_GPM = @CONFIG_GPM@
CONFIG_GZIP = @CONFIG_GZIP@
CONFIG_HTML_HIGHLIGHT = @CONFIG_HTML_HIGHLIGHT@
CONFIG_IDN = @CONFIG_IDN@
CONFIG_INTERLINK = @CONFIG_INTERLINK@
CONFIG_IPV6 = @CONFIG_IPV6@
CONFIG_JW = @CONFIG_JW@
CONFIG_LEDS = @CONFIG_LEDS@
CONFIG_SCRIPTING_LUA = @CONFIG_SCRIPTING_LUA@
CONFIG_MAILCAP = @CONFIG_MAILCAP@
CONFIG_MANUAL = @CONFIG_MANUAL@
CONFIG_MARKS = @CONFIG_MARKS@
CONFIG_MD5 = @CONFIG_MD5@
CONFIG_MIMETYPES = @CONFIG_MIMETYPES@
CONFIG_MOUSE = @CONFIG_MOUSE@
CONFIG_NLS = @CONFIG_NLS@
CONFIG_NNTP = @CONFIG_NNTP@
CONFIG_NO_ROOT_EXEC = @CONFIG_NO_ROOT_EXEC@
CONFIG_OPENSSL = @CONFIG_OPENSSL@
CONFIG_OS_BEOS = @CONFIG_OS_BEOS@
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_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_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_SMALL = @CONFIG_SMALL@
CONFIG_SMB = @CONFIG_SMB@
CONFIG_SCRIPTING_SPIDERMONKEY = @CONFIG_SCRIPTING_SPIDERMONKEY@
CONFIG_SPIDERMONKEY = @CONFIG_SPIDERMONKEY@
CONFIG_SSL = @CONFIG_SSL@
CONFIG_SYSMOUSE = @CONFIG_SYSMOUSE@
CONFIG_OS_UNIX = @CONFIG_OS_UNIX@
CONFIG_URI_REWRITE = @CONFIG_URI_REWRITE@
CONFIG_OS_WIN32 = @CONFIG_OS_WIN32@
CONFIG_XBEL_BOOKMARKS = @CONFIG_XBEL_BOOKMARKS@
CONFIG_XMLTO = @CONFIG_XMLTO@
@ -170,6 +174,7 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
MAKE_COLOR = @MAKE_COLOR@
LIB_O_NAME = lib.o
### This is here because Makefile.config is usually the first thing
### we get and sometimes the all rule can be implicit, yet we want

View File

@ -1,19 +1,5 @@
### 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.
ifdef MAKE_COLOR
INFO_COLOR = $(shell tput setaf 5)
@ -25,6 +11,25 @@ ifdef MAKE_COLOR
END_COLOR = $(shell tput sgr0)
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
# just above) and then execute it.
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)$@"
cmd_ld_objs = $(LD) -r -o $@ $(filter $(OBJS), $^) \
$(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)$@'
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)
### 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)
endif
OBJS += $(OBJS-yes)
ifdef OBJS-yes
OBJS += $(OBJS-yes)
endif
ALTDIRS = $(SUBDIRS-no) $(SUBDIRS-)
ALTOBJS = $(OBJS-no) $(OBJS-)
ifneq ($(findstring cleanall,$(MAKECMDGOALS)),)
INCLUDE_ALL=1
@ -97,33 +84,46 @@ INCLUDE_ALL=1
endif
ifdef INCLUDE_ALL
ifdef SUBDIRS-no
SUBDIRS += $(SUBDIRS-no)
endif
ifdef SUBDIRS-
SUBDIRS += $(SUBDIRS-)
endif
ifdef OBJS-no
OBJS += $(OBJS-no)
endif
ifdef OBJS-
OBJS += $(OBJS-)
endif
SUBDIRS += $(ALTDIRS)
OBJS += $(ALTOBJS)
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)
LIB_O = lib.o
CLEAN += $(OBJS) $(LIB_O)
DEP_FILES_1 = $(foreach src,$(OBJS),.deps/$(src))
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
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
init-recursive: init-default
@ -133,23 +133,36 @@ init-default:
$(MKINSTALLDIRS) $(subdir) >/dev/null; \
echo 'include $(SRC)/$(RELPATH)/$(subdir)/Makefile' > $(subdir)/Makefile;)
clean-default: clean-test
clean-default cleanall-default:
@-test -z "$(CLEAN)" || $(RM) $(CLEAN)
cleanall-default: clean-default
check-default:
ifneq ($(SPARSE),)
@$(foreach file, $(wildcard *.c), \
$(call ncmd,sparse,$(file));)
endif
##############################################################################
#
# Auto-testing infrastructure
#
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
##############################################################################
# Auto-testing infrastructure
clean-test:
test-default:
ifdef TEST_PROGS
@ -173,58 +186,43 @@ clean-test:
@rm -fr trash
CLEAN += $(TEST_PROGS) $(addsuffix .o,$(TEST_PROGS))
clean-default: clean-test
endif
.PHONY: $(TESTS)
.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
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.
$(RECRULES):
ifdef SUBDIRS
$(RULES_REC):
@$(foreach subdir,$(sort $(SUBDIRS)), \
$(call ncmd,recmake,$(subdir),$(subst -recursive,,$@)) || exit 1;)
endif
# Setup the default sub commands dependency. First decend subdirs then do all
# the default stuff and finally do any local hooks.
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 -local rules
$(RULES_LOCAL):
# Dummy rules for local hooks
$(addsuffix -local,$(RULES)):
# Default deps
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.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@ -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(AUTOHEADER,[autoheader],[autoheader],[config/missing autoheader])
AC_PROG_MAKE_SET
MAKE=
for make in gnumake gmake make false; do
@ -26,13 +24,15 @@ for make in gnumake gmake make false; do
fi
done
builddir="`pwd`"
# Cleanup if we are configuring with a previous build in the tree
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
builddir="`pwd`"
dnl ===================================================================
dnl Load feature configuration file and start logging features.
dnl ===================================================================
@ -53,9 +53,7 @@ AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PATH_PROGS(CG_COMMIT_ID, "cg-commit-id")
AC_PATH_PROGS(SPARSE, "sparse")
AC_SUBST(SPARSE)
CONFIG_ASCIIDOC="no"
CONFIG_POD2HTML="no"
@ -529,9 +527,9 @@ if test "$enable_see" = "yes"; then
SEE_CFLAGS="`$SEE_CONFIG --cppflags`"
LIBS="$SEE_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $SEE_CFLAGS"
EL_CONFIG(CONFIG_SEE, [SEE])
EL_CONFIG(CONFIG_ECMASCRIPT_SEE, [SEE])
AC_SUBST(SEE_CFLAGS)
AC_SUBST(CONFIG_SEE)
AC_SUBST(CONFIG_ECMASCRIPT_SEE)
else
if test -n "$withval" && test "x$withval" != xno; then
AC_MSG_ERROR([SEE not found])
@ -596,14 +594,15 @@ else
AC_SUBST(SPIDERMONKEY_CFLAGS)
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])
fi
AC_SUBST(CONFIG_SPIDERMONKEY)
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 ===================================================================
@ -1018,6 +1017,7 @@ AC_MSG_RESULT($cf_result)
dnl Final SSL setup
EL_CONFIG_DEPENDS(CONFIG_SSL, [CONFIG_OPENSSL CONFIG_GNUTLS], [SSL])
AC_SUBST(CONFIG_GNUTLS_OPENSSL_COMPAT)
AC_SUBST(CONFIG_OPENSSL)
AC_SUBST(CONFIG_GNUTLS)

8
doc/.gitignore vendored
View File

@ -1,12 +1,14 @@
api
*.tmp
*.html
*.pdf
*.xml
*.1
*.5
command-options.txt
import-features.conf.txt
api
web
features.txt
keymap-actions.txt
keymap-defaults.txt
manual.html-chunked
option-command.txt
option-config.txt

View File

@ -3,62 +3,28 @@ include $(top_builddir)/Makefile.config
SUBDIRS = man
# A little trick to simplify some of the rules.
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
#
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
#############################################################################
# Build files
TXT_DOCS = \
bookmarks.txt \
ecmascript.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 \
features.txt \
keymap-actions.txt \
keymap-defaults.txt \
keymap-actions.txt
TXT_DOCS += $(GEN_TXT_DOCS)
option-command.txt \
option-config.txt
HTML_DOCS-$(CONFIG_ASCIIDOC) += \
elinks.1.html \
elinks.conf.5.html \
elinkskeys.5.html \
hacking.html \
manual.html
@ -68,109 +34,162 @@ HTML_DOCS-$(CONFIG_XMLTO) += \
HTML_DOCS-$(CONFIG_POD2HTML) += \
perl.html \
perl-hooks.html \
perl-hooks.html
MAN_DOCS-$(CONFIG_XMLTO) += \
elinks.1 \
elinks.conf.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) += \
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)
endif
define api_doc
api/$(2).txt: $(1)
api/$(2).txt: $(1) $(CODE2DOC)
@test -d api || $(MKINSTALLDIRS) api
@$(CODE2DOC) $(1) > $$@
API_TXT += api/$(2).txt
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
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) $<
#############################################################################
# Build commands and macros
quiet_cmd_jw = ' [$(LINK_COLOR)JW$(END_COLOR)] $(RELPATH)$@'
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)$@'
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))
# 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
$(call cmd,asciidoc,xhtml11)
$(call asciidoc_dep)
%.xml: %.txt asciidoc.conf
$(call cmd,asciidoc,docbook)
$(call asciidoc_dep)
%.1: %.1.xml
$(call cmd,xmlto,man)
$(call man_hack,$(call man_desc))
%.5: %.5.xml
$(call cmd,xmlto,man)
$(call man_hack,$(call man_desc))
%.html-chunked: %.xml
$(call cmd,xmlto,html,-o $@)
@ -184,4 +203,5 @@ doctype = $(if $(findstring .1.,$(1)),manpage,$(if $(findstring .5.,$(1)),manpag
perl-%.html: %.pl
$(call cmd,pod2html)
include $(top_srcdir)/Makefile.lib

View File

@ -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,
README and INSTALL files in the project's root directory.
The files you will find in this directory are manpages living in the man/
directory and a bunch of .html and especially .txt (wait, you expect HTML
browser to carry its documentation around in HTML?) documents. The index.txt
file contains the table of contents which should help you navigating between
the files.
You are encouraged to get a copy of the ELinks manual. It tries to be a
complete book of all there is to know about ELinks. For example, most files
listed in the next section is in some way part of the ELinks manual.
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.
If you want to translate .pod files you need pod2html.
Where to start
--------------
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
possible documentation (with the tools available on the system), just run
$ 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
------------

View File

@ -1,17 +1,40 @@
# AsciiDoc configuration file
# 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.
#############################################################################
# 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[]
[link-inlinemacro]
{0%&lt;{target}&gt;}
@ -31,8 +54,16 @@ endif::backend-docbook[]
# XHTML11
ifdef::backend-xhtml11[]
[attributes]
squote='
# Use the man:[] macro to link between elinks manpages
[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]
<a id="{0}" href="#{0}">{0}</a>
@ -54,4 +85,5 @@ ifdef::backend-xhtml11[]
[ref-inlinemacro]
<a href="{target}#{0}">{0}</a>
endif::backend-xhtml11[]

View File

@ -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
resume progress is shown in the resume dialog, depicted below:
+----------------------------------------- Download -------------------------------------+
+--------------------------------------- Download ---------------------------------------+
| |
| 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
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 |
| |

View File

@ -1,5 +1,6 @@
elinks(1)
=========
:Description: The Elinks text-browser
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,
start 'ELinks' with parameter `--help`.
include::command-options.txt[]
include::option-command.txt[]
ENVIRONMENT VARIABLES
---------------------
@ -75,7 +76,7 @@ HOME::
WWW_HOME::
Homepage location (as in lynx(1)).
Homepage location (as in man:lynx[1]).
FILES
-----
@ -150,7 +151,8 @@ was done by Jonas Fonseca mailto:fonseca@diku.dk[].
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

63
doc/elinks.conf.5.txt Normal file
View 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]

View File

@ -1,5 +1,6 @@
elinkskeys(5)
=============
:Description: ELinks keybindings
NAME
----
@ -103,4 +104,4 @@ to asciidoc format and cleaned up by Jonas Fonseca.
SEE ALSO
--------
man:elinks[1], elinks.conf(5)
man:elinks[1], man:elinks.conf[5]

View File

@ -312,8 +312,8 @@ place it on the same line as the command, if it's
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
as a guideline for _REAL_ coding. Always use descriptive variables

View File

@ -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

View File

@ -19,7 +19,7 @@ required or recommended that you install.
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
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. \
Newer PuTTY also has 256 color support.
libidn For internationalized domain names.
SpiderMonkey Mozilla's JavaScript engine for getting
SpiderMonkey Mozilla's JavaScript engine for getting \
JavaScript/ECMAScript support in ELinks. \
See also <<ecmascript,notes on ECMAScript support>>.
-----------------------------------------------------------------------------
@ -71,6 +71,6 @@ include::small.txt[]
include::ecmascript.txt[]
include::import-features.conf.txt[]
include::features.txt[]
endif::installation-webpage[]

9
doc/man/man1/elinks.1.in Executable file → Normal file
View File

@ -17,7 +17,7 @@
.el .ne 3
.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
elinks \- lynx-like alternative character mode WWW browser
.SH "SYNOPSIS"
@ -200,6 +200,9 @@ The verbose level controls what messages are shown at start up and while running
\-version
Print \fIELinks\fR version information and exit\&.
Generated using output from ELinks version 0\&.12\&.GIT\&.
.SH "ENVIRONMENT VARIABLES"
.TP
@ -236,7 +239,7 @@ The path to the users home directory\&. Used when expanding ~/\&.
.TP
WWW_HOME
Homepage location (as in lynx(1))\&.
Homepage location (as in \fBlynx\fR(1))\&.
.SH "FILES"
@ -305,5 +308,5 @@ This manual page was written by Peter Gervai <grin@tolna\&.net>, using excerpts
.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

File diff suppressed because it is too large Load Diff

4
doc/man/man5/elinkskeys.5 Executable file → Normal file
View File

@ -17,7 +17,7 @@
.el .ne 3
.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
elinkskeys \- keybindings for ELinks
.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"
elinks(1), elinks\&.conf(5)
\fBelinks\fR(1), \fBelinks\&.conf\fR(5)

View File

@ -1,14 +1,15 @@
The ELinks Manual
=================
:Revision: $Revision: 1.18 $
:Date: $Date: 2005/05/18 18:55:14 $
Preface
-------
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
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
one time, and you can still find it at:

View File

@ -38,9 +38,9 @@ while (<>)
{
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.
print "\nid:[$idpath$1]::\n\t$2\n";
print "\nid:[$idpath$1]::\n\t$2.\n";
} elsif ($inblock) {
# Redo the indentation, preserve empty lines.
@ -59,10 +59,13 @@ while (<>)
my $orig_title = $title;
if (not /^#define\s/) {
while (not /(struct|enum|typedef|[^=])*[\s*](\w+).*[\[:,;{]/) {
$_ .= <>;
}
# Combine multi-line declarations to one. Break at empty
# for #define ...
while (not /(struct|enum|typedef|[^=])*[\s*](\w+).*[\[:,;{]/) {
my $line = $_;
$_ .= <>;
last if $_ eq $line;
}
if (/struct\s+(\w+)\s*{/) {
@ -73,36 +76,35 @@ while (<>)
$title = "enum:$1" . "[$title]";
$idpath = "";
} elsif (/#define\s+(\w+)[(]/) {
} elsif (/#define/) {
if (/#define\s+(\w+)[(]/) {
$title = "func:$1" . "[$title]";
} elsif (/#define\s+(\w+)/) {
$title = "macro:$1" . "[$title]";
}
$idpath = "";
} elsif (/typedef/) {
if (/.*\(\*(\w+)\)\(/) {
$title = "typedef:$1" . "[$title]";
} elsif (/typedef.*\s(\w+);/) {
$title = "typedef:$1" . "[$title]";
}
$idpath = "";
} elsif (/.*[\s*](\w+)\(/) {
$title = "func:$1" . "[$title]";
$idpath = "";
} elsif (/#define\s+(\w+)/) {
$title = "macro:$1" . "[$title]";
$idpath = "";
} elsif (/.*\(\*(\w+)\)\(/) {
$body = "#newline#" . $title if not $body;
$title = "id:[$idpath$1]::";
$indent = "\t";
} else {
if (/typedef/) {
if (/.*\(\*(\w+)\)\(/) {
$title = "typedef:$1" . "[$title]";
} elsif (/typedef.*\s(\w+);/) {
$title = "typedef:$1" . "[$title]";
}
$idpath = "";
} else {
if (/.*[\s*](\w+)\(/) {
$title = "func:$1" . "[$title]";
$idpath = "";
} elsif (/.*\(\*(\w+)\)\(/) {
$body = "#newline#" . $title if not $body;
$title = "id:[$idpath$1]::";
$indent = "\t";
} elsif (/[^=]*[\s*](\w+)[\[\s,:;]/) {
$body = "#newline#" . $title if not $body;
$title = "id:[$idpath$1]::";
$indent = "\t";
}
}
} elsif (/[^=]*[\s*](\w+)[\[\s,:;]/) {
$body = "#newline#" . $title if not $body;
$title = "id:[$idpath$1]::";
$indent = "\t";
}
put_section if $orig_title ne $title;
next;

View File

@ -5,102 +5,25 @@
# and hopefully other in the future.
# Updated by option handlind via --elinks=path/to/elinks option
elinks="elinks"
# 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
}
elinks="$1"
option="$2"
# Option handling {{{1
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
*command*)
filter="sed 0,/^Options:/d"
option=--long-help
;;
*config*)
filter="sed 0,/^Configuration/d"
option=--config-help
;;
esac
case "$option" in
--cmdoptions)
command="$elinks -long-help"
filter="sed 0,/^Options:/d"
backend="cmdoptions"
;;
--elinksconf)
command="$elinks -config-help"
filter="sed 0,/^Configuration/d"
backend="elinksconf"
;;
-)
command="cat /dev/stdin"
;;
--elinks=*)
elinks="`echo $option | sed -e 's/.*=//'`"
;;
*)
usage "Unknown option"
;;
esac
done
if test -z "$backend";
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()
print_description_line()
{
line="$1"
number="$2"
@ -124,12 +47,14 @@ print_cmdoptions_description_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"
typeid="$2"
@ -153,130 +78,10 @@ print_cmdoptions_option_type()
then
typestring="$default"
fi
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
@ -285,9 +90,7 @@ parse_description=
parse_int_option=
use_log=
$print_header
$command | $filter | while read line
"$elinks" $option | $filter | while read line
do
if test -n "$parse_description"
then
@ -295,7 +98,7 @@ do
# the desciption is over.
if test -z "$line"
then
$print_description_end
echo
parse_description=
parse_int_option=
continue
@ -318,7 +121,7 @@ do
esac
fi
$print_description_line "$line" "$number"
print_description_line "$line" "$number"
continue
fi
@ -329,7 +132,7 @@ do
parse_description=1
title="`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_-]*)
@ -337,7 +140,7 @@ do
path="`echo $line | sed -e 's/\([a-z-][^ ]*\).*/\1/'`"
typeid="`echo $line | sed -e 's/[ ]*[a-z-][^ ]* \([^ ]*\).*/\1/'`"
default="`echo \"$line\" | sed -e 's/[^(]*(\(.*\))/\1/'`"
$print_option_type "$path" "$typeid" "$default"
print_option_type "$path" "$typeid" "$default"
if test "$typeid" = "<num>";
then
parse_int_option=1
@ -349,6 +152,8 @@ do
esac
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

View File

@ -16,12 +16,22 @@
KBDBIND=$1
CONFIGDIR=$(dirname "$KBDBIND")
OUTPUT=$2
test -d "$CONFIGDIR" || exit
print_title()
{
echo "$1" | tr 'a-z' 'A-Z'
echo "$1" | sed 's/[^~]/~/g'
echo
}
print_keymap_actions()
{
keymap=$1
keymap="$1"
print_title "$keymap ACTIONS"
echo 'ifdef::backend-xhtml11[]'
echo '`----------------------------------`----------------------------------------------------------------------------'
@ -40,7 +50,9 @@ print_keymap_actions()
[ "$action" = " *scripting-function*" ] && continue
echo 'ifdef::backend-docbook[]'
echo "$action:: $caption."
echo "$action::"
echo " $caption."
echo
echo 'endif::backend-docbook[]'
echo 'ifdef::backend-xhtml11[]'
printf "%-34s %s\n" "$action" "$caption"
@ -57,6 +69,8 @@ print_keymap_defaults()
keymap="$1"
KEYMAP=$(echo $1 | tr '[a-z]' '[A-Z]')
print_title "$keymap KEYS"
echo 'ifdef::backend-xhtml11[]'
echo '`-----------`-------------------------------------------------------------------------------'
echo 'Key Description (Action)'
@ -84,8 +98,8 @@ print_keymap_defaults()
key="Space"
;;
*)
key=$(echo "$key" | sed "s/^'\(.*\)'/\1/" \
| sed "s/'/\\\\'/")
key=$(echo "$key" | sed "s/^'\(.*\)'$/\1/" \
| sed "s/'/{squote}/")
;;
esac
@ -95,19 +109,10 @@ print_keymap_defaults()
*) modifier="" ;;
esac
case "$DOCTYPE" in
man)
echo
echo "'$modifier$key'::"
echo " $action"
;;
html)
printf "%-11s %s\n" "$modifier$key" "$action"
;;
esac
echo 'ifdef::backend-docbook[]'
echo "'$modifier$key':: $action"
echo "'$modifier$key'::"
echo " $action"
echo
echo 'endif::backend-docbook[]'
echo 'ifdef::backend-xhtml11[]'
printf "%-11s %s\n" "$modifier$key" "$action"
@ -115,42 +120,18 @@ print_keymap_defaults()
done
echo 'ifdef::backend-xhtml11[]'
echo '--------------------------------------------------------------------------------------------'
echo 'endif::backend-xhtml11[]'
}
cat > keymap-actions.txt << __END__
MAIN ACTIONS
~~~~~~~~~~~~
print_keymap_doc=
$(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_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__
$print_keymap_doc main
$print_keymap_doc edit
$print_keymap_doc menu

View File

@ -3,11 +3,11 @@ include $(top_builddir)/Makefile.config
SUBDIRS-$(CONFIG_BOOKMARKS) += bookmarks
SUBDIRS-$(CONFIG_COOKIES) += cookies
SUBDIRS-$(CONFIG_DOM) += dom
SUBDIRS-$(CONFIG_ECMASCRIPT) += ecmascript
SUBDIRS-$(CONFIG_FORMHIST) += formhist
SUBDIRS-$(CONFIG_GLOBHIST) += globhist
SUBDIRS-$(CONFIG_ECMASCRIPT) += ecmascript
SUBDIRS-$(CONFIG_SCRIPTING) += scripting
SUBDIRS-$(CONFIG_DOM) += dom
SUBDIRS = \
bfu \
@ -37,7 +37,7 @@ OBJS = vernum.o
vernum.o: FORCE
FORCE:
elinks: lib.o
elinks: $(LIB_O_NAME)
$(call cmd,link)
PROGS = elinks

View File

@ -981,7 +981,6 @@ render_dom_document(struct cache_entry *cached, struct document *document,
unsigned char *string = struri(cached->uri);
size_t length = strlen(string);
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;
convert_table = get_convert_table(head, document->options.cp,
@ -1021,7 +1020,7 @@ render_dom_document(struct cache_entry *cached, struct document *document,
parser = init_sgml_parser(parser_type, doctype, &uri, 0);
if (!parser) return;
if (document->options.plain) {
add_dom_stack_context(&parser->stack, &renderer,
&dom_source_renderer_context_info);
@ -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
* incrementally parse new data. This will require the parser to live
* during the fetching of data. */
code = parse_sgml(parser, &source, 1);
code = parse_sgml(parser, buffer->source, buffer->length, 1);
if (parser->root) {
assert(parser->stack.depth == 1);

View File

@ -1,13 +1,9 @@
/* SGML node handling */
/* $Id: docbook.c,v 1.1.2.24 2004/02/29 02:47:30 jonas Exp $ */
/* DocBook SGML info */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dom/sgml/docbook/docbook.h"

View File

@ -1,12 +1,9 @@
/* SGML node handling */
/* HTML SGML info */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dom/sgml/html/html.h"

View File

@ -19,20 +19,6 @@
#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
* is the first to add it's context, which it is since it initializes the
* stack. */
@ -400,10 +386,11 @@ parse_sgml_plain(struct dom_stack *stack, struct dom_scanner *scanner)
}
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;
enum sgml_parser_code code;
struct dom_string source = INIT_DOM_STRING(buf, bufsize);
struct dom_node *node;
if (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;
}
parsing = init_sgml_parsing_state(parser, buffer);
if (!parsing) return SGML_PARSER_CODE_MEM_ALLOC;
code = parse_sgml_plain(&parser->stack, &parsing->scanner);
node = init_dom_node(DOM_NODE_TEXT, &source);
if (!node || !push_dom_node(&parser->parsing, node))
return SGML_PARSER_CODE_MEM_ALLOC;
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
* 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
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,
SGML_STATE_TEXT, count_lines, complete, incremental,
detect_errors);
parser->code = parse_sgml_plain(&parser->stack, &parsing->scanner);
}
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
get_sgml_parser_line_number(struct sgml_parser *parser)
{

View File

@ -101,6 +101,7 @@ struct sgml_parser {
struct dom_string uri; /*: The URI of the DOM document */
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 */
struct dom_stack stack; /*: A stack for tracking parsed nodes */
@ -111,7 +112,7 @@ struct sgml_parser {
/** Initialise an SGML parser
*
* Initialise an SGML parser with the given properties.
*
*
* type:: Stream or tree; one-time or persistant.
* doctype:: The document type, this affects what sub type nodes are given.
* uri:: The URI of the document root.
@ -137,14 +138,15 @@ void done_sgml_parser(struct sgml_parser *parser);
* signals through the `complete` parameter.
*
* 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.
*
* The returned code is ref:[SGML_PARSER_CODE_OK] if the buffer was
* successfully parserd, else a code hinting at the error.
*/
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
*

View File

@ -1,12 +1,9 @@
/* SGML node handling */
/* RSS SGML info */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dom/sgml/rss/rss.h"

View File

@ -1,12 +1,9 @@
/* SGML node handling */
/* XBEL SGML info */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dom/sgml/xbel/xbel.h"

View File

@ -160,9 +160,9 @@ extern struct dom_stack_context_info dom_stack_trace_context_info;
*
* Define `DOM_STACK_TRACE` to have debug info about the nodes added printed to
* the log. It will define add_dom_stack_tracer() to not be a no-op.
*
*
* Run as:
*
*
* ELINKS_LOG=/tmp/dom-dump.txt ./elinks -no-connect <url>
*
* to have the debug dumped into a file. */

View File

@ -7,7 +7,7 @@ TEST_PROGS = \
sgml-parser
TESTDEPS = \
$(top_builddir)/src/dom/lib.o \
$(top_builddir)/src/dom/$(LIB_O_NAME) \
$(top_builddir)/src/util/error.o \
$(top_builddir)/src/osdep/stub.o \
$(top_builddir)/src/util/hash.o \

View File

@ -312,7 +312,7 @@ main(int argc, char *argv[])
parser->error_func = sgml_error_function;
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) {
size_t root_offset = parser->stack.depth - 1;

View File

@ -2,11 +2,11 @@ top_builddir=../..
include $(top_builddir)/Makefile.config
INCLUDES += $(SPIDERMONKEY_CFLAGS)
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
SUBDIRS-$(CONFIG_SEE) += see
SUBDIRS-$(CONFIG_ECMASCRIPT_SEE) += see
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey.o
OBJS-$(CONFIG_SEE) += see.o
OBJS-$(CONFIG_ECMASCRIPT_SEE) += see.o
OBJS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey.o
OBJS = ecmascript.o

View File

@ -146,15 +146,17 @@ document_get(struct SEE_interpreter *interp, struct SEE_object *o,
struct form_view *form_view;
struct js_form *form_object;
if (!string) return;
foreach (form, document->forms) {
if (!form->name || strcasecmp(string, form->name))
continue;
mem_free_if(string);
form_view = find_form_view(doc_view, form);
form_object = js_get_form_object(interp, doc, form_view);
SEE_SET_OBJECT(res, (struct SEE_object *)form_object);
break;
}
mem_free(string);
}
}

View File

@ -396,7 +396,7 @@ js_input_focus(struct SEE_interpreter *interp, struct SEE_object *self,
linknum = get_form_control_link(document, fc);
/* Hiddens have no link. */
if (linknum < 0)
if (linknum < 0)
return;
jump_to_link_number(ses, doc_view, linknum);
@ -603,10 +603,10 @@ form_elems_get(struct SEE_interpreter *interp, struct SEE_object *o,
}
SEE_SET_STRING(&argv, p);
if (string[0] >= '0' && string[1] <= '9') {
js_form_elems_item(interp, o, NULL, 1,
(struct SEE_value **)&argv, res);
js_form_elems_item(interp, o, o, 1,
(struct SEE_value **)&argv, res);
} else {
js_form_elems_namedItem(interp, o, NULL, 1,
js_form_elems_namedItem(interp, o, o, 1,
(struct SEE_value **)&argv, res);
}
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 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 form_view *fv;
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 document_view *doc_view = vs->doc_view;
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 form *form;
unsigned char *string;
@ -689,7 +689,7 @@ js_forms_namedItem(struct SEE_interpreter *interp, struct SEE_object *self,
SEE_SET_OBJECT(res, (struct SEE_object *)obj);
break;
}
}
mem_free(string);
@ -716,18 +716,19 @@ forms_get(struct SEE_interpreter *interp, struct SEE_object *o,
} else {
unsigned char *string = SEE_string_to_unsigned_char(p);
struct SEE_value argv;
struct SEE_value *argv1 = &argv;
if (!string) {
SEE_SET_UNDEFINED(res);
return;
}
SEE_SET_STRING(&argv, p);
if (string[0] >= '0' && string[1] <= '9') {
js_forms_item(interp, o, NULL, 1,
(struct SEE_value **)&argv, res);
SEE_SET_STRING(argv1, p);
if (string[0] >= '0' && string[0] <= '9') {
js_forms_item(interp, o, fo->item, 1,
(struct SEE_value **)&argv1, res);
} else {
js_forms_namedItem(interp, o, NULL, 1,
(struct SEE_value **)&argv, res);
js_forms_namedItem(interp, o, fo->namedItem, 1,
(struct SEE_value **)&argv1, res);
}
mem_free(string);
}
@ -874,7 +875,7 @@ form_put(struct SEE_interpreter *interp, struct SEE_object *o,
mem_free_set(&form->name, string);
} else if (p == s_target) {
mem_free_set(&form->target, string);
}
}
}
static int
@ -952,7 +953,7 @@ struct js_form *js_get_form_object(struct SEE_interpreter *interp,
js_form->reset = SEE_cfunction_make(interp, js_form_reset, s_reset, 0);
js_form->submit = SEE_cfunction_make(interp, js_form_submit, s_submit, 0);
js_form->fv = fv;
fv->ecmascript_obj = js_form;
return js_form;
}

View File

@ -258,7 +258,7 @@ js_location_toString(struct SEE_interpreter *interp, struct SEE_object *self,
unsigned char *string = get_uri_string(vs->uri, URI_ORIGINAL);
struct SEE_string *str = string_to_SEE_string(interp, string);
mem_free_if(string);
mem_free_if(string);
checktime(interp);
SEE_SET_STRING(res, str);

View File

@ -94,7 +94,7 @@ unibar_get(struct SEE_interpreter *interp, struct SEE_object *o,
struct session_status *status = &doc_view->session->status;
struct js_unibar_object *obj = (struct js_unibar_object *)o;
unsigned char bar = obj->bar;
checktime(interp);
if (p == s_visible) {
#define unibar_fetch(bar) \

View File

@ -172,15 +172,14 @@ window_get(struct SEE_interpreter *interp, struct SEE_object *o,
} else {
unsigned char *frame = SEE_string_to_unsigned_char(p);
struct document_view *doc_view = vs->doc_view;
struct js_window_object *obj =
js_try_resolve_frame(doc_view, frame);
struct js_window_object *obj;
mem_free_if(frame);
if (obj) {
if (frame && (obj = js_try_resolve_frame(doc_view, frame))) {
SEE_SET_OBJECT(res, (struct SEE_object *)obj);
} else {
SEE_SET_UNDEFINED(res);
}
mem_free_if(frame);
}
}
@ -238,8 +237,10 @@ js_window_alert(struct SEE_interpreter *interp, struct SEE_object *self,
return;
string = SEE_value_to_unsigned_char(interp, argv[0]);
if (!string || !*string)
if (!string || !*string) {
mem_free_if(string);
return;
}
info_box(vs->doc_view->session->tab->term, MSGBOX_FREE_TEXT,
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")
&& !get_cmd_opt_bool("no-home")
&& !get_cmd_opt_bool("anonymous")
@ -350,6 +350,7 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self,
}
end:
mem_free_if(target);
done_uri(uri);
}

View File

@ -1,7 +1,7 @@
#! /bin/sh
# 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
# 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
# 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.
#
# The table consists of lines of the form
@ -30,72 +30,77 @@
# MIME charset name is preferred.
# The current list of GNU canonical charset names is as follows.
#
# name used by which systems a MIME name?
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-3 glibc yes
# ISO-8859-4 osf solaris freebsd yes
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
# ISO-8859-6 glibc aix hpux solaris yes
# ISO-8859-7 glibc aix hpux irix osf solaris yes
# ISO-8859-8 glibc aix hpux osf solaris yes
# ISO-8859-9 glibc aix hpux irix osf solaris yes
# ISO-8859-13 glibc
# ISO-8859-15 glibc aix osf solaris freebsd
# KOI8-R glibc solaris freebsd yes
# KOI8-U glibc freebsd yes
# CP437 dos
# CP775 dos
# CP850 aix osf dos
# CP852 dos
# CP855 dos
# CP856 aix
# CP857 dos
# CP861 dos
# CP862 dos
# CP864 dos
# CP865 dos
# CP866 freebsd dos
# CP869 dos
# CP874 win32 dos
# CP922 aix
# CP932 aix win32 dos
# CP943 aix
# CP949 osf win32 dos
# CP950 win32 dos
# CP1046 aix
# CP1124 aix
# CP1129 aix
# CP1250 win32
# CP1251 glibc win32
# CP1252 aix win32
# CP1253 win32
# CP1254 win32
# CP1255 win32
# CP1256 win32
# CP1257 win32
# GB2312 glibc aix hpux irix solaris freebsd yes
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
# EUC-TW glibc aix hpux irix osf solaris
# BIG5 glibc aix hpux osf solaris freebsd yes
# BIG5-HKSCS glibc
# GBK aix osf win32 dos
# GB18030 glibc
# SHIFT_JIS hpux osf solaris freebsd yes
# JOHAB glibc win32
# TIS-620 glibc aix hpux osf solaris
# VISCII glibc yes
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
# HP-GREEK8 hpux
# HP-HEBREW8 hpux
# HP-TURKISH8 hpux
# HP-KANA8 hpux
# DEC-KANJI osf
# DEC-HANYU osf
# UTF-8 glibc aix hpux osf solaris yes
# name MIME? used by which systems
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
# ISO-8859-3 Y glibc solaris
# ISO-8859-4 Y osf solaris freebsd darwin
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
# ISO-8859-6 Y glibc aix hpux solaris
# ISO-8859-7 Y glibc aix hpux irix osf solaris darwin
# ISO-8859-8 Y glibc aix hpux osf solaris
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
# ISO-8859-13 glibc darwin
# ISO-8859-14 glibc
# ISO-8859-15 glibc aix osf solaris freebsd darwin
# KOI8-R Y glibc solaris freebsd darwin
# KOI8-U Y glibc freebsd darwin
# KOI8-T glibc
# CP437 dos
# CP775 dos
# CP850 aix osf dos
# CP852 dos
# CP855 dos
# CP856 aix
# CP857 dos
# CP861 dos
# CP862 dos
# CP864 dos
# CP865 dos
# CP866 freebsd darwin dos
# CP869 dos
# CP874 woe32 dos
# CP922 aix
# CP932 aix woe32 dos
# CP943 aix
# CP949 osf woe32 dos
# CP950 woe32 dos
# CP1046 aix
# CP1124 aix
# CP1125 dos
# CP1129 aix
# CP1250 woe32
# CP1251 glibc solaris darwin woe32
# CP1252 aix woe32
# CP1253 woe32
# CP1254 woe32
# CP1255 glibc woe32
# CP1256 woe32
# CP1257 woe32
# GB2312 Y glibc aix hpux irix solaris freebsd darwin
# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
# EUC-TW glibc aix hpux irix osf solaris
# BIG5 Y glibc aix hpux osf solaris freebsd darwin
# BIG5-HKSCS glibc solaris
# GBK glibc aix osf solaris woe32 dos
# GB18030 glibc solaris
# SHIFT_JIS Y hpux osf solaris freebsd darwin
# JOHAB glibc solaris woe32
# TIS-620 glibc aix hpux osf solaris
# VISCII Y glibc
# TCVN5712-1 glibc
# GEORGIAN-PS glibc
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
# HP-GREEK8 hpux
# HP-HEBREW8 hpux
# HP-TURKISH8 hpux
# HP-KANA8 hpux
# DEC-KANJI osf
# DEC-HANYU osf
# 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
# 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:
echo "# Packages using this file: "
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*)
# With glibc-2.1 or newer, we don't need any canonicalization,
# because glibc has iconv and both glibc and libiconv support all
@ -217,6 +321,7 @@ case "$os" in
echo "646 ASCII"
echo "ISO8859-1 ISO-8859-1"
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-3 ISO-8859-3"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-6 ISO-8859-6"
@ -225,20 +330,27 @@ case "$os" in
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "koi8-r KOI8-R"
echo "ansi-1251 CP1251"
echo "BIG5 BIG5"
echo "Big5-HKSCS BIG5-HKSCS"
echo "gb2312 GB2312"
echo "GBK GBK"
echo "GB18030 GB18030"
echo "cns11643 EUC-TW"
echo "5601 EUC-KR"
echo "ko_KR.johap92 JOHAB"
echo "eucJP EUC-JP"
echo "PCK SHIFT_JIS"
echo "TIS620.2533 TIS-620"
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
freebsd*)
freebsd* | os2*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# 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 "US-ASCII ASCII"
for l in la_LN lt_LN; do
@ -270,6 +382,91 @@ case "$os" in
echo "ja_JP.Shift_JIS SHIFT_JIS"
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 has a single locale, and it has UTF-8 encoding.
echo "* UTF-8"
@ -284,7 +481,7 @@ case "$os" in
echo "# country is not the one your DOS machine actually uses, just"
echo "# correct it in this file, and send a mail to"
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 "C ASCII"
# ISO-8859-1 languages
@ -383,6 +580,7 @@ case "$os" in
echo "sq CP852"
echo "sq_AL CP852"
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 ??
# ISO-8859-3 languages
echo "mt CP850"
@ -394,8 +592,10 @@ case "$os" in
echo "bg_BG CP866" # not CP855 ??
echo "mk CP866" # not CP855 ??
echo "mk_MK CP866" # not CP855 ??
echo "ru KOI8-R" # not CP866 ??
echo "ru_RU KOI8-R" # not CP866 ??
echo "ru CP866"
echo "ru_RU CP866"
echo "uk CP1125"
echo "uk_UA CP1125"
# ISO-8859-6 languages
echo "ar CP864"
echo "ar_AE CP864"

View File

@ -240,7 +240,8 @@ struct block_list {
do { \
while (list != NULL) { \
struct block_list *old = list; \
list = list->next; \
list = list->next; \
free (old->address); \
free (old); \
} \
} while (0)

View File

@ -70,8 +70,12 @@
* feature may disappear soon if none is interested in. Please report
* 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
#undef CONFIG_TCP_INTERLINK
#define CONFIG_TCP_INTERLINK
#endif
/* Common to both AF_UNIX and AF_INET stuff. */

View File

@ -4,7 +4,7 @@ INCLUDES += $(X_CFLAGS)
SUBDIRS-$(CONFIG_OS_BEOS) += beos
SUBDIRS-$(CONFIG_OS_OS2) += os2
SUBDIRS-$(CONFIG_OS_RISCOS) += riscos
SUBDIRS-$(CONFIG_OS_RISCOS) += riscos
SUBDIRS-$(CONFIG_OS_UNIX) += unix
SUBDIRS-$(CONFIG_OS_WIN32) += win32

View File

@ -11,6 +11,7 @@
#include "elinks.h"
#include "osdep/stat.h"
#include "protocol/ftp/parse.h"

View File

@ -2,9 +2,9 @@ top_builddir=../..
include $(top_builddir)/Makefile.config
SUBDIRS-$(CONFIG_SCRIPTING_GUILE) += guile
SUBDIRS-$(CONFIG_SCRIPTING_LUA) += lua
SUBDIRS-$(CONFIG_SCRIPTING_LUA) += lua
SUBDIRS-$(CONFIG_SCRIPTING_PERL) += perl
SUBDIRS-$(CONFIG_SCRIPTING_PYTHON) += python
SUBDIRS-$(CONFIG_SCRIPTING_PYTHON) += python
SUBDIRS-$(CONFIG_SCRIPTING_RUBY) += ruby
SUBDIRS-$(CONFIG_SCRIPTING_SPIDERMONKEY) += smjs

View File

@ -26,7 +26,7 @@
/* Error reporting. */
#if defined(CONFIG_SCRIPTING_RUBY) || defined(CONFIG_SEE) || defined(CONFIG_SCRIPTING_SPIDERMONKEY)
#if defined(CONFIG_SCRIPTING_RUBY) || defined(CONFIG_SCRIPTING_SPIDERMONKEY)
void
report_scripting_error(struct module *module, struct session *ses,
unsigned char *msg)

View File

@ -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
* 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
* 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
* a safe recommendation anyway, so... ;-) */

20
test/css/css_media.html Normal file
View 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>