mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Merge with git+ssh://pasky/srv/git/elinks.git
This commit is contained in:
commit
315c6e8552
3
AUTHORS
3
AUTHORS
@ -218,6 +218,9 @@ Hugo Haas <hugo@larve.net>
|
||||
Minor random hacking
|
||||
debian/watch file
|
||||
|
||||
<incoherent@mail.ru>
|
||||
bzip2 decoding fix and rewrite
|
||||
|
||||
Ingo Blechschmidt <iblech@web.de>
|
||||
German translation updates
|
||||
|
||||
|
@ -46,7 +46,6 @@ INSTALL = $(if $(patsubst /%,,$(firstword @INSTALL@)),$(top_builddir)/)@INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
UNINSTALL = rm -f
|
||||
|
||||
host = @host@
|
||||
|
||||
@ -83,6 +82,7 @@ PYTHON_LIBS = @PYTHON_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RUBY_CFLAGS = @RUBY_CFLAGS@
|
||||
RUBY_LIBS = @RUBY_LIBS@
|
||||
SEE_CFLAGS = @SEE_CFLAGS@
|
||||
SPARSE = @SPARSE@
|
||||
SPIDERMONKEY_CFLAGS = @SPIDERMONKEY_CFLAGS@
|
||||
SPIDERMONKEY_LIBS = @SPIDERMONKEY_LIBS@
|
||||
|
@ -66,8 +66,10 @@ quiet_cmd_installdata = " [$(INSTALL_COLOR)INSTALL$(END_COLOR)] $(RELPATH)
|
||||
quiet_cmd_installprog = " [$(INSTALL_COLOR)INSTALL$(END_COLOR)] $(RELPATH)$(2) -> $(3)"
|
||||
cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3)
|
||||
|
||||
quiet_cmd_uninstall = " [$(UNINSTALL_COLOR)UNINSTALL$(END_COLOR)] $(3)/$(2)"
|
||||
cmd_uninstall = $(UNINSTALL) $(3)/$(2)
|
||||
# $(INSTALL_DATA) in cmd_installdata doesn't use the directory part of
|
||||
# $(2) when it forms the output file name, so don't use it here either.
|
||||
quiet_cmd_uninstall = " [$(UNINSTALL_COLOR)UNINSTALL$(END_COLOR)] $(3)/$(notdir $(2))"
|
||||
cmd_uninstall = $(RM) $(3)/$(notdir $(2))
|
||||
|
||||
#############################################################################
|
||||
# Special handling of conditional variables
|
||||
|
372
NEWS
372
NEWS
@ -5,16 +5,354 @@ You can see the complete list of recent changes, bugfixes and new features in
|
||||
the link:http://pasky.or.cz/gitweb.cgi[gitweb interface]. See the ChangeLog
|
||||
file for details.
|
||||
|
||||
ELinks now:
|
||||
-----------
|
||||
ELinks 0.12.GIT now:
|
||||
--------------------
|
||||
|
||||
* Native FSP protocol support (replaces CGI program in contrib/fsp/)
|
||||
* SEE Ecmascript backend
|
||||
* Minimalistic RSS renderer
|
||||
To be released as ELinks 0.12.0.
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
This list now contains all the important changes from ELinks 0.11.0 to
|
||||
ELinks 0.12.GIT (049cc9c6b37951a739dfd6b20ca92c170188824c). The next
|
||||
step will be to scan through Bugzilla and look for bug numbers that
|
||||
were not mentioned in related commit messages.
|
||||
|
||||
The list no doubt includes several changes that are not really
|
||||
important enough. Please move them to the separate "should be removed
|
||||
from NEWS" list below, or coalesce several changes into one entry (but
|
||||
do list all bug numbers). It might be a good idea to sort the entries
|
||||
roughly in decreasing order of importance.
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
* Notable new features
|
||||
- (unfinished enhancement 822) UTF-8 as terminal charset: not
|
||||
merely UTF-8 I/O of a unibyte codepage as in previous versions.
|
||||
Double-cell (aka fullwidth) and non-BMP characters work too, but
|
||||
combining characters and right-to-left text do not. The only
|
||||
multibyte charset ELinks can decode is still UTF-8, so if the
|
||||
server outputs e.g. Shift-JIS, you'd better recode with a proxy.
|
||||
- (enhancement 844) SMB protocol using libsmbclient. This replaces
|
||||
the smbclient-based code that was disabled in ELinks 0.11.2.
|
||||
* Incompatibilities
|
||||
- ECMAScript support is now disabled by default. It has known bugs
|
||||
(548, 755, 771) with which malicious web pages can crash or hang
|
||||
ELinks, and its security goals are undocumented. If you must
|
||||
enable ECMAScript support, it would be prudent to restrict the
|
||||
ELinks process with a sandbox of some kind.
|
||||
- (bug 871) The numbering of terminal.*.colors no longer depends on
|
||||
config options. This change makes elinks.conf portable between
|
||||
different configurations but unfortunately not between this and
|
||||
previous versions.
|
||||
- Changed Python goto_url_hook(current) to goto_url_hook(new). The
|
||||
hook can call the new function elinks.current_url() if desired.
|
||||
The Python scripting back-end is much more featureful than in
|
||||
previous releases, but it is still considered experimental.
|
||||
* Miscellaneous
|
||||
- (enhancement 752) Documentation updates
|
||||
- (enhancement 381) Reduce memory consumption of codepages and some
|
||||
other arrays.
|
||||
- (enhancement) Reject invalid UTF-8 input from documents and
|
||||
terminals.
|
||||
* Changes in terminal support
|
||||
- (enhancement) Mouse wheel support on BSD via moused -z 4
|
||||
- (enhancement) Support for mouse wheel over GPM
|
||||
- (bugfix 724) Better parsing of escape sequences and control
|
||||
sequences from the terminal.
|
||||
- (bugfix) Decode UTF-8 only from bytes, not from codes of special
|
||||
keys.
|
||||
- (new feature) 24-bit truecolor mode
|
||||
- (enhancement) "Resize terminal" tries to use the window size
|
||||
increment.
|
||||
- (new feature) Support Ctrl+Alt+letter key combinations.
|
||||
- (bugfix) Subprocess forked for SIGTSTP calls _exit, not exit.
|
||||
- (enhancement) Turn terminal transparency off by default.
|
||||
* Changes in cookies and bookmarks
|
||||
- (new feature) "Add server" button in the cookie manager.
|
||||
- (enhancement) Tell the user how to move bookmarks.
|
||||
- (enhancement 887) Save in cookie manager should save cookies even
|
||||
if unmodified.
|
||||
* Changes in the user interface
|
||||
- (new feature 145) Internal clipboard support
|
||||
- (enhancement) Localization updates
|
||||
- (bugfix 355) Add documents displayed via "What to do" dialog to
|
||||
globhist
|
||||
- (new feature) Autocreate directories needed to download a file.
|
||||
- (new feature) Option ui.show_menu_bar_always
|
||||
- (new feature) Option ui.tabs moves the tab bar to the top.
|
||||
- (new feature) New actions: kill-word-back, move-backward-word,
|
||||
move-forward-word
|
||||
- (enhancement) Ctrl+characters don't trigger hotkeys in menus and
|
||||
dialogs.
|
||||
- (bugfix 396) Never show empty filename in the what-to-do dialog
|
||||
- (bugfix 930) Refresh status bar when key prefix is eaten.
|
||||
* Changes in support for URI schemes, protocols, caching, and encodings
|
||||
- (bugfix) Fixes cache-control issue. See elinks-users mail from 28 Oct 2005
|
||||
- (new feature) LZMA decompression
|
||||
- (bugfix 517) Fixed and enabled HTTP bzip2 decompression
|
||||
- (new feature) HTTP negotiate-auth using GSSAPI
|
||||
- (bugfix 770) Download resuming simply restarts the download
|
||||
- (bugfix 691) Fix IPv4 DNS lookup bug
|
||||
- (enhancement 790) If-Modified-Since and If-None-Match
|
||||
- (bugfix) gzip_read: always call gzclearerr
|
||||
- (bugfix 107) Recognize "localhost" in file: URIs.
|
||||
- (bugfix 756) "assertion (cached)->object.refcount >= 0 failed"
|
||||
after HTTP proxy was changed
|
||||
- (bugfix) Encode and decode filenames in FSP URLs.
|
||||
- (enhancement) FSP progress indicator and password prompt.
|
||||
- (bugfix) Support much longer locale-specific timestamps when
|
||||
formatting a directory listing. LC_TIME=fi_FI.UTF-8 now works.
|
||||
* Changes in parsing and rendering of HTML (without DOM)
|
||||
- (bugfix) Use frame->name instead of target avoiding possible segfault.
|
||||
- (bugfix 284) Render closing parentheses for HTML elements SUB, SUP
|
||||
in the same line; don't let them fall to the next.
|
||||
- (enhancement) Show quote characters for HTML element Q, rather
|
||||
than italics.
|
||||
- (enhancement) Add support for parsing space separated CSS class
|
||||
attribute values
|
||||
- (bugfix 387) Treat 
 inside <pre>...</pre> as a newline.
