1
0
Fork 0
This commit is contained in:
Kalle Olavi Niemitalo 2007-07-09 11:39:21 +03:00 committed by Kalle Olavi Niemitalo
commit eccc8c23f0
106 changed files with 2274 additions and 4704 deletions

View File

@ -3,9 +3,17 @@ by doing
$ cg log
in a checked out GIT tree, or using the gitweb interface currently
available at
in a checked out GIT tree, or using the gitweb interface available at:
http://pasky.or.cz/gitweb.cgi
http://repo.or.cz/w/elinks.git
(to be moved to a nicer location later).
The data in the main repository reaches back to 2005-09-16, when
ELinks switched from CVS to GIT. To see changes made in CVS before
that, download the history with the contrib/grafthistory.sh script.
Unfortunately, because files in the CVS repository have been moved or
copied around, checking out a historical version often places files in
the wrong directories. The history is usable for git-blame, however.
It is currently also viewable at these sites:
http://pasky.or.cz/gitweb.cgi?p=elinks-history.git
http://cvsweb.elinks.cz/cvsweb.cgi/elinks/

View File

@ -182,6 +182,10 @@ MAKE_COLOR = @MAKE_COLOR@
LIB_O_NAME = lib.o
# Reverse a CONFIG_* string
# Usage $(call not,$(CONFIG_FOO))
not = $(if $(findstring yes,$(1)),no,yes)
### This is here because Makefile.config is usually the first thing
### we get and sometimes the all rule can be implicit, yet we want
### it always as the default one. So this should make sure it always

View File

@ -191,6 +191,21 @@ test-default:
ifdef TEST_PROGS
TESTDEPS-$(CONFIG_DEBUG) += $(top_builddir)/src/util/memdebug.o
TESTDEPS-$(call not,$(CONFIG_SMALL)) += \
$(top_builddir)/src/util/fastfind.o \
# Add most of the basic utility library to the test dependencies.
TESTDEPS += \
$(top_builddir)/src/intl/charsets.o \
$(top_builddir)/src/osdep/stub.o \
$(top_builddir)/src/util/conv.o \
$(top_builddir)/src/util/error.o \
$(top_builddir)/src/util/file.o \
$(top_builddir)/src/util/hash.o \
$(top_builddir)/src/util/memory.o \
$(top_builddir)/src/util/string.o \
$(top_builddir)/src/util/time.o
TESTDEPS += $(TESTDEPS-yes)
TEST_LIB=$(top_srcdir)/test/libtest.sh

403
NEWS
View File

@ -1,8 +1,8 @@
Release info
============
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
You can see the complete list of recent changes, bugfixes and new features
in the http://repo.or.cz/w/elinks.git[gitweb interface]. See the ChangeLog
file for details.
ELinks 0.13.GIT now:
@ -17,192 +17,160 @@ 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.
ELinks 0.12.GIT (0cf15ca9d9dbc00c10f23440674fcdb832dffd75) and related
bug numbers. Each section is sorted by severity and grouped by topic.
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.
do list all bug numbers).
//////////////////////////////////////////////////////////////////////
* 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.
- (bugfix 712) GnuTLS works on https://www-s.uiuc.edu
* 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 &#013; 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.
Notable new features:
* 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 supplementary 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. See more notes
in features.conf.
* 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 and 771 with which malicious web pages can 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.
* ECMAScript support no longer works with SpiderMonkey versions
earlier than JS1.5 RC3a.
* Gzip decompression support now requires zlib 1.2.0.2 or later.
* bugs 871, 752: 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.
* Guile scripting reads hooks.scm rather than internal-hooks.scm.
(It still reads user-hooks.scm, too.)
Miscellaneous:
* critical bug 756: ``assertion (cached)->object.refcount >= 0 failed''
after HTTP proxy was changed
* tabs opened by -remote now go behind existing dialogs
* Debian bug 257762: turn terminal transparency off by default
* bug 724: better parsing of escape sequences and control
sequences from the terminal
* bug 948: fix wrong UTF-8 output after the charset menu was used
* gzip_read: always call gzclearerr
* bug 816: convert entity references in input/@value only once
* bug 916: if a mailcap entry has no %s, provide the file as stdin
* bug 355: add documents displayed via ``What to do'' dialog to the
global history
* encode and decode filenames in FSP URLs
* don't use a busy cache entry if it has expired or should be
reloaded. See elinks-users mail from 28 Oct 2005.
* several accesskey fixes
* in Lua: don't write to the string returned by lua_tostring
* minor bug 284: render closing bracket for HTML element SUB in the
same line; don't let it fall to the next
* minor: show quote characters for HTML element Q, rather than italics
* trivial bug 387: treat &#013; inside <pre>...</pre> as a newline
* trivial bug 930: refresh status bar when key prefix is eaten
* trivial bug 776: ``elinks -remote http://elinks.cz/'' no longer clears
the screen
* enhancement 121: if a mailcap entry indicates 'copiousoutput', ELinks
itself acts as a pager
* enhancement 790: If-Modified-Since and If-None-Match
* enhancement: HTTP negotiate-auth using GSSAPI
* enhancement 517: fixed and enabled HTTP bzip2 decompression
* enhancement: LZMA decompression
* enhancement: FSP progress indicator and password prompt
* enhancement: autocreate directories needed to download a file
* enhancement: ``Add server'' button in the cookie manager
* enhancement 887: ``Save'' in the cookie manager now saves cookies
even if unmodified
* enhancement 145: internal clipboard support
* enhancement: new actions kill-word-back, move-backward-word,
move-forward-word
* enhancements 687, 688: options ui.tabs.top, ui.show_menu_bar_always
* enhancement: highlight links as one enters link prefixes
* enhancement: backspace backs out the last digit of the prefix
* enhancement: in text type-ahead searching, don't follow current link
on enter
* enhancement: add support for parsing space separated CSS class
attribute values
* enhancement: mouse wheel support over GPM (contrib/gpm-wheel.patch),
and on BSD via moused -z 4
* enhancement: 24-bit truecolor mode
* enhancement 622: -dump-color-mode
* enhancement: support Ctrl+Alt+letter key combinations
* enhancement 381: reduce memory consumption of codepages and some
other arrays
* enhancement in user SMJS: new properties/functions elinks.action,
elinks.execute, elinks.globhist, elinks.load_uri, elinks.vs
Build system and compile-time errors (ignore if you don't build ELinks):
* bug 725: fix version checking for Ruby in 'configure'
* 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'
* enhancement: make uninstall
* experimental enhancements: --with-python=DIRECTORY, --with-gc=DIRECTORY
* experimental enhancement: native Win32 port
Changes in the experimental ECMAScript support:
* disabled by default, as mentioned under ``Incompatibilities'' above
* execute event-handler scripts as function bodies, so ``return''
statements work as intended
* fix error ``forms.namedItem is not a function''
* enhancement: SEE ECMAScript backend, an alternative to SpiderMonkey
* enhancement: handling onsubmit
* workaround: window.open remembers the last few URLs and doesn't
reopen them when incremental rendering reruns the onload script
* enhancement: better handling of form.action assignments
* enhancement: form[x] looks up controls also by 'id', not only 'name'
* enhancement: added document.location.href, input.selectedIndex,
window.setTimeout, window.status
Changes in the experimental SGML/DOM implementation:
* enhancement: 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
* enhancement: 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.
* Not clear whether the bugs have been fixed:
- (bugfix 674) Reproduceable crashes while trying to unsubscribe
from a community on Orkut
- (bugfix 770) Download resuming simply restarts the download
* 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.
- (bugfix 784) attributes corrupt character entity references if
terminal charset != document charset
* 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".
@ -210,8 +178,6 @@ have already been considered.
- (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.
@ -219,7 +185,6 @@ have already been considered.
- (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
@ -235,6 +200,28 @@ have already been considered.
as entity references
- (bugfix 935) Yes and No buttons override the bottom border of the
dialog.
- (bugfix in SEE) Use frame->name instead of target avoiding
possible segfault.
- (bugfix 957) crash within js_Interpret: cx->fp points to freed
memory
- (bugfix 920) assertion priority >= prev_priority failed: queue is
not sorted
* Already backported to a previous release but not listed there:
- (enhancement) Activate link only when onClick returns true.
Fixed bug 786 in ELinks 0.11.2.
- when the configure script cleans old object files, this no longer
causes it to loop. Commit 564b67883b189a05839bcd2a30d8d4c6eb89c66d
in ELinks 0.11.1.
- don't include <sys/param.h> for MIN and MAX because it may interfere with
CONFIG_IPV6 on Linux. Commit 63797ae9b331efd91be27512bd9d5b2e2ff74741
in ELinks 0.11.1.
- Debian bug 400872: include <sys/types.h> for off_t.
(Related to bug 936 but not the same.)
Commit 135a79a3c309af36cf963f1d3c34b07f296fa2f7 in ELinks 0.11.3.
- bug 107: recognize "localhost" in file: URIs. Cannot reproduce in
earlier versions.
- fix compilation under gcc 4.x. Backported from gentoo portage.
Commit bcabd8b7951f3319199811088e607501296ee573 in ELinks 0.11.3.
* Reverted changes:
- (new feature) document.write, reverted in
2c087e52e74528a720621186b91880463e039d50
@ -263,8 +250,67 @@ have already been considered.
(commit 539f756438fca4264ab937b2ccfba2351e916a16)
- (bugfix) Don't claim that the authentication is for HTTP.
(commit ef2f6383c6f0bed576e6f69030eacc4931b42a27)
- (enhancement) Reject invalid UTF-8 input from documents and
terminals
- (bugfix) Decode UTF-8 only from bytes, not from codes of special
keys.
- (enhancement) "Resize terminal" tries to use the window size
increment.
- (bugfix) Subprocess forked for SIGTSTP calls _exit, not exit.
- (enhancement) Tell the user how to move bookmarks.
- (enhancement) Localization updates. For this to be important, we
should at least list the languages.
- (enhancement) Ctrl+characters don't trigger hotkeys in menus and
dialogs.
- (bitrot) Fix two warnings on Mac OS X.
- (enhancement) reduce warnings on gcc 4.2 snapshots
* don't use cmp -b, which FreeBSD doesn't support. This is commit
7a5f699a88c5fc89c510854b04702c16c30ece5a in src/dom/test/ which
is run only by "make test" rather than "make".
* support much longer locale-specific timestamps when formatting a
directory listing. LC_TIME=fi_FI.UTF-8 now works. Let's treat
this as part of the UTF-8 support.
* enhancement in user SMJS: elinks.alert no longer displays as an
"error"
//////////////////////////////////////////////////////////////////////
ELinks 0.11.3.GIT now:
----------------------
To be released as 0.11.4.
* critical bug 755: fix crashes due to dangling pointers to struct
form_state
* critical bug 945: don't crash if a Lua script calls e.g. error(nil)
* major bug 956: don't reuse pointers to SpiderMonkey objects that may
have been collected as garbage. This fix causes bug 954.
* CVE-2007-2027: check if the program path contains "src/" before
using ../po files
* important Debian bug 380347: prevent a buffer overflow in entity_cache
and a possible subsequent crash
* major bug 788: don't read STRLEN n_a, which isn't initialized by
POPpx of Perl v5.8.8 and later
* fix query parsing in file: URIs for local CGI (was broken in 0.11.3)
* bug 691: don't look up bogus IPv4 addresses based on characters of a
hostname
* bug 712: GnuTLS works on https://www-s.uiuc.edu/[]
* fix passive FTP over IPv6 when connect() fails with EINPROGRESS
* minor bug 951 in user SMJS: garbage-collect SMJS objects on 'File ->
Flush all caches' to work around their holding cache entries busy
* minor bug 396: never show empty filename in the what-to-do dialog
* minor bug 461: ensure contrast in blank areas, to keep the cursor visible
* minor bug 928: properly display no-break spaces in a UTF-8 document
if the terminal uses some other charset
* trivial bug 947: document.html.wrap_nbsp also affects text in tables
* build bug 950: fix ``config/install-sh: No such file or directory''
on SunOS
* build bug 936: fix errors about undefined off_t (autoheader
incompatibility)
* build: update SpiderMonkey configure check Debian compatibility
* build: use $(CPPFLAGS) rather than $(AM_CFLAGS)
* minor build bug 960: fix errors in loadmsgcat.c if mmap() exists but
munmap() doesn't
ELinks 0.11.3:
--------------
@ -305,7 +351,7 @@ Released on 2007-04-15.
* 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
* 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
@ -402,6 +448,7 @@ ELinks 0.10.0 (Thelma):
Released on 2004-12-24.
* licensed under GPLv2 only
* simple CSS
* simple JavaScript/ECMAScript support by the SpiderMonkey Mozilla JS engine
* plain-text mark-up (_^Hx to underline, x^Hx to embolden)
@ -416,12 +463,12 @@ Released on 2004-12-24.
* incremental searching (press '#/')
* Perl scripting back-end (experimental)
* build-time configurability and feature documentation through features.conf
* Mozilla-compatible -remote option (http://www.mozilla.org/unix/remote.html)
* support for specifying IP family as protocol postfix (i.e. http4 or ftp6)
* Mozilla-compatible -remote option (http://www.mozilla.org/unix/remote.html[])
* support for specifying IP family as protocol postfix (e.g. http4 or ftp6)
* internationalized domain names via libidn (RFC 3490)
* data URI protocol (RFC 2397)
* gopher protocol (RFC 1436)
* NNTP protocol (RFC 977 and 2980) (experimental)
* NNTP protocol (RFC 977 and RFC 2980) (experimental)
* build system fine-tuned to use automake conditionals
* -localhost option to block connections to remote hosts
* -verbose option to control messages printed at startup

26
TODO
View File

@ -1,20 +1,18 @@
The ELinks TODO items are kept in Bugzilla (http://bugzilla.elinks.cz/),
look for the bugs with 'enhancement' severity. Some generic goals are still
kept here, though, to be more on the developers' eyes ;-).
What yet needs to take its way to Bugzilla:
Rewrite HTML parser (see the SGML+DOM stuff: src/dom/ & src/document/dom)
Reorganization of user interface (nothing particular at all, just an
uncertain feel that it could be better and bear a look of some UI designer ;)
TODO list
=========
The ELinks TODO items are kept in Bugzilla <http://bugzilla.elinks.cz/>;
look for the bugs with 'enhancement' severity. More general goals are
still kept here, though, to be more visible to developers. ;-) Finally,
the code contains several (greppable) "FIXME" and "TODO" notes regarding
smaller fixes and enhancements.
General goals:
Write some more documentation.. docs, a lot of docs!
- Rewrite HTML parser (see the SGML+DOM stuff: src/dom/ & src/document/dom)
General code cleanup
- Write more documentation; docs, a lot of docs!
Speed/memory optimizations
- General code cleanup
- Speed/memory optimizations

View File

@ -12,6 +12,11 @@ aclocal
echo autoheader...
autoheader
# The timestamp of stamp-h.in indicates when config.h.in was last
# generated or found to be already correct. Create stamp-h.in so
# that it gets included in elinks-*.tar.gz and Makefile won't try
# to run a possibly incompatible version of autoheader (bug 936).
echo timestamp > stamp-h.in
echo autoconf...
autoconf

View File

@ -1,6 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
dnl Autoconf 2.13 generates an incomplete config.h.in; see ELinks bug 936.
dnl Autoconf 2.59 is installed in the computer that generates our daily
dnl snapshots, so we need to be compatible with that.
AC_PREREQ(2.59)
AC_INIT(src/main/main.c)
AC_CONFIG_AUX_DIR(config)
@ -465,7 +468,7 @@ AC_DEFUN([EL_CONFIG_OPTIONAL_LIBRARY],
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_GPM, gpm, gpm.h, gpm, Gpm_Open,
[ --without-gpm disable gpm (mouse) support])
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_GZIP, zlib, zlib.h, z, gzdopen,
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_GZIP, zlib, zlib.h, z, gzclearerr,
[ --without-zlib disable zlib support])
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_BZIP2, bzlib, bzlib.h, bz2, BZ2_bzReadOpen,
@ -572,14 +575,9 @@ AC_ARG_WITH(see, [ --with-see enable Simple Ecmascript Engine (SEE
# to compile CVS. Also, the macro seems to be really stupid regarding searching
# for Guile in $PATH etc. --pasky
AC_MSG_CHECKING([for SEE])
CONFIG_ECMASCRIPT_SEE=no
if test "$enable_see" = "yes"; then
AC_MSG_RESULT(yes);
## Based on the SEE_FLAGS macro.
if test -d "$withval"; then
SEE_PATH="$withval:$PATH"
else
@ -587,16 +585,24 @@ if test "$enable_see" = "yes"; then
fi
AC_PATH_PROG(SEE_CONFIG, libsee-config, no, $SEE_PATH)
## First, let's just see if we can find Guile at all.
AC_MSG_CHECKING([for SEE (2.0.1131 or later)])
if test "$SEE_CONFIG" != no; then
cf_result="yes";
EL_SAVE_FLAGS
SEE_LIBS="`$SEE_CONFIG --libs`"
SEE_CFLAGS="`$SEE_CONFIG --cppflags`"
LIBS="$SEE_LIBS $LIBS"
EL_CONFIG(CONFIG_ECMASCRIPT_SEE, [SEE])
AC_SUBST(SEE_CFLAGS)
CPPFLAGS="$SEE_CFLAGS $CPPFLAGS"
LIBS="$SEE_LIBS $LIBS_X"
AC_TRY_LINK([#include <see/see.h>],[#if SEE_VERSION_API_MAJOR < 2
#error SEE too old
#endif
], cf_result=yes, cf_result=no)
EL_RESTORE_FLAGS
if test "$cf_result" = yes; then
LIBS="$SEE_LIBS $LIBS"
EL_CONFIG(CONFIG_ECMASCRIPT_SEE, [SEE])
AC_SUBST(SEE_CFLAGS)
fi
AC_MSG_RESULT($cf_result)
else
if test -n "$withval" && test "x$withval" != xno; then
AC_MSG_ERROR([SEE not found])
@ -604,18 +610,15 @@ if test "$enable_see" = "yes"; then
AC_MSG_WARN([SEE support disabled])
fi
fi
else
AC_MSG_RESULT(no);
fi
dnl ===================================================================
dnl Check for SpiderMonkey, optional even if installed.
dnl ===================================================================
AC_ARG_WITH(spidermonkey, [ --without-spidermonkey disable SpiderMonkey Mozilla JavaScript engine support],
[if test "$withval" = no; then disable_spidermonkey=yes; fi])
AC_MSG_CHECKING([for SpiderMonkey])
AC_MSG_CHECKING([for SpiderMonkey (1.5 RC3a or later)])
EL_SAVE_FLAGS
cf_result=no
@ -641,7 +644,7 @@ if test -z "$disable_spidermonkey"; then
AC_TRY_LINK([#define XP_UNIX
#include <jsapi.h>],
[JS_GetImplementationVersion()],
[JS_GetReservedSlot(NULL, NULL, 0, NULL)],
cf_result=yes, cf_result=no)
fi
done

View File

@ -9,7 +9,6 @@ Copyright:
This program is free software. You may redistribute it and/or modify it
under the terms of The GNU General Public License, as published by the Free
Software Foundation; either version 2, or (at your option) any later
version. A copy of this license is in the file
/usr/share/common-licenses/GPL.
Software Foundation, specifically version 2 of the License. A copy of this
license is in the file /usr/share/common-licenses/GPL-2.

File diff suppressed because it is too large Load Diff

5
contrib/proxy/Makefile Normal file
View File

@ -0,0 +1,5 @@
all: /tmp/log gen
./gen
gen: gen.c
$(CC) -g -o $@ $<

29
contrib/proxy/README Normal file
View File

@ -0,0 +1,29 @@
This program generate proxy.py - a tool for developers to find bugs offline.
How to use it:
1) make the change in src/network/socket.c and recompile the ELinks
/* To enable logging of tranfers, for debugging purposes. */
#if 0
^^^^^
set this to 1
2) set connection.max_connections = 1
set connection.max_connections_to_host = 1
3) run the ELinks and gather data.
4) revert "#if 1 change" and recompile ELinks.
5) run make in directory with this file. The proxy.py should be generated
and some files with .txt extension.
6) run proxy.py
7) run ELinks and set protocol.http.proxy = localhost:8000
8) repeat previous session, go to the same pages, etc.
If you want to use https use browser scripting to replace
'https' with 'http' in follow_url.
Enjoy,
Witek