|
||||
* Changes in parsing and rendering of non-HTML content-types
|
||||
- (new feature 121) If a mailcap entry indicates copiousoutput,
|
||||
ELinks itself acts as a pager.
|
||||
- (new feature 916) If a mailcap entry has no %s, provide the file
|
||||
as stdin.
|
||||
* Changes in the document viewer and tabs
|
||||
- (new feature) Highlight links as one enters link prefixes.
|
||||
- (new feature) Backspace backs out the last digit of the prefix.
|
||||
- (bugfix) Tabs opened by -remote now go behind existing dialogs.
|
||||
- (new feature 622) -dump-color-mode
|
||||
- (bugfix) Fix accesskeys so that they work when priority is 0
|
||||
- (enhancement) Text type-ahead searching: don't follow current link
|
||||
on enter
|
||||
- (bugfix) Take the terminal charset in account when comparing
|
||||
accesskeys.
|
||||
- (enhancement) Display accesskeys as e.g. (Alt-f), not just (f).
|
||||
* Changes in user scripting
|
||||
- (enhancement) Guile: Read hooks.scm rather than internal-hooks.scm.
|
||||
(Keep reading user-hooks.scm, too.)
|
||||
- (bugfix) Lua: Don't write to the string returned by lua_tostring.
|
||||
- (bugfix 945) Lua: Don't crash if a script calls e.g. error(nil).
|
||||
- (enhancement) SMJS: elinks.alert no longer displays as an "error".
|
||||
- (new feature) SMJS: New properties elinks.action, elinks.globhist,
|
||||
elinks.vs.
|
||||
- (new feature) SMJS: New function elinks.load_uri.
|
||||
- (new feature) SMJS: New method elinks.execute.
|
||||
- (enhancement) SMJS: Garbage-collect SMJS objects before flushing
|
||||
caches.
|
||||
- (bitrot) Perl: Don't assume POPpx stores the length to n_a.
|
||||
- (bugfix) Perl: Fix pre_format_html hook wrt. binary files.
|
||||
* Build system and compile-time errors (ignore if you don't build ELinks)
|
||||
- (bugfix) Fixed some bugs about compiling outside the source
|
||||
directory.
|
||||
- (bugfix) Don't use cmp -b, which FreeBSD doesn't support.
|
||||
- (bugfix) Don't include <sys/param.h> for MIN and MAX because it
|
||||
may interfere with CONFIG_IPV6 on Linux.
|
||||
- (bugfix) When the configure script cleans old object files, this
|
||||
no longer causes it to loop.
|
||||
- (experimental, new feature) --with-python=DIRECTORY, --with-gc=DIRECTORY
|
||||
- (bugfix) Include <sys/types.h> and fix compilation on an old
|
||||
PPC/Debian system
|
||||
- (bitrot) Fix compilation under gcc 4.x. Backported from gentoo portage.
|
||||
Also, reduce warnings on gcc 4.2 snapshots.
|
||||
- (bitrot) Update SpiderMonkey configure check Debian compatibility
|
||||
- (new feature 779) make uninstall
|
||||
- (experimental, new feature) Native Win32 port
|
||||
- (enhancement) If make -k was used and a sub-Make fails, build the
|
||||
rest before propagating.
|
||||
- (enhancement) Avoid compilation of vernum.c in 'make install'
|
||||
- (bugfix) Don't use $(AM_CFLAGS) anymore. Use $(CPPFLAGS) instead.
|
||||
- (bitrot) Fix two warnings on Mac OS X.
|
||||
* (experimental) Changes in ECMAScript support
|
||||
- (new feature) SEE ECMAScript backend, an alternative to SpiderMonkey.
|
||||
- (new feature) Handling onsubmit
|
||||
- (workaround) window.open remembers the last few URLs and doesn't
|
||||
reopen them when incremental rendering reruns the onload script.
|
||||
- (enhancement) Recognize document.location.href for SMJS.
|
||||
- (enhancement) Better handling of form.action assignments
|
||||
- (enhancement) form[x] looks up controls also by id, not only name.
|
||||
- (new feature) New property input.selectedIndex.
|
||||
- (new feature) Activate link only when onClick returns true.
|
||||
- (enhancement) input.accessKey can be any Unicode character except
|
||||
U+0000.
|
||||
- (new feature) window.setTimeout, window.status
|
||||
* (experimental) Changes in SGML/DOM implementation
|
||||
- (new feature) Minimalistic RSS renderer
|
||||
- (enhancement) Source highlighting also recognizes
|
||||
application/xhtml+xml and application/docbook+xml. It doesn't yet
|
||||
support arbitrary XML though.
|
||||
- (enhancement) Make it possible to use more CSS properties with the
|
||||
source highlighting
|
||||
- (enhancement) Handle <base href=""> for HTML source rendering
|
||||
- (enhancement) Add support for scanning comment endings such as
|
||||
'--!>' correctly
|
||||
- (new feature) Incremental parsing
|
||||
- And more.
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
The following changes should be removed from NEWS before ELinks 0.12.0
|
||||
is released. They are currently listed here just to show that they
|
||||
have already been considered.
|
||||
|
||||
* Only partially fixed bugs:
|
||||
- (bugfix 764) int/long type punning in options
|
||||
- (bugfix 725) Fixes version checking for Ruby in 'configure'
|
||||
- (bugfix 890) Change colors 0-15 to match xterm defaults.
|
||||
The bug report also requests asking xterm to report its palette,
|
||||
but that part will be delayed to 0.13 or later.
|
||||
* Fixed bugs that were not in previous versions:
|
||||
- (bugfix) Fix a crash when adding a server in the cookie manager.
|
||||
- (bugfix) cookies: "Add Server" ignores "cookies.accept_policy".
|
||||
- (bugfix) Fix data: protocol.
|
||||
- (bugfix 747) Properly deselect the main menu instead of crashing
|
||||
- (bugfix 778) ELinks crashes on binary files when
|
||||
document.plain.display_links is set
|
||||
- (bugfix 784) UTF-8 mode misconverts non-ASCII entity in Latin-1
|
||||
document
|
||||
- (bugfix 782) UTF-8 buffer overwritten while in use
|
||||
- (bugfix) switch_to_tab: Prevent "tab number out of range"
|
||||
assertion failure.
|
||||
- (bugfix) Fixed about:
|
||||
- (bugfix 821) I cannot enter national characters in dialog boxes
|
||||
- (bugfix 834) Gzip decompression doesn't work
|
||||
- (bugfix) Fix out-of-bound access to the quote_char buffer
|
||||
- (bugfix 788) compile error with --enable-perl
|
||||
- (bugfix 827) Crash with term charset set to Unicode and UTF-8 I/O
|
||||
disabled
|
||||
- (bugfix 826) too small table for double-cell characters
|
||||
- (bugfix 902) crash: "overflow detected realloc()" in realloc_line
|
||||
- (bugfix 912) wrong color in one cell of an HTML input field
|
||||
- (bugfix 835) Text in textarea is unaffected by horizontal
|
||||
scrolling of document in UTF-8 mode
|
||||
- (bugfix 823) Big textarea is too slow with CONFIG_UTF8
|
||||
- (bugfix 754) Pressing ESC do not pop up main menu anymore.
|
||||
- (bugfix 794) tab-close-all-but-current crashes
|
||||
- (bugfix 781) document->buf can overflow with UTF-8 enabled
|
||||
- (bugfix 882) C1 controls pass through to the terminal if written
|
||||
as entity references
|
||||
- (bugfix 935) Yes and No buttons override the bottom border of the
|
||||
dialog.
|
||||
* Reverted changes:
|
||||
- (new feature) document.write, reverted in
|
||||
2c087e52e74528a720621186b91880463e039d50
|
||||
- (enhancement) restore Linux console mode (UTF-8 or not), reverted
|
||||
in 10d72cae7eafa6b90db1c8f303deb200555734c2
|
||||
- (enhancement) wcwidth, reverted in
|
||||
d050cb67aa37390ab938b0a308c7541f19578506
|
||||
- (new feature) Let plain text change colors with ESC [ 31 m or
|
||||
similar control sequences, reverted in
|
||||
2a6125e3d0407b588eb286d4d0ff5c98c23ebda9
|
||||
- (enhancement) Support for pasting from GNU screen clipboard,
|
||||
reverted in 763f03f146cc1391b303c8074556f0ddea1e3c7a
|
||||
* Unimportant changes:
|
||||
- (enhancement) If select fails, save its errno.
|
||||
- (bugfix) Use PF_* instead of AF_* as first parameter of socket(2).
|
||||
(commits 8b7657deaf6037736d0abe88bae1865fec55fe93 in 0.12.GIT
|
||||
and d9b56bad7d528a87376768572c2601c57d8afb02 in 0.11.0.GIT)
|
||||
- (bugfix) Better error handling in save_form_data_to_file and
|
||||
save_textarea_file.
|
||||
(commit 6bdc34cfbcade0c25922c1ad96c753cc7d1c9949 and nearby)
|
||||
- (bugfix) Do not call toupper with potentially out-of-range values.
|
||||
(commit 9e30ee631ced843f26a264c351cfa1716e7e1941)
|
||||
- (bugfix) If ELinks logs debug information to a file, it now opens
|
||||
that in binary mode. (commit 4ced25779dca68c0e15ce1e695ce191b536bb05d)
|
||||
- (bugfix) Kill the ESC timer when blocking the terminal.
|
||||
(commit 539f756438fca4264ab937b2ccfba2351e916a16)
|
||||
- (bugfix) Don't claim that the authentication is for HTTP.
|
||||
(commit ef2f6383c6f0bed576e6f69030eacc4931b42a27)
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
ELinks 0.11.2.GIT now:
|
||||
----------------------
|
||||
|
||||
To be released as ELinks 0.11.3.
|
||||
|
||||
* critical bugs 846, 870: fix crashes in web ECMAScripts and SMJS user
|
||||
scripting
|
||||
* critical bug 927: fix null pointer crash if META Refresh is in a
|
||||
table cell
|
||||
* critical bug 941: fix assertion failure or memory corruption if FTP
|
||||
server responds to PASV with status 200
|
||||
* critical bug 729 in experimental BitTorrent: fix crashes with
|
||||
various bogus BitTorrent URLs
|
||||
* critical bug 868: fix segfault in check_timers
|
||||
* critical bugs 897, 919: fix crashes on operating systems lacking
|
||||
mremap()
|
||||
* critical: fix null pointer crash if XBEL bookmark has no title
|
||||
* critical bug 760: fix crash when moving bookmarks out of a folder
|
||||
* critical: fix crash in an empty file-extensions menu
|
||||
* critical bug 715: fix null pointer crash caused by malformed proxy
|
||||
setting
|
||||
* critical: fix SMJS null pointer crash on exit
|
||||
* critical bug 880 in experimental Python scripting: fix null pointer
|
||||
crash with -no-home
|
||||
* major Gentoo 121247: fix segfaults in Ruby user scripting
|
||||
* major bug 908: don't write to freed memory when the user pushes a
|
||||
radio button
|
||||
* major bug 937: don't send the entire HTTPS request to a CONNECT
|
||||
proxy
|
||||
* bug 899, Debian 403139: recognize >2GB files in FTP directory
|
||||
listing, if off_t is large enough
|
||||
* bug 942: encode/decode file names in FTP URLs, so they can contain
|
||||
spaces
|
||||
* bug 741: don't recognize HTML comments inside STYLE elements
|
||||
* bug 769: fix MD5 computation/formatting in HTTP digest
|
||||
authentication
|
||||
* fix POST to local CGI
|
||||
* remove a garbage character from the end of the authentication prompt
|
||||
* bugs 872, 886: editing or deleting cookies in the cookie manager
|
||||
should cause a save
|
||||
* secure file saving: restore umask after _all_ failure conditions
|
||||
* decode the fragment identifier extracted from the URI when looking
|
||||
it up
|
||||
* bug 768 in experimental Python scripting: link with e.g. -lpython2.4
|
||||
rather than -lpython
|
||||
* minor bugs 830, 831: changes in parsing of -remote arguments
|
||||
* minor Debian 313696 and other translation updates
|
||||
* enhancement 24: fix searching past unselectable elements in menus
|
||||
* enhancement: recognize function keys and backspace/delete on FreeBSD
|
||||
* enhancement 772: recognize Shift-Tab on XTerm
|
||||
* enhancement: place cursor on listbox rather than button, to help
|
||||
screen readers
|
||||
* enhancements in text wrapping
|
||||
* enhancement 767: recognize URL in META Refresh even without "URL="
|
||||
* enhancement 396: search for "<html>" if the server doesn't specify a
|
||||
Content-Type
|
||||
|
||||
ELinks 0.11.2:
|
||||
--------------
|
||||
|
||||
Released on 2006-11-19.
|
||||
|
||||
* critical bug 841, CVE-2006-5925: prevent enabling the SMB protocol
|
||||
* critical bug 786: fix crash when following a link in frames
|
||||
* print off_t with custom OFF_T_FORMAT instead of PRId64
|
||||
* build: Minix3 compatibility
|
||||
|
||||
ELinks 0.11.1:
|
||||
--------------
|
||||
|
||||
Released on 2006-01-29.
|
||||
|
||||
* work around null pointer crashes in HTTP digest authentication
|
||||
* fix assertion failure with document.plain.display_links and
|
||||
uppercase URIs
|
||||
* fix Gopher crashes
|
||||
* enhancement 630: native FSP protocol support (replaces CGI program
|
||||
in contrib/cgi/)
|
||||
* SMJS user scripting: check for hooks.js before trying to load it
|
||||
* SMJS user scripting: the elinks.preformat_html hook gets a second
|
||||
argument: a view_state object with .uri and .plain properties
|
||||
* bug 921 in Lua scripting: fix current_document_formatted
|
||||
* if given "a?b" in the command line, try to guess whether the
|
||||
question mark is part of the file name or indicates a query part
|
||||
* updated character entity list from unicode.org
|
||||
* build: use asciidoc -unsafe for AsciiDoc 7.0.4 compatibility
|
||||
* build bug 738: fix "/config.charset" error triggered by building in
|
||||
the source directory
|
||||
|
||||
ELinks 0.11.0 (Elated):
|
||||
-----------------------
|
||||
|
||||
Released on 2006-01-01.
|
||||
|
||||
* SSL support via GNUTLS now requires 1.2 or higher
|
||||
* support for Lua 4.x was dropped, we only support Lua 5.x now
|
||||
* Python scripting back-end (experimental)
|
||||
@ -26,30 +364,38 @@ ELinks 0.11.0 (Elated):
|
||||
history-move-back, and history-move-forward
|
||||
* BitTorrent protocol (experimental)
|
||||
* FSP protocol via a CGI script (see contrib/cgi/README.FSP) (experimental)
|
||||
* sysmouse support on the BSD console
|
||||
* enhancement 694: sysmouse support on the BSD console
|
||||
* new GNU make based build system (aclocal from automake is still required)
|
||||
* move from CVS to GIT
|
||||
|
||||
ELinks 0.10.6:
|
||||
--------------
|
||||
|
||||
Released on 2005-09-15.
|
||||
|
||||
* external editor is configurable at run-time
|
||||
|
||||
ELinks 0.10.4:
|
||||
--------------
|
||||
|
||||
Released on 2005-04-06.
|
||||
|
||||
* explicit keyboard accelerators were defined for buttons in dialogue boxes and
|
||||
are now highlighted
|
||||
|
||||
ELinks 0.10.2:
|
||||
--------------
|
||||
|
||||
Released on 2005-01-30.
|
||||
|
||||
* Ruby scripting back-end (experimental)
|
||||
* Debian package files (apt-get install devscripts && debuild -uc -us)
|
||||
|
||||
ELinks 0.10.0 (Thelma):
|
||||
-----------------------
|
||||
|
||||
Released on 2004-12-24.
|
||||
|
||||
* simple CSS
|
||||
* simple JavaScript/ECMAScript support by the SpiderMonkey Mozilla JS engine
|
||||
* plain-text mark-up (_^Hx to underline, x^Hx to embolden)
|
||||
@ -81,6 +427,8 @@ ELinks 0.10.0 (Thelma):
|
||||
ELinks 0.9.2:
|
||||
-------------
|
||||
|
||||
Released on 2004-09-24.
|
||||
|
||||
* directional links navigation
|
||||
* 'unset' configuration directive, which can be used, e.g., to delete default
|
||||
MIME type settings or external protocol handlers.
|
||||
@ -88,6 +436,8 @@ ELinks 0.9.2:
|
||||
ELinks 0.9.1:
|
||||
-------------
|
||||
|
||||
Released on 2004-01-23.
|
||||
|
||||
* support <object> tags by displaying a link to the data
|
||||
* add beginning-of-buffer and end-of-buffer actions for text fields
|
||||
* automatic session saving/restoring support (disabled by default)
|
||||
@ -100,6 +450,8 @@ ELinks 0.9.1:
|
||||
ELinks 0.9.0 (Skyrider):
|
||||
------------------------
|
||||
|
||||
Released on 2003-12-24.
|
||||
|
||||
* used gettext for internationalization
|
||||
* support for background document colors
|
||||
* tabs support
|
||||
@ -121,6 +473,8 @@ ELinks 0.9.0 (Skyrider):
|
||||
ELinks 0.4.0 (Iceberg):
|
||||
-----------------------
|
||||
|
||||
Released on 2002-12-24.
|
||||
|
||||
* merged HTTP_AUTH
|
||||
* basic proxy auth support
|
||||
* cookies parser rewritten
|
||||
@ -153,6 +507,8 @@ ELinks 0.4.0 (Iceberg):
|
||||
ELinks 0.3.0:
|
||||
-------------
|
||||
|
||||
Released on 2002-03-02.
|
||||
|
||||
* unhistory
|
||||
* external textarea editor
|
||||
* DNS rewrite - we handle multi RR per host correctly
|
||||
@ -165,6 +521,8 @@ ELinks 0.3.0:
|
||||
Links 0.96-pb3:
|
||||
---------------
|
||||
|
||||
Released on 2001-10-26.
|
||||
|
||||
* secured cookies file creation
|
||||
* support for title attribute of img tag
|
||||
* Catalan translation
|
||||
@ -175,6 +533,8 @@ Links 0.96-pb3:
|
||||
Links 0.96-pb2:
|
||||
---------------
|
||||
|
||||
Released on 2001-10-06.
|
||||
|
||||
* cookies expiration, saving and resaving
|
||||
* do NOT strip everything after ? in form action
|
||||
* http referrer, true http referrer
|
||||
|
4
SITES
4
SITES
@ -10,8 +10,6 @@ DEBs:
|
||||
|
||||
RPMs:
|
||||
http://rpmfind.net/linux/rpm2html/search.php?query=elinks
|
||||
http://ftp.nest.pld-linux.org/pool/e/elinks/
|
||||
http://ftp.pld-linux.org/pool/e/elinks/
|
||||
|
||||
RISC OS binaries:
|
||||
http://www.riscos.info/unix/indexes/browser.html
|
||||
@ -43,6 +41,4 @@ DEBs:
|
||||
|
||||
RPMs:
|
||||
http://rpmfind.net/linux/rpm2html/search.php?query=links
|
||||
http://ftp.nest.pld-linux.org/pool/l/links/
|
||||
http://ftp.pld-linux.org/pool/l/links/
|
||||
|
||||
|
@ -147,14 +147,14 @@ Window$ 1250
|
||||
0x7E 0x007E #TILDE
|
||||
0x7F 0x007F #DELETE
|
||||
0x80 0x20AC #EURO SIGN
|
||||
0x81 0x0000 #UNDEFINED
|
||||
0x81 #UNDEFINED
|
||||
0x82 0x201A #SINGLE LOW-9 QUOTATION MARK
|
||||
0x83 0x0000 #UNDEFINED
|
||||
0x83 #UNDEFINED
|
||||
0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK
|
||||
0x85 0x2026 #HORIZONTAL ELLIPSIS
|
||||
0x86 0x2020 #DAGGER
|
||||
0x87 0x2021 #DOUBLE DAGGER
|
||||
0x88 0x0000 #UNDEFINED
|
||||
0x88 #UNDEFINED
|
||||
0x89 0x2030 #PER MILLE SIGN
|
||||
0x8A 0x0160 #LATIN CAPITAL LETTER S WITH CARON
|
||||
0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
||||
@ -162,7 +162,7 @@ Window$ 1250
|
||||
0x8D 0x0164 #LATIN CAPITAL LETTER T WITH CARON
|
||||
0x8E 0x017D #LATIN CAPITAL LETTER Z WITH CARON
|
||||
0x8F 0x0179 #LATIN CAPITAL LETTER Z WITH ACUTE
|
||||
0x90 0x0000 #UNDEFINED
|
||||
0x90 #UNDEFINED
|
||||
0x91 0x2018 #LEFT SINGLE QUOTATION MARK
|
||||
0x92 0x2019 #RIGHT SINGLE QUOTATION MARK
|
||||
0x93 0x201C #LEFT DOUBLE QUOTATION MARK
|
||||
@ -170,7 +170,7 @@ Window$ 1250
|
||||
0x95 0x2022 #BULLET
|
||||
0x96 0x2013 #EN DASH
|
||||
0x97 0x2014 #EM DASH
|
||||
0x98 0x0000 #UNDEFINED
|
||||
0x98 #UNDEFINED
|
||||
0x99 0x2122 #TRADE MARK SIGN
|
||||
0x9A 0x0161 #LATIN SMALL LETTER S WITH CARON
|
||||
0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
||||
|
@ -23,22 +23,22 @@ Window$ 1257
|
||||
0x20-0x7e idem
|
||||
#
|
||||
0x80 0x20AC #EURO SIGN
|
||||
0x81 0x0000 #UNDEFINED
|
||||
0x81 #UNDEFINED
|
||||
0x82 0x201A #SINGLE LOW-9 QUOTATION MARK
|
||||
0x83 0x0000 #UNDEFINED
|
||||
0x83 #UNDEFINED
|
||||
0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK
|
||||
0x85 0x2026 #HORIZONTAL ELLIPSIS
|
||||
0x86 0x2020 #DAGGER
|
||||
0x87 0x2021 #DOUBLE DAGGER
|
||||
0x88 0x0000 #UNDEFINED
|
||||
0x88 #UNDEFINED
|
||||
0x89 0x2030 #PER MILLE SIGN
|
||||
0x8A 0x0000 #UNDEFINED
|
||||
0x8A #UNDEFINED
|
||||
0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
||||
0x8C 0x0000 #UNDEFINED
|
||||
0x8C #UNDEFINED
|
||||
0x8D 0x00A8 #DIAERESIS
|
||||
0x8E 0x02C7 #CARON
|
||||
0x8F 0x00B8 #CEDILLA
|
||||
0x90 0x0000 #UNDEFINED
|
||||
0x90 #UNDEFINED
|
||||
0x91 0x2018 #LEFT SINGLE QUOTATION MARK
|
||||
0x92 0x2019 #RIGHT SINGLE QUOTATION MARK
|
||||
0x93 0x201C #LEFT DOUBLE QUOTATION MARK
|
||||
@ -46,20 +46,20 @@ Window$ 1257
|
||||
0x95 0x2022 #BULLET
|
||||
0x96 0x2013 #EN DASH
|
||||
0x97 0x2014 #EM DASH
|
||||
0x98 0x0000 #UNDEFINED
|
||||
0x98 #UNDEFINED
|
||||
0x99 0x2122 #TRADE MARK SIGN
|
||||
0x9A 0x0000 #UNDEFINED
|
||||
0x9A #UNDEFINED
|
||||
0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
||||
0x9C 0x0000 #UNDEFINED
|
||||
0x9C #UNDEFINED
|
||||
0x9D 0x00AF #MACRON
|
||||
0x9E 0x02DB #OGONEK
|
||||
0x9F 0x0000 #UNDEFINED
|
||||
0x9F #UNDEFINED
|
||||
0xA0 0x00A0 #NO-BREAK SPACE
|
||||
0xA1 0x0000 #UNDEFINED
|
||||
0xA1 #UNDEFINED
|
||||
0xA2 0x00A2 #CENT SIGN
|
||||
0xA3 0x00A3 #POUND SIGN
|
||||
0xA4 0x00A4 #CURRENCY SIGN
|
||||
0xA5 0x0000 #UNDEFINED
|
||||
0xA5 #UNDEFINED
|
||||
0xA6 0x00A6 #BROKEN BAR
|
||||
0xA7 0x00A7 #SECTION SIGN
|
||||
0xA8 0x00D8 #LATIN CAPITAL LETTER O WITH STROKE
|
||||
|
@ -8,7 +8,7 @@ N=`cat tmp | wc -l`
|
||||
echo '/* Automatically generated by gen-7b */'
|
||||
echo '/* DO NOT EDIT THIS FILE! EDIT Unicode/7bitrepl.lnx INSTEAD! */'
|
||||
echo
|
||||
echo 'struct { unicode_val_T x; unsigned char *s; } unicode_7b ['`expr $N + 1`'] = {'
|
||||
echo 'static const struct { unicode_val_T x; unsigned char *s; } unicode_7b ['`expr $N + 1`'] = {'
|
||||
sort tmp | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed 's/^/ {/' | sed 's/:/, "/' | sed 's/$/"},/'
|
||||
echo ' {-1, NULL}'
|
||||
echo '};'
|
||||
|
@ -23,17 +23,29 @@ for i in $codepages; do
|
||||
echo "/*** $i ***/"
|
||||
echo
|
||||
|
||||
sed '1,2d
|
||||
sed ' # Delete the name and aliases lines.
|
||||
1,2d
|
||||
# Delete comment-only and blank lines.
|
||||
/^[ ]*\(#.*\)\{,1\}$/d
|
||||
# Copy to the hold space.
|
||||
h
|
||||
# Delete everything except the comment.
|
||||
s/^[^#]*//
|
||||
# If there is a comment, change it to use /* */ delimiters.
|
||||
s!#[ ]*\(.*\)!/* \1 */!
|
||||
# Exchange spaces; now hold space = comment and pattern space = all.
|
||||
x
|
||||
# Delete the comment.
|
||||
s/#.*//
|
||||
# Canonicalize case so the strings can be used as lookup keys.
|
||||
y/Xabcdef/xABCDEF/
|
||||
# Delete mappings of bytes 0x00...0x7F. ELinks assumes those match ASCII.
|
||||
/^0x[01234567]/d
|
||||
/[^0x0123456789ABCDEF ]/d
|
||||
# Delete lines that do not map the byte to exactly one character.
|
||||
/^[ ]*0x[0123456789ABCDEF]\{2\}[ ]\{1,\}0x[0123456789ABCDEF]\{1,\}[ ]*$/!d
|
||||
# Append a newline and the comment from the hold space.
|
||||
G
|
||||
# Delete the newline added by the previous command.
|
||||
s/\n//' "$i.cp" | {
|
||||
for left in 8 9 A B C D E F; do
|
||||
for right in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do
|
||||
|
@ -16,7 +16,7 @@ N=`cat tmp | wc -l`
|
||||
cat > ../src/intl/entity.inc <<EOF
|
||||
/* Automatically generated by gen-ent */
|
||||
|
||||
struct entity { char *s; unicode_val_T c; } entities [$(expr $N + 1)] = {
|
||||
static const struct entity { char *s; unicode_val_T c; } entities [$(expr $N + 1)] = {
|
||||
$(cat tmp)
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
61
configure.in
61
configure.in
@ -277,7 +277,7 @@ AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_STRFTIME
|
||||
AC_CHECK_FUNCS(cfmakeraw gethostbyaddr herror strerror)
|
||||
AC_CHECK_FUNCS(atoll cfmakeraw gethostbyaddr herror strerror)
|
||||
AC_CHECK_FUNCS(popen uname access chmod alarm timegm mremap)
|
||||
AC_CHECK_FUNCS(strcasecmp strncasecmp strcasestr strstr strchr strrchr)
|
||||
AC_CHECK_FUNCS(memmove bcopy stpcpy strdup index isdigit mempcpy memrchr)
|
||||
@ -595,7 +595,6 @@ if test "$enable_see" = "yes"; then
|
||||
SEE_LIBS="`$SEE_CONFIG --libs`"
|
||||
SEE_CFLAGS="`$SEE_CONFIG --cppflags`"
|
||||
LIBS="$SEE_LIBS $LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $SEE_CFLAGS"
|
||||
EL_CONFIG(CONFIG_ECMASCRIPT_SEE, [SEE])
|
||||
AC_SUBST(SEE_CFLAGS)
|
||||
else
|
||||
@ -725,7 +724,6 @@ if test "$enable_guile" = "yes"; then
|
||||
GUILE_LIBS="`guile-config link`"
|
||||
GUILE_CFLAGS="`guile-config compile`"
|
||||
LIBS="$GUILE_LIBS $LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $GUILE_CFLAGS"
|
||||
EL_CONFIG(CONFIG_SCRIPTING_GUILE, [Guile])
|
||||
AC_SUBST(GUILE_CFLAGS)
|
||||
cat <<EOF
|
||||
@ -805,6 +803,7 @@ else
|
||||
EL_CONFIG(CONFIG_SCRIPTING_PERL, [Perl])
|
||||
|
||||
CFLAGS="$CFLAGS_X"
|
||||
CPPFLAGS="$CPPFLAGS_X"
|
||||
AC_SUBST(PERL_LIBS)
|
||||
AC_SUBST(PERL_CFLAGS)
|
||||
fi
|
||||
@ -850,6 +849,7 @@ if test "$enable_python" = "yes"; then
|
||||
EL_CONFIG(CONFIG_SCRIPTING_PYTHON, [Python])
|
||||
AC_SUBST(PYTHON_LIBS)
|
||||
AC_SUBST(PYTHON_CFLAGS)
|
||||
CPPFLAGS="$CPPFLAGS_X"
|
||||
cat <<EOF
|
||||
***********************************************************************
|
||||
The Python support is incomplete and not so well integrated to ELinks
|
||||
@ -929,6 +929,7 @@ else
|
||||
AC_CHECK_HEADERS(lauxlib.h)
|
||||
|
||||
CFLAGS="$CFLAGS_X"
|
||||
CPPFLAGS="$CPPFLAGS_X"
|
||||
AC_SUBST(LUA_LIBS)
|
||||
AC_SUBST(LUA_CFLAGS)
|
||||
fi
|
||||
@ -1142,7 +1143,6 @@ AC_PATH_X
|
||||
if test x"$no_x" != xyes; then
|
||||
if test -n "$x_includes"; then
|
||||
X_CFLAGS="-I$x_includes"
|
||||
CPPFLAGS="$CPPFLAGS -I$x_includes"
|
||||
fi
|
||||
if test -n "$x_libraries"; then
|
||||
LDFLAGS="$LDFLAGS -L$x_libraries"
|
||||
@ -1161,13 +1161,6 @@ AC_CHECK_HEADERS(execinfo.h, HAVE_EXECINFO=yes, HAVE_EXECINFO=no)
|
||||
# possible checks for other system-specific means go here
|
||||
|
||||
|
||||
dnl ===================================================================
|
||||
dnl SMB protocol support.
|
||||
dnl ===================================================================
|
||||
|
||||
AC_CHECK_PROG(HAVE_SMBCLIENT, smbclient, yes, no)
|
||||
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Gettext grey zone. Beware.
|
||||
dnl ===================================================================
|
||||
@ -1260,17 +1253,28 @@ EL_ARG_ENABLE(CONFIG_GOPHER, gopher, [Gopher protocol],
|
||||
EL_ARG_ENABLE(CONFIG_NNTP, nntp, [NNTP protocol],
|
||||
[ --enable-nntp enable nntp protocol support])
|
||||
|
||||
dnl Force disable SMB before EL_ARG_DEPEND so that it logs the correct value.
|
||||
if test "${enable_smb-no}" != no || test "${CONFIG_SMB-no}" != no; then
|
||||
AC_MSG_WARN([Forcing --disable-smb because of vulnerability CVE-2006-5925.
|
||||
If you want to use SMB, please vote for bug 844 or post a patch.])
|
||||
dnl ===================================================================
|
||||
dnl SMB protocol support.
|
||||
dnl ===================================================================
|
||||
EL_SAVE_FLAGS
|
||||
|
||||
if test "x${enable_smb}" != xno; then
|
||||
AC_CHECK_HEADERS(libsmbclient.h, HAVE_SMBCLIENT=yes, HAVE_SMBCLIENT=no)
|
||||
|
||||
if test "$HAVE_SMBCLIENT" = yes; then
|
||||
AC_CHECK_LIB(smbclient, smbc_init, HAVE_SMBCLIENT=yes, HAVE_SMBCLIENT=no)
|
||||
if test "$HAVE_SMBCLIENT" = yes; then
|
||||
LIBS="$LIBS -lsmbclient"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
EL_ARG_DEPEND(CONFIG_SMB, smb, [HAVE_SMBCLIENT:yes], [Samba protocol],
|
||||
[ --enable-smb enable Samba protocol support])
|
||||
|
||||
if test "x$CONFIG_SMB" = xno; then
|
||||
EL_RESTORE_FLAGS
|
||||
fi
|
||||
enable_smb=no
|
||||
CONFIG_SMB=no
|
||||
EL_ARG_DEPEND(CONFIG_SMB, smb, [HAVE_SMBCLIENT:yes], [SMB protocol],
|
||||
[ --enable-smb not currently allowed])
|
||||
dnl EL_ARG_DEPEND(CONFIG_SMB, smb, [HAVE_SMBCLIENT:yes], [SMB protocol],
|
||||
dnl [ --disable-smb disable SMB protocol support (requires smbclient)])
|
||||
|
||||
|
||||
EL_ARG_ENABLE(CONFIG_MOUSE, mouse, [Mouse handling],
|
||||
@ -1420,6 +1424,21 @@ if test "x$ac_cv_prog_gcc" = "xyes"; then
|
||||
# These should be ok using -Werror
|
||||
;;
|
||||
esac
|
||||
|
||||
# GCC 4.2 snapshots warn that comparisons like &object != NULL
|
||||
# always return true. Some macros in ELinks check whether pointer
|
||||
# arguments are NULL, and giving them addresses of named objects
|
||||
# triggers the warning. These warnings have not revealed any real
|
||||
# bugs, so shut them up instead of complicating the code. GCC 4.1
|
||||
# does not recognize -Wno-always-true and exits with code 1 if it is
|
||||
# given.
|
||||
AC_MSG_CHECKING([whether $CC accepts -Wno-always-true])
|
||||
EL_SAVE_FLAGS
|
||||
CFLAGS="$CFLAGS -Wno-always-true"
|
||||
AC_TRY_COMPILE([], [],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[EL_RESTORE_FLAGS
|
||||
AC_MSG_RESULT([no])])
|
||||
fi
|
||||
|
||||
EL_LOG_CONFIG(CFLAGS, [Compiler flags (CFLAGS)], [])
|
||||
|
11
contrib/gpm-wheel.patch
Normal file
11
contrib/gpm-wheel.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- gpm-1.20.1/src/gpm.c.old 2006-07-27 22:52:10.095084528 +0200
|
||||
+++ gpm-1.20.1/src/gpm.c 2006-07-27 22:52:48.503245600 +0200
|
||||
@@ -530,7 +530,7 @@
|
||||
/* up and down, up and down, ... who does a do..while(0) loop ???
|
||||
and then makes a break into it... argh ! */
|
||||
|
||||
- if (!event->dx && !event->dy && (event->buttons==oldB))
|
||||
+ if (!event->dx && !event->dy && !event->wdx && !event->wdy && (event->buttons==oldB))
|
||||
do { /* so to break */
|
||||
static long awaketime;
|
||||
/*
|
@ -46,17 +46,16 @@ dumbprefixes = {
|
||||
"sd" : "http://www.slashdot.org/"
|
||||
}
|
||||
|
||||
def goto_url_hook(url, current_url):
|
||||
def goto_url_hook(url):
|
||||
"""Rewrite a URL that was entered in a "Go to URL" dialog box.
|
||||
|
||||
This function should return a URL for ELinks to follow, or None if
|
||||
This function should return a string containing a URL for ELinks to
|
||||
follow, or an empty string if no URL should be followed, or None if
|
||||
ELinks should follow the original URL.
|
||||
|
||||
Arguments:
|
||||
|
||||
url -- The URL provided by the user.
|
||||
current_url -- The URL of the document being viewed, or None if no
|
||||
document is being viewed.
|
||||
|
||||
"""
|
||||
if url in dumbprefixes:
|
||||
@ -65,7 +64,8 @@ def goto_url_hook(url, current_url):
|
||||
def follow_url_hook(url):
|
||||
"""Rewrite a URL for a link that's about to be followed.
|
||||
|
||||
This function should return a URL for ELinks to follow, or None if
|
||||
This function should return a string containing a URL for ELinks to
|
||||
follow, or an empty string if no URL should be followed, or None if
|
||||
ELinks should follow the original URL.
|
||||
|
||||
Arguments:
|
||||
@ -136,13 +136,12 @@ class goto_url_in_new_tab:
|
||||
"""Prompter that opens a given URL in a new tab."""
|
||||
def __init__(self):
|
||||
"""Prompt for a URL."""
|
||||
self.current_location = elinks.current_url()
|
||||
elinks.input_box("Enter URL", self._callback, title="Go to URL")
|
||||
def _callback(self, url):
|
||||
"""Open the given URL in a new tab."""
|
||||
if 'goto_url_hook' in globals():
|
||||
# Mimic the standard "Go to URL" dialog by calling goto_url_hook().
|
||||
url = goto_url_hook(url, self.current_location) or url
|
||||
url = goto_url_hook(url) or url
|
||||
if url:
|
||||
elinks.open(url, new_tab=True)
|
||||
# The elinks.bind_key() function can be used to create a keystroke binding
|
||||
|
25
doc/Makefile
25
doc/Makefile
@ -92,9 +92,9 @@ install-doc: all-docs update-man install
|
||||
|
||||
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/))
|
||||
$(call ncmd,installdata,elinks.1,$(srcdir)man/man1/elinks.1.in); \
|
||||
$(call ncmd,installdata,elinkskeys.5,$(srcdir)man/man5/); \
|
||||
$(call ncmd,installdata,elinks.conf.5,$(srcdir)man/man5/))
|
||||
|
||||
clean-local:
|
||||
@$(RM) -r api $(TXT_DOCS_NOINSTALL) $(MAN_DOCS) $(HTML_DOCS) $(HTML_DOCS_NOINSTALL) $(PDF_DOCS) *.tmp *.xml
|
||||
@ -165,11 +165,24 @@ asciidoc_dep = sed -n 's/[{]builddir}//g;s@include::\(.*\)\[.*@$@: $< \1@p' < $<
|
||||
-include .deps/*.asciidoc
|
||||
|
||||
# Do a little post-processing of man pages. Inserting title headers and date.
|
||||
# - Change SYNOPSIS to OVERVIEW in elinkskeys.5 (but not in elinks.1).
|
||||
# SYNOPSIS isn't supposed to contain running text. But AsciiDoc
|
||||
# 7.1.2 complains "ERROR: elinkskeys.5.txt: line 10: second section
|
||||
# must be named SYNOPSIS" so we can't change this in elinkskeys.5.txt.
|
||||
# - Write backslash as "\e" not "\\", but be careful not to replace
|
||||
# double-backslashes that actually mean something else. This is
|
||||
# apparently a bug in db2man, which xmlto runs.
|
||||
# Run all the hacks together in one sed command so that we get the right
|
||||
# exit code if there is an error somewhere in the middle.
|
||||
MAN_DATE = $(shell date -I)
|
||||
man_desc = `sed -n 's/:Description:\s*\(.*\)/\1/p' < $(srcdir)$(subst .xml,.txt,$(<F))`
|
||||
man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\" \"$(1)\"/" < $@ | \
|
||||
sed "s/@squote@/\\\\'/g" > $@.tmp && mv $@.tmp $@
|
||||
|
||||
man_hack = sed -e "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\" \"$(1)\"/" \
|
||||
-e 's/\\\\\\\\ /\\e\\e /' \
|
||||
-e 's/\(\\fI\)\\\\\(\\fR\)/\1\\e\2/' \
|
||||
-e "s/@squote@/\\\\'/g" \
|
||||
$(if $(findstring elinkskeys.5,$(<F)),-e 's/^\.SH "SYNOPSIS"$$/.SH "OVERVIEW"/') \
|
||||
$(2) < $@ > $@.tmp \
|
||||
&& mv $@.tmp $@
|
||||
|
||||
#############################################################################
|
||||
# Build recipies
|
||||
|
@ -5,7 +5,7 @@ This chapter provides a small manual for using the implemented
|
||||
BitTorrent client. The BitTorrent client is provided as an optional
|
||||
add-on for ELinks, and needs to be enabled at compile time. To build
|
||||
ELinks with BitTorrent support be sure to either pass
|
||||
`--enable-bittorrent` to `./configure` or change the value of
|
||||
`\--enable-bittorrent` to `./configure` or change the value of
|
||||
`CONFIG_BITTORRENT` to `yes` in `features.conf`.
|
||||
|
||||
Using the BitTorrent Client
|
||||
|
@ -32,9 +32,9 @@ where:
|
||||
|
||||
<keystroke>::
|
||||
|
||||
is a case sensitive key, which you can prefix with 'Ctrl-' or 'Alt-'.
|
||||
'Ctrl-' must be followed by an uppercase key. See below for a list of
|
||||
valid keys.
|
||||
is a case sensitive key, which you can prefix with 'Ctrl-', 'Alt-',
|
||||
or both. 'Ctrl-' must be followed by an uppercase key. See below for
|
||||
a list of valid keys.
|
||||
|
||||
<action>::
|
||||
|
||||
|
@ -6,7 +6,7 @@ Are you a vim-controls nerd who wants to see them everywhere? Welcome.
|
||||
Actually ELinks doesn't shine in this area yet very much. Heck, the famous
|
||||
hjkl foursome is still occupied by some feeble managers in the default keymap
|
||||
(we have that in our monumental TODO lists). Still, if you know what to touch
|
||||
during the compilation (`--enable-exmode`), you can get at least some familiar
|
||||
during the compilation (`\--enable-exmode`), you can get at least some familiar
|
||||
reply to the mighty ``:'' (colon) grip.
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ The reason why normal cut and paste does not work is that ELinks requests all
|
||||
mouse event info even if it is compiled without GPM. Therefore it is necessary
|
||||
to hold down the Shift key when cutting or pasting text. If you do not need to
|
||||
use the mouse for navigation you can disable mouse support by passing
|
||||
`--disable-mouse` to configure.
|
||||
`\--disable-mouse` to configure.
|
||||
|
||||
|
||||
[[move]]
|
||||
@ -110,7 +110,7 @@ First, you must enable it in the `feature.conf` file before compiling.
|
||||
Second, you must run ELinks on a terminal that supports 256 colours:
|
||||
|
||||
- link:http://dickey.his.com/xterm/xterm.html[Thomas Dickey's XTerm],
|
||||
revision 111. XTerm must be compiled with `--enable-256-color`.
|
||||
revision 111. XTerm must be compiled with `\--enable-256-color`.
|
||||
|
||||
- Recent versions of
|
||||
link:http://www.chiark.greenend.org.uk/~sgtatham/putty/[PuTTY].
|
||||
|
@ -1,5 +1,5 @@
|
||||
Hacking ELinks
|
||||
--------------
|
||||
==============
|
||||
|
||||
Welcome, mere mortal, to the realm of evil unindented code, heaps of one or
|
||||
two-letter variables, seas of gotos accompanied with 30-letters labels in Czech
|
||||
@ -12,7 +12,7 @@ Motto: I didn't expect someone to look at the source, so it's unreadable.
|
||||
|
||||
|
||||
Language files
|
||||
~~~~~~~~~~~~~~
|
||||
--------------
|
||||
|
||||
Each UI output should use language files in order to be able to translate the
|
||||
messages to a desired language. Those language files reside in the po/ subdir. If
|
||||
@ -22,7 +22,7 @@ your own system, you have to have the gettext tools installed.
|
||||
|
||||
|
||||
ELinks philosophy
|
||||
~~~~~~~~~~~~~~~~~
|
||||
-----------------
|
||||
|
||||
ELinks is based on the philosophy of asynchronism. That means, you pass a
|
||||
callback to each function, and when the requested task finishes sometime in the
|
||||
@ -55,7 +55,7 @@ directory.
|
||||
|
||||
|
||||
HTML parser
|
||||
~~~~~~~~~~~
|
||||
-----------
|
||||
|
||||
The following was found in the mailing list archive - Mikulas wrote it:
|
||||
|
||||
@ -86,7 +86,7 @@ functions only calculate size.
|
||||
|
||||
|
||||
Documents management
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
--------------------
|
||||
|
||||
Just a few words regarding the document structures. To understand the code, it
|
||||
is important to note the difference between rendered documents and document
|
||||
@ -114,7 +114,7 @@ those view_states up, you get a session history.
|
||||
|
||||
|
||||
Lua support
|
||||
~~~~~~~~~~~
|
||||
-----------
|
||||
|
||||
Peter Wang wrote this on the mailing list:
|
||||
|
||||
@ -196,7 +196,7 @@ pressed, we branch off to some Lua code.
|
||||
|
||||
|
||||
Coding style
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
|
||||
Mikulas once said that 'it was hard to code, so it should be hard to read' -
|
||||
and he drove by this when he was writing links. However, we do NOT drive by
|
||||
@ -247,7 +247,7 @@ at the start of block only.
|
||||
|
||||
|
||||
Comments
|
||||
~~~~~~~~
|
||||
--------
|
||||
|
||||
Use blank lines frequently to separate chunks of code. And use magic `/\*` and
|
||||
`*/` to give others an idea about what it does and about possible pitfalls.
|
||||
@ -313,14 +313,14 @@ place it on the preceding line.
|
||||
|
||||
|
||||
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
|
||||
names and do not write stupid code ;).
|
||||
|
||||
General style is:
|
||||
^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
[blank line]
|
||||
@ -346,7 +346,7 @@ func(int a, int b)
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
You should observe the following rules:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Always have a blank line before a function declaration or comment.
|
||||
|
||||
@ -432,8 +432,8 @@ foreach(a, b) if (a == c) ... else ...
|
||||
If you have a chain of if () { .. } else if () { .. } else { .. } with longer
|
||||
statements, you can insert a blank line before each else line.
|
||||
|
||||
Label names should start on the first column and with have a blank line before
|
||||
it.
|
||||
Label names should start on the first column and a blank line should be
|
||||
inserted before it.
|
||||
|
||||
.Use:
|
||||
-------------------------------------------------------------------------------
|
||||
@ -497,6 +497,9 @@ Use assert() and assertm() where applicable. It will prevent hidden bugs.
|
||||
|
||||
Names of enum constants should be in upper case.
|
||||
|
||||
Please call the charset "utf8" or "UTF8" in identifiers, "UTF-8"
|
||||
elsewhere, and "utf_8" only for compatibility.
|
||||
|
||||
If you see code in ELinks that doesn't follow these rules, fix it or tell us
|
||||
about it.
|
||||
|
||||
@ -514,10 +517,10 @@ exception and be prepared to defend your exception at anytime ;).
|
||||
|
||||
|
||||
Coding practices
|
||||
~~~~~~~~~~~~~~~~
|
||||
----------------
|
||||
|
||||
Use bitfields to store boolean values
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If speed is not critical and especially if you are messing with some struct
|
||||
where size might matter, feel encouraged to use bitfields to store boolean (or
|
||||
@ -527,7 +530,7 @@ to reach the top bit in these cases, and with int foo:1, foo would be either 0
|
||||
or -1, which is probably not what you want.
|
||||
|
||||
Wrap hard initializations of structures with macros
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This should be done if the structure's initializers are going to be spread
|
||||
widely (so that we can grep for them easily), there are massive typecasts
|
||||
@ -555,7 +558,7 @@ struct example t = NULL_EXAMPLE;
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Please try to keep order of fields
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Please try to keep order of fields from max. to min. of size of each type of
|
||||
fields, especially in structures:
|
||||
@ -580,7 +583,7 @@ logical composition always takes precedence over this optimization, modulo
|
||||
some very rare critical structures.
|
||||
|
||||
Please do not use sizeof(struct item_struct_name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Instead use sizeof(*item) when possible.
|
||||
|
||||
@ -613,7 +616,7 @@ The preferred form eases future changes in types, and maintain size vs type
|
||||
coherence.
|
||||
|
||||
Please postfix defined types with _T
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
typedef int (some_func_T)(void *);
|
||||
@ -621,7 +624,7 @@ typedef long long our_long_T;
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Please use mode_t and S_I???? macros instead of numeric modes
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.Use:
|
||||
-------------------------------------------------------------------------------
|
||||
@ -638,7 +641,7 @@ S_IWUSR, S_IXUSR instead.
|
||||
|
||||
|
||||
Patches
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
Please send unified patches only.
|
||||
|
||||
@ -675,7 +678,7 @@ sufficiently self-contained.
|
||||
|
||||
|
||||
Advantages of `--enable-debug` configure option
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-----------------------------------------------
|
||||
|
||||
Since ELinks 0.4pre11, a memory debugger can be enabled using the
|
||||
`--enable-debug` configure script option. It may help to find memleaks and more
|
||||
|
@ -34,7 +34,12 @@ have the following libraries and programs installed:
|
||||
Dependency Description
|
||||
-----------------------------------------------------------------------------
|
||||
Lua or Guile Makes it possible to write scripting plugins. \
|
||||
ifdef::installation-webpage[]
|
||||
See link:manual.html#lua-scripting[the Elinks - Lua interface] \
|
||||
endif::installation-webpage[]
|
||||
ifndef::installation-webpage[]
|
||||
See <<lua-scripting,the Elinks - Lua interface>> \
|
||||
endif::installation-webpage[]
|
||||
for more info.
|
||||
GNU zip For handling compressed documents both locally and \
|
||||
sent from server.
|
||||
@ -50,7 +55,12 @@ xterm with 256 colors Program atleast patch level 179 or rxvt program \
|
||||
libidn For internationalized domain names.
|
||||
SpiderMonkey Mozilla's JavaScript engine for getting \
|
||||
JavaScript/ECMAScript support in ELinks. \
|
||||
ifdef::installation-webpage[]
|
||||
See also link:manual.html#ecmascript[notes on ECMAScript support].
|
||||
endif::installation-webpage[]
|
||||
ifndef::installation-webpage[]
|
||||
See also <<ecmascript,notes on ECMAScript support>>.
|
||||
endif::installation-webpage[]
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
When compiling, you also need the header files for the libraries. Most OS
|
||||
|
@ -17,7 +17,7 @@ own bookmarks system with Lua. See also contrib/lua/ for some examples of the
|
||||
possibilities of ELinks Lua support.
|
||||
|
||||
Please do not confuse Lua scripting with JavaScript, EcmaScript, VBScript and
|
||||
similiar. Those are embedded in page, allowing per-document scripting related
|
||||
similar. Those are embedded in page, allowing per-document scripting related
|
||||
to its presentation and providing some degree of interactivity etc. On the
|
||||
contrary, the current Lua support permits scripts to be embedded to the
|
||||
browser directly, changing the behaviour of the browser, not the document.
|
||||
@ -34,12 +34,12 @@ The Lua scripting support comes with the stock ELinks distribution, no
|
||||
additional patches and tweaks should be needed.
|
||||
|
||||
The web site of the original Links-Lua is at
|
||||
link:http://links.sourceforge.net/links-lua/[]. Some older patches against
|
||||
http://links.sourceforge.net/links-lua/[]. Some older patches against
|
||||
regular Links are available at
|
||||
link:http://www.sourceforge.net/projects/links/[], but they are not being
|
||||
http://www.sourceforge.net/projects/links/[], but they are not being
|
||||
maintained.
|
||||
|
||||
Lua can be found at link:http://www.lua.org/[].
|
||||
Lua can be found at http://www.lua.org/[].
|
||||
|
||||
What it runs on
|
||||
^^^^^^^^^^^^^^^
|
||||
@ -72,6 +72,10 @@ systems should try to enable `popen` support, but this is not necessary
|
||||
On systems without shared object support, simply run `make; make install`
|
||||
instead.
|
||||
|
||||
Since ELinks 0.11.0, only version 5.0 of Lua is supported.
|
||||
Future versions of ELinks will probably support Lua 5.1 too;
|
||||
see http://bugzilla.elinks.cz/show_bug.cgi?id=742[bug 742].
|
||||
|
||||
|
||||
Installing ELinks
|
||||
^^^^^^^^^^^^^^^^^
|
||||
@ -85,8 +89,9 @@ Running ELinks with Lua
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Simply start ELinks as you normally would. To check you have Lua support
|
||||
compiled in, open up the "Help | About" dialog box. It should list "Lua"
|
||||
under "Features". If not, make sure you do not have other copies of ELinks
|
||||
compiled in, open up the "Help | About" dialog box. It should list
|
||||
"Scripting (Lua)" under "Features".
|
||||
If not, make sure you do not have other copies of ELinks
|
||||
running, or start ELinks again with the "-no-connect" option on the
|
||||
command-line.
|
||||
|
||||
@ -114,7 +119,7 @@ they're more convenient.
|
||||
|
||||
Note that this document assumes you have some knowledge of programming in Lua.
|
||||
For that, you should refer to the Lua reference manual
|
||||
(link:http://www.lua.org/docs.html[]). In fact, the language is relatively
|
||||
(http://www.lua.org/docs.html[]). In fact, the language is relatively
|
||||
trivial, though. You could already do wonders with simply refactoring the
|
||||
example scripts.
|
||||
|
||||
@ -152,6 +157,12 @@ pre_format_html_hook (url, html)::
|
||||
should return the modified HTML text, or `nil` if there were no
|
||||
modifications.
|
||||
|
||||
proxy_for_hook (url)::
|
||||
This hook is called when ELinks is about to load a resource
|
||||
from a URL. It should return "PROXY:PORT" (e.g. "localhost:8080")
|
||||
to use the specified proxy, "" to contact the origin server
|
||||
directly, or `nil` to use the default proxy of the protocol.
|
||||
|
||||
lua_console_hook (string)::
|
||||
This hook is passed the string that the user entered into the "Lua
|
||||
Console" dialog box. It should return two values: the type of action
|
||||
@ -162,7 +173,7 @@ lua_console_hook (string)::
|
||||
`someprogram`.
|
||||
- `return "eval", "somefunction(1+2)"` will attempt to call the Lua
|
||||
function `somefunction` with an argument, 3.
|
||||
- `return "goto-url", "http://www.bogus.com"` will ask Links to visit
|
||||
- `return "goto_url", "http://www.bogus.com"` will ask Links to visit
|
||||
the URL "http://www.bogus.com".
|
||||
- `return nil` will do nothing.
|
||||
|
||||
@ -177,16 +188,11 @@ Functions
|
||||
As well as providing hooks, ELinks provides some functions in addition to the
|
||||
standard Lua functions.
|
||||
|
||||
enable_systems_functions ()::
|
||||
Enable some potentially dangerous functions, as well as some other
|
||||
functions which were unfortunate enough to be lumped in the same group.
|
||||
+
|
||||
The functions are: `openfile`, `closefile`, `readfrom`, `writeto`, `appendto`,
|
||||
`pipe_read`, `remove`, `rename`, `flush`, `seek`, `tmpname`, `read`, `write`
|
||||
`execute`, `exit`, `clock`, `date`, `getenv`, `setlocale`.
|
||||
+
|
||||
Note: `setlocale` is a standard Lua function and will not affect
|
||||
the current ELinks locale.
|
||||
Note: The standard Lua function `os.setlocale` affects ELinks' idea of
|
||||
the system locale, which ELinks uses for the "System" charset, for the
|
||||
"System" language, and for formatting dates. This may however have to
|
||||
be changed in a future version of ELinks, in order to properly support
|
||||
terminal-specific system locales.
|
||||
|
||||
current_url ()::
|
||||
Returns the URL of the current page being shown (in the ELinks session
|
||||
@ -216,17 +222,68 @@ pipe_read (command)::
|
||||
function `read` seems to crash ELinks when used in pipe-reading mode.
|
||||
|
||||
execute (string)::
|
||||
Executes shell commands `string` and returns the exit code. Beware
|
||||
Executes shell commands `string` without waiting for it to exit. Beware
|
||||
that you must not read or write to stdin and stdout. And unlike the
|
||||
standard Lua function of the same name, the return value is
|
||||
meaningless.
|
||||
|
||||
tmpname ()::
|
||||
Returns a unique name for a temporary file, or `nil` if no
|
||||
such name is available. The returned string includes the
|
||||
directory name. This function does not create the file and
|
||||
does not guarantee exclusive access to it: the caller must
|
||||
handle the possibility that another process creates the file
|
||||
and begins using it while this function is returning.
|
||||
|
||||
bind_key (keymap, keystroke, function)::
|
||||
Currently, `keymap` must be the string `"main"`. Keystroke is a
|
||||
keystroke as you would write it in the ELinks config file
|
||||
`~/.elinks/elinks.conf`. The function `function` should take no
|
||||
arguments, and should return the same values as `lua_console_hook`.
|
||||
|
||||
edit_bookmark_dialog (cat, name, url, function)::
|
||||
Displays a dialog for editing a bookmark, and returns without
|
||||
waiting for the user to close the dialog. The return value is
|
||||
`1` if successful, `nil` if arguments are invalid, or nothing
|
||||
at all if out of memory. The first three arguments
|
||||
must be strings, and the user can then edit them in input
|
||||
fields. There are also 'OK' and 'Cancel' buttons in the
|
||||
dialog. If the user presses 'OK', ELinks calls `function`
|
||||
with the three edited strings as arguments, and it should
|
||||
return similar values as in `lua_console_hook`.
|
||||
|
||||
xdialog (string [, more strings...], function)::
|
||||
Displays a generic dialog for editing multiple strings, and
|
||||
returns without waiting for the user to close the dialog.
|
||||
The return value is `1` if successful, `nil` if arguments are
|
||||
invalid, or nothing at all if out of memory. All arguments
|
||||
except the last one must be strings, and ELinks places them
|
||||
in input fields in the dialog. There can be at most 5 such
|
||||
strings. There are also 'OK' and 'Cancel' buttons in the
|
||||
dialog. If the user presses 'OK', ELinks calls `function`
|
||||
with the edited strings as arguments, and it should return
|
||||
similar values as in `lua_console_hook`.
|
||||
|
||||
set_option (option, value)::
|
||||
Sets an ELinks option. The first argument `option` must be
|
||||
the name of the option as a string. ELinks then tries to
|
||||
convert the second argument `value` to match the type of the
|
||||
option. If successful, `set_option` returns `value`, else
|
||||
`nil`.
|
||||
|
||||
get_option (option)::
|
||||
Returns the value of an ELinks option. The argument `option`
|
||||
must be the name of the option as a string. If the option
|
||||
does not exist, `get_option` returns `nil`.
|
||||
|
||||
|
||||
Variables
|
||||
^^^^^^^^^
|
||||
|
||||
elinks_home::
|
||||
The name of the ELinks home directory, as a string. Typically
|
||||
this is the .elinks subdirectory of the user's home directory.
|
||||
|
||||
|
||||
User protocol
|
||||
^^^^^^^^^^^^^
|
||||
|
@ -21,7 +21,7 @@ on most UNIX systems--usually in /etc/mailcap--so this makes it possible for
|
||||
ELinks to know how to handle a great variety of file formats with little
|
||||
configuration. To be able to use mailcap, it has to be compiled into ELinks.
|
||||
This is the default. If you don't need mailcap support, just configure ELinks
|
||||
with the flag: --disable-mailcap.
|
||||
with the flag: \--disable-mailcap.
|
||||
|
||||
|
||||
Parameters to Mailcap Entries
|
||||
@ -92,7 +92,7 @@ or present on your system.
|
||||
Mailcap Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Apart from the mime.mailcap.path option, you can configure if mailca support
|
||||
Apart from the mime.mailcap.path option, you can configure if mailcap support
|
||||
should be disabled. The default being that it is enabled. To disable it just
|
||||
put:
|
||||
|
||||
@ -100,8 +100,8 @@ put:
|
||||
|
||||
in elinks.conf.
|
||||
|
||||
It is also possible to control wether ELinks should ask you before opening a
|
||||
file. The option is a boolian and can be set like this:
|
||||
It is also possible to control whether ELinks should ask you before opening a
|
||||
file. The option is a boolean and can be set like this:
|
||||
|
||||
set mime.mailcap.ask = 1
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.TH "ELINKS" 1 "The Elinks text-browser" "2006-06-12" "The Elinks text-browser"
|
||||
.TH "ELINKS" 1 "The Elinks text-browser" "2007-01-06" "The Elinks text-browser"
|
||||
.SH NAME
|
||||
elinks \- lynx-like alternative character mode WWW browser
|
||||
.SH "SYNOPSIS"
|
||||
|
@ -17,7 +17,7 @@
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.TH "ELINKS.CONF" 5 "ELinks configuration file" "2006-06-12" "ELinks configuration file"
|
||||
.TH "ELINKS.CONF" 5 "ELinks configuration file" "2007-01-06" "ELinks configuration file"
|
||||
.SH NAME
|
||||
elinks.conf \- ELinks configuration file
|
||||
.SH "SYNOPSIS"
|
||||
@ -77,7 +77,7 @@ File format for bookmarks (affects both reading and saving):
|
||||
0: is the default native \fIELinks\fR format
|
||||
.TP
|
||||
\(bu
|
||||
1: is XBEL universal XML bookmarks format (NO NATIONAL CHARS SUPPORT!)
|
||||
1: is XBEL universal XML bookmarks format (\fIELinks\fR bug 153: NO NATIONAL CHARS SUPPORT!)
|
||||
.LP
|
||||
.RE
|
||||
.IP
|
||||
@ -194,11 +194,11 @@ Number of tries to establish a connection\&. Zero means try forever\&.
|
||||
|
||||
.TP
|
||||
connection\&.try_ipv4 [0|1] (default: 1)
|
||||
Whether to try to connect to a host over IPv4\&. Note that if connection\&.try_ipv6 is enabled too, it takes precedence\&. And better do not touch this at all unless you are sure what are you doing\&. Note that you can also force a given protocol to be used on a per\-connection basis by using an URL in the style of i\&.e\&. http4://elinks\&.or\&.cz/\&.
|
||||
Whether to try to connect to a host over IPv4\&. Note that if connection\&.try_ipv6 is enabled too, it takes precedence\&. And better do not touch this at all unless you are sure what are you doing\&. Note that you can also force a given protocol to be used on a per\-connection basis by using an URL in the style of e\&.g\&. http4://elinks\&.cz/\&.
|
||||
|
||||
.TP
|
||||
connection\&.try_ipv6 [0|1] (default: 1)
|
||||
Whether to try to connect to a host over IPv6\&. Note that you can also force a given protocol to be used on a per\-connection basis by using an URL in the style of i\&.e\&. http6://elinks\&.or\&.cz/\&.
|
||||
Whether to try to connect to a host over IPv6\&. Note that you can also force a given protocol to be used on a per\-connection basis by using an URL in the style of e\&.g\&. http6://elinks\&.cz/\&.
|
||||
|
||||
.TP
|
||||
connection\&.unrestartable_receive_timeout <num> (default: 600)
|
||||
@ -634,6 +634,10 @@ Cache even redirects sent by server (usually thru HTTP by a 302 HTTP code and a
|
||||
document\&.cache\&.ignore_cache_control [0|1] (default: 1)
|
||||
Ignore Cache\-Control and Pragma server headers\&. When set, the document is cached even with 'Cache\-Control: no\-cache'\&.
|
||||
|
||||
.TP
|
||||
document\&.cache\&.revalidation_interval <num> (default: \-1)
|
||||
Period that a cache entry is considered to be up\-to\-date\&. When a document is loaded and this interval has elapsed since the document was initially loaded or most recently revalidated with the server, the server will be checked in case there is a more up\-to\-date version of the document\&.
|
||||
|
||||
.TP
|
||||
document\&.codepage
|
||||
Charset options\&.
|
||||
@ -778,7 +782,7 @@ Codepage used in dump output\&. 'System' stands for a codepage determined by a s
|
||||
|
||||
.TP
|
||||
document\&.dump\&.color_mode <num> (default: \-1)
|
||||
Color mode for dumps:
|
||||
Color mode for dumps\&. Some modes may have been disabled at compile time\&. The Setup \-> Terminal options dialog lists the modes supported by this executable\&. If you select an unsupported mode, \fIELinks\fR uses 16 colors\&. The color modes are:
|
||||
|
||||
.RS
|
||||
.TP 3
|
||||
@ -792,7 +796,13 @@ Color mode for dumps:
|
||||
1: is 16 color mode
|
||||
.TP
|
||||
\(bu
|
||||
2: is 256 color mode
|
||||
2: is 88 color mode
|
||||
.TP
|
||||
\(bu
|
||||
3: is 256 color mode
|
||||
.TP
|
||||
\(bu
|
||||
4: is true color mode
|
||||
.LP
|
||||
.RE
|
||||
.IP
|
||||
@ -921,7 +931,7 @@ Compress successive empty lines to only one in displayed text\&.
|
||||
|
||||
.TP
|
||||
document\&.uri_passing
|
||||
Rules for passing URIs to external commands\&. When one rule is defined the link and tab menu will have a menu item that makes it possible to pass the the link, frame or tab URI to an external command\&. If several rules are defined the link and tab menu will have a submenu of items for each rule\&. Note, this is mostly useful for launching graphical viewers, since there is not support for releasing the terminal while the command runs\&. The action and submenus are also available by binding keys to the frame\-external\-command, the link\-external\-command, and the tab\-external\-command actions\&.
|
||||
Rules for passing URIs to external commands\&. When one rule is defined the link and tab menu will have a menu item that makes it possible to pass the the link, frame or tab URI to an external command\&. If several rules are defined the link and tab menu will have a submenu of items for each rule\&. Note, this is mostly useful for launching graphical viewers, since there is no support for releasing the terminal while the command runs\&. The action and submenus are also available by binding keys to the frame\-external\-command, the link\-external\-command, and the tab\-external\-command actions\&.
|
||||
|
||||
.TP
|
||||
document\&.uri_passing\&._template_ <str> (default: "")
|
||||
@ -932,7 +942,7 @@ ecmascript
|
||||
ECMAScript options\&.
|
||||
|
||||
.TP
|
||||
ecmascript\&.enable [0|1] (default: 1)
|
||||
ecmascript\&.enable [0|1] (default: 0)
|
||||
Whether to run those scripts inside of documents\&.
|
||||
|
||||
.TP
|
||||
@ -1378,14 +1388,6 @@ Enable dumb prefixes \- simple URI abbreviations which can be written to the Got
|
||||
protocol\&.rewrite\&.enable\-smart [0|1] (default: 1)
|
||||
Enable smart prefixes \- URI templates triggered by writing given abbreviation to the Goto URL dialog followed by a list of arguments from which the actual URI is composed \- i\&.e\&. 'gg:search keywords' or \fIgn search keywords for news\fR\&.
|
||||
|
||||
.TP
|
||||
protocol\&.smb
|
||||
SAMBA specific options\&.
|
||||
|
||||
.TP
|
||||
protocol\&.smb\&.credentials <str> (default: "")
|
||||
Credentials file passed to smbclient via \-A option\&.
|
||||
|
||||
.TP
|
||||
protocol\&.user
|
||||
User protocols\&. Options in this tree specify external handlers for the appropriate protocols\&. Ie\&. protocol\&.user\&.mailto\&.unix\&.
|
||||
@ -1440,7 +1442,7 @@ Switch fonts when drawing lines, enabling both local characters and lines workin
|
||||
|
||||
.TP
|
||||
terminal\&._template_\&.utf_8_io [0|1] (default: 0)
|
||||
Enable I/O in UTF8 for Unicode terminals\&. Note that currently, only the subset of UTF8 according to terminal codepage is used\&.
|
||||
Enable I/O in UTF\-8 for Unicode terminals\&. Note that currently, only the subset of UTF\-8 according to terminal codepage is used\&. \fIELinks\fR ignores this option if the terminal codepage is UTF\-8\&.
|
||||
|
||||
.TP
|
||||
terminal\&._template_\&.restrict_852 [0|1] (default: 0)
|
||||
@ -1452,7 +1454,7 @@ Move cursor to bottom right corner when done drawing\&. This is particularly use
|
||||
|
||||
.TP
|
||||
terminal\&._template_\&.colors <num> (default: 0)
|
||||
The color mode controls what colors are used and how they are output to the terminal\&. The color modes are:
|
||||
The color mode controls what colors are used and how they are output to the terminal\&. Some modes may have been disabled at compile time\&. The Setup \-> Terminal options dialog lists the modes supported by this executable\&. If you select an unsupported mode, \fIELinks\fR uses 16 colors\&. The color modes are:
|
||||
|
||||
.RS
|
||||
.TP 3
|
||||
@ -1463,14 +1465,20 @@ The color mode controls what colors are used and how they are output to the term
|
||||
1: is 16 color mode, uses the common ANSI colors
|
||||
.TP
|
||||
\(bu
|
||||
2: is 256 color mode, uses XTerm RGB codes
|
||||
2: is 88 color mode, uses XTerm RGB codes
|
||||
.TP
|
||||
\(bu
|
||||
3: is 256 color mode, uses XTerm RGB codes
|
||||
.TP
|
||||
\(bu
|
||||
4: is true color mode, uses konsole RGB codes
|
||||
.LP
|
||||
.RE
|
||||
.IP
|
||||
|
||||
.TP
|
||||
terminal\&._template_\&.transparency [0|1] (default: 1)
|
||||
If we should not set the background to black\&. This is particularly useful when we have a terminal (typically in some windowing environment) with a background image or a transparent background \- it will be visible in \fIELinks\fR as well\&. Note that this option makes sense only when colors are enabled\&.
|
||||
terminal\&._template_\&.transparency [0|1] (default: 0)
|
||||
If we should not set the background to black\&. This is particularly useful when we have a terminal (typically in some windowing environment) with a background image or a transparent background \- it will be visible in \fIELinks\fR as well (but \fIELinks\fR document color handling will still assume the background is black so if you have a bright background you might experience contrast problems)\&. Note that this option makes sense only when colors are enabled\&.
|
||||
|
||||
.TP
|
||||
terminal\&._template_\&.underline [0|1] (default: 0)
|
||||
|
@ -17,10 +17,10 @@
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2006-06-12" "ELinks keybindings"
|
||||
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2007-01-06" "ELinks keybindings"
|
||||
.SH NAME
|
||||
elinkskeys \- keybindings for ELinks
|
||||
.SH "SYNOPSIS"
|
||||
.SH "OVERVIEW"
|
||||
|
||||
|
||||
Information on how to configure keybinding and overview of the default keybindings\&.
|
||||
@ -87,7 +87,7 @@ bind "main" "," = "lua\-console"
|
||||
Valid keys are: alphanumeric characters, punctuation, \fIEnter\fR, \fIBackspace\fR, \fITab\fR, \fIEscape\fR, \fILeft\fR, \fIRight\fR, \fIUp\fR, \fIDown\fR, \fIInsert\fR, \fIDelete\fR, \fIHome\fR, \fIEnd\fR, \fIPageUp\fR, \fIPageDown\fR, \fIF1\fR to \fIF12\fR\&.
|
||||
|
||||
|
||||
Some keys will need to be quoted or escaped\&. For example, space can be written as " " (quote space quote), and the quote itself as \\" (backslash quote)\&. Backslash can be written as \\\\ (double backslash)\&.
|
||||
Some keys will need to be quoted or escaped\&. For example, space can be written as " " (quote space quote), and the quote itself as \\" (backslash quote)\&. Backslash can be written as \e\e (double backslash)\&.
|
||||
|
||||
.SH "KEYMAP ACTIONS"
|
||||
|
||||
@ -607,10 +607,22 @@ Delete to beginning of line\&.
|
||||
kill\-to\-eol
|
||||
Delete to end of line\&.
|
||||
|
||||
.TP
|
||||
kill\-word\-back
|
||||
Delete backwards to start of word\&.
|
||||
|
||||
.TP
|
||||
left
|
||||
Move the cursor left\&.
|
||||
|
||||
.TP
|
||||
move\-backward\-word
|
||||
Move cursor before current word\&.
|
||||
|
||||
.TP
|
||||
move\-forward\-word
|
||||
Move cursor after current word\&.
|
||||
|
||||
.TP
|
||||
next\-item
|
||||
Move to the next item\&.
|
||||
@ -806,7 +818,7 @@ Open download manager (\fIdownload\-manager\fR)
|
||||
|
||||
.TP
|
||||
\fIE\fR
|
||||
Open \\"Go to URL\\" dialog box containing the current link URL (\fIgoto\-url\-current\-link\fR)
|
||||
Open "Go to URL" dialog box containing the current link URL (\fIgoto\-url\-current\-link\fR)
|
||||
|
||||
.TP
|
||||
\fICtrl\-E\fR
|
||||
@ -822,7 +834,7 @@ Move downwards by a page (\fImove\-page\-down\fR)
|
||||
|
||||
.TP
|
||||
\fIG\fR
|
||||
Open \\"Go to URL\\" dialog box containing the current URL (\fIgoto\-url\-current\fR)
|
||||
Open "Go to URL" dialog box containing the current URL (\fIgoto\-url\-current\fR)
|
||||
|
||||
.TP
|
||||
\fIH\fR
|
||||
@ -881,7 +893,7 @@ Scroll left (\fIscroll\-left\fR)
|
||||
Go at a specified mark (\fImark\-goto\fR)
|
||||
|
||||
.TP
|
||||
\fI\\\fR
|
||||
\fI\e\fR
|
||||
Toggle rendering page as HTML / plain text (\fItoggle\-html\-plain\fR)
|
||||
|
||||
.TP
|
||||
@ -914,7 +926,7 @@ Maximize the current frame (\fIframe\-maximize\fR)
|
||||
|
||||
.TP
|
||||
\fIg\fR
|
||||
Open \\"Go to URL\\" dialog box (\fIgoto\-url\fR)
|
||||
Open "Go to URL" dialog box (\fIgoto\-url\fR)
|
||||
|
||||
.TP
|
||||
\fIh\fR
|
||||
@ -1060,6 +1072,10 @@ Move to the next frame (\fIframe\-next\fR)
|
||||
\fIAlt\-Tab\fR
|
||||
Move to the previous frame (\fIframe\-prev\fR)
|
||||
|
||||
.TP
|
||||
\fITab\fR
|
||||
Move to the previous frame (\fIframe\-prev\fR)
|
||||
|
||||
.TP
|
||||
\fIUp\fR
|
||||
Move to the previous link (\fImove\-link\-prev\fR)
|
||||
@ -1078,6 +1094,10 @@ Go to the last line of the buffer (\fIend\-of\-buffer\fR)
|
||||
\fICtrl\-A\fR
|
||||
Go to the start of the page/line (\fIhome\fR)
|
||||
|
||||
.TP
|
||||
\fIAlt\-b\fR
|
||||
Move cursor before current word (\fImove\-backward\-word\fR)
|
||||
|
||||
.TP
|
||||
\fICtrl\-D\fR
|
||||
Delete character under cursor (\fIdelete\fR)
|
||||
@ -1086,6 +1106,10 @@ Delete character under cursor (\fIdelete\fR)
|
||||
\fICtrl\-E\fR
|
||||
Go to the end of the page/line (\fIend\fR)
|
||||
|
||||
.TP
|
||||
\fIAlt\-f\fR
|
||||
Move cursor after current word (\fImove\-forward\-word\fR)
|
||||
|
||||
.TP
|
||||
\fICtrl\-H\fR
|
||||
Delete character in front of the cursor (\fIbackspace\fR)
|
||||
@ -1130,6 +1154,10 @@ Attempt to auto\-complete the input (\fIauto\-complete\fR)
|
||||
\fICtrl\-X\fR
|
||||
Delete text from clipboard (\fIcut\-clipboard\fR)
|
||||
|
||||
.TP
|
||||
\fIAlt\-Backspace\fR
|
||||
Delete backwards to start of word (\fIkill\-word\-back\fR)
|
||||
|
||||
.TP
|
||||
\fIBackspace\fR
|
||||
Delete character in front of the cursor (\fIbackspace\fR)
|
||||
@ -1182,6 +1210,10 @@ Move to the next item (\fInext\-item\fR)
|
||||
\fIAlt\-Tab\fR
|
||||
Move to the previous item (\fIprevious\-item\fR)
|
||||
|
||||
.TP
|
||||
\fITab\fR
|
||||
Move to the previous item (\fIprevious\-item\fR)
|
||||
|
||||
.TP
|
||||
\fIUp\fR
|
||||
Move cursor upwards (\fIup\fR)
|
||||
@ -1312,6 +1344,10 @@ Move to the next item (\fInext\-item\fR)
|
||||
\fIAlt\-Tab\fR
|
||||
Move to the previous item (\fIprevious\-item\fR)
|
||||
|
||||
.TP
|
||||
\fITab\fR
|
||||
Move to the previous item (\fIprevious\-item\fR)
|
||||
|
||||
.TP
|
||||
\fIUp\fR
|
||||
Move cursor upwards (\fIup\fR)
|
||||
|
@ -8,7 +8,7 @@ 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. 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
|
||||
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
|
||||
|
@ -37,24 +37,24 @@ FUNCTIONS
|
||||
follow_url_hook(url)
|
||||
Rewrite a URL for a link that's about to be followed.
|
||||
|
||||
This function should return a URL for ELinks to follow, or None if
|
||||
This function should return a string containing a URL for ELinks to
|
||||
follow, or an empty string if no URL should be followed, or None if
|
||||
ELinks should follow the original URL.
|
||||
|
||||
Arguments:
|
||||
|
||||
url -- The URL of the link.
|
||||
|
||||
goto_url_hook(url, current_url)
|
||||
goto_url_hook(url)
|
||||
Rewrite a URL that was entered in a "Go to URL" dialog box.
|
||||
|
||||
This function should return a URL for ELinks to follow, or None if
|
||||
This function should return a string containing a URL for ELinks to
|
||||
follow, or an empty string if no URL should be followed, or None if
|
||||
ELinks should follow the original URL.
|
||||
|
||||
Arguments:
|
||||
|
||||
url -- The URL provided by the user.
|
||||
current_url -- The URL of the document being viewed, or None if no
|
||||
document is being viewed.
|
||||
|
||||
pre_format_html_hook(url, html)
|
||||
Rewrite the body of a document before it's formatted.
|
||||
|
@ -41,11 +41,11 @@ You can disable bookmarks, globhist and more, too, if you want to.
|
||||
[NOTE]
|
||||
.Notes
|
||||
===============================================================================
|
||||
- --disable-backtrace disables internal backtrace code.
|
||||
- --disable-nls disables i18n support.
|
||||
- --enable-fastmem disables internal `malloc()` debugging and use `alloca()`
|
||||
- \--disable-backtrace disables internal backtrace code.
|
||||
- \--disable-nls disables i18n support.
|
||||
- \--enable-fastmem disables internal `malloc()` debugging and use `alloca()`
|
||||
wherever possible.
|
||||
- --enable-small forces to remove some text descriptions in options and
|
||||
- \--enable-small forces to remove some text descriptions in options and
|
||||
keybind stuff (regain 30Kb).
|
||||
===============================================================================
|
||||
|
||||
@ -54,15 +54,15 @@ options:
|
||||
`-----------------------`------------------------------------------------------
|
||||
Option Description
|
||||
-------------------------------------------------------------------------------
|
||||
--without-zlib removes libz dependency (compression)
|
||||
--without-bzlib removes libbz2 dependency (compression)
|
||||
--disable-xbel removes expat dependency (XBEL bookmarks support)
|
||||
--without-lua removes liblua dependency (Lua scripting)
|
||||
--without-gnutls removes libtls dependency (SSL support)
|
||||
--without-openssl removes libssl dependency (SSL support)
|
||||
--without-x removes libx11 dependency (restoring terminal title)
|
||||
--without-spidermonkey removes libjs dependency (JavaScript)
|
||||
--without-gpm removes libgpm dependency (mouse/console)
|
||||
\--without-zlib removes libz dependency (compression)
|
||||
\--without-bzlib removes libbz2 dependency (compression)
|
||||
\--disable-xbel removes expat dependency (XBEL bookmarks support)
|
||||
\--without-lua removes liblua dependency (Lua scripting)
|
||||
\--without-gnutls removes libtls dependency (SSL support)
|
||||
\--without-openssl removes libssl dependency (SSL support)
|
||||
\--without-x removes libx11 dependency (restoring terminal title)
|
||||
\--without-spidermonkey removes libjs dependency (JavaScript)
|
||||
\--without-gpm removes libgpm dependency (mouse/console)
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
It seems GCC 2.95.x do not generate as small binaries as GCC 3.2.x with same
|
||||
@ -82,7 +82,7 @@ Here are some results using gcc 2.95.3, dietlibc-0.23, and previous flags:
|
||||
Whow ! Around 200kb :)
|
||||
|
||||
[NOTE]
|
||||
.Details about the `--enable-small` configure option effects:
|
||||
.Details about the `\--enable-small` configure option effects:
|
||||
==============================================================================
|
||||
- it disables long descriptions of options;
|
||||
- it disables textual descriptions of keybinding options;
|
||||
|
187
doc/tinycc.txt
Normal file
187
doc/tinycc.txt
Normal file
@ -0,0 +1,187 @@
|
||||
Compiling ELinks with Tiny C Compiler
|
||||
=====================================
|
||||
|
||||
ELinks has been successfully compiled with http://www.tinycc.org/[Tiny
|
||||
C Compiler] version 0.9.23, however there are several problems.
|
||||
This file lists some of these problems and their possible solutions.
|
||||
|
||||
Perl uses unsupported -Wl,-E
|
||||
----------------------------
|
||||
|
||||
----------------------------------------------------------------------
|
||||
checking for Perl... no
|
||||
----------------------------------------------------------------------
|
||||
|
||||
`config.log` reveals:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
configure:18039: checking for Perl
|
||||
configure:18082: tcc -o conftest ... -rdynamic conftest.c -Wl,-E ... -lperl ... >&5
|
||||
tcc: unsupported linker option '-E'
|
||||
configure:18088: $? = 1
|
||||
...
|
||||
configure:18106: result: no
|
||||
----------------------------------------------------------------------
|
||||
|
||||
The `-Wl,-E` option comes from this command:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
perl -MExtUtils::Embed -e ldopts
|
||||
----------------------------------------------------------------------
|
||||
|
||||
TCC 0.9.23 does not support the option, so ELinks builds without Perl.
|
||||
|
||||
Python uses unsupported -Xlinker -export-dynamic
|
||||
------------------------------------------------
|
||||
|
||||
----------------------------------------------------------------------
|
||||
checking for Python... yes
|
||||
checking for python... /usr/bin/python
|
||||
...
|
||||
Browser scripting ............... Guile, Lua, SpiderMonkey
|
||||
----------------------------------------------------------------------
|
||||
|
||||
`config.log` reveals:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
configure:18204: checking for Python
|
||||
configure:18208: result: yes
|
||||
configure:18219: checking for python
|
||||
configure:18237: found /usr/bin/python
|
||||
configure:18250: result: /usr/bin/python
|
||||
configure:18287: tcc -o conftest ... -rdynamic conftest.c -Xlinker -export-dynamic ... -lpython2.3 ... >&5
|
||||
tcc: invalid option -- '-Xlinker'
|
||||
configure:18293: $? = 1
|
||||
----------------------------------------------------------------------
|
||||
|
||||
The `-Xlinker -export-dynamic` options come from this command:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
python -c 'from distutils import sysconfig; print sysconfig.get_config_var("LINKFORSHARED")'
|
||||
----------------------------------------------------------------------
|
||||
|
||||
TCC 0.9.23 does not support `-Xlinker`, so ELinks builds without
|
||||
Python.
|
||||
|
||||
Ruby uses unsupported -Wl,-export-dynamic
|
||||
-----------------------------------------
|
||||
|
||||
----------------------------------------------------------------------
|
||||
checking for Ruby... yes
|
||||
checking for ruby... /usr/bin/ruby
|
||||
checking Ruby version... 1.8.3
|
||||
checking for Ruby header files... /usr/lib/ruby/1.8/i486-linux
|
||||
configure: error: Ruby not found
|
||||
----------------------------------------------------------------------
|
||||
|
||||
`config.log` reveals:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
configure:18617: checking for Ruby
|
||||
configure:18641: result: yes
|
||||
configure:18653: checking for ruby
|
||||
configure:18671: found /usr/bin/ruby
|
||||
configure:18684: result: /usr/bin/ruby
|
||||
configure:18694: checking Ruby version
|
||||
configure:18698: result: 1.8.3
|
||||
configure:18701: checking for Ruby header files
|
||||
configure:18706: result: /usr/lib/ruby/1.8/i486-linux
|
||||
configure:18765: tcc -o conftest ... -rdynamic -Wl,-export-dynamic ... conftest.c -lruby1.8 ... >&5
|
||||
tcc: unsupported linker option '-export-dynamic'
|
||||
configure:18771: $? = 1
|
||||
configure:18808: error: Ruby not found
|
||||
----------------------------------------------------------------------
|
||||
|
||||
The `-rdynamic -Wl,-export-dynamic` options come from this command:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'
|
||||
----------------------------------------------------------------------
|
||||
|
||||
TCC 0.9.23 supports the former but not the latter. To work around the
|
||||
error, configure `\--without-ruby`.
|
||||
|
||||
Stabs entry has invalid string index
|
||||
------------------------------------
|
||||
|
||||
----------------------------------------------------------------------
|
||||
ld -r -o lib.o frames.o parser.o renderer.o tables.o parser/lib.o
|
||||
ld: parser/lib.o(.stab+0x2688): Stabs entry has invalid string index.
|
||||
parser/lib.o: could not read symbols: Bad value
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Apparently, GNU ld 2.16.91 does not like the debug information
|
||||
generated by TCC 0.9.23. To work around the error, either set
|
||||
`LD=tcc` or remove `-g` from `CFLAGS`.
|
||||
|
||||
Linker segfault
|
||||
---------------
|
||||
|
||||
If you configure ELinks with both `\--with-gnutls` and `\--with-guile`,
|
||||
TCC 0.9.23 crashes when it's trying to link ELinks.
|
||||
|
||||
http://bugs.debian.org/418360[Debian bug #418360] has a patch that
|
||||
fixes this.
|
||||
|
||||
Undefined symbol alloca
|
||||
-----------------------
|
||||
|
||||
----------------------------------------------------------------------
|
||||
[LINK] src/elinks
|
||||
tcc: undefined symbol 'alloca'
|
||||
----------------------------------------------------------------------
|
||||
|
||||
GNU libc 2.3.6 declares `alloca()` in `<alloca.h>` but does not
|
||||
actually define it as a function, perhaps because the definition must
|
||||
be specific to each compiler. TCC 0.9.23 does not define `alloca()`
|
||||
either and fails to generate an executable but stupidly exits with
|
||||
code 0.
|
||||
|
||||
In ELinks, only `intl/gettext/plural.c` uses `alloca()`, so you can
|
||||
avoid the error with `configure --disable-nls`.
|
||||
|
||||
Unexpanded @HAVE_ALLOCA_H@ in <see/type.h>
|
||||
------------------------------------------
|
||||
|
||||
----------------------------------------------------------------------
|
||||
.../include/see/type.h:180: identifier expected
|
||||
----------------------------------------------------------------------
|
||||
|
||||
`<see/type.h>` of
|
||||
http://www.adaptive-enterprises.com.au/~d/software/see/[Simple
|
||||
ECMAScript Engine] 2.0.1131 has an unexpanded `@HAVE_ALLOCA_H@` inside
|
||||
`#ifndef __GNUC__`. Of course, TCC 0.9.23 does not define `__GNUC__`,
|
||||
so an error results. To avoid the error, either configure ELinks
|
||||
`\--without-see`, or edit `<see/type.h>`.
|
||||
|
||||
Reported as
|
||||
http://www.adaptive-enterprises.com.au/bugs/show_bug.cgi?id=65[SEE bug 65].
|
||||
|
||||
Advanced: Compiling SEE with TCC
|
||||
--------------------------------
|
||||
|
||||
If you want even more problems, try compiling Simple ECMAScript Engine
|
||||
with Tiny C Compiler as well.
|
||||
|
||||
Wrong precedence of sizeof
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
----------------------------------------------------------------------
|
||||
.../see-2.0.1131/libsee/unicase.c:86: pointer expected
|
||||
----------------------------------------------------------------------
|
||||
|
||||
TCC 0.9.23 misparses `sizeof (a)[0]` used in the `lengthof` macro.
|
||||
To work around the bug, change it to `sizeof ((a)[0])`.
|
||||
|
||||
Reported as http://bugs.debian.org/419203[Debian bug #419203].
|
||||
|
||||
Linker option -soname not supported
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
----------------------------------------------------------------------
|
||||
tcc: invalid option -- '-soname'
|
||||
----------------------------------------------------------------------
|
||||
|
||||
To construct a proper ELF library, the build system of SEE 2.0.1131
|
||||
must specify the shared object name. Unfortunately, TCC 0.9.23 does
|
||||
not appear to support any such option. So, use some other linker.
|
@ -73,7 +73,8 @@ cat "$CONFFILE" | while read line; do
|
||||
# Ignore
|
||||
;;
|
||||
"#"*)
|
||||
line=$(strip_comment "$line")
|
||||
# Backslashify --help, --enable, --disable to avoid —.
|
||||
line=$(strip_comment "$line" | sed 's/ --\([hed]\)/ \\--\1/')
|
||||
echo "$line" >> $TMPFILE
|
||||
;;
|
||||
esac
|
||||
|
@ -78,8 +78,11 @@ print_keymap_defaults()
|
||||
key=$(echo "$entry" | sed "s/\(KBD_[^,]*\|'.*'\),.*/\1/")
|
||||
modifier=$(echo "$entry" | sed "s/.*KBD_MOD_\([A-Z_]*\).*/\1/")
|
||||
action=$(echo "$entry" | sed "s/.*,.*\(ACT_$KEYMAP\)_\([A-Z_]*\).*/\2/")
|
||||
# If there are backslashed quotes, remove the backslashes.
|
||||
# (This is not needed in print_keymap_actions because
|
||||
# there the "read" command consumes the backslashes.)
|
||||
action=$(grep " $action," "$CONFIGDIR/actions-$keymap.inc" \
|
||||
| sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/")
|
||||
| sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/;s/\\\\\"/\"/g")
|
||||
|
||||
case "$key" in
|
||||
KBD_*)
|
||||
|
@ -368,16 +368,14 @@ CONFIG_NNTP=no
|
||||
|
||||
### SMB Protocol Support
|
||||
#
|
||||
# ELinks supports browsing over the SMB protocol (URI 'smb' scheme), using the
|
||||
# smbclient program as back-end. Therefore, in order to have this enabled, you
|
||||
# will need to install Samba (or at least just the smbclient part, if you can
|
||||
# install it separately).
|
||||
# ELinks supports browsing over the SMB protocol (URI 'smb' scheme),
|
||||
# using the libsmbclient library as back-end. Therefore, in order to
|
||||
# have this enabled, you will need to install Samba (or at least just
|
||||
# the libsmbclient part, if you can install it separately).
|
||||
#
|
||||
# Unfortunately, ELinks doesn't yet properly validate the file name passed to
|
||||
# smbclient, and this caused vulnerability CVE-2006-5925 (bug 841). To close
|
||||
# the vulnerability, configure.in now disables the SMB protocol regardless
|
||||
# of what you specify here. If you would like to fix the code so that the
|
||||
# protocol can be safely enabled again, please see bug 844.
|
||||
# This use of libsmbclient is believed to be immune to the command
|
||||
# injection attacks (CVE-2006-5925, bug 841) from which earlier ELinks
|
||||
# releases (0.9.0 to 0.11.1) suffered.
|
||||
#
|
||||
# Default: disabled
|
||||
|
||||
|
21
po/Makefile
21
po/Makefile
@ -57,7 +57,25 @@ $(srcdir)$(PACKAGE).pot: $(srcdir)$(POTFILES_ABS_LIST) $(srcdir)perl/gather-acce
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
||||
--directory=$(top_srcdir) \
|
||||
--add-comments --language=C \
|
||||
--keyword=_ --keyword=N_ --keyword=n_:1,2 --keyword=N__ -f $(srcdir)$(POTFILES_ABS_LIST) \
|
||||
--keyword=_ --keyword=N_ --keyword=n_:1,2 --keyword=N__ \
|
||||
--flag=msg_text:2:c-format --flag=die:1:c-format \
|
||||
--flag=secure_fprintf:2:c-format \
|
||||
--flag=DBG:1:c-format --flag=elinks_debug:1:c-format \
|
||||
--flag=WDBG:1:c-format --flag=elinks_wdebug:1:c-format \
|
||||
--flag=ERROR:1:c-format --flag=elinks_error:1:c-format \
|
||||
--flag=INTERNAL:1:c-format --flag=elinks_internal:1:c-format \
|
||||
--flag=usrerror:1:c-format --flag=elinks_log:4:c-format \
|
||||
--flag=LOG_ERR:1:c-format --flag=LOG_WARN:1:c-format \
|
||||
--flag=LOG_INFO:1:c-format --flag=LOG_DBG:1:c-format \
|
||||
--flag=assertm:2:c-format --flag=elinks_assertm:2:c-format \
|
||||
--flag=add_format_to_string:2:c-format \
|
||||
--flag=elinks_vsnprintf:3:c-format --flag=elinks_snprintf:3:c-format \
|
||||
--flag=elinks_vasprintf:2:c-format --flag=elinks_asprintf:2:c-format \
|
||||
--flag=vasprintfa:1:c-format --flag=asprintfa:1:c-format \
|
||||
--flag=_:1:pass-c-format --flag=N_:1:pass-c-format \
|
||||
--flag=n_:1:pass-c-format --flag=n_:2:pass-c-format \
|
||||
--flag=N__:1:pass-c-format \
|
||||
-f $(srcdir)$(POTFILES_ABS_LIST) \
|
||||
&& test -f $(PACKAGE).po \
|
||||
&& $(PERL) -I"$(srcdir)perl" $(srcdir)perl/gather-accelerator-contexts.pl -S"$(top_srcdir)" $(PACKAGE).po \
|
||||
&& mv -f $(PACKAGE).po $(srcdir)$(PACKAGE).pot
|
||||
@ -71,7 +89,6 @@ $(srcdir)$(PACKAGE).pot: $(srcdir)$(POTFILES_ABS_LIST) $(srcdir)perl/gather-acce
|
||||
# either <lang> or <lang>.po when calling make. Example: make update-po PO=is
|
||||
|
||||
update-po: Makefile $(srcdir)$(PACKAGE).pot
|
||||
@test -z "$(srcdir)" || cd $(srcdir)
|
||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||
echo -n "$(lang): "; \
|
||||
if $(MSGMERGE) $(srcdir)$(lang).po $(srcdir)$(PACKAGE).pot -o $(lang).new.po; then \
|
||||
|
65
po/de.po
65
po/de.po
@ -4,14 +4,15 @@
|
||||
# Josef 'Jupp' Schugt <jupp@gmx.de>, 2003
|
||||
# Karsten 'kuser' Schölzel <kuser@gmx.de>
|
||||
# Thomas Fuchs <tfoxYOUKNOWgmx.de>
|
||||
# Jens Seidel <jensseidel@users.sf.net>
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ELinks 0.9.CVS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-02-19 00:03+0100\n"
|
||||
"PO-Revision-Date: 2004-08-15 17:19+0200\n"
|
||||
"Last-Translator: Thomas Fuchs <tfoxYOUKNOWgmx.de>\n"
|
||||
"PO-Revision-Date: 2005-06-14 20:52+0200\n"
|
||||
"Last-Translator: Jens Seidel <jensseidel@users.sf.net>\n"
|
||||
"Language-Team: German <de@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-15\n"
|
||||
@ -1298,7 +1299,7 @@ msgstr ""
|
||||
|
||||
#: src/config/cmdline.c:666
|
||||
msgid "Name of directory with configuration file"
|
||||
msgstr "Name des Verzeichnises mit der Konfigurations-Datei"
|
||||
msgstr "Name des Verzeichnisses mit der Konfigurations-Datei"
|
||||
|
||||
#: src/config/cmdline.c:668
|
||||
#, fuzzy
|
||||
@ -1477,7 +1478,7 @@ msgstr ""
|
||||
|
||||
#: src/config/cmdline.c:750
|
||||
msgid "Run as separate instance"
|
||||
msgstr "Starte als seperater Prozess"
|
||||
msgstr "Starte als separater Prozess"
|
||||
|
||||
#: src/config/cmdline.c:752
|
||||
#, fuzzy
|
||||
@ -1487,7 +1488,7 @@ msgid ""
|
||||
"(bookmarks, history, etc.) are written to the disk when this\n"
|
||||
"option is used. See also -touch-files."
|
||||
msgstr ""
|
||||
"Starte ELinks als seperate Instanz und verbinde nicht zu einer\n"
|
||||
"Starte ELinks als separate Instanz und verbinde nicht zu einer\n"
|
||||
"laufenden Instanz. Beachte, dass normalerweise keine Statusdateien\n"
|
||||
"(Lesezeichen, Verlauf, usw.) geschrieben werden, wenn diese Option\n"
|
||||
"benutzt wird. Siehe auch -touch-files."
|
||||
@ -2384,11 +2385,11 @@ msgstr ""
|
||||
|
||||
#: src/config/options.inc:234
|
||||
msgid "Image link prefix"
|
||||
msgstr "Prefix von Links zu Bildern"
|
||||
msgstr "Präfix von Links zu Bildern"
|
||||
|
||||
#: src/config/options.inc:236
|
||||
msgid "Prefix string to use to mark image links."
|
||||
msgstr "Prefix, um Links zu Bildern zu kennzeichnen."
|
||||
msgstr "Präfix, um Links zu Bildern zu kennzeichnen."
|
||||
|
||||
#: src/config/options.inc:238
|
||||
msgid "Image link suffix"
|
||||
@ -2598,7 +2599,7 @@ msgid ""
|
||||
"1 means if document.browse.links.numbering = 1\n"
|
||||
"2 means always"
|
||||
msgstr ""
|
||||
"Ziffertasten wählen Links aus und bezeichnen keine Kommandoprefixe.\n"
|
||||
"Ziffertasten wählen Links aus und bezeichnen keine Kommandopräfixe.\n"
|
||||
"Diese Option hat drei Zustände:\n"
|
||||
"0 niemals\n"
|
||||
"1 wenn document.browse.links.numbering = 1\n"
|
||||
@ -2648,7 +2649,7 @@ msgid ""
|
||||
"right is pressed and no prefix was given."
|
||||
msgstr ""
|
||||
"Anzahl der zu rollenden Zeilen, wenn eine mit scroll-up oder scroll-\n"
|
||||
"down verbundene Taste gedrückt und kein Prefix angegeben wurde."
|
||||
"down verbundene Taste gedrückt und kein Präfix angegeben wurde."
|
||||
|
||||
#: src/config/options.inc:366
|
||||
msgid "Extended horizontal scrolling"
|
||||
@ -2683,7 +2684,7 @@ msgid ""
|
||||
"down is pressed and no prefix was given."
|
||||
msgstr ""
|
||||
"Anzahl der zu rollenden Zeilen, wenn eine mit scroll-up oder scroll-\n"
|
||||
"down verbundene Taste gedrückt und kein Prefix angegeben wurde."
|
||||
"down verbundene Taste gedrückt und kein Präfix angegeben wurde."
|
||||
|
||||
#: src/config/options.inc:383
|
||||
msgid "Searching"
|
||||
@ -2695,7 +2696,7 @@ msgstr "Optionen f
|
||||
|
||||
#: src/config/options.inc:387
|
||||
msgid "Case sensitivity"
|
||||
msgstr "Groß-/Kleinscreibung beachten"
|
||||
msgstr "Groß-/Kleinschreibung beachten"
|
||||
|
||||
#: src/config/options.inc:389
|
||||
msgid ""
|
||||
@ -4630,7 +4631,7 @@ msgstr "Hintergrund"
|
||||
#: src/dialogs/download.c:246
|
||||
#, fuzzy
|
||||
msgid "Background with ~notify"
|
||||
msgstr "Im Hintergund mit Benachrichtigung"
|
||||
msgstr "Im Hintergrund mit Benachrichtigung"
|
||||
|
||||
#. accelerator_context(display_download, src/dialogs/download.c:download_buttons)
|
||||
#: src/dialogs/download.c:253 src/dialogs/download.c:481
|
||||
@ -4836,12 +4837,12 @@ msgstr "Linknummer eingeben"
|
||||
#: src/dialogs/info.c:239
|
||||
#, fuzzy
|
||||
msgid "master terminal"
|
||||
msgstr "Terminalgrösse ändern"
|
||||
msgstr "Terminalgröße ändern"
|
||||
|
||||
#: src/dialogs/info.c:241
|
||||
#, fuzzy
|
||||
msgid "slave terminal"
|
||||
msgstr "Terminalgrösse ändern"
|
||||
msgstr "Terminalgröße ändern"
|
||||
|
||||
#: src/dialogs/info.c:245
|
||||
#, fuzzy, c-format
|
||||
@ -5027,7 +5028,7 @@ msgstr "~Starte Shell"
|
||||
#. accelerator_context(src/dialogs/menu.c:file_menu)
|
||||
#: src/dialogs/menu.c:388
|
||||
msgid "Resize t~erminal"
|
||||
msgstr "Terminalgrösse ~ändern"
|
||||
msgstr "Terminalgröße ~ändern"
|
||||
|
||||
#. accelerator_context(src/dialogs/menu.c:view_menu)
|
||||
#: src/dialogs/menu.c:406
|
||||
@ -5334,7 +5335,7 @@ msgstr "256 Farben"
|
||||
|
||||
#: src/dialogs/options.c:286
|
||||
msgid "Resize terminal"
|
||||
msgstr "Terminalgrösse ändern"
|
||||
msgstr "Terminalgröße ändern"
|
||||
|
||||
#: src/dialogs/options.c:289
|
||||
#, fuzzy
|
||||
@ -7768,14 +7769,14 @@ msgid ""
|
||||
"arguments to them like search engine keywords."
|
||||
msgstr ""
|
||||
"Regeln um URIs zu verändern, die im Gehe-zu-Dialog eingegeben werden.\n"
|
||||
"Hiermit ist es möglich, Prefixe zu definieren, die bei Eingabe im\n"
|
||||
"Gehe-zu-Dialog expandiert werden. Die Prefixe können einfach sein,\n"
|
||||
"Hiermit ist es möglich, Präfixe zu definieren, die bei Eingabe im\n"
|
||||
"Gehe-zu-Dialog expandiert werden. Die Präfixe können einfach sein,\n"
|
||||
"das heißt sie verhalten sich wie URI-Abkürzungen, oder komplex sein,\n"
|
||||
"dann können Argumente angegeben werden wie zum Beispiel Suchbegriffe."
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:53
|
||||
msgid "Enable dumb prefixes"
|
||||
msgstr "Einfache Prefixe aktivieren"
|
||||
msgstr "Einfache Präfixe aktivieren"
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:55
|
||||
#, fuzzy
|
||||
@ -7785,14 +7786,14 @@ msgid ""
|
||||
"if you write 'elinks' there, you are directed to\n"
|
||||
"http://elinks.cz/."
|
||||
msgstr ""
|
||||
"Aktiviert einfache Prefixe. Dabei handelt es sich um URI Abkürzungen,\n"
|
||||
"Aktiviert einfache Präfixe. Dabei handelt es sich um URI-Abkürzungen,\n"
|
||||
"die in den Gehe-Zu-URL-Dialog geschrieben werden anstelle der \n"
|
||||
"aktuellen URI. Z.B. kann man dort 'elinks' eingeben und wird auf\n"
|
||||
"http://elinks.or.cz/ umgeleitet."
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:60
|
||||
msgid "Enable smart prefixes"
|
||||
msgstr "Komplexe Prefixe aktivieren"
|
||||
msgstr "Komplexe Präfixe aktivieren"
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:62
|
||||
msgid ""
|
||||
@ -7801,18 +7802,18 @@ msgid ""
|
||||
"of arguments from which the actual URI is composed - i.e.\n"
|
||||
"'gg:search keywords' or 'gn search keywords for news'."
|
||||
msgstr ""
|
||||
"Aktiviert komplexe Prefixe. Dabei handelt es sich um Abkürzungen\n"
|
||||
"Aktiviert komplexe Präfixe. Dabei handelt es sich um Abkürzungen\n"
|
||||
"für URI-Schablonen, die gefolgt von einer Liste von Argumenten\n"
|
||||
"in den Gehe-zu-Dialog eingegeben werden und aus denen die Ziel-URL\n"
|
||||
"zusammengesetzt wird. Z.B. 'gg Suchwörter' oder 'gn Suchwörter für News'."
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:67
|
||||
msgid "Dumb Prefixes"
|
||||
msgstr "Einfache Prefixe"
|
||||
msgstr "Einfache Präfixe"
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:69
|
||||
msgid "Dumb prefixes, see enable-dumb description for details."
|
||||
msgstr "Einfach Prefixe, siehe enable-dump-Beschreibung für Details."
|
||||
msgstr "Einfach Präfixe, siehe enable-dump-Beschreibung für Details."
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:74
|
||||
#, fuzzy, no-c-format
|
||||
@ -7821,17 +7822,17 @@ msgid ""
|
||||
"%c in the string means the current URL\n"
|
||||
"%% in the string means '%'"
|
||||
msgstr ""
|
||||
"Ersatz-URI für dieses einfache Prefix.\n"
|
||||
"Ersatz-URI für dieses einfache Präfix.\n"
|
||||
"%c in der Zeichenkette bedeutet die aktuelle URL\n"
|
||||
"%% in der Zeichenkette bedeutet '%'"
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:78
|
||||
msgid "Smart Prefixes"
|
||||
msgstr "Komplexe Prefixe"
|
||||
msgstr "Komplexe Präfixe"
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:80
|
||||
msgid "Smart prefixes, see enable-smart description for details."
|
||||
msgstr "Komplexe Prefixe, siehe enable-smart-Besschreibung für Details."
|
||||
msgstr "Komplexe Präfixe, siehe enable-smart-Beschreibung für Details."
|
||||
|
||||
#: src/protocol/rewrite/rewrite.c:87
|
||||
#, fuzzy, no-c-format
|
||||
@ -7842,9 +7843,9 @@ msgid ""
|
||||
"%0,%1,...,%9 means argument 0, 1, ..., 9\n"
|
||||
"%% in the string means '%'"
|
||||
msgstr ""
|
||||
"Ersatz-URI für dieses komplexe Prefix.\n"
|
||||
"Ersatz-URI für dieses komplexe Präfix.\n"
|
||||
"%c in der Zeichenkette bedeutet die aktuelle URL\n"
|
||||
"%s in der Zeichenkette bedeutet das gesamte Argument dieses Prefixes\n"
|
||||
"%s in der Zeichenkette bedeutet das gesamte Argument dieses Präfixes\n"
|
||||
"%0,%1,...,%9 in der Zeichenkette bedeutet Argument 0, 1, ..., 9\n"
|
||||
"%% in der Zeichenkette bedeutet '%'"
|
||||
|
||||
@ -8114,7 +8115,7 @@ msgid ""
|
||||
"for any inconvience caused."
|
||||
msgstr ""
|
||||
"Der Wert der Option config.saving_style ist de facto veraltet. Die "
|
||||
"Algorithmen für das Speichern der Konfiguartion haben sich im Vergleich zu "
|
||||
"Algorithmen für das Speichern der Konfiguration haben sich im Vergleich zu "
|
||||
"deiner letzten ELinks-Version verändert. Jetzt werden nur noch diejenigen "
|
||||
"Optionen gespeichert, die sich geändert haben, anstatt aller Optionen. Dies "
|
||||
"vereinfacht unsere Situation, wenn eine Option einen ungültigen Wert hat "
|
||||
@ -8586,8 +8587,8 @@ msgstr "Fehler beim Schreiben in Datei"
|
||||
#~ "Prefix: Shift, Ctrl, Alt\n"
|
||||
#~ "Key: a,b,c,...,1,2,3,...,Space,Up,PageDown,Tab,Enter,Insert,F5,..."
|
||||
#~ msgstr ""
|
||||
#~ "Geben Sie Tastendrücke in dieser Form ein: [Prefix-]Taste\n"
|
||||
#~ "Prefix: Shift, Ctrl, Alt\n"
|
||||
#~ "Geben Sie Tastendrücke in dieser Form ein: [Präfix-]Taste\n"
|
||||
#~ "Präfix: Shift, Ctrl, Alt\n"
|
||||
#~ "Taste: a,b,c,...,1,2,3,...,Space,Up,PageDown,Tab,Enter,Insert,F5,..."
|
||||
|
||||
#, fuzzy
|
||||
|
@ -38,6 +38,14 @@ vernum.o: $(LIB_O_NAME)
|
||||
elinks: $(LIB_O_NAME) vernum.o
|
||||
$(call cmd,link)
|
||||
|
||||
TAGS:
|
||||
find $(srcdir). \( -name "*.[ch]" -o -name "*.inc" \) -print \
|
||||
| etags --regex='{c}/INIT_LIST_HEAD(\([[:alnum:]_]+\))/\1/' \
|
||||
--regex='{c}/struct_hierbox_browser(\n[ \t]*\([[:alnum:]_]+\),/\1/m' \
|
||||
--regex='{c}/^ACTION_(\([[:alnum:]_]+\),[^,]*,[ \t]*\([[:alnum:]_]+\),/ACT_\1_\2/' \
|
||||
--language=c -
|
||||
.PHONY: TAGS
|
||||
|
||||
PROGS = elinks
|
||||
CLEAN = vernum.o
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#ifdef DEBUG_BUTTON_HOTKEY
|
||||
void
|
||||
add_dlg_button_do(unsigned char *file, int line,
|
||||
add_dlg_button_do(const unsigned char *file, int line,
|
||||
struct dialog *dlg, unsigned char *text, int flags,
|
||||
widget_handler_T *handler, void *data,
|
||||
done_handler_T *done, void *done_data)
|
||||
@ -331,7 +331,7 @@ select_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
return widget_data->widget->handler(dlg_data, widget_data);
|
||||
}
|
||||
|
||||
struct widget_ops button_ops = {
|
||||
const struct widget_ops button_ops = {
|
||||
display_button,
|
||||
NULL,
|
||||
mouse_button,
|
||||
|
@ -30,7 +30,7 @@ struct widget_info_button {
|
||||
|
||||
|
||||
#ifdef DEBUG_BUTTON_HOTKEY
|
||||
void add_dlg_button_do(unsigned char *file, int line, struct dialog *dlg, unsigned char *text, int flags, widget_handler_T *handler, void *data, done_handler_T *done, void *done_data);
|
||||
void add_dlg_button_do(const unsigned char *file, int line, struct dialog *dlg, unsigned char *text, int flags, widget_handler_T *handler, void *data, done_handler_T *done, void *done_data);
|
||||
#define add_dlg_ok_button(dlg, text, flags, done, data) \
|
||||
add_dlg_button_do(__FILE__, __LINE__, dlg, text, flags, ok_dialog, NULL, done, data)
|
||||
|
||||
@ -47,7 +47,7 @@ void add_dlg_button_do(struct dialog *dlg, unsigned char *text, int flags, widge
|
||||
add_dlg_button_do(dlg, text, flags, handler, data, NULL, NULL)
|
||||
#endif
|
||||
|
||||
extern struct widget_ops button_ops;
|
||||
extern const struct widget_ops button_ops;
|
||||
void dlg_format_buttons(struct terminal *, struct widget_data *, int, int, int *, int, int *, enum format_align, int);
|
||||
|
||||
#endif
|
||||
|
@ -164,7 +164,7 @@ select_checkbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
struct widget_ops checkbox_ops = {
|
||||
const struct widget_ops checkbox_ops = {
|
||||
display_checkbox,
|
||||
init_checkbox,
|
||||
mouse_checkbox,
|
||||
|
@ -27,7 +27,7 @@ void add_dlg_radio_do(struct dialog *dlg, unsigned char *text, int groupid, int
|
||||
#define add_dlg_checkbox(dlg, text, data) \
|
||||
add_dlg_radio_do(dlg, text, 0, 0, data)
|
||||
|
||||
extern struct widget_ops checkbox_ops;
|
||||
extern const struct widget_ops checkbox_ops;
|
||||
|
||||
void
|
||||
dlg_format_checkbox(struct terminal *term,
|
||||
|
@ -140,7 +140,7 @@ select_dlg_item(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
widget_data->widget->ops->select(dlg_data, widget_data);
|
||||
}
|
||||
|
||||
static struct widget_ops *widget_type_to_ops[] = {
|
||||
static const struct widget_ops *const widget_type_to_ops[] = {
|
||||
&checkbox_ops,
|
||||
&field_ops,
|
||||
&field_pass_ops,
|
||||
@ -344,7 +344,7 @@ static void
|
||||
dialog_ev_kbd(struct dialog_data *dlg_data)
|
||||
{
|
||||
struct widget_data *widget_data = selected_widget(dlg_data);
|
||||
struct widget_ops *ops = widget_data->widget->ops;
|
||||
const struct widget_ops *ops = widget_data->widget->ops;
|
||||
/* XXX: KEYMAP_EDIT ? --pasky */
|
||||
enum menu_action action_id;
|
||||
struct term_event *ev = dlg_data->term_event;
|
||||
|
@ -43,7 +43,7 @@ add_listbox_item(struct hierbox_browser *browser, struct listbox_item *root,
|
||||
struct listbox_item *item;
|
||||
|
||||
if (!root) {
|
||||
assertm(browser, "Nowhere to add new list box item");
|
||||
assertm(browser != NULL, "Nowhere to add new list box item");
|
||||
root = &browser->root;
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ hierbox_browser(struct hierbox_browser *browser, struct session *ses)
|
||||
add_dlg_listbox(dlg, listbox_data);
|
||||
|
||||
for (button = 0; button < browser->buttons_size; button++) {
|
||||
struct hierbox_browser_button *but = &browser->buttons[button];
|
||||
const struct hierbox_browser_button *but = &browser->buttons[button];
|
||||
|
||||
/* Skip buttons that should not be displayed in anonymous mode */
|
||||
if (anonymous && !but->anonymous) {
|
||||
@ -335,7 +335,7 @@ hierbox_browser(struct hierbox_browser *browser, struct session *ses)
|
||||
* have to subtract one. */
|
||||
add_dlg_end(dlg, button + 2 - (anonymous ? anonymous - 1 : 0));
|
||||
|
||||
return do_dialog(term, dlg, getml(dlg, NULL));
|
||||
return do_dialog(term, dlg, getml(dlg, (void *) NULL));
|
||||
}
|
||||
|
||||
|
||||
@ -434,11 +434,11 @@ push_hierbox_info_button(struct dialog_data *dlg_data, struct widget_data *butto
|
||||
|
||||
box->ops->lock(item);
|
||||
|
||||
msg_box(term, getml(context, NULL), MSGBOX_FREE_TEXT /* | MSGBOX_SCROLLABLE */,
|
||||
msg_box(term, getml(context, (void *) NULL), MSGBOX_FREE_TEXT /* | MSGBOX_SCROLLABLE */,
|
||||
N_("Info"), ALIGN_LEFT,
|
||||
msg,
|
||||
context, 1,
|
||||
N_("~OK"), done_listbox_context, B_ESC | B_ENTER);
|
||||
MSG_BOX_BUTTON(N_("~OK"), done_listbox_context, B_ESC | B_ENTER));
|
||||
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
@ -547,7 +547,7 @@ enum delete_error {
|
||||
DELETE_ERRORS,
|
||||
};
|
||||
|
||||
struct listbox_ops_messages default_listbox_ops_messages = {
|
||||
static const struct listbox_ops_messages default_listbox_ops_messages = {
|
||||
/* cant_delete_item */
|
||||
N_("Sorry, but the item \"%s\" cannot be deleted."),
|
||||
|
||||
@ -592,7 +592,7 @@ struct listbox_ops_messages default_listbox_ops_messages = {
|
||||
|
||||
static void
|
||||
print_delete_error(struct listbox_item *item, struct terminal *term,
|
||||
struct listbox_ops *ops, enum delete_error err)
|
||||
const struct listbox_ops *ops, enum delete_error err)
|
||||
{
|
||||
struct string msg;
|
||||
unsigned char *errmsg;
|
||||
@ -647,7 +647,7 @@ static void
|
||||
do_delete_item(struct listbox_item *item, struct listbox_context *info,
|
||||
int last)
|
||||
{
|
||||
struct listbox_ops *ops = info->box->ops;
|
||||
const struct listbox_ops *ops = info->box->ops;
|
||||
|
||||
assert(item);
|
||||
|
||||
@ -720,7 +720,7 @@ query_delete_selected_item(void *context_)
|
||||
struct listbox_context *context, *oldcontext = context_;
|
||||
struct terminal *term = oldcontext->term;
|
||||
struct listbox_data *box = oldcontext->box;
|
||||
struct listbox_ops *ops = box->ops;
|
||||
const struct listbox_ops *ops = box->ops;
|
||||
struct listbox_item *item = box->sel;
|
||||
unsigned char *text;
|
||||
enum delete_error delete;
|
||||
@ -747,24 +747,24 @@ query_delete_selected_item(void *context_)
|
||||
|
||||
if (item->type == BI_FOLDER) {
|
||||
ops->lock(item);
|
||||
msg_box(term, getml(context, NULL), MSGBOX_FREE_TEXT,
|
||||
msg_box(term, getml(context, (void *) NULL), MSGBOX_FREE_TEXT,
|
||||
listbox_message(delete_folder_title), ALIGN_CENTER,
|
||||
msg_text(term, listbox_message(delete_folder), text),
|
||||
context, 2,
|
||||
N_("~Yes"), push_ok_delete_button, B_ENTER,
|
||||
N_("~No"), done_listbox_context, B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~Yes"), push_ok_delete_button, B_ENTER),
|
||||
MSG_BOX_BUTTON(N_("~No"), done_listbox_context, B_ESC));
|
||||
} else {
|
||||
unsigned char *msg = ops->get_info(item, term);
|
||||
|
||||
ops->lock(item);
|
||||
|
||||
msg_box(term, getml(context, NULL), MSGBOX_FREE_TEXT,
|
||||
msg_box(term, getml(context, (void *) NULL), MSGBOX_FREE_TEXT,
|
||||
listbox_message(delete_item_title), ALIGN_LEFT,
|
||||
msg_text(term, listbox_message(delete_item),
|
||||
text, empty_string_or_(msg)),
|
||||
context, 2,
|
||||
N_("~Yes"), push_ok_delete_button, B_ENTER,
|
||||
N_("~No"), done_listbox_context, B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~Yes"), push_ok_delete_button, B_ENTER),
|
||||
MSG_BOX_BUTTON(N_("~No"), done_listbox_context, B_ESC));
|
||||
mem_free_if(msg);
|
||||
}
|
||||
mem_free(text);
|
||||
@ -772,6 +772,12 @@ query_delete_selected_item(void *context_)
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
static void
|
||||
dont_delete_marked_items(void *const context_)
|
||||
{
|
||||
query_delete_selected_item(context_);
|
||||
}
|
||||
|
||||
widget_handler_status_T
|
||||
push_hierbox_delete_button(struct dialog_data *dlg_data,
|
||||
struct widget_data *button)
|
||||
@ -779,7 +785,7 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
|
||||
/* [gettext_accelerator_context(push_hierbox_delete_button)] */
|
||||
struct terminal *term = dlg_data->win->term;
|
||||
struct listbox_data *box = get_dlg_listbox_data(dlg_data);
|
||||
struct listbox_ops *ops = box->ops;
|
||||
const struct listbox_ops *ops = box->ops;
|
||||
struct listbox_item *item = box->sel;
|
||||
struct listbox_context *context;
|
||||
|
||||
@ -801,12 +807,12 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
|
||||
return status;
|
||||
}
|
||||
|
||||
msg_box(term, getml(context, NULL), 0,
|
||||
msg_box(term, getml(context, (void *) NULL), 0,
|
||||
listbox_message(delete_marked_items_title), ALIGN_CENTER,
|
||||
listbox_message(delete_marked_items),
|
||||
context, 2,
|
||||
N_("~Yes"), push_ok_delete_button, B_ENTER,
|
||||
N_("~No"), query_delete_selected_item, B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~Yes"), push_ok_delete_button, B_ENTER),
|
||||
MSG_BOX_BUTTON(N_("~No"), dont_delete_marked_items, B_ESC));
|
||||
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
@ -842,7 +848,7 @@ push_hierbox_clear_button(struct dialog_data *dlg_data,
|
||||
{
|
||||
/* [gettext_accelerator_context(push_hierbox_clear_button)] */
|
||||
struct listbox_data *box = get_dlg_listbox_data(dlg_data);
|
||||
struct listbox_ops *ops = box->ops;
|
||||
const struct listbox_ops *ops = box->ops;
|
||||
struct terminal *term = dlg_data->win->term;
|
||||
struct listbox_context *context;
|
||||
|
||||
@ -863,12 +869,12 @@ push_hierbox_clear_button(struct dialog_data *dlg_data,
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
msg_box(term, getml(context, NULL), 0,
|
||||
msg_box(term, getml(context, (void *) NULL), 0,
|
||||
listbox_message(clear_all_items_title), ALIGN_CENTER,
|
||||
listbox_message(clear_all_items),
|
||||
context, 2,
|
||||
N_("~Yes"), do_clear_browser, B_ENTER,
|
||||
N_("~No"), NULL, B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~Yes"), do_clear_browser, B_ENTER),
|
||||
MSG_BOX_BUTTON(N_("~No"), NULL, B_ESC));
|
||||
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
@ -18,13 +18,13 @@ struct hierbox_browser_button {
|
||||
struct hierbox_browser {
|
||||
unsigned char *title;
|
||||
void (*expansion_callback)(void);
|
||||
struct hierbox_browser_button *buttons;
|
||||
const struct hierbox_browser_button *buttons;
|
||||
size_t buttons_size;
|
||||
|
||||
struct list_head boxes;
|
||||
struct list_head dialogs;
|
||||
struct listbox_item root;
|
||||
struct listbox_ops *ops;
|
||||
const struct listbox_ops *ops;
|
||||
|
||||
/* For saving state */
|
||||
unsigned int do_not_save_state:1;
|
||||
|
@ -238,7 +238,7 @@ input_field(struct terminal *term, struct memory_list *ml, int intl,
|
||||
|
||||
add_dlg_end(dlg, INPUT_WIDGETS_COUNT);
|
||||
|
||||
add_to_ml(&ml, dlg, NULL);
|
||||
add_to_ml(&ml, (void *) dlg, (void *) NULL);
|
||||
do_dialog(term, dlg, ml);
|
||||
}
|
||||
|
||||
@ -744,7 +744,7 @@ clear_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
struct widget_ops field_ops = {
|
||||
const struct widget_ops field_ops = {
|
||||
display_field,
|
||||
init_field,
|
||||
mouse_field,
|
||||
@ -753,7 +753,7 @@ struct widget_ops field_ops = {
|
||||
clear_field,
|
||||
};
|
||||
|
||||
struct widget_ops field_pass_ops = {
|
||||
const struct widget_ops field_pass_ops = {
|
||||
display_field_pass,
|
||||
init_field,
|
||||
mouse_field,
|
||||
@ -908,5 +908,5 @@ input_field_line(struct session *ses, unsigned char *prompt, void *data,
|
||||
add_dlg_field_float2(dlg, prompt, 0, 0, NULL, INPUT_LINE_BUFFER_SIZE,
|
||||
buffer, history);
|
||||
|
||||
do_dialog(ses->tab->term, dlg, getml(dlg, NULL));
|
||||
do_dialog(ses->tab->term, dlg, getml(dlg, (void *) NULL));
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ add_dlg_field_do(struct dialog *dlg, enum widget_type type, unsigned char *label
|
||||
add_dlg_field_do(dlg, WIDGET_FIELD_PASS, label, min, max, handler, len, field, NULL, INPFIELD_FLOAT)
|
||||
|
||||
|
||||
extern struct widget_ops field_ops;
|
||||
extern struct widget_ops field_pass_ops;
|
||||
extern const struct widget_ops field_ops;
|
||||
extern const struct widget_ops field_pass_ops;
|
||||
|
||||
widget_handler_status_T check_number(struct dialog_data *, struct widget_data *);
|
||||
widget_handler_status_T check_nonempty(struct dialog_data *, struct widget_data *);
|
||||
|
@ -289,7 +289,8 @@ load_input_history(struct input_history *history, unsigned char *filename)
|
||||
|
||||
if (get_cmd_opt_bool("anonymous")) return 0;
|
||||
if (elinks_home) {
|
||||
history_file = straconcat(elinks_home, filename, NULL);
|
||||
history_file = straconcat(elinks_home, filename,
|
||||
(unsigned char *) NULL);
|
||||
if (!history_file) return 0;
|
||||
}
|
||||
|
||||
@ -327,7 +328,8 @@ save_input_history(struct input_history *history, unsigned char *filename)
|
||||
|| get_cmd_opt_bool("anonymous"))
|
||||
return 0;
|
||||
|
||||
history_file = straconcat(elinks_home, filename, NULL);
|
||||
history_file = straconcat(elinks_home, filename,
|
||||
(unsigned char *) NULL);
|
||||
if (!history_file) return -1;
|
||||
|
||||
ssi = secure_open(history_file);
|
||||
|
@ -452,7 +452,7 @@ display_listbox_item(struct listbox_item *item, void *data_, int *offset)
|
||||
|
||||
} else {
|
||||
unsigned char *text;
|
||||
struct listbox_ops *ops = data->box->ops;
|
||||
const struct listbox_ops *ops = data->box->ops;
|
||||
int len_bytes;
|
||||
|
||||
assert(ops && ops->get_info);
|
||||
@ -735,7 +735,7 @@ kbd_listbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
return EVENT_NOT_PROCESSED;
|
||||
}
|
||||
|
||||
struct widget_ops listbox_ops = {
|
||||
const struct widget_ops listbox_ops = {
|
||||
display_listbox,
|
||||
init_listbox,
|
||||
mouse_listbox,
|
||||
|
@ -100,7 +100,7 @@ struct listbox_ops {
|
||||
struct listbox_data {
|
||||
LIST_HEAD(struct listbox_data);
|
||||
|
||||
struct listbox_ops *ops; /* Backend-provided operations */
|
||||
const struct listbox_ops *ops; /* Backend-provided operations */
|
||||
struct listbox_item *sel; /* Item currently selected */
|
||||
struct listbox_item *top; /* Item which is on the top line of the box */
|
||||
|
||||
@ -131,7 +131,7 @@ struct listbox_item {
|
||||
void *udata;
|
||||
};
|
||||
|
||||
extern struct widget_ops listbox_ops;
|
||||
extern const struct widget_ops listbox_ops;
|
||||
|
||||
void dlg_format_listbox(struct terminal *, struct widget_data *, int, int *, int, int, int *, enum format_align, int format_only);
|
||||
|
||||
|
@ -177,7 +177,7 @@ menu_labels(struct menu_item *items, unsigned char *base, unsigned char **lbls)
|
||||
foreach_menu_item (item, items) {
|
||||
bs = (item->flags & MENU_FULLNAME) ? (unsigned char *) ""
|
||||
: base;
|
||||
bs = straconcat(bs, item->text, NULL);
|
||||
bs = straconcat(bs, item->text, (unsigned char *) NULL);
|
||||
if (!bs) continue;
|
||||
|
||||
if (item->func == do_select_submenu) {
|
||||
|
@ -171,7 +171,7 @@ select_menu_item(struct terminal *term, struct menu_item *it, void *data)
|
||||
return;
|
||||
}
|
||||
|
||||
assertm(func, "No menu function");
|
||||
assertm(func != NULL, "No menu function");
|
||||
if_assert_failed return;
|
||||
|
||||
func(term, it_data, data);
|
||||
@ -983,8 +983,8 @@ menu_handler(struct window *win, struct term_event *ev)
|
||||
switch (ev->ev) {
|
||||
case EVENT_INIT:
|
||||
case EVENT_RESIZE:
|
||||
case EVENT_REDRAW:
|
||||
get_parent_ptr(win, &menu->parent_x, &menu->parent_y);
|
||||
case EVENT_REDRAW:
|
||||
count_menu_size(win->term, menu);
|
||||
/* do_menu sets menu->selected = 0. If that
|
||||
* item isn't actually selectable, correct
|
||||
|
@ -71,7 +71,7 @@ msg_box(struct terminal *term, struct memory_list *ml, enum msgbox_flags flags,
|
||||
int bflags;
|
||||
|
||||
label = va_arg(ap, unsigned char *);
|
||||
done = va_arg(ap, void *);
|
||||
done = va_arg(ap, done_handler_T *);
|
||||
bflags = va_arg(ap, int);
|
||||
|
||||
if (!label) {
|
||||
@ -170,7 +170,7 @@ refreshed_msg_box(struct terminal *term, enum msgbox_flags flags,
|
||||
title, align,
|
||||
info,
|
||||
data, 1,
|
||||
N_("~OK"), NULL, B_ENTER | B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~OK"), NULL, B_ENTER | B_ESC));
|
||||
|
||||
if (!dlg_data) return;
|
||||
|
||||
@ -187,6 +187,9 @@ info_box(struct terminal *term, enum msgbox_flags flags,
|
||||
unsigned char *text)
|
||||
{
|
||||
/* [gettext_accelerator_context(info_box)] */
|
||||
return msg_box(term, NULL, flags, title, align, text,
|
||||
NULL, 1, N_("~OK"), NULL, B_ENTER | B_ESC);
|
||||
return msg_box(term, NULL, flags,
|
||||
title, align,
|
||||
text,
|
||||
NULL, 1,
|
||||
MSG_BOX_BUTTON(N_("~OK"), NULL, B_ENTER | B_ESC));
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ enum msgbox_flags {
|
||||
* @udata Is a reference to any data that should be passed to
|
||||
* the handlers associated with each button. NULL if none.
|
||||
*
|
||||
* @buttons Denotes the number of buttons given as varadic arguments.
|
||||
* @buttons Denotes the number of buttons given as variadic arguments.
|
||||
* For each button 3 arguments are extracted:
|
||||
* o First the label text. It is automatically localized
|
||||
* unless MSGBOX_NO_INTL is passed. If NULL, this button
|
||||
@ -72,6 +72,10 @@ enum msgbox_flags {
|
||||
* o Second pointer to the handler function (taking
|
||||
* one (void *), which is incidentally the udata).
|
||||
* o Third any flags.
|
||||
* Each triple should be wrapped in the MSG_BOX_BUTTON
|
||||
* macro, which converts the values to the correct types.
|
||||
* (The compiler can't do that on its own for variadic
|
||||
* arguments.)
|
||||
*
|
||||
* Note that you should ALWAYS format the msg_box() call like:
|
||||
*
|
||||
@ -79,9 +83,9 @@ enum msgbox_flags {
|
||||
* title, align,
|
||||
* text,
|
||||
* udata, M,
|
||||
* label1, handler1, flags1,
|
||||
* MSG_BOX_BUTTON(label1, handler1, flags1),
|
||||
* ...,
|
||||
* labelM, handlerM, flagsM);
|
||||
* MSG_BOX_BUTTON(labelM, handlerM, flagsM));
|
||||
*
|
||||
* ...no matter that it could fit on one line in case of a tiny message box. */
|
||||
struct dialog_data *
|
||||
@ -89,6 +93,21 @@ msg_box(struct terminal *term, struct memory_list *mem_list,
|
||||
enum msgbox_flags flags, unsigned char *title, enum format_align align,
|
||||
unsigned char *text, void *udata, int buttons, ...);
|
||||
|
||||
/* Cast @value to @type and warn if the conversion is suspicious.
|
||||
* If @value has side effects, this does them only once.
|
||||
* The expression used here is intended to be standard C, but it is
|
||||
* somewhat tricky. If it causes trouble on some compiler, you can
|
||||
* #ifdef an alternative definition that skips the type check. */
|
||||
#define MSG_BOX_CAST(type, value) \
|
||||
(((void) sizeof(((int (*)(type)) 0)(value))), (type) (value))
|
||||
|
||||
/* A button in the variadic arguments of msg_box().
|
||||
* This macro expands into three arguments. */
|
||||
#define MSG_BOX_BUTTON(label, handler, flags) \
|
||||
MSG_BOX_CAST(const unsigned char *, label), \
|
||||
MSG_BOX_CAST(done_handler_T *, handler), \
|
||||
MSG_BOX_CAST(int, flags)
|
||||
|
||||
|
||||
/* msg_text() is basically an equivalent to asprintf(), specifically to be used
|
||||
* inside of message boxes. Please always use msg_text() instead of asprintf()
|
||||
|
@ -68,7 +68,8 @@ get_bfu_color(struct terminal *term, unsigned char *stylename)
|
||||
struct option *opt;
|
||||
|
||||
/* Construct the color entry. */
|
||||
opt = get_opt_rec_real(config_options, color_mode
|
||||
opt = get_opt_rec_real(config_options,
|
||||
color_mode != COLOR_MODE_MONO
|
||||
? "ui.colors.color" : "ui.colors.mono");
|
||||
if (!opt) return NULL;
|
||||
|
||||
|
@ -119,7 +119,6 @@ split_line(unsigned char *text, int max_width, int *cells)
|
||||
* followed by a space so this rule
|
||||
* will not match often. We match dash
|
||||
* and quotes too. */
|
||||
cells_save--;
|
||||
while (--split != text) {
|
||||
cells_save--;
|
||||
if (!ispunct(*split)) continue;
|
||||
@ -542,7 +541,7 @@ mouse_text(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
}
|
||||
|
||||
|
||||
struct widget_ops text_ops = {
|
||||
const struct widget_ops text_ops = {
|
||||
display_text,
|
||||
NULL,
|
||||
mouse_text,
|
||||
|
@ -44,7 +44,7 @@ struct widget_data_info_text {
|
||||
void add_dlg_text(struct dialog *dlg, unsigned char *text,
|
||||
enum format_align align, int bottom_pad);
|
||||
|
||||
extern struct widget_ops text_ops;
|
||||
extern const struct widget_ops text_ops;
|
||||
void dlg_format_text_do(struct terminal *term,
|
||||
unsigned char *text, int x, int *y, int w, int *rw,
|
||||
struct color_pair *scolor, enum format_align align, int format_only);
|
||||
|
@ -30,7 +30,7 @@ struct widget_ops {
|
||||
};
|
||||
|
||||
struct widget {
|
||||
struct widget_ops *ops;
|
||||
const struct widget_ops *ops;
|
||||
|
||||
unsigned char *text;
|
||||
|
||||
@ -51,11 +51,18 @@ struct widget {
|
||||
|
||||
struct widget_data {
|
||||
struct widget *widget;
|
||||
|
||||
/* For WIDGET_FIELD: If CONFIG_UTF8 is defined and UTF-8 I/O
|
||||
* is enabled for the terminal, then @cdata is in UTF-8;
|
||||
* otherwise, @cdata is in the charset of the terminal, and
|
||||
* the charset is assumed to be unibyte. (Thus, if you choose
|
||||
* UTF-8 as the charset but disable UTF-8 I/O, you lose.) */
|
||||
* UTF-8 as the charset but disable UTF-8 I/O, you lose.)
|
||||
*
|
||||
* For WIDGET_TEXT: @cdata is cast from/to an unsigned char **
|
||||
* that points to the first element of an array. Each element
|
||||
* in this array corresponds to one line of text, and is an
|
||||
* unsigned char * that points to the first character of that
|
||||
* line. The array has @widget_data.info.text.lines elements. */
|
||||
unsigned char *cdata;
|
||||
|
||||
struct box box;
|
||||
|
@ -57,7 +57,8 @@ bookmarks_read(void)
|
||||
file_name = backend->filename(0);
|
||||
if (!file_name) return;
|
||||
if (elinks_home) {
|
||||
file_name = straconcat(elinks_home, file_name, NULL);
|
||||
file_name = straconcat(elinks_home, file_name,
|
||||
(unsigned char *) NULL);
|
||||
if (!file_name) return;
|
||||
}
|
||||
|
||||
@ -91,7 +92,7 @@ bookmarks_write(struct list_head *bookmarks_list)
|
||||
* they would be just truncated to zero by secure_open()). */
|
||||
file_name = backend->filename(1);
|
||||
if (!file_name) return;
|
||||
file_name = straconcat(elinks_home, file_name, NULL);
|
||||
file_name = straconcat(elinks_home, file_name, (unsigned char *) NULL);
|
||||
if (!file_name) return;
|
||||
|
||||
ssi = secure_open(file_name);
|
||||
|
@ -183,9 +183,9 @@ print_xml_entities(struct secure_save_info *ssi, const unsigned char *str)
|
||||
|| (x) == '{' || (x) == '%' \
|
||||
|| (x) == '+')
|
||||
|
||||
static int cp = 0;
|
||||
static int cp = -1;
|
||||
|
||||
if (!cp) get_cp_index("us-ascii");
|
||||
if (cp == -1) cp = get_cp_index("us-ascii");
|
||||
|
||||
for (; *str; str++) {
|
||||
if (accept_char(*str))
|
||||
@ -195,7 +195,7 @@ print_xml_entities(struct secure_save_info *ssi, const unsigned char *str)
|
||||
secure_fprintf(ssi, "&#%i;", (int) *str);
|
||||
}
|
||||
else {
|
||||
unsigned char *s = u2cp_no_nbsp(*str, cp);
|
||||
const unsigned char *s = u2cp_no_nbsp(*str, cp);
|
||||
|
||||
if (s) print_xml_entities(ssi, s);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ change_hook_folder_state(struct session *ses, struct option *current,
|
||||
static void
|
||||
init_bookmarks(struct module *module)
|
||||
{
|
||||
struct change_hook_info bookmarks_change_hooks[] = {
|
||||
static const struct change_hook_info bookmarks_change_hooks[] = {
|
||||
{ "bookmarks.folder_state", change_hook_folder_state },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
@ -139,7 +139,7 @@ static struct listbox_ops_messages bookmarks_messages = {
|
||||
N_("Do you really want to remove all bookmarks?"),
|
||||
};
|
||||
|
||||
static struct listbox_ops bookmarks_listbox_ops = {
|
||||
static const struct listbox_ops bookmarks_listbox_ops = {
|
||||
lock_bookmark,
|
||||
unlock_bookmark,
|
||||
is_bookmark_used,
|
||||
@ -341,7 +341,7 @@ enum move_bookmark_flags {
|
||||
};
|
||||
|
||||
/* Traverse all bookmarks and move all marked items
|
||||
* _into_ destb or, if destb is NULL, _after_ dest. */
|
||||
* _into_ dest or, if insert_as_child is 0, _after_ dest. */
|
||||
static enum move_bookmark_flags
|
||||
do_move_bookmark(struct bookmark *dest, int insert_as_child,
|
||||
struct list_head *src, struct listbox_data *box)
|
||||
@ -482,7 +482,7 @@ push_move_button(struct dialog_data *dlg_data,
|
||||
|
||||
/**** MANAGEMENT *****************************************************/
|
||||
|
||||
static struct hierbox_browser_button bookmark_buttons[] = {
|
||||
static const struct hierbox_browser_button bookmark_buttons[] = {
|
||||
/* [gettext_accelerator_context(.bookmark_buttons)] */
|
||||
{ N_("~Goto"), push_hierbox_goto_button, 1 },
|
||||
{ N_("~Edit"), push_edit_button, 0 },
|
||||
@ -498,7 +498,7 @@ static struct hierbox_browser_button bookmark_buttons[] = {
|
||||
{ N_("Clear"), push_hierbox_clear_button, 0 },
|
||||
|
||||
/* TODO: Would this be useful? --jonas */
|
||||
{ N_("Save"), push_save_button },
|
||||
{ N_("Save"), push_save_button, 0 },
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -602,7 +602,7 @@ bookmark_search_do(void *data)
|
||||
struct listbox_data *box;
|
||||
struct dialog_data *dlg_data;
|
||||
|
||||
assertm(dlg->udata, "Bookmark search with NULL udata in dialog");
|
||||
assertm(dlg->udata != NULL, "Bookmark search with NULL udata in dialog");
|
||||
if_assert_failed return;
|
||||
|
||||
ctx.title = dlg->widgets[0].data;
|
||||
|
4
src/cache/dialogs.c
vendored
4
src/cache/dialogs.c
vendored
@ -209,7 +209,7 @@ static struct listbox_ops_messages cache_messages = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct listbox_ops cache_entry_listbox_ops = {
|
||||
static const struct listbox_ops cache_entry_listbox_ops = {
|
||||
lock_cache_entry,
|
||||
unlock_cache_entry,
|
||||
is_cache_entry_used,
|
||||
@ -224,7 +224,7 @@ static struct listbox_ops cache_entry_listbox_ops = {
|
||||
&cache_messages,
|
||||
};
|
||||
|
||||
static struct hierbox_browser_button cache_buttons[] = {
|
||||
static const struct hierbox_browser_button cache_buttons[] = {
|
||||
/* [gettext_accelerator_context(.cache_buttons)] */
|
||||
{ N_("~Info"), push_hierbox_info_button, 1 },
|
||||
{ N_("~Goto"), push_hierbox_goto_button, 1 },
|
||||
|
@ -11,7 +11,7 @@ ACTION_(EDIT, "backspace", BACKSPACE, N__("Delete character in front of the curs
|
||||
ACTION_(EDIT, "beginning-of-buffer", BEGINNING_OF_BUFFER, N__("Go to the first line of the buffer"), 0),
|
||||
ACTION_(EDIT, "cancel", CANCEL, N__("Cancel current state"), 0),
|
||||
ACTION_(EDIT, "copy-clipboard", COPY_CLIPBOARD, N__("Copy text to clipboard"), 0),
|
||||
ACTION_(EDIT, "cut-clipboard", CUT_CLIPBOARD, N__("Delete text from clipboard"), 0),
|
||||
ACTION_(EDIT, "cut-clipboard", CUT_CLIPBOARD, N__("Cut text to clipboard"), 0),
|
||||
ACTION_(EDIT, "delete", DELETE, N__("Delete character under cursor"), 0),
|
||||
ACTION_(EDIT, "down", DOWN, N__("Move cursor downwards"), 0),
|
||||
ACTION_(EDIT, "end", END, N__("Go to the end of the page/line"), 0),
|
||||
|
@ -500,13 +500,15 @@ load_config_file(unsigned char *prefix, unsigned char *name,
|
||||
{
|
||||
unsigned char *config_str, *config_file;
|
||||
|
||||
config_file = straconcat(prefix, STRING_DIR_SEP, name, NULL);
|
||||
config_file = straconcat(prefix, STRING_DIR_SEP, name,
|
||||
(unsigned char *) NULL);
|
||||
if (!config_file) return 1;
|
||||
|
||||
config_str = read_config_file(config_file);
|
||||
if (!config_str) {
|
||||
mem_free(config_file);
|
||||
config_file = straconcat(prefix, STRING_DIR_SEP, ".", name, NULL);
|
||||
config_file = straconcat(prefix, STRING_DIR_SEP, ".", name,
|
||||
(unsigned char *) NULL);
|
||||
if (!config_file) return 2;
|
||||
|
||||
config_str = read_config_file(config_file);
|
||||
@ -765,7 +767,7 @@ create_config_string(unsigned char *prefix, unsigned char *name,
|
||||
smart_config_string(&tmpstring, 2, i18n, options->value.tree, NULL, 0,
|
||||
smart_config_output_fn);
|
||||
if (tmpstring.length > origlen)
|
||||
add_bytes_to_string(&config, tmpstring.source, tmpstring.length);
|
||||
add_string_to_string(&config, &tmpstring);
|
||||
done_string(&tmpstring);
|
||||
|
||||
if (!init_string(&tmpstring)) goto get_me_out;
|
||||
@ -776,7 +778,7 @@ create_config_string(unsigned char *prefix, unsigned char *name,
|
||||
origlen = tmpstring.length;
|
||||
bind_config_string(&tmpstring);
|
||||
if (tmpstring.length > origlen)
|
||||
add_bytes_to_string(&config, tmpstring.source, tmpstring.length);
|
||||
add_string_to_string(&config, &tmpstring);
|
||||
done_string(&tmpstring);
|
||||
|
||||
get_me_out:
|
||||
@ -802,7 +804,7 @@ write_config_file(unsigned char *prefix, unsigned char *name,
|
||||
|
||||
if (name_has_slash && prefix_has_slash) name++;
|
||||
|
||||
config_file = straconcat(prefix, slash, name, NULL);
|
||||
config_file = straconcat(prefix, slash, name, (unsigned char *) NULL);
|
||||
if (!config_file) goto free_cfg_str;
|
||||
|
||||
ssi = secure_open(config_file);
|
||||
|
@ -32,11 +32,10 @@
|
||||
|
||||
|
||||
static void
|
||||
toggle_success_msgbox(void *dummy)
|
||||
disable_success_msgbox(void *dummy)
|
||||
{
|
||||
/* TODO: option_changed() */
|
||||
get_opt_bool("ui.success_msgbox") = !get_opt_bool("ui.success_msgbox");
|
||||
get_opt_rec(config_options, "ui.success_msgbox")->flags |= OPT_TOUCHED;
|
||||
get_opt_bool("ui.success_msgbox") = 0;
|
||||
option_changed(NULL, get_opt_rec(config_options, "ui.success_msgbox"));
|
||||
}
|
||||
|
||||
void
|
||||
@ -55,15 +54,16 @@ write_config_dialog(struct terminal *term, unsigned char *config_file,
|
||||
msg_text(term, N_("Options were saved successfully to config file %s."),
|
||||
config_file),
|
||||
NULL, 2,
|
||||
N_("~OK"), NULL, B_ENTER | B_ESC,
|
||||
N_("~Do not show anymore"), toggle_success_msgbox, 0);
|
||||
MSG_BOX_BUTTON(N_("~OK"), NULL, B_ENTER | B_ESC),
|
||||
MSG_BOX_BUTTON(N_("~Do not show anymore"), disable_success_msgbox, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
strerr = secsave_strerror(secsave_error, term);
|
||||
|
||||
if (stdio_error > 0)
|
||||
errmsg = straconcat(strerr, " (", strerror(stdio_error), ")", NULL);
|
||||
errmsg = straconcat(strerr, " (", strerror(stdio_error), ")",
|
||||
(unsigned char *) NULL);
|
||||
|
||||
info_box(term, MSGBOX_FREE_TEXT,
|
||||
N_("Write config error"), ALIGN_CENTER,
|
||||
@ -122,7 +122,8 @@ get_option_text(struct listbox_item *item, struct terminal *term)
|
||||
|
||||
if (option->flags & OPT_TOUCHED)
|
||||
return straconcat(_(desc, term),
|
||||
" (", _("modified", term), ")", NULL);
|
||||
" (", _("modified", term), ")",
|
||||
(unsigned char *) NULL);
|
||||
|
||||
return stracpy(_(desc, term));
|
||||
}
|
||||
@ -141,7 +142,8 @@ get_option_info(struct listbox_item *item, struct terminal *term)
|
||||
type = _(option_types[option->type].name, term);
|
||||
if (option->type == OPT_TREE) {
|
||||
type = straconcat(type, " ",
|
||||
_("(expand by pressing space)", term), NULL);
|
||||
_("(expand by pressing space)", term),
|
||||
(unsigned char *) NULL);
|
||||
}
|
||||
|
||||
add_format_to_string(&info, "\n%s: %s", _("Type", term), type);
|
||||
@ -243,7 +245,7 @@ delete_option_item(struct listbox_item *item, int last)
|
||||
mark_option_as_deleted(option);
|
||||
}
|
||||
|
||||
static struct listbox_ops options_listbox_ops = {
|
||||
static const struct listbox_ops options_listbox_ops = {
|
||||
lock_option,
|
||||
unlock_option,
|
||||
is_option_used,
|
||||
@ -275,9 +277,7 @@ check_valid_option(struct dialog_data *dlg_data, struct widget_data *widget_data
|
||||
if (chinon) {
|
||||
if (option_types[option->type].set &&
|
||||
option_types[option->type].set(option, chinon)) {
|
||||
struct option *current = option;
|
||||
|
||||
option_changed(ses, current, option);
|
||||
option_changed(ses, option);
|
||||
|
||||
commandline = 0;
|
||||
mem_free(chinon);
|
||||
@ -328,17 +328,19 @@ build_edit_dialog(struct terminal *term, struct session *ses,
|
||||
|
||||
name = straconcat(_("Name", term), ": ", option->name, "\n",
|
||||
_("Type", term), ": ",
|
||||
_(option_types[option->type].name, term), NULL);
|
||||
_(option_types[option->type].name, term),
|
||||
(unsigned char *) NULL);
|
||||
desc = straconcat(_("Description", term), ": \n",
|
||||
_(option->desc ? option->desc
|
||||
: (unsigned char *) "N/A", term),
|
||||
NULL);
|
||||
(unsigned char *) NULL);
|
||||
range = get_range_string(option);
|
||||
if (range) {
|
||||
if (*range) {
|
||||
unsigned char *tmp;
|
||||
|
||||
tmp = straconcat(name, " ", range, NULL);
|
||||
tmp = straconcat(name, " ", range,
|
||||
(unsigned char *) NULL);
|
||||
if (tmp) {
|
||||
mem_free(name);
|
||||
name = tmp;
|
||||
@ -365,7 +367,7 @@ build_edit_dialog(struct terminal *term, struct session *ses,
|
||||
|
||||
add_dlg_end(dlg, EDIT_WIDGETS_COUNT);
|
||||
|
||||
do_dialog(term, dlg, getml(dlg, name, desc, NULL));
|
||||
do_dialog(term, dlg, getml(dlg, (void *) name, (void *) desc, (void *) NULL));
|
||||
#undef EDIT_WIDGETS_COUNT
|
||||
}
|
||||
|
||||
@ -474,7 +476,7 @@ invalid_option:
|
||||
ctx->option = option;
|
||||
ctx->widget_data = dlg_data->widgets_data;
|
||||
|
||||
input_dialog(term, getml(ctx, NULL), N_("Add option"), N_("Name"),
|
||||
input_dialog(term, getml(ctx, (void *) NULL), N_("Add option"), N_("Name"),
|
||||
ctx, NULL,
|
||||
MAX_STR_LEN, "", 0, 0, check_option_name,
|
||||
add_option_to_tree, NULL);
|
||||
@ -495,7 +497,7 @@ push_save_button(struct dialog_data *dlg_data,
|
||||
}
|
||||
|
||||
|
||||
static struct hierbox_browser_button option_buttons[] = {
|
||||
static const struct hierbox_browser_button option_buttons[] = {
|
||||
/* [gettext_accelerator_context(.option_buttons)] */
|
||||
{ N_("~Info"), push_hierbox_info_button, 1 },
|
||||
{ N_("~Edit"), push_edit_button, 0 },
|
||||
@ -730,7 +732,7 @@ delete_keybinding_item(struct listbox_item *item, int last)
|
||||
free_keybinding(keybinding);
|
||||
}
|
||||
|
||||
static struct listbox_ops keybinding_listbox_ops = {
|
||||
static const struct listbox_ops keybinding_listbox_ops = {
|
||||
lock_keybinding,
|
||||
unlock_keybinding,
|
||||
is_keybinding_used,
|
||||
@ -810,7 +812,7 @@ really_add_keybinding(void *data, unsigned char *keystroke)
|
||||
if (init_string(&canonical))
|
||||
add_keystroke_to_string(&canonical, &hop->kbd, 0);
|
||||
|
||||
msg_box(new_hop->term, getml(new_hop, NULL), MSGBOX_FREE_TEXT,
|
||||
msg_box(new_hop->term, getml(new_hop, (void *) NULL), MSGBOX_FREE_TEXT,
|
||||
N_("Keystroke already used"), ALIGN_CENTER,
|
||||
msg_text(new_hop->term, N_("The keystroke \"%s\" "
|
||||
"is currently used for \"%s\".\n"
|
||||
@ -818,8 +820,8 @@ really_add_keybinding(void *data, unsigned char *keystroke)
|
||||
canonical.length ? canonical.source : keystroke,
|
||||
get_action_name(hop->keymap_id, action_id)),
|
||||
new_hop, 2,
|
||||
N_("~Yes"), really_really_add_keybinding, B_ENTER,
|
||||
N_("~No"), NULL, B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~Yes"), really_really_add_keybinding, B_ENTER),
|
||||
MSG_BOX_BUTTON(N_("~No"), NULL, B_ESC));
|
||||
|
||||
done_string(&canonical); /* safe even if init failed */
|
||||
return;
|
||||
@ -889,7 +891,7 @@ push_kbdbind_add_button(struct dialog_data *dlg_data,
|
||||
get_action_name(hop->keymap_id, hop->action_id),
|
||||
get_keymap_name(hop->keymap_id));
|
||||
|
||||
input_dialog(term, getml(hop, text, NULL),
|
||||
input_dialog(term, getml(hop, (void *) text, (void *) NULL),
|
||||
N_("Add keybinding"), text,
|
||||
hop, NULL,
|
||||
MAX_STR_LEN, "", 0, 0, check_keystroke,
|
||||
@ -924,7 +926,7 @@ push_kbdbind_save_button(struct dialog_data *dlg_data,
|
||||
|
||||
static INIT_LIST_HEAD(keybinding_dialog_list);
|
||||
|
||||
static struct hierbox_browser_button keybinding_buttons[] = {
|
||||
static const struct hierbox_browser_button keybinding_buttons[] = {
|
||||
/* [gettext_accelerator_context(.keybinding_buttons)] */
|
||||
{ N_("~Add"), push_kbdbind_add_button, 0 },
|
||||
{ N_("~Delete"), push_hierbox_delete_button, 0 },
|
||||
|
@ -49,7 +49,8 @@ test_confdir(unsigned char *home, unsigned char *path,
|
||||
if (!path || !*path) return NULL;
|
||||
|
||||
if (home && *home && !dir_sep(*path))
|
||||
confdir = straconcat(home, STRING_DIR_SEP, path, NULL);
|
||||
confdir = straconcat(home, STRING_DIR_SEP, path,
|
||||
(unsigned char *) NULL);
|
||||
else
|
||||
confdir = stracpy(path);
|
||||
|
||||
|
@ -940,7 +940,7 @@ bind_act(unsigned char *keymap_str, const unsigned char *keystroke_str)
|
||||
return NULL;
|
||||
|
||||
keybinding->flags |= KBDB_WATERMARK;
|
||||
return straconcat("\"", action, "\"", NULL);
|
||||
return straconcat("\"", action, "\"", (unsigned char *) NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -989,6 +989,9 @@ bind_config_string(struct string *file)
|
||||
}
|
||||
|
||||
struct module kbdbind_module = struct_module(
|
||||
/* Because this module is listed in main_modules rather than
|
||||
* in builtin_modules, its name does not appear in the user
|
||||
* interface and so need not be translatable. */
|
||||
/* name: */ "Keyboard Bindings",
|
||||
/* options: */ NULL,
|
||||
/* hooks: */ NULL,
|
||||
|
@ -159,7 +159,7 @@ static int no_autocreate = 0;
|
||||
|
||||
/* Get record of option of given name, or NULL if there's no such option. */
|
||||
struct option *
|
||||
get_opt_rec(struct option *tree, unsigned char *name_)
|
||||
get_opt_rec(struct option *tree, const unsigned char *name_)
|
||||
{
|
||||
struct option *option;
|
||||
unsigned char *aname = stracpy(name_);
|
||||
@ -197,7 +197,7 @@ get_opt_rec(struct option *tree, unsigned char *name_)
|
||||
if (tree && tree->flags & OPT_AUTOCREATE && !no_autocreate) {
|
||||
struct option *template = get_opt_rec(tree, "_template_");
|
||||
|
||||
assertm(template, "Requested %s should be autocreated but "
|
||||
assertm(template != NULL, "Requested %s should be autocreated but "
|
||||
"%.*s._template_ is missing!", name_, sep - name_,
|
||||
name_);
|
||||
if_assert_failed {
|
||||
@ -231,7 +231,7 @@ get_opt_rec(struct option *tree, unsigned char *name_)
|
||||
* do not create the option if it doesn't exist and there's autocreation
|
||||
* enabled. */
|
||||
struct option *
|
||||
get_opt_rec_real(struct option *tree, unsigned char *name)
|
||||
get_opt_rec_real(struct option *tree, const unsigned char *name)
|
||||
{
|
||||
struct option *opt;
|
||||
|
||||
@ -391,7 +391,7 @@ add_opt_rec(struct option *tree, unsigned char *path, struct option *option)
|
||||
assert(path && option && tree);
|
||||
if (*path) tree = get_opt_rec(tree, path);
|
||||
|
||||
assertm(tree, "Missing option tree for '%s'", path);
|
||||
assertm(tree != NULL, "Missing option tree for '%s'", path);
|
||||
if (!tree->value.tree) return;
|
||||
|
||||
object_nolock(option, "option");
|
||||
@ -680,7 +680,7 @@ register_autocreated_options(void)
|
||||
|
||||
static struct option_info config_options_info[];
|
||||
extern struct option_info cmdline_options_info[];
|
||||
static struct change_hook_info change_hooks[];
|
||||
static const struct change_hook_info change_hooks[];
|
||||
|
||||
void
|
||||
init_options(void)
|
||||
@ -716,7 +716,7 @@ done_options(void)
|
||||
}
|
||||
|
||||
void
|
||||
register_change_hooks(struct change_hook_info *change_hooks)
|
||||
register_change_hooks(const struct change_hook_info *change_hooks)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -955,9 +955,8 @@ toggle_option(struct session *ses, struct option *option)
|
||||
assert(option->type == OPT_BOOL || option->type == OPT_INT);
|
||||
assert(option->max);
|
||||
|
||||
/* TODO: call change hooks. --jonas */
|
||||
option->value.number = (number <= option->max) ? number : option->min;
|
||||
option_changed(ses, option, option);
|
||||
option_changed(ses, option);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -976,7 +975,7 @@ change_hook_language(struct session *ses, struct option *current, struct option
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct change_hook_info change_hooks[] = {
|
||||
static const struct change_hook_info change_hooks[] = {
|
||||
{ "config.show_template", change_hook_stemplate },
|
||||
{ "connection", change_hook_connection },
|
||||
{ "document.browse", change_hook_html },
|
||||
@ -1012,11 +1011,11 @@ call_change_hooks(struct session *ses, struct option *current, struct option *op
|
||||
}
|
||||
|
||||
void
|
||||
option_changed(struct session *ses, struct option *current, struct option *option)
|
||||
option_changed(struct session *ses, struct option *option)
|
||||
{
|
||||
option->flags |= OPT_TOUCHED;
|
||||
/* Notify everyone out there! */
|
||||
call_change_hooks(ses, current, option);
|
||||
call_change_hooks(ses, option, option);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -105,7 +105,19 @@ union option_value {
|
||||
unsigned char *string;
|
||||
};
|
||||
|
||||
typedef int (*change_hook_T)(struct session *, struct option *current,
|
||||
|
||||
/* @session is the session via which the user changed the options,
|
||||
* or NULL if not known. Because the options are currently not
|
||||
* session-specific, it is best to ignore this parameter. In a future
|
||||
* version of ELinks, this parameter might mean the session to which
|
||||
* the changed options apply.
|
||||
*
|
||||
* @current is the option whose change hook is being called. It is
|
||||
* never NULL.
|
||||
*
|
||||
* @changed is the option that was changed, or NULL if multiple
|
||||
* descendants of @current may have been changed. */
|
||||
typedef int (*change_hook_T)(struct session *session, struct option *current,
|
||||
struct option *changed);
|
||||
|
||||
struct option {
|
||||
@ -145,7 +157,7 @@ struct change_hook_info {
|
||||
change_hook_T change_hook;
|
||||
};
|
||||
|
||||
extern void register_change_hooks(struct change_hook_info *change_hooks);
|
||||
extern void register_change_hooks(const struct change_hook_info *change_hooks);
|
||||
|
||||
|
||||
extern struct list_head *init_options_tree(void);
|
||||
@ -180,8 +192,7 @@ void call_change_hooks(struct session *ses, struct option *current,
|
||||
|
||||
/* Do proper bookkeeping after an option has changed - call this every time
|
||||
* you change an option value. */
|
||||
void option_changed(struct session *ses, struct option *current,
|
||||
struct option *option);
|
||||
void option_changed(struct session *ses, struct option *option);
|
||||
|
||||
extern int commit_option_values(struct option_resolver *resolvers,
|
||||
struct option *root,
|
||||
@ -197,8 +208,8 @@ extern void checkout_option_values(struct option_resolver *resolvers,
|
||||
* use get_opt_type() and add_opt_type(). For command line options, you want to
|
||||
* use get_opt_type_tree(cmdline_options, "option"). */
|
||||
|
||||
extern struct option *get_opt_rec(struct option *, unsigned char *);
|
||||
extern struct option *get_opt_rec_real(struct option *, unsigned char *);
|
||||
extern struct option *get_opt_rec(struct option *, const unsigned char *);
|
||||
extern struct option *get_opt_rec_real(struct option *, const unsigned char *);
|
||||
#ifdef CONFIG_DEBUG
|
||||
extern union option_value *get_opt_(unsigned char *, int, enum option_type, struct option *, unsigned char *);
|
||||
#define get_opt(tree, name, type) get_opt_(__FILE__, __LINE__, type, tree, name)
|
||||
|
@ -505,11 +505,12 @@ static struct option_info config_options_info[] = {
|
||||
/* FIXME: Write more. */
|
||||
INIT_OPT_INT("document.cache", N_("Revalidation interval"),
|
||||
"revalidation_interval", 0, -1, 86400, -1,
|
||||
N_("Period that a cache entry is considered to be up-to-date.\n"
|
||||
"When a document is loaded and this interval has elapsed since the\n"
|
||||
"document was initially loaded or most recently revalidated\n"
|
||||
"with the server, the server will be checked in case there is\n"
|
||||
"a more up-to-date version of the document.")),
|
||||
N_("Period in seconds that a cache entry is considered to be\n"
|
||||
"up-to-date. When a document is loaded and this interval has elapsed\n"
|
||||
"since the document was initially loaded or most recently\n"
|
||||
"revalidated with the server, the server will be checked in case\n"
|
||||
"there is a more up-to-date version of the document.\n\n"
|
||||
"A value of -1 disables automatic revalidation.")),
|
||||
|
||||
INIT_OPT_TREE("document.cache", N_("Memory cache"),
|
||||
"memory", 0,
|
||||
@ -641,80 +642,26 @@ static struct option_info config_options_info[] = {
|
||||
N_("Codepage used in dump output. 'System' stands for\n"
|
||||
"a codepage determined by a selected locale.")),
|
||||
|
||||
/* The #if directives cannot be inside the argument list of
|
||||
* the INIT_OPT_INT macro; that wouldn't be standard C.
|
||||
* And they especially cannot be inside the argument list of N_;
|
||||
* xgettext (GNU gettext-tools) 0.14.3 wouldn't support that. */
|
||||
/* FIXME: It's totally brainless --witekfl */
|
||||
#if defined(CONFIG_88_COLORS) && defined(CONFIG_256_COLORS) && !defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 3, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode\n"
|
||||
"2 is 88 color mode\n"
|
||||
"3 is 256 color mode")),
|
||||
#elif defined(CONFIG_88_COLORS) && !defined(CONFIG_256_COLORS) && !defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 2, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode\n"
|
||||
"2 is 88 color mode")),
|
||||
#elif defined(CONFIG_256_COLORS) && !defined(CONFIG_88_COLORS) && !defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 2, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode\n"
|
||||
"2 is 256 color mode")),
|
||||
#elif !defined(CONFIG_88_COLORS) && !defined(CONFIG_256_COLORS) && !defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 1, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode")),
|
||||
#elif defined(CONFIG_88_COLORS) && defined(CONFIG_256_COLORS) && defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 4, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"color_mode", 0, -1, COLOR_MODES - 1, -1,
|
||||
/* The list of modes must be at the end of this string
|
||||
* because AsciiDoc 7.1.2 does not support continuing
|
||||
* an outer list entry after an inner list.
|
||||
* TRANSLATORS: This restriction applies only to the
|
||||
* "en" (English) translation. (See doc/Makefile.) */
|
||||
N_("Color mode for dumps.\n"
|
||||
"Some modes may have been disabled at compile time. "
|
||||
"The Setup -> Terminal options dialog lists the modes "
|
||||
"supported by this executable. If you select an "
|
||||
"unsupported mode, ELinks uses 16 colors.\n"
|
||||
"The color modes are:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode\n"
|
||||
"2 is 88 color mode\n"
|
||||
"3 is 256 color mode\n"
|
||||
"4 is true color mode")),
|
||||
#elif defined(CONFIG_88_COLORS) && !defined(CONFIG_256_COLORS) && defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 3, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode\n"
|
||||
"2 is 88 color mode\n"
|
||||
"3 is true color mode")),
|
||||
#elif defined(CONFIG_256_COLORS) && !defined(CONFIG_88_COLORS) && defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 3, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode\n"
|
||||
"2 is 256 color mode\n"
|
||||
"3 is true color mode")),
|
||||
#elif !defined(CONFIG_88_COLORS) && !defined(CONFIG_256_COLORS) && defined(CONFIG_TRUE_COLOR)
|
||||
INIT_OPT_INT("document.dump", N_("Color mode"),
|
||||
"color_mode", 0, -1, 2, -1,
|
||||
N_("Color mode for dumps:\n"
|
||||
"-1 is standard dump mode\n"
|
||||
"0 is mono mode\n"
|
||||
"1 is 16 color mode\n"
|
||||
"2 is true color mode")),
|
||||
#endif /* !defined(CONFIG_88_COLORS) && !defined(CONFIG_256_COLORS) */
|
||||
|
||||
INIT_OPT_STRING("document.dump", N_("Footer"),
|
||||
"footer", 0, "",
|
||||
N_("Footer string used in dumps. %u is substituted by URL.")),
|
||||
@ -885,14 +832,16 @@ static struct option_info config_options_info[] = {
|
||||
"and lines working at the same time. Makes sense only with linux\n"
|
||||
"terminal.")),
|
||||
|
||||
/* When CONFIG_UTF8 is defined, any code that reads the "utf_8_io"
|
||||
* option should also check whether the "codepage" option is UTF-8,
|
||||
* and if so, behave as if "utf_8_io" were 1. (When CONFIG_UTF8 is
|
||||
* not defined, it should not be possible to set UTF-8 as "codepage";
|
||||
* please report any such possibilities as bugs.) */
|
||||
INIT_OPT_BOOL("terminal._template_", N_("UTF-8 I/O"),
|
||||
"utf_8_io", 0, 0,
|
||||
N_("Enable I/O in UTF-8 for Unicode terminals. Note that currently,\n"
|
||||
"only the subset of UTF-8 according to terminal codepage is used.\n"
|
||||
"ELinks ignores this option if the terminal codepage is UTF-8.")),
|
||||
/* When CONFIG_UTF8 is defined, any code that reads the "utf_8_io"
|
||||
* option should also check whether the "codepage" option is UTF-8,
|
||||
* and if so, behave as if "utf_8_io" were 1. */
|
||||
|
||||
INIT_OPT_BOOL("terminal._template_", N_("Restrict frames in cp850/852"),
|
||||
"restrict_852", 0, 0,
|
||||
@ -907,12 +856,23 @@ static struct option_info config_options_info[] = {
|
||||
|
||||
INIT_OPT_INT("terminal._template_", N_("Color mode"),
|
||||
"colors", 0, 0, COLOR_MODES - 1, 0,
|
||||
N_("The color mode controls what colors are used and how they are\n"
|
||||
"output to the terminal. The color modes are:\n"
|
||||
/* The list of modes must be at the end of this string
|
||||
* because AsciiDoc 7.1.2 does not support continuing
|
||||
* an outer list entry after an inner list.
|
||||
* TRANSLATORS: This restriction applies only to the
|
||||
* "en" (English) translation. (See doc/Makefile.) */
|
||||
N_("The color mode controls what colors are used and how they are "
|
||||
"output to the terminal.\n"
|
||||
"Some modes may have been disabled at compile time. "
|
||||
"The Setup -> Terminal options dialog lists the modes "
|
||||
"supported by this executable. If you select an "
|
||||
"unsupported mode, ELinks uses 16 colors.\n"
|
||||
"The color modes are:\n"
|
||||
"0 is mono mode, only 2 colors are used\n"
|
||||
"1 is 16 color mode, uses the common ANSI colors\n"
|
||||
"2 is 256 color mode, uses XTerm RGB codes\n"
|
||||
"3 is true color mode, uses konsole RGB codes.")),
|
||||
"2 is 88 color mode, uses XTerm RGB codes\n"
|
||||
"3 is 256 color mode, uses XTerm RGB codes\n"
|
||||
"4 is true color mode, uses konsole RGB codes")),
|
||||
|
||||
INIT_OPT_BOOL("terminal._template_", N_("Transparency"),
|
||||
"transparency", 0, 0,
|
||||
|
@ -94,7 +94,7 @@ exec_cmd(struct option *o, unsigned char ***argv, int *argc)
|
||||
{ \
|
||||
struct option *real = get_opt_rec(config_options, opt->value.string); \
|
||||
\
|
||||
assertm(real, "%s aliased to unknown option %s!", opt->name, opt->value.string); \
|
||||
assertm(real != NULL, "%s aliased to unknown option %s!", opt->name, opt->value.string); \
|
||||
if_assert_failed { return ret_; } \
|
||||
\
|
||||
if (option_types[real->type].name_) \
|
||||
@ -109,7 +109,7 @@ redir_cmd(struct option *opt, unsigned char ***argv, int *argc)
|
||||
struct option *real = get_opt_rec(config_options, opt->value.string);
|
||||
unsigned char * ret = NULL;
|
||||
|
||||
assertm(real, "%s aliased to unknown option %s!", opt->name, opt->value.string);
|
||||
assertm(real != NULL, "%s aliased to unknown option %s!", opt->name, opt->value.string);
|
||||
if_assert_failed { return ret; }
|
||||
|
||||
if (option_types[real->type].cmdline) {
|
||||
@ -131,7 +131,7 @@ redir_wr(struct option *opt, struct string *string)
|
||||
{
|
||||
struct option *real = get_opt_rec(config_options, opt->value.string);
|
||||
|
||||
assertm(real, "%s aliased to unknown option %s!", opt->name, opt->value.string);
|
||||
assertm(real != NULL, "%s aliased to unknown option %s!", opt->name, opt->value.string);
|
||||
if_assert_failed { return; }
|
||||
|
||||
if (option_types[real->type].write)
|
||||
@ -144,7 +144,7 @@ redir_set(struct option *opt, unsigned char *str)
|
||||
struct option *real = get_opt_rec(config_options, opt->value.string);
|
||||
int ret = 0;
|
||||
|
||||
assertm(real, "%s aliased to unknown option %s!", opt->name, opt->value.string);
|
||||
assertm(real != NULL, "%s aliased to unknown option %s!", opt->name, opt->value.string);
|
||||
if_assert_failed { return ret; }
|
||||
|
||||
if (option_types[real->type].set) {
|
||||
@ -166,7 +166,7 @@ redir_add(struct option *opt, unsigned char *str)
|
||||
/* Support functions for config file parsing. */
|
||||
|
||||
static void
|
||||
add_optstring_to_string(struct string *s, unsigned char *q, int qlen)
|
||||
add_optstring_to_string(struct string *s, const unsigned char *q, int qlen)
|
||||
{
|
||||
if (!commandline) add_char_to_string(s, '"');
|
||||
add_quoted_to_string(s, q, qlen);
|
||||
@ -322,7 +322,7 @@ cp_set(struct option *opt, unsigned char *str)
|
||||
static void
|
||||
cp_wr(struct option *o, struct string *s)
|
||||
{
|
||||
unsigned char *mime_name = get_cp_mime_name(o->value.number);
|
||||
unsigned char *mime_name = get_cp_config_name(o->value.number);
|
||||
|
||||
add_optstring_to_string(s, mime_name, strlen(mime_name));
|
||||
}
|
||||
@ -364,7 +364,7 @@ color_wr(struct option *opt, struct string *str)
|
||||
{
|
||||
color_T color = opt->value.color;
|
||||
unsigned char hexcolor[8];
|
||||
unsigned char *strcolor = get_color_string(color, hexcolor);
|
||||
const unsigned char *strcolor = get_color_string(color, hexcolor);
|
||||
|
||||
add_optstring_to_string(str, strcolor, strlen(strcolor));
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ periodic_save_change_hook(struct session *ses, struct option *current,
|
||||
static void
|
||||
init_timer(struct module *module)
|
||||
{
|
||||
struct change_hook_info timer_change_hooks[] = {
|
||||
static const struct change_hook_info timer_change_hooks[] = {
|
||||
{ "infofiles.save_interval", periodic_save_change_hook },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
@ -456,9 +456,9 @@ set_cookie(struct uri *uri, unsigned char *str)
|
||||
#ifdef DEBUG_COOKIES
|
||||
{
|
||||
DBG("Got cookie %s = %s from %s, domain %s, "
|
||||
"expires at %d, secure %d", cookie->name,
|
||||
"expires at %"TIME_PRINT_FORMAT", secure %d", cookie->name,
|
||||
cookie->value, cookie->server->host, cookie->domain,
|
||||
cookie->expires, cookie->secure);
|
||||
(time_print_T) cookie->expires, cookie->secure);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -672,8 +672,8 @@ send_cookies(struct uri *uri)
|
||||
|
||||
if (c->expires && c->expires <= now) {
|
||||
#ifdef DEBUG_COOKIES
|
||||
DBG("Cookie %s=%s (exp %d) expired.",
|
||||
c->name, c->value, c->expires);
|
||||
DBG("Cookie %s=%s (exp %"TIME_PRINT_FORMAT") expired.",
|
||||
c->name, c->value, (time_print_T) c->expires);
|
||||
#endif
|
||||
delete_cookie(c);
|
||||
|
||||
@ -720,7 +720,8 @@ load_cookies(void) {
|
||||
time_t now;
|
||||
|
||||
if (elinks_home) {
|
||||
cookfile = straconcat(elinks_home, cookfile, NULL);
|
||||
cookfile = straconcat(elinks_home, cookfile,
|
||||
(unsigned char *) NULL);
|
||||
if (!cookfile) return;
|
||||
}
|
||||
|
||||
@ -861,7 +862,8 @@ save_cookies(struct terminal *term) {
|
||||
return;
|
||||
}
|
||||
|
||||
cookfile = straconcat(elinks_home, COOKIES_FILENAME, NULL);
|
||||
cookfile = straconcat(elinks_home, COOKIES_FILENAME,
|
||||
(unsigned char *) NULL);
|
||||
if (!cookfile) {
|
||||
CANNOT_SAVE_COOKIES(0, N_("Out of memory"));
|
||||
return;
|
||||
@ -878,12 +880,12 @@ save_cookies(struct terminal *term) {
|
||||
now = time(NULL);
|
||||
foreach (c, cookies) {
|
||||
if (!c->expires || c->expires <= now) continue;
|
||||
if (secure_fprintf(ssi, "%s\t%s\t%s\t%s\t%s\t%ld\t%d\n",
|
||||
if (secure_fprintf(ssi, "%s\t%s\t%s\t%s\t%s\t%"TIME_PRINT_FORMAT"\t%d\n",
|
||||
c->name, c->value,
|
||||
c->server->host,
|
||||
empty_string_or_(c->path),
|
||||
empty_string_or_(c->domain),
|
||||
c->expires, c->secure) < 0)
|
||||
(time_print_T) c->expires, c->secure) < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,18 @@ add_cookie_info_to_string(struct string *string, struct cookie *cookie,
|
||||
_(cookie->secure ? N_("yes") : N_("no"), term));
|
||||
}
|
||||
|
||||
static void
|
||||
accept_cookie_in_msg_box(void *cookie_)
|
||||
{
|
||||
accept_cookie((struct cookie *) cookie_);
|
||||
}
|
||||
|
||||
static void
|
||||
reject_cookie_in_msg_box(void *cookie_)
|
||||
{
|
||||
done_cookie((struct cookie *) cookie_);
|
||||
}
|
||||
|
||||
/* TODO: Store cookie in data arg. --jonas*/
|
||||
void
|
||||
accept_cookie_dialog(struct session *ses, void *data)
|
||||
@ -78,8 +90,8 @@ accept_cookie_dialog(struct session *ses, void *data)
|
||||
N_("Accept cookie?"), ALIGN_LEFT,
|
||||
string.source,
|
||||
cookie, 2,
|
||||
N_("~Accept"), accept_cookie, B_ENTER,
|
||||
N_("~Reject"), done_cookie, B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~Accept"), accept_cookie_in_msg_box, B_ENTER),
|
||||
MSG_BOX_BUTTON(N_("~Reject"), reject_cookie_in_msg_box, B_ESC));
|
||||
}
|
||||
|
||||
|
||||
@ -219,7 +231,7 @@ static struct listbox_ops_messages cookies_messages = {
|
||||
N_("Do you really want to remove all cookies?"),
|
||||
};
|
||||
|
||||
static struct listbox_ops cookies_listbox_ops = {
|
||||
static const struct listbox_ops cookies_listbox_ops = {
|
||||
lock_cookie,
|
||||
unlock_cookie,
|
||||
is_cookie_used,
|
||||
@ -280,6 +292,7 @@ set_cookie_expires(struct dialog_data *dlg_data, struct widget_data *widget_data
|
||||
|
||||
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
||||
|
||||
/* Bug 923: Assumes time_t values fit in long. */
|
||||
errno = 0;
|
||||
number = strtol(value, (char **) &end, 10);
|
||||
if (errno || *end || number < 0) return EVENT_NOT_PROCESSED;
|
||||
@ -335,12 +348,14 @@ build_edit_dialog(struct terminal *term, struct cookie *cookie)
|
||||
safe_strncpy(name, cookie->name, MAX_STR_LEN);
|
||||
safe_strncpy(value, cookie->value, MAX_STR_LEN);
|
||||
safe_strncpy(domain, cookie->domain, MAX_STR_LEN);
|
||||
/* Bug 923: Assumes time_t values fit in unsigned long. */
|
||||
ulongcat(expires, &length, cookie->expires, MAX_STR_LEN, 0);
|
||||
length = 0;
|
||||
ulongcat(secure, &length, cookie->secure, MAX_STR_LEN, 0);
|
||||
|
||||
dlg_server = cookie->server->host;
|
||||
dlg_server = straconcat(_("Server", term), ": ", dlg_server, "\n", NULL);
|
||||
dlg_server = straconcat(_("Server", term), ": ", dlg_server, "\n",
|
||||
(unsigned char *) NULL);
|
||||
|
||||
if (!dlg_server) {
|
||||
mem_free(dlg);
|
||||
@ -359,7 +374,7 @@ build_edit_dialog(struct terminal *term, struct cookie *cookie)
|
||||
|
||||
add_dlg_end(dlg, EDIT_WIDGETS_COUNT);
|
||||
|
||||
do_dialog(term, dlg, getml(dlg, dlg_server, NULL));
|
||||
do_dialog(term, dlg, getml(dlg, (void *) dlg_server, (void *) NULL));
|
||||
#undef EDIT_WIDGETS_COUNT
|
||||
}
|
||||
|
||||
@ -455,7 +470,7 @@ push_add_server_button(struct dialog_data *dlg_data, struct widget_data *button)
|
||||
add_dlg_ok_button(dlg, _("~OK", term), B_ENTER, add_server_do, name);
|
||||
add_dlg_button(dlg, _("~Cancel", term), B_ESC, cancel_dialog, NULL);
|
||||
add_dlg_end(dlg, SERVER_WIDGETS_COUNT);
|
||||
do_dialog(term, dlg, getml(dlg, NULL));
|
||||
do_dialog(term, dlg, getml(dlg, (void *) NULL));
|
||||
|
||||
return EVENT_PROCESSED;
|
||||
#undef SERVER_WIDGETS_COUNT
|
||||
@ -469,7 +484,7 @@ push_save_button(struct dialog_data *dlg_data, struct widget_data *button)
|
||||
return EVENT_PROCESSED;
|
||||
}
|
||||
|
||||
static struct hierbox_browser_button cookie_buttons[] = {
|
||||
static const struct hierbox_browser_button cookie_buttons[] = {
|
||||
/* [gettext_accelerator_context(.cookie_buttons)] */
|
||||
{ N_("~Info"), push_hierbox_info_button, 1 },
|
||||
{ N_("~Add"), push_add_button, 1 },
|
||||
|
@ -270,7 +270,7 @@ display_download(struct terminal *term, struct file_download *file_download,
|
||||
add_dlg_end(dlg, DOWNLOAD_WIDGETS_COUNT - !!file_download->external_handler);
|
||||
#endif
|
||||
|
||||
do_dialog(term, dlg, getml(dlg, NULL));
|
||||
do_dialog(term, dlg, getml(dlg, (void *) NULL));
|
||||
}
|
||||
|
||||
|
||||
@ -445,7 +445,7 @@ static struct listbox_ops_messages download_messages = {
|
||||
N_("Do you really want to interrupt all downloads?"),
|
||||
};
|
||||
|
||||
static struct listbox_ops downloads_listbox_ops = {
|
||||
static const struct listbox_ops downloads_listbox_ops = {
|
||||
lock_file_download,
|
||||
unlock_file_download,
|
||||
is_file_download_used,
|
||||
@ -487,7 +487,7 @@ push_info_button(struct dialog_data *dlg_data, struct widget_data *button)
|
||||
* - Open button that can be used to set file_download->prog.
|
||||
* - Toggle notify button
|
||||
*/
|
||||
static struct hierbox_browser_button download_buttons[] = {
|
||||
static const struct hierbox_browser_button download_buttons[] = {
|
||||
/* [gettext_accelerator_context(.download_buttons)] */
|
||||
{ N_("~Info"), push_info_button },
|
||||
{ N_("~Abort"), push_hierbox_delete_button },
|
||||
|
@ -107,7 +107,7 @@ do_edit_dialog(struct terminal *term, int intl, unsigned char *title,
|
||||
|
||||
add_dlg_end(dlg, EDIT_WIDGETS_COUNT);
|
||||
|
||||
do_dialog(term, dlg, getml(dlg, NULL));
|
||||
do_dialog(term, dlg, getml(dlg, (void *) NULL));
|
||||
|
||||
#undef EDIT_WIDGETS_COUNT
|
||||
}
|
||||
|
@ -127,12 +127,12 @@ menu_keys(struct terminal *term, void *d_, void *xxx)
|
||||
add_actions_to_string(&keys, action_ids, KEYMAP_MAIN, term);
|
||||
}
|
||||
|
||||
msg_box(term, getml(info, NULL), MSGBOX_FREE_TEXT | MSGBOX_SCROLLABLE,
|
||||
msg_box(term, getml(info, (void *) NULL), MSGBOX_FREE_TEXT | MSGBOX_SCROLLABLE,
|
||||
N_("Keys"), ALIGN_LEFT,
|
||||
keys.source,
|
||||
info, 2,
|
||||
N_("~OK"), NULL, B_ENTER | B_ESC,
|
||||
N_("~Toggle display"), push_toggle_keys_display_button, B_ENTER);
|
||||
MSG_BOX_BUTTON(N_("~OK"), NULL, B_ENTER | B_ESC),
|
||||
MSG_BOX_BUTTON(N_("~Toggle display"), push_toggle_keys_display_button, B_ENTER));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -100,15 +100,19 @@ save_url_as(struct session *ses)
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
really_exit_prog(struct session *ses)
|
||||
static void
|
||||
really_exit_prog(void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
|
||||
register_bottom_half(destroy_terminal, ses->tab->term);
|
||||
}
|
||||
|
||||
static inline void
|
||||
dont_exit_prog(struct session *ses)
|
||||
dont_exit_prog(void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
|
||||
ses->exit_query = 0;
|
||||
}
|
||||
|
||||
@ -124,8 +128,8 @@ query_exit(struct session *ses)
|
||||
"(and terminate all downloads)?")
|
||||
: N_("Do you really want to exit ELinks?"),
|
||||
ses, 2,
|
||||
N_("~Yes"), (void (*)(void *)) really_exit_prog, B_ENTER,
|
||||
N_("~No"), (void (*)(void *)) dont_exit_prog, B_ESC);
|
||||
MSG_BOX_BUTTON(N_("~Yes"), really_exit_prog, B_ENTER),
|
||||
MSG_BOX_BUTTON(N_("~No"), dont_exit_prog, B_ESC));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -24,7 +24,6 @@ void free_history_lists(void);
|
||||
|
||||
void query_file(struct session *, struct uri *, void *, void (*)(void *, unsigned char *), void (*)(void *), int);
|
||||
|
||||
void really_exit_prog(struct session *ses);
|
||||
void query_exit(struct session *ses);
|
||||
void exit_prog(struct session *ses, int query);
|
||||
|
||||
|
@ -37,9 +37,7 @@ display_codepage(struct terminal *term, void *name_, void *xxx)
|
||||
|
||||
if (opt->value.number != index) {
|
||||
opt->value.number = index;
|
||||
/* TODO: option_changed() (we need to review the hooks
|
||||
* to handle NULL ses or properly document that stuff). */
|
||||
opt->flags |= OPT_TOUCHED;
|
||||
option_changed(NULL, opt);
|
||||
}
|
||||
|
||||
cls_redraw_all_terminals();
|
||||
@ -50,7 +48,9 @@ charset_list(struct terminal *term, void *xxx, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
int i, items;
|
||||
int sel = int_max(0, get_opt_codepage_tree(term->spec, "charset"));
|
||||
int sel = 0;
|
||||
const unsigned char *const sel_mime = get_cp_mime_name(
|
||||
get_opt_codepage_tree(term->spec, "charset"));
|
||||
struct menu_item *mi = new_menu(FREE_LIST);
|
||||
|
||||
if (!mi) return;
|
||||
@ -64,16 +64,16 @@ charset_list(struct terminal *term, void *xxx, void *ses_)
|
||||
if (is_cp_utf8(i)) continue;
|
||||
#endif /* CONFIG_UTF8 */
|
||||
|
||||
/* Map the "System" codepage to the underlying one.
|
||||
* A pointer comparison might suffice here but this
|
||||
* code is not time-critical. */
|
||||
if (strcmp(sel_mime, get_cp_mime_name(i)) == 0)
|
||||
sel = items;
|
||||
items++;
|
||||
add_to_menu(&mi, name, NULL, ACT_MAIN_NONE,
|
||||
display_codepage, get_cp_mime_name(i), 0);
|
||||
display_codepage, get_cp_config_name(i), 0);
|
||||
}
|
||||
|
||||
/* Special codepages are not in the menu and it may cause assertion
|
||||
* failures later if the selected item is out of bound. */
|
||||
if (sel >= items)
|
||||
sel = 0;
|
||||
|
||||
do_menu_selected(term, mi, ses, sel, 0);
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ terminal_options(struct terminal *term, void *xxx, struct session *ses)
|
||||
|
||||
add_dlg_end(dlg, TERMOPT_WIDGETS_COUNT - anonymous);
|
||||
|
||||
do_dialog(term, dlg, getml(dlg, NULL));
|
||||
do_dialog(term, dlg, getml(dlg, (void *) NULL));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NLS
|
||||
@ -317,5 +317,5 @@ resize_terminal_dialog(struct terminal *term)
|
||||
|
||||
add_dlg_end(dlg, RESIZE_WIDGETS_COUNT);
|
||||
|
||||
do_dialog(term, dlg, getml(dlg, NULL));
|
||||
do_dialog(term, dlg, getml(dlg, (void *) NULL));
|
||||
}
|
||||
|
@ -152,7 +152,8 @@ get_current_link_info_and_title(struct session *ses,
|
||||
if (link_title) {
|
||||
assert(*link_title);
|
||||
|
||||
ret = straconcat(link_info, " - ", link_title, NULL);
|
||||
ret = straconcat(link_info, " - ", link_title,
|
||||
(unsigned char *) NULL);
|
||||
mem_free(link_info);
|
||||
mem_free(link_title);
|
||||
}
|
||||
@ -482,7 +483,8 @@ display_window_title(struct session *ses, struct terminal *term)
|
||||
&& ses->doc_view->document->title[0])
|
||||
doc_title = ses->doc_view->document->title;
|
||||
|
||||
title = doc_title ? straconcat(doc_title, " - ELinks", NULL)
|
||||
title = doc_title ? straconcat(doc_title, " - ELinks",
|
||||
(unsigned char *) NULL)
|
||||
: stracpy("ELinks");
|
||||
if (!title) return;
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "main/module.h"
|
||||
#include "network/connection.h"
|
||||
#include "protocol/uri.h"
|
||||
#include "session/session.h"
|
||||
#include "util/error.h"
|
||||
#include "util/memory.h"
|
||||
#include "viewer/text/draw.h"
|
||||
@ -127,7 +128,10 @@ change_hook_css(struct session *ses, struct option *current, struct option *chan
|
||||
import_default_css();
|
||||
}
|
||||
|
||||
draw_formatted(ses, 1);
|
||||
/* Instead of using the value of the @ses parameter, iterate
|
||||
* through the @sessions list. The parameter may be NULL and
|
||||
* anyway we don't support session-specific options yet. */
|
||||
foreach (ses, sessions) draw_formatted(ses, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -135,7 +139,7 @@ change_hook_css(struct session *ses, struct option *current, struct option *chan
|
||||
static void
|
||||
init_css(struct module *module)
|
||||
{
|
||||
struct change_hook_info css_change_hooks[] = {
|
||||
static const struct change_hook_info css_change_hooks[] = {
|
||||
{ "document.css", change_hook_css },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
@ -342,6 +342,9 @@ done_documents(struct module *module)
|
||||
}
|
||||
|
||||
struct module document_module = struct_module(
|
||||
/* Because this module is listed in main_modules rather than
|
||||
* in builtin_modules, its name does not appear in the user
|
||||
* interface and so need not be translatable. */
|
||||
/* name: */ "Document",
|
||||
/* options: */ NULL,
|
||||
/* hooks: */ NULL,
|
||||
|
@ -561,7 +561,7 @@ look_for_link(unsigned char **pos, unsigned char *eof, struct menu_item **menu,
|
||||
|
||||
} else if (!strlcasecmp(name, namelen, "/MAP", 4)) {
|
||||
/* This is the only successful return from here! */
|
||||
add_to_ml(ml, *menu, NULL);
|
||||
add_to_ml(ml, (void *) *menu, (void *) NULL);
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
@ -644,7 +644,8 @@ look_for_link(unsigned char **pos, unsigned char *eof, struct menu_item **menu,
|
||||
nm[nmenu].flags = NO_INTL;
|
||||
}
|
||||
|
||||
add_to_ml(ml, ld, ld->link, ld->target, label, NULL);
|
||||
add_to_ml(ml, (void *) ld, (void *) ld->link, (void *) ld->target,
|
||||
(void *) label, (void *) NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -232,7 +232,8 @@ html_img_do(unsigned char *a, unsigned char *object_src,
|
||||
|
||||
mem_free(usemap_attr);
|
||||
if (!joined_urls) return;
|
||||
map_url = straconcat("MAP@", joined_urls, NULL);
|
||||
map_url = straconcat("MAP@", joined_urls,
|
||||
(unsigned char *) NULL);
|
||||
mem_free(joined_urls);
|
||||
if (!map_url) return;
|
||||
|
||||
@ -308,7 +309,7 @@ html_img_do(unsigned char *a, unsigned char *object_src,
|
||||
if (img_link_tag && (img_link_tag == 2 || add_brackets)) {
|
||||
unsigned char *img_link_prefix = options->image_link.prefix;
|
||||
unsigned char *img_link_suffix = options->image_link.suffix;
|
||||
unsigned char *new_label = straconcat(img_link_prefix, label, img_link_suffix, NULL);
|
||||
unsigned char *new_label = straconcat(img_link_prefix, label, img_link_suffix, (unsigned char *) NULL);
|
||||
|
||||
if (new_label) mem_free_set(&label, new_label);
|
||||
}
|
||||
@ -327,7 +328,7 @@ html_img_do(unsigned char *a, unsigned char *object_src,
|
||||
unsigned char *new_link;
|
||||
|
||||
html_stack_dup(html_context, ELEMENT_KILLABLE);
|
||||
new_link = straconcat(format.link, "?0,0", NULL);
|
||||
new_link = straconcat(format.link, "?0,0", (unsigned char *) NULL);
|
||||
if (new_link)
|
||||
mem_free_set(&format.link, new_link);
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ found_endattr:
|
||||
mem_free(saved_attr);
|
||||
}
|
||||
|
||||
set_mem_comment(trim_chars(attr, ' ', NULL), name, strlen(name));
|
||||
set_mem_comment(attr, name, strlen(name));
|
||||
return attr;
|
||||
|
||||
} else {
|
||||
|
@ -154,14 +154,16 @@ realloc_line(struct html_context *html_context, struct document *document,
|
||||
{
|
||||
struct screen_char *pos, *end;
|
||||
struct line *line;
|
||||
int orig_length;
|
||||
|
||||
if (!realloc_lines(document, y))
|
||||
return -1;
|
||||
|
||||
line = &document->data[y];
|
||||
orig_length = line->length;
|
||||
|
||||
if (length < line->length)
|
||||
return 0;
|
||||
if (length < orig_length)
|
||||
return orig_length;
|
||||
|
||||
if (!ALIGN_LINE(&line->chars, line->length, length + 1))
|
||||
return -1;
|
||||
@ -181,7 +183,7 @@ realloc_line(struct html_context *html_context, struct document *document,
|
||||
|
||||
line->length = length + 1;
|
||||
|
||||
return 0;
|
||||
return orig_length;
|
||||
}
|
||||
|
||||
void
|
||||
@ -244,7 +246,7 @@ clear_hchars(struct html_context *html_context, int x, int y, int width)
|
||||
assert(part && part->document && width > 0);
|
||||
if_assert_failed return;
|
||||
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x) + width - 1))
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x) + width - 1) < 0)
|
||||
return;
|
||||
|
||||
assert(part->document->data);
|
||||
@ -277,7 +279,7 @@ get_frame_char(struct html_context *html_context, struct part *part,
|
||||
assert(part && part->document && x >= 0 && y >= 0);
|
||||
if_assert_failed return NULL;
|
||||
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x)))
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x)) < 0)
|
||||
return NULL;
|
||||
|
||||
assert(part->document->data);
|
||||
@ -325,7 +327,7 @@ draw_frame_vchars(struct part *part, int x, int y, int height,
|
||||
/* The template char is the first vertical char to be drawn. So
|
||||
* copy it to the rest. */
|
||||
for (height -= 1, y += 1; height; height--, y++) {
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x)))
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x)) < 0)
|
||||
return;
|
||||
|
||||
copy_screen_chars(&POS(x, y), template, 1);
|
||||
@ -386,14 +388,15 @@ static inline int
|
||||
set_hline(struct html_context *html_context, unsigned char *chars, int charslen,
|
||||
enum link_state link_state)
|
||||
{
|
||||
struct part *part = html_context->part;
|
||||
struct screen_char *schar = get_format_screen_char(html_context,
|
||||
link_state);
|
||||
struct part *const part = html_context->part;
|
||||
struct screen_char *const schar = get_format_screen_char(html_context,
|
||||
link_state);
|
||||
int x = part->cx;
|
||||
int y = part->cy;
|
||||
int x2 = x;
|
||||
const int y = part->cy;
|
||||
const int x2 = x;
|
||||
int len = charslen;
|
||||
int utf8 = html_context->options->utf8;
|
||||
const int utf8 = html_context->options->utf8;
|
||||
int orig_length;
|
||||
|
||||
assert(part);
|
||||
if_assert_failed return len;
|
||||
@ -404,8 +407,21 @@ set_hline(struct html_context *html_context, unsigned char *chars, int charslen,
|
||||
return 0;
|
||||
|
||||
if (part->document) {
|
||||
if (realloc_line(html_context, part->document,
|
||||
Y(y), X(x) + charslen - 1))
|
||||
/* Reallocate LINE(y).chars[] to large enough. The
|
||||
* last parameter of realloc_line is the index of the
|
||||
* last element to which we may want to write,
|
||||
* i.e. one less than the required size of the array.
|
||||
* Compute the required size by assuming that each
|
||||
* byte of input will need at most one character cell.
|
||||
* (All double-cell characters take up at least two
|
||||
* bytes in UTF-8, and there are no triple-cell or
|
||||
* wider characters.) However, if there already is an
|
||||
* incomplete character in part->document->buf, then
|
||||
* the first byte of input can result in a double-cell
|
||||
* character, so we must reserve one extra element. */
|
||||
orig_length = realloc_line(html_context, part->document,
|
||||
Y(y), X(x) + charslen);
|
||||
if (orig_length < 0) /* error */
|
||||
return 0;
|
||||
if (utf8) {
|
||||
unsigned char *end = chars + charslen;
|
||||
@ -424,61 +440,71 @@ set_hline(struct html_context *html_context, unsigned char *chars, int charslen,
|
||||
part->document->buf[i] = '\0';
|
||||
data = utf8_to_unicode(&buf_ptr, buf_ptr + i);
|
||||
if (data != UCS_NO_CHAR) {
|
||||
/* FIXME: If there was invalid
|
||||
* UTF-8 in the buffer,
|
||||
* @utf8_to_unicode may have left
|
||||
* some bytes unused. Those
|
||||
* bytes should be pulled back
|
||||
* into @chars, rather than
|
||||
* discarded. This is not
|
||||
* trivial to implement because
|
||||
* each byte may have arrived in
|
||||
* a separate call. */
|
||||
part->document->buf_length = 0;
|
||||
goto good_char;
|
||||
} else {
|
||||
/* Still not full char */
|
||||
LINE(y).length = orig_length;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (; chars < end; x++) {
|
||||
if (*chars == NBSP_CHAR) {
|
||||
schar->data = ' ';
|
||||
part->spaces[x] = html_context->options->wrap_nbsp;
|
||||
part->char_width[x] = 1;
|
||||
chars++;
|
||||
} else {
|
||||
part->spaces[x] = (*chars == ' ');
|
||||
data = utf8_to_unicode(&chars, end);
|
||||
if (data == UCS_NO_CHAR) {
|
||||
if (charslen == 1) {
|
||||
/* HR */
|
||||
unsigned char attr = schar->attr;
|
||||
/* ELinks does not use NBSP_CHAR in UTF-8. */
|
||||
|
||||
schar->data = *chars++;
|
||||
schar->attr = SCREEN_ATTR_FRAME;
|
||||
copy_screen_chars(&POS(x, y), schar, 1);
|
||||
schar->attr = attr;
|
||||
part->char_width[x] = 0;
|
||||
continue;
|
||||
} else {
|
||||
unsigned char i;
|
||||
data = utf8_to_unicode(&chars, end);
|
||||
if (data == UCS_NO_CHAR) {
|
||||
part->spaces[x] = 0;
|
||||
if (charslen == 1) {
|
||||
/* HR */
|
||||
unsigned char attr = schar->attr;
|
||||
|
||||
for (i = 0; chars < end;i++) {
|
||||
part->document->buf[i] = *chars++;
|
||||
}
|
||||
part->document->buf_length = i;
|
||||
return x - x2;
|
||||
}
|
||||
schar->data = *chars++;
|
||||
schar->attr = SCREEN_ATTR_FRAME;
|
||||
copy_screen_chars(&POS(x, y), schar, 1);
|
||||
schar->attr = attr;
|
||||
part->char_width[x] = 0;
|
||||
continue;
|
||||
} else {
|
||||
good_char:
|
||||
if (unicode_to_cell(data) == 2) {
|
||||
schar->data = (unicode_val_T)data;
|
||||
part->char_width[x] = 2;
|
||||
copy_screen_chars(&POS(x++, y), schar, 1);
|
||||
schar->data = UCS_NO_CHAR;
|
||||
part->spaces[x] = 0;
|
||||
part->char_width[x] = 0;
|
||||
} else {
|
||||
part->char_width[x] = unicode_to_cell(data);
|
||||
schar->data = (unicode_val_T)data;
|
||||
unsigned char i;
|
||||
|
||||
for (i = 0; chars < end;i++) {
|
||||
part->document->buf[i] = *chars++;
|
||||
}
|
||||
part->document->buf_length = i;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
good_char:
|
||||
if (data == UCS_NO_BREAK_SPACE
|
||||
&& html_context->options->wrap_nbsp)
|
||||
data = UCS_SPACE;
|
||||
part->spaces[x] = (data == UCS_SPACE);
|
||||
if (unicode_to_cell(data) == 2) {
|
||||
schar->data = (unicode_val_T)data;
|
||||
part->char_width[x] = 2;
|
||||
copy_screen_chars(&POS(x++, y), schar, 1);
|
||||
schar->data = UCS_NO_CHAR;
|
||||
part->spaces[x] = 0;
|
||||
part->char_width[x] = 0;
|
||||
} else {
|
||||
part->char_width[x] = unicode_to_cell(data);
|
||||
schar->data = (unicode_val_T)data;
|
||||
}
|
||||
}
|
||||
copy_screen_chars(&POS(x, y), schar, 1);
|
||||
}
|
||||
} else {
|
||||
} else { /* not UTF-8 */
|
||||
for (; charslen > 0; charslen--, x++, chars++) {
|
||||
part->char_width[x] = 1;
|
||||
if (*chars == NBSP_CHAR) {
|
||||
@ -490,10 +516,24 @@ good_char:
|
||||
}
|
||||
copy_screen_chars(&POS(x, y), schar, 1);
|
||||
}
|
||||
} /* end of UTF-8 check */
|
||||
|
||||
}
|
||||
/* Assert that we haven't written past the end of the
|
||||
* LINE(y).chars array. @x here is one greater than
|
||||
* the last one used in POS(x, y). Instead of this,
|
||||
* we could assert(X(x) < LINE(y).length) immediately
|
||||
* before each @copy_screen_chars call above, but
|
||||
* those are in an inner loop that should be fast. */
|
||||
assert(X(x) <= LINE(y).length);
|
||||
/* Some part of the code is apparently using LINE(y).length
|
||||
* for line-wrapping decisions. It may currently be too
|
||||
* large because it was allocated above based on @charslen
|
||||
* which is the number of bytes, not the number of cells.
|
||||
* Change the length to the correct size, but don't let it
|
||||
* get smaller than it was on entry to this function. */
|
||||
LINE(y).length = int_max(orig_length, X(x));
|
||||
len = x - x2;
|
||||
} else {
|
||||
} else { /* part->document == NULL */
|
||||
if (utf8) {
|
||||
unsigned char *end;
|
||||
|
||||
@ -514,13 +554,13 @@ good_char:
|
||||
}
|
||||
}
|
||||
len = x - x2;
|
||||
} else {
|
||||
} else { /* not UTF-8 */
|
||||
for (; charslen > 0; charslen--, x++, chars++) {
|
||||
part->spaces[x] = (*chars == ' ');
|
||||
part->char_width[x] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* end of part->document check */
|
||||
return len;
|
||||
}
|
||||
#else
|
||||
@ -545,7 +585,7 @@ set_hline(struct html_context *html_context, unsigned char *chars, int charslen,
|
||||
|
||||
if (part->document) {
|
||||
if (realloc_line(html_context, part->document,
|
||||
Y(y), X(x) + charslen - 1))
|
||||
Y(y), X(x) + charslen - 1) < 0)
|
||||
return;
|
||||
|
||||
for (; charslen > 0; charslen--, x++, chars++) {
|
||||
@ -694,7 +734,7 @@ copy_chars(struct html_context *html_context, int x, int y, int width, struct sc
|
||||
assert(width > 0 && part && part->document && part->document->data);
|
||||
if_assert_failed return;
|
||||
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x) + width - 1))
|
||||
if (realloc_line(html_context, part->document, Y(y), X(x) + width - 1) < 0)
|
||||
return;
|
||||
|
||||
copy_screen_chars(&POS(x, y), d, width);
|
||||
@ -1369,7 +1409,8 @@ process_link(struct html_context *html_context, enum link_state link_state,
|
||||
if (name) {
|
||||
unsigned char *new_name;
|
||||
|
||||
new_name = straconcat(name, chars, NULL);
|
||||
new_name = straconcat(name, chars,
|
||||
(unsigned char *) NULL);
|
||||
if (new_name) {
|
||||
mem_free(name);
|
||||
link->data.name = new_name;
|
||||
@ -1930,7 +1971,11 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
|
||||
unsigned long seconds = va_arg(l, unsigned long);
|
||||
unsigned char *t = va_arg(l, unsigned char *);
|
||||
|
||||
document->refresh = init_document_refresh(t, seconds);
|
||||
if (document) {
|
||||
if (document->refresh)
|
||||
done_document_refresh(document->refresh);
|
||||
document->refresh = init_document_refresh(t, seconds);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SP_COLOR_LINK_LINES:
|
||||
|
@ -196,7 +196,7 @@ again:
|
||||
}
|
||||
|
||||
if (wanted) {
|
||||
assertm(limits, "bug in distribute_values()");
|
||||
assertm(limits != NULL, "bug in distribute_values()");
|
||||
limits = NULL;
|
||||
sum = 0;
|
||||
goto again;
|
||||
|
@ -123,7 +123,7 @@ check_link_word(struct document *document, unsigned char *uri, int length,
|
||||
uri[length] = 0;
|
||||
|
||||
if (mailto && mailto > uri && mailto - uri < length - 1) {
|
||||
where = straconcat("mailto:", uri, NULL);
|
||||
where = straconcat("mailto:", uri, (unsigned char *) NULL);
|
||||
|
||||
} else if (parse_uri(&test, uri) == URI_ERRNO_OK
|
||||
&& test.protocol != PROTOCOL_UNKNOWN
|
||||
|
@ -371,7 +371,7 @@ init_dom_node_at(
|
||||
int sort = (type == DOM_NODE_ATTRIBUTE);
|
||||
int index;
|
||||
|
||||
assertm(list, "Adding node %d to bad parent %d",
|
||||
assertm(list != NULL, "Adding node %d to bad parent %d",
|
||||
node->type, parent->type);
|
||||
|
||||
index = *list && (*list)->size > 0 && sort
|
||||
|
@ -488,7 +488,7 @@ parse_dom_select(struct dom_select *select, struct dom_stack *stack,
|
||||
int sort = (node->type == DOM_NODE_ATTRIBUTE);
|
||||
int index;
|
||||
|
||||
assertm(list, "Adding node to bad parent [%d -> %d]",
|
||||
assertm(list != NULL, "Adding node to bad parent [%d -> %d]",
|
||||
node->type, parent->type);
|
||||
|
||||
index = *list && (*list)->size > 0 && sort
|
||||
|
@ -189,7 +189,7 @@ get_dom_stack_state_data(struct dom_stack_context *context,
|
||||
|
||||
if (!object_size) return NULL;
|
||||
|
||||
assertm(context->state_objects);
|
||||
assert(context->state_objects);
|
||||
|
||||
return (void *) &context->state_objects[state->depth * object_size];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
top_builddir=../..
|
||||
include $(top_builddir)/Makefile.config
|
||||
INCLUDES += $(SPIDERMONKEY_CFLAGS)
|
||||
INCLUDES += $(SPIDERMONKEY_CFLAGS) $(SEE_CFLAGS)
|
||||
|
||||
SUBDIRS-$(CONFIG_ECMASCRIPT_SEE) += see
|
||||
SUBDIRS-$(CONFIG_ECMASCRIPT_SMJS) += spidermonkey
|
||||
|
@ -43,7 +43,7 @@ static struct option_info ecmascript_options[] = {
|
||||
N_("ECMAScript options.")),
|
||||
|
||||
INIT_OPT_BOOL("ecmascript", N_("Enable"),
|
||||
"enable", 0, 1,
|
||||
"enable", 0, 0,
|
||||
N_("Whether to run those scripts inside of documents.")),
|
||||
|
||||
INIT_OPT_BOOL("ecmascript", N_("Script error reporting"),
|
||||
@ -285,10 +285,10 @@ ecmascript_set_action(unsigned char **action, unsigned char *string)
|
||||
struct uri *uri = get_uri(*action, URI_HTTP_REFERRER_HOST);
|
||||
|
||||
if (uri->protocol == PROTOCOL_FILE) {
|
||||
mem_free_set(action, straconcat(struri(uri), string, NULL));
|
||||
mem_free_set(action, straconcat(struri(uri), string, (unsigned char *) NULL));
|
||||
}
|
||||
else
|
||||
mem_free_set(action, straconcat(struri(uri), string + 1, NULL));
|
||||
mem_free_set(action, straconcat(struri(uri), string + 1, (unsigned char *) NULL));
|
||||
done_uri(uri);
|
||||
mem_free(string);
|
||||
} else { /* relative uri */
|
||||
@ -296,7 +296,8 @@ ecmascript_set_action(unsigned char **action, unsigned char *string)
|
||||
unsigned char *new_action;
|
||||
|
||||
if (last_slash) *(last_slash + 1) = '\0';
|
||||
new_action = straconcat(*action, string, NULL);
|
||||
new_action = straconcat(*action, string,
|
||||
(unsigned char *) NULL);
|
||||
mem_free_set(action, new_action);
|
||||
mem_free(string);
|
||||
}
|
||||
@ -311,7 +312,9 @@ ecmascript_timeout_handler(void *i)
|
||||
{
|
||||
struct ecmascript_interpreter *interpreter = i;
|
||||
|
||||
assertm(interpreter->vs->doc_view, "setTimeout: vs with no document (e_f %d)", interpreter->vs->ecmascript_fragile);
|
||||
assertm(interpreter->vs->doc_view != NULL,
|
||||
"setTimeout: vs with no document (e_f %d)",
|
||||
interpreter->vs->ecmascript_fragile);
|
||||
interpreter->vs->doc_view->document->timeout = TIMER_ID_UNDEF;
|
||||
/* The expired timer ID has now been erased. */
|
||||
|
||||
|
@ -181,7 +181,7 @@ see_eval_boolback(struct ecmascript_interpreter *interpreter,
|
||||
}
|
||||
|
||||
struct module see_module = struct_module(
|
||||
/* name: */ "SEE",
|
||||
/* name: */ N_("SEE"),
|
||||
/* options: */ NULL,
|
||||
/* events: */ NULL,
|
||||
/* submodules: */ NULL,
|
||||
|
@ -1,5 +1,6 @@
|
||||
top_builddir=../../..
|
||||
include $(top_builddir)/Makefile.config
|
||||
INCLUDES += $(SEE_CFLAGS)
|
||||
|
||||
OBJS = checktype.o document.o form.o input.o location.o navigator.o strings.o unibar.o window.o
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* Check the type of a SEE object so it's safe to cast */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -312,7 +312,7 @@ spidermonkey_eval_boolback(struct ecmascript_interpreter *interpreter,
|
||||
}
|
||||
|
||||
struct module spidermonkey_module = struct_module(
|
||||
/* name: */ "SpiderMonkey",
|
||||
/* name: */ N_("SpiderMonkey"),
|
||||
/* options: */ NULL,
|
||||
/* events: */ NULL,
|
||||
/* submodules: */ NULL,
|
||||
|
@ -12,6 +12,7 @@
|
||||
#ifdef HAVE_BZLIB_H
|
||||
#include <bzlib.h> /* Everything needs this after stdio.h */
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
@ -19,30 +20,55 @@
|
||||
#include "encoding/encoding.h"
|
||||
#include "util/memory.h"
|
||||
|
||||
/* How many bytes of compressed data to read before decompressing.
|
||||
* This is currently defined as BZ_MAX_UNUSED to make the behaviour
|
||||
* similar to BZ2_bzRead; but other values would work too. */
|
||||
#define ELINKS_BZ_BUFFER_LENGTH BZ_MAX_UNUSED
|
||||
|
||||
struct bz2_enc_data {
|
||||
FILE *file;
|
||||
BZFILE *bzfile;
|
||||
int last_read; /* If err after last bzRead() was BZ_STREAM_END.. */
|
||||
};
|
||||
bz_stream fbz_stream;
|
||||
|
||||
/* TODO: When it'll be official, use bzdopen() from Yoshioka Tsuneo. --pasky */
|
||||
/* The file descriptor from which we read. */
|
||||
int fdread;
|
||||
|
||||
/* Initially 0; set to 1 when BZ2_bzDecompress indicates
|
||||
* BZ_STREAM_END, which means it has found the bzip2-specific
|
||||
* end-of-stream marker and all data has been decompressed.
|
||||
* Then we neither read from the file nor call BZ2_bzDecompress
|
||||
* any more. */
|
||||
int last_read;
|
||||
|
||||
/* A buffer for data that has been read from the file but not
|
||||
* yet decompressed. fbz_stream.next_in and fbz_stream.avail_in
|
||||
* refer to this buffer. */
|
||||
unsigned char buf[ELINKS_BZ_BUFFER_LENGTH];
|
||||
};
|
||||
|
||||
static int
|
||||
bzip2_open(struct stream_encoded *stream, int fd)
|
||||
{
|
||||
/* A zero-initialized bz_stream. The compiler ensures that all
|
||||
* pointer members in it are null. (Can't do this with memset
|
||||
* because C99 does not require all-bits-zero to be a null
|
||||
* pointer.) */
|
||||
static const bz_stream null_bz_stream = {0};
|
||||
|
||||
struct bz2_enc_data *data = mem_alloc(sizeof(*data));
|
||||
int err;
|
||||
|
||||
stream->data = NULL;
|
||||
if (!data) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Initialize all members of *data, except data->buf[], which
|
||||
* will be initialized on demand by bzip2_read. */
|
||||
copy_struct(&data->fbz_stream, &null_bz_stream);
|
||||
data->fdread = fd;
|
||||
data->last_read = 0;
|
||||
|
||||
data->file = fdopen(fd, "rb");
|
||||
|
||||
data->bzfile = BZ2_bzReadOpen(&err, data->file, 0, 0, NULL, 0);
|
||||
if (!data->bzfile) {
|
||||
err = BZ2_bzDecompressInit(&data->fbz_stream, 0, 0);
|
||||
if (err != BZ_OK) {
|
||||
mem_free(data);
|
||||
return -1;
|
||||
}
|
||||
@ -58,25 +84,45 @@ bzip2_read(struct stream_encoded *stream, unsigned char *buf, int len)
|
||||
struct bz2_enc_data *data = (struct bz2_enc_data *) stream->data;
|
||||
int err = 0;
|
||||
|
||||
if (data->last_read)
|
||||
return 0;
|
||||
if (!data) return -1;
|
||||
|
||||
len = BZ2_bzRead(&err, data->bzfile, buf, len);
|
||||
assert(len > 0);
|
||||
|
||||
if (err == BZ_STREAM_END)
|
||||
data->last_read = 1;
|
||||
else if (err)
|
||||
return -1;
|
||||
if (data->last_read) return 0;
|
||||
|
||||
return len;
|
||||
}
|
||||
data->fbz_stream.avail_out = len;
|
||||
data->fbz_stream.next_out = buf;
|
||||
|
||||
static unsigned char *
|
||||
bzip2_decode(struct stream_encoded *stream, unsigned char *data, int len,
|
||||
int *new_len)
|
||||
{
|
||||
*new_len = len;
|
||||
return data;
|
||||
do {
|
||||
if (data->fbz_stream.avail_in == 0) {
|
||||
int l = safe_read(data->fdread, data->buf,
|
||||
ELINKS_BZ_BUFFER_LENGTH);
|
||||
|
||||
if (l == -1) {
|
||||
if (errno == EAGAIN)
|
||||
break;
|
||||
else
|
||||
return -1; /* I/O error */
|
||||
} else if (l == 0) {
|
||||
/* EOF. It is error: we wait for more bytes */
|
||||
return -1;
|
||||
}
|
||||
|
||||
data->fbz_stream.next_in = data->buf;
|
||||
data->fbz_stream.avail_in = l;
|
||||
}
|
||||
|
||||
err = BZ2_bzDecompress(&data->fbz_stream);
|
||||
if (err == BZ_STREAM_END) {
|
||||
data->last_read = 1;
|
||||
break;
|
||||
} else if (err != BZ_OK) {
|
||||
return -1;
|
||||
}
|
||||
} while (data->fbz_stream.avail_out > 0);
|
||||
|
||||
assert(len - data->fbz_stream.avail_out == data->fbz_stream.next_out - (char *) buf);
|
||||
return len - data->fbz_stream.avail_out;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMALL
|
||||
@ -148,21 +194,22 @@ static void
|
||||
bzip2_close(struct stream_encoded *stream)
|
||||
{
|
||||
struct bz2_enc_data *data = (struct bz2_enc_data *) stream->data;
|
||||
int err;
|
||||
|
||||
BZ2_bzReadClose(&err, data->bzfile);
|
||||
fclose(data->file);
|
||||
mem_free(data);
|
||||
if (data) {
|
||||
BZ2_bzDecompressEnd(&data->fbz_stream);
|
||||
close(data->fdread);
|
||||
mem_free(data);
|
||||
stream->data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned char *bzip2_extensions[] = { ".bz2", ".tbz", NULL };
|
||||
static const unsigned char *const bzip2_extensions[] = { ".bz2", ".tbz", NULL };
|
||||
|
||||
struct decoding_backend bzip2_decoding_backend = {
|
||||
const struct decoding_backend bzip2_decoding_backend = {
|
||||
"bzip2",
|
||||
bzip2_extensions,
|
||||
bzip2_open,
|
||||
bzip2_read,
|
||||
bzip2_decode,
|
||||
bzip2_decode_buffer,
|
||||
bzip2_close,
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "encoding/encoding.h"
|
||||
|
||||
#ifdef CONFIG_BZIP2
|
||||
extern struct decoding_backend bzip2_decoding_backend;
|
||||
extern const struct decoding_backend bzip2_decoding_backend;
|
||||
#else
|
||||
#define bzip2_decoding_backend dummy_decoding_backend
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user