177
contrib/proxy/gen.c Normal file
View File

@ -0,0 +1,177 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
struct stat st;
char *file = "/tmp/log";
unsigned char *data;
int counter = 0;
struct {
unsigned char *string;
unsigned char *host;
unsigned char *data;
int length;
} tab[100000]; /* should be enough */
unsigned char header[] =
"#!/usr/bin/env python\n"
"import BaseHTTPServer\n\n";
unsigned char footer[] =
"class Serwer(BaseHTTPServer.BaseHTTPRequestHandler):\n"
"\tdef do_GET(self):\n"
"\t\tglobal slownik\n"
"\t\tof = open(slownik[self.path])\n"
"\t\tprint (self.path)\n"
"\t\tself.wfile.write(of.read())\n"
"\t\tof.close()\n\n"
"\tdef do_POST(self):\n"
"\t\tself.do_GET()\n\n"
"def run(server_class = BaseHTTPServer.HTTPServer, handler_class = Serwer):\n"
"\tserver_address = ('', 8000)\n"
"\thttpd = server_class(server_address, handler_class)\n"
"\thttpd.serve_forever()\n\n"
"run()\n";
static unsigned char *
find(unsigned char *from, unsigned char *key)
{
unsigned char *end = data + st.st_size;
unsigned char *beg;
int l = strlen(key);
for (beg = from;; beg++) {
beg = memchr(beg, key[0], end - beg);
if (!beg)
break;
if (!strncmp(beg, key, l))
break;
}
return beg;
}
static void
parse(void)
{
unsigned char *current = data;
while (1) {
unsigned char *conn = find(current, "CONNECTION:");
unsigned char *get = find(current, "GET /");
unsigned char *post = find(current, "POST /");
unsigned char *host, *space, *http;
size_t enter;
if (counter) {
unsigned char *min = data + st.st_size;
if (conn)
min = conn;
if (get && get < min)
min = get;
if (post && post < min)
min = post;
tab[counter - 1].length = min - http;
}
if (get && post) {
if (get < post) {
current = get + 4;
} else {
current = post + 5;
}
} else {
if (get) {
current = get + 4;
} else if (post) {
current = post + 5;
} else {
return;
}
}
space = strchr(current, ' ');
if (!space)
return;
host = find(space + 1, "Host: ");
if (!host)
return;
*space = '\0';
tab[counter].string = current;
host += 6;
enter = strcspn(host, "\r\n\0");
host[enter] = '\0';
tab[counter].host = host;
http = find(host + enter + 1, "HTTP/");
if (!http)
return;
tab[counter++].data = http;
}
}
static void
dicts(FILE *f)
{
int i;
fprintf(f, "slownik = {\n");
for (i = 0; i < counter - 1; i++) {
fprintf(f, "\t'http://%s%s' : '%d.txt',\n", tab[i].host, tab[i].string, i);
}
for (; i < counter; i++) {
fprintf(f, "\t'http://%s%s' : '%d.txt'\n", tab[i].host, tab[i].string, i);
}
fprintf(f, "}\n\n");
}
static void
save(void)
{
int i;
FILE *f;
for (i = 0; i < counter; i++) {
char buf[12];
snprintf(buf, 12, "%d.txt", i);
f = fopen(buf, "w");
if (!f)
return;
fwrite(tab[i].data, 1, tab[i].length, f);
fclose(f);
}
f = fopen("proxy.py", "w");
if (!f)
return;
fprintf(f, "%s", header);
dicts(f);
fprintf(f, "%s", footer);
fclose(f);
}
int
main(int argc, char **argv)
{
FILE *f;
if (argc > 1)
file = argv[1];
f = fopen(file, "r");
if (!f)
return 1;
stat(file, &st);
data = calloc(1, st.st_size + 1);
if (!data)
return 2;
fread(data, 1, st.st_size, f);
fclose(f);
parse();
save();
return 0;
}

View File

@ -15,7 +15,7 @@ var smartprefixes = {
// If you want to add a smartprefix for another project's CVSweb,
// just create a lambda like this. Aren't high-level languages fun?
cvs: function (x) { return cvsweb ("http://cvsweb.elinks.cz/cvsweb.cgi/", "elinks", x) },
gitweb: function (x) { return gitweb("http://pasky.or.cz/gitweb.cgi", "elinks.git", x) },
gitweb: function (x) { return gitweb("http://repo.or.cz/gitweb.cgi", "elinks.git", x) },
d: "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query",
debcontents: debian_contents,
debfile: debian_file,

View File

@ -55,7 +55,7 @@ function cvsweb (base, project, url)
return base + project + "/" + file
}
/* javascript:gitweb("http://pasky.or.cz/gitweb.cgi", "elinks.git", "%s"); */
/* javascript:gitweb("http://repo.or.cz/gitweb.cgi", "elinks.git", "%s"); */
function gitweb(base, project, url)
{
var parts = url.match(/^(search|summary|shortlog|log|blob|commit|commitdiff|history|tree|tag)(\s(.*))?/);

View File

@ -165,24 +165,11 @@ 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 -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 $@
man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\" \"$(1)\"/" < $@ | \
sed "s/@squote@/\\\\'/g" > $@.tmp && mv $@.tmp $@
#############################################################################
# Build recipies

View File

@ -41,7 +41,7 @@ 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 \
zlib 1.2.0.2 or later For handling compressed documents both locally and \
sent from server.
bzip2 For handling local compressed documents.
OpenSSL or GNU TLS For handling secure HTTP browsing.

View File

@ -17,7 +17,7 @@
.el .ne 3
.IP "\\$1" \\$2
..
.TH "ELINKS.CONF" 5 "ELinks configuration file" "2007-01-06" "ELinks configuration file"
.TH "ELINKS.CONF" 5 "ELinks configuration file" "2007-06-21" "ELinks configuration file"
.SH NAME
elinks.conf \- ELinks configuration file
.SH "SYNOPSIS"
@ -636,7 +636,7 @@ Ignore Cache\-Control and Pragma server headers\&. When set, the document is cac
.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\&.
Period in seconds 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
@ -1378,7 +1378,7 @@ Replacement URI for this smartprefix: %c in the string means the current URL %s
.TP
protocol\&.rewrite\&.default_template <str> (default: "")
Default URI template used when the string entered in the goto dialog does not appear to be a URI or a filename (i\&.e\&. contains no '\&.', \fI:\fR or \fI/\fR characters), and does not match any defined prefixes\&. Set the value to "" to disable use of the default template rewrite rule\&.
Default URI template used when the string entered in the goto dialog does not appear to be a URI or a filename (i\&.e\&. contains no '\&.', \fI:\fR or \fI/\fR characters), and does not match any defined prefixes\&. Set the value to "" to disable use of the default template rewrite rule\&. %c in the template means the current URL %s in the template means the whole string from the goto dialog %0,%1,...,%9 mean the 1st,2nd,...,10th space\-delimited part of %s %% in the template means '%'
.TP
protocol\&.rewrite\&.enable\-dumb [0|1] (default: 1)
@ -1438,7 +1438,7 @@ Terminal type; matters mostly only when drawing frames and dialog box borders:
.TP
terminal\&._template_\&.m11_hack [0|1] (default: 0)
Switch fonts when drawing lines, enabling both local characters and lines working at the same time\&. Makes sense only with linux terminal\&.
Switch fonts when drawing lines, enabling both local characters and lines working at the same time\&. \fIELinks\fR uses this option only if UTF\-8 I/O is disabled and the terminal type is Linux or FreeBSD\&.
.TP
terminal\&._template_\&.utf_8_io [0|1] (default: 0)

View File

@ -17,10 +17,10 @@
.el .ne 3
.IP "\\$1" \\$2
..
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2007-01-06" "ELinks keybindings"
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2007-06-21" "ELinks keybindings"
.SH NAME
elinkskeys \- keybindings for ELinks
.SH "OVERVIEW"
.SH "SYNOPSIS"
Information on how to configure keybinding and overview of the default keybindings\&.
@ -46,7 +46,7 @@ is \fImain\fR, \fIedit\fR, or \fImenu\fR\&. The main keymap is used for general
.TP
<keystroke>
is a case sensitive key, which you can prefix with \fICtrl\-\fR or \fIAlt\-\fR\&. \fICtrl\-\fR 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 \fICtrl\-\fR, \fIAlt\-\fR, or both\&. \fICtrl\-\fR must be followed by an uppercase key\&. See below for a list of valid keys\&.
.TP
<action>
@ -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 \e\e (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 \\\\ (double backslash)\&.
.SH "KEYMAP ACTIONS"
@ -573,7 +573,7 @@ Copy text to clipboard\&.
.TP
cut\-clipboard
Delete text from clipboard\&.
Cut text to clipboard\&.
.TP
delete
@ -893,7 +893,7 @@ Scroll left (\fIscroll\-left\fR)
Go at a specified mark (\fImark\-goto\fR)
.TP
\fI\e\fR
\fI\\\fR
Toggle rendering page as HTML / plain text (\fItoggle\-html\-plain\fR)
.TP
@ -1152,7 +1152,7 @@ Attempt to auto\-complete the input (\fIauto\-complete\fR)
.TP
\fICtrl\-X\fR
Delete text from clipboard (\fIcut\-clipboard\fR)
Cut text to clipboard (\fIcut\-clipboard\fR)
.TP
\fIAlt\-Backspace\fR

View File

@ -10,6 +10,8 @@ When releasing a new version
Write a small changelog highlighting the most important changes. Changes
by new contributors are always important!
- Update NEWS file and commit. Remember to add the new version number!
Don't add the release date yet though; it will be added after the release,
from the date in the mailing list archives.
- Change VERSION in the top of configure.in to hold the new version number.
- Commit only this change.
- Create a signed tag having the version ("ELinks X.X.X") as the subject and

View File

@ -625,12 +625,12 @@ CONFIG_SMALL=no
# Some features are partially supported. Like line breaking between
# double-width characters. There is no other detection for determining when to
# break or not.
# Character conversions are still incomplete for ECMAScript strings (bug 805),
# local file names, and IRIs (RFC 3987).
#
# Note: This UTF-8 support is experimental.
#
# Default: disabled
# Default: enabled
CONFIG_UTF8=no
CONFIG_UTF8=yes

View File

@ -74,7 +74,18 @@ name of your language (in English) so you end up with something like:
{NULL, NULL},
};
1.2 Making the new language file part of ELinks:
1.2 Testing your changes without installing ELinks:
---------------------------------------------------
It is possible to test translation updates without installing ELinks. After
building both ELinks and the po files, simply start ELinks from the top-level
directory in the source tree using:
$ ./src/elinks
It will then load po files from the po/ directory in the source tree.
1.3 Making the new language file part of ELinks:
------------------------------------------------
Finally to make it part of the ELinks distribution send it to one of the
@ -340,7 +351,7 @@ mark (e.g. "~/.elinks") and the translated msgstr do not.
If the language file is already added finally run make to compile and check the
language file for errors and fix any warnings you get. Then patch your changes
and send it to one of the mailinglists or file it as a bug at
<http://bugzilla.elinks.or.cz>.
<http://bugzilla.elinks.cz>.
3. Statistics:

463
po/fr.po

File diff suppressed because it is too large Load Diff

617
po/pl.po

File diff suppressed because it is too large Load Diff

2
src/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
ID
TAGS

View File

@ -38,8 +38,13 @@ vernum.o: $(LIB_O_NAME)
elinks: $(LIB_O_NAME) vernum.o
$(call cmd,link)
# Place the TAGS file in the source directory so that, if the same
# source is built for different configurations in different build
# directories, one doesn't have to remember which of those build
# directories has the most recent TAGS.
TAGS:
find $(srcdir). \( -name "*.[ch]" -o -name "*.inc" \) -print \
cd $(srcdir) \
&& find . \( -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/' \

View File

@ -130,7 +130,7 @@ dlg_format_buttons(struct terminal *term,
mw = 0;
#ifdef CONFIG_UTF8
buttons_width(widget_data1, i2 - i1 + 1, NULL, &mw,
term->utf8);
term->utf8_cp);
#else
buttons_width(widget_data1, i2 - i1 + 1, NULL, &mw);
#endif /* CONFIG_UTF8 */
@ -140,7 +140,7 @@ dlg_format_buttons(struct terminal *term,
mw = 0;
#ifdef CONFIG_UTF8
buttons_width(widget_data1, i2 - i1, NULL, &mw, term->utf8);
buttons_width(widget_data1, i2 - i1, NULL, &mw, term->utf8_cp);
#else
buttons_width(widget_data1, i2 - i1, NULL, &mw);
#endif /* CONFIG_UTF8 */
@ -156,7 +156,7 @@ dlg_format_buttons(struct terminal *term,
for (i = i1; i < i2; i++) {
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
set_box(&widget_data[i].box,
p, *y,
utf8_ptr2cells(widget_data[i].widget->text, NULL)
@ -196,7 +196,7 @@ display_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
if (!color || !shortcut_color) return EVENT_PROCESSED;
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
int button_left_len = utf8_ptr2cells(BUTTON_LEFT, NULL);
int button_right_len = utf8_ptr2cells(BUTTON_RIGHT, NULL);
@ -222,7 +222,7 @@ display_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
? SCREEN_ATTR_UNDERLINE : 0;
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
if (hk_pos >= 0) {
int hk_bytes = utf8charlen(&text[hk_pos+1]);
int cells_to_hk = utf8_ptr2cells(text,
@ -286,7 +286,7 @@ display_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
}
}
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
int text_cells = utf8_ptr2cells(widget_data->widget->text, NULL);
int hk = (widget_data->widget->info.button.hotkey_pos >= 0);

View File

@ -102,7 +102,7 @@ redraw_dialog(struct dialog_data *dlg_data, int layout)
int x, y;
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
titlecells = utf8_ptr2cells(title,
&title[titlelen]);
#endif /* CONFIG_UTF8 */
@ -110,7 +110,7 @@ redraw_dialog(struct dialog_data *dlg_data, int layout)
titlecells = int_min(box.width - 2, titlecells);
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
titlelen = utf8_cells2bytes(title, titlecells,
NULL);
#endif /* CONFIG_UTF8 */
@ -619,7 +619,7 @@ generic_dialog_layouter(struct dialog_data *dlg_data)
int x = 0, y, rw;
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
rw = int_min(w, utf8_ptr2cells(dlg_data->dlg->title, NULL));
else
#endif /* CONFIG_UTF8 */
@ -664,12 +664,12 @@ draw_dialog(struct dialog_data *dlg_data, int width, int height)
draw_shadow(term, &dlg_data->box,
get_bfu_color(term, "dialog.shadow"), 2, 1);
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
fix_dwchar_around_box(term, &dlg_data->box, 0, 2, 1);
#endif /* CONFIG_UTF8 */
}
#ifdef CONFIG_UTF8
else if(term->utf8)
else if (term->utf8_cp)
fix_dwchar_around_box(term, &dlg_data->box, 0, 0, 0);
#endif /* CONFIG_UTF8 */
}

View File

@ -40,7 +40,7 @@ dlg_format_group(struct terminal *term,
int label_padding;
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
if (text && *text)
label_length = utf8_ptr2cells(text, NULL);
else
@ -55,7 +55,7 @@ dlg_format_group(struct terminal *term,
width = CHECKBOX_LEN;
} else if (widget_is_textfield(widget_data)) {
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
width = utf8_ptr2cells(widget_data->widget->data,
NULL);
} else
@ -82,7 +82,7 @@ dlg_format_group(struct terminal *term,
/* Draw text at right of checkbox. */
if (label_length) {
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
int lb = utf8_cells2bytes(
text,
label_length,
@ -108,7 +108,7 @@ dlg_format_group(struct terminal *term,
/* Draw label at left of widget. */
if (label_length) {
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
int lb = utf8_cells2bytes(
text,
label_length,
@ -149,7 +149,7 @@ group_layouter(struct dialog_data *dlg_data)
int n = dlg_data->number_of_widgets - 2;
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
rw = int_min(w, utf8_ptr2cells(dlg_data->dlg->title, NULL));
else
#endif /* CONFIG_UTF8 */

View File

<
@ -271,7 +271,7 @@ display_field_do(struct dialog_data *dlg_data, struct widget_data *widget_data,
#endif /* CONFIG_UTF8 */
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
unsigned char *t = widget_data->cdata;
int p = widget_data->info.field.cpos;
@ -298,9 +298,9 @@ display_field_do(struct dialog_data *dlg_data, struct widget_data *widget_data,
int len, w;
#ifdef CONFIG_UTF8
if (term->utf8 && !hide)
if (term->utf8_cp && !hide)
len = utf8_ptr2cells(text, NULL);
else if (term->utf8)
else if (term->utf8_cp)
len = utf8_ptr2chars(text, NULL);
else
#endif /* CONFIG_UTF8 */
@ -309,7 +309,7 @@ display_field_do(struct dialog_data *dlg_data, struct widget_data *widget_data,
if (!hide) {
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
w = utf8_cells2bytes(text, w, NULL);
#endif /* CONFIG_UTF8 */
draw_text(term, widget_data->box.x, widget_data->box.y,
@ -328,7 +328,7 @@ display_field_do(struct dialog_data *dlg_data, struct widget_data *widget_data,
int x;
#ifdef CONFIG_UTF8
if (term->utf8)
if (term->utf8_cp)
x = widget_data->box.x + len - left;
else
#endif /* CONFIG_UTF8 */
@ -474,7 +474,7 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
case ACT_EDIT_RIGHT:
if (widget_data->info.field.cpos < strlen(widget_data->cdata)) {
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {
unsigned char *next = widget_data->cdata + widget_data->info.field.cpos;
unsigned char *end = strchr(next, '\0');
@ -492,7 +492,7 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
if (widget_data->info.field.cpos > 0)
widget_data->info.field.cpos--;
#ifdef CONFIG_UTF8
if (widget_data->info.field.cpos && term->utf8) {
if (widget_data->info.field.cpos && term->utf8_cp) {
unsigned char *t = widget_data->cdata;
unsigned char *t2 = t;
int p = widget_data->info.field.cpos;
@ -517,7 +517,7 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
case ACT_EDIT_BACKSPACE:
#ifdef CONFIG_UTF8
if (widget_data->info.field.cpos && term->utf8) {
if (widget_data->info.field.cpos && term->utf8_cp) {
/* XXX: stolen from src/viewer/text/form.c */
/* FIXME: This isn't nice. We remove last byte
* from UTF-8 character to detect
@ -559,7 +559,7 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
if (widget_data->info.field.cpos >= cdata_len) goto display_field;
#ifdef CONFIG_UTF8
if (term->utf8) {
if (term->utf8_cp) {