1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

1983 Commits

Author SHA1 Message Date
Witold Filipczyk
68913c8c7d Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
M. Levinson
ebadc9bf9e Additional functionality for Python backend. 2006-10-19 15:21:39 +02:00
Petr Baudis
b52583902f Merge with /srv/git/elinks.git 2006-10-16 23:12:41 +02:00
Petr Baudis
10d72cae7e Revert cfce869a69 (The UTF-8 detection reactivated.)
Total crap - spits out garbage on random terminals when attaching instances
and sometimes hang the attached instance.
2006-10-16 23:12:35 +02:00
Kalle Olavi Niemitalo
0c8d40049f Bug 811: Added test/nbsp.html.
ELinks currently fails this test.  Also, it does not support all the
DOM features used here.  I don't know whether the scripts should be
simplified or ELinks should be enhanced to support them.
2006-10-15 13:37:27 +03:00
Jonas Fonseca
9b5446a025 Fix warning about undefined sscanf on Mac OS X 2006-10-14 05:12:23 +02:00
Laurent MONIN
3e5b4b7adf Fix whitespace goof reported by Miciah on IRC, introduced in
947c1730a6.
2006-10-13 15:08:52 +02:00
Petr Baudis
9c8fff1100 Merge with /srv/git/elinks.git 2006-10-12 23:44:12 +02:00
Petr Baudis
71eebf1cc7 Compensate for glibc not defining wcwidth() when _XOPEN_SOURCE is not set 2006-10-12 23:43:49 +02:00
Witold Filipczyk
8d6a73646b Commented code related to "If-Modified-Since" (infinite loop). 2006-10-12 14:07:58 +02:00
Witold Filipczyk
cfce869a69 The UTF-8 detection reactivated. It trashes slightly screen,
but works probably.
2006-10-12 13:13:10 +02:00
Laurent MONIN
e4ce1645f0 French translation was updated. 2006-10-12 11:15:33 +02:00
Petr Baudis
647db326fb Merge with /srv/git/elinks.git 2006-10-12 11:11:05 +02:00
Petr Baudis
f06aed0d8f More verbose assert messages for invalid h1/h2 in POST buffer 2006-10-12 11:10:41 +02:00
Laurent MONIN
49c5299f89 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-10-12 09:32:44 +02:00
Witold Filipczyk
eef961e206 Detection of UTF-8 mode doesn't work well on slave terminals. 2006-10-11 21:13:43 +02:00
Laurent MONIN
947c1730a6 Fix crash due to untested null pointer occuring when doing
HTTP_PROXY=8080:proxy.ucv.cl elinks http://wwww.google.cl. Thanks to
Karel Zak.
2006-10-11 14:44:39 +02:00
Laurent MONIN
09991b59f1 Partial Afrikaans translation was added. Thanks to Friedel Wolff. 2006-10-11 14:39:04 +02:00
Witold Filipczyk
cc6c59d932 Handling If-Modified-Since. 2006-10-08 16:24:47 +02:00
Miciah Dashiel Butler Masters
7f0fb0440c Secure file saving: restore umask after _all_ failure conditions
The secure file saving code plays some shenanigans with the umask.
Previously, the code could fail to restore the old umask when certain libc
calls failed: malloc, mkstemp, fdopen, and fopen. This resulted in
unrelated code creating files with the wrong umode. Specifically, the
download code's automatic directory creation was creating directories
without the execute permission bit.

Thanks to Quiznos for reporting and helping to track the problem down.
2006-10-01 14:57:47 +00:00
Witold Filipczyk
461787013b Revert commit 7cb91c3213. Doble glyphs should
be displayed correctly.
2006-10-01 16:08:52 +02:00
Laurent MONIN
e86e1d0fa3 Trim some trailing whitespaces. 2006-09-29 00:07:54 +02:00
Laurent MONIN
0b58b99d30 Use @current_tab for current tab. 2006-09-28 23:58:26 +02:00
Laurent MONIN
3f94687e28 Use @tabs_count instead of mixed tabs_count, num_tabs or tabs. 2006-09-28 23:50:46 +02:00
Kalle Olavi Niemitalo
bac6e76c23 switch_to_tab: Prevent "tab number out of range" assertion failure.
To reproduce:
- Start ELinks.
- Enable the ui.tabs.wraparound option.
- Press t to open a second tab.
- Go to http://elinks.cz/ in the second tab.
- Press 3< to step three tabs to the left.

In the statement "tab = tabs + tab % tabs;", tab == -2 and tabs == 2.
So tab % tabs == 0 and tab becomes 2, which is out of range.

The new version calls get_opt_bool even if the tab parameter is already in
range, but the cost should be negligible compared to the redraw_terminal()
call that follows.
2006-09-27 21:29:27 +03:00
Witold Filipczyk
86bc6a534b Should be visible not location. 2006-09-26 19:40:59 +02:00
Kalle Olavi Niemitalo
c33d195ff4 Garbage-collect SMJS objects before flushing caches. 2006-09-25 23:43:32 +03:00
Kalle Olavi Niemitalo
7a1644c252 List "Triggered When" before "Arguments" in the event template.
That's the order in all existing event descriptions.
2006-09-25 22:58:38 +03:00
Kalle Olavi Niemitalo
538e8eb8a5 List events in alphabetical order. 2006-09-25 22:46:48 +03:00
Kalle Olavi Niemitalo
304f5fa1ea comment fix (__STDC_ISO_10646__, not __STDC_ISO_10646) 2006-09-25 22:24:56 +03:00
Kalle Olavi Niemitalo
86ed79deaf Use wcwidth if available and applicable.
(If wchar_t is not Unicode, then it is not applicable.)
2006-09-24 23:56:12 +03:00
Kalle Olavi Niemitalo
4a5af7fd26 Bug 381: Store codepage-to-Unicode mappings as dense arrays.
Previously, each mapping between a codepage byte and a Unicode
character was stored as a struct table_entry, which listed both the
byte and the character.  This representation may be optimal for sparse
mappings, but codepages map almost every possible byte to a character,
so it is more efficient to just have an array that lists the Unicode
character corresponding to each byte from 0x80 to 0xFF.  The bytes are
not stored but rather implied by the array index.  The tcvn5712 and
viscii codepages have a total of four mappings that do not fit in the
arrays, so we still use struct table_entry for those.

This change also makes cp2u() operate in O(1) time and may speed up
other functions as well.

The "sed | while read" concoction in Unicode/gen-cp looks rather
unhealthy.  It would probably be faster and more readable if rewritten
in Perl, but IMO that goes for the previous version as well, so I
suppose whoever wrote it had a reason not to use Perl here.

Before:

   text	   data	    bss	    dec	    hex	filename
  38948	  28528	   3311	  70787	  11483	src/intl/charsets.o
 500096	  85568	  82112	 667776	  a3080	src/elinks

After:

   text	   data	    bss	    dec	    hex	filename
  31558	  28528	   3311	  63397	   f7a5	src/intl/charsets.o
 492878	  85568	  82112	 660558	  a144e	src/elinks

So the text section shrank by 7390 bytes.

Measured on i686-pc-linux-gnu with: --disable-xbel --disable-nls
--disable-cookies --disable-formhist --disable-globhist
--disable-mailcap --disable-mimetypes --disable-smb --disable-mouse
--disable-sysmouse --disable-leds --disable-marks --disable-css
--enable-small --enable-utf-8 --without-gpm --without-bzlib
--without-idn --without-spidermonkey --without-lua --without-gnutls
--without-openssl CFLAGS="-Os -ggdb -Wall"
2006-09-24 16:55:29 +03:00
Kalle Olavi Niemitalo
0e88f8ba28 Bug 381: New macro is_cp_ptr_utf8(cp_ptr).
This does not significantly change the generated code but should make
the next commit more readable.
2006-09-24 13:33:58 +03:00
Kalle Olavi Niemitalo
e1fee49fb7 Bug 381: Halve sizeof(struct table_entry).
Before:

   text	   data	    bss	    dec	    hex	filename
  54920	  28528	   3311	  86759	  152e7	src/intl/charsets.o
 516064	  85568	  82112	 683744	  a6ee0	src/elinks

After:

   text	   data	    bss	    dec	    hex	filename
  38958	  28528	   3311	  70797	  1148d	src/intl/charsets.o
 500112	  85568	  82112	 667792	  a3090	src/elinks

So the text section shrank by 15962 bytes.

Measured on i686-pc-linux-gnu with: --disable-xbel --disable-nls
--disable-cookies --disable-formhist --disable-globhist
--disable-mailcap --disable-mimetypes --disable-smb --disable-mouse
--disable-sysmouse --disable-leds --disable-marks --disable-css
--enable-small --enable-utf-8 --without-gpm --without-bzlib
--without-idn --without-spidermonkey --without-lua --without-gnutls
--without-openssl CFLAGS="-Os -ggdb -Wall"
2006-09-24 12:47:00 +03:00
Kalle Olavi Niemitalo
62d6db44aa Bug 381: Make codepage data const.
Before:

   text	   data	    bss	    dec	    hex	filename
  25726	  62992	   3343	  92061	  1679d	src/intl/charsets.o
 653856	 120020	  82144	 856020	  d0fd4	src/elinks

After:

   text	   data	    bss	    dec	    hex	filename
  60190	  28528	   3311	  92029	  1677d	src/intl/charsets.o
 688320	  85556	  82112	 855988	  d0fb4	src/elinks

So 34464 bytes were moved from the data section to the text section
and should be more likely to get shared between ELinks processes.

Measured on i686-pc-linux-gnu with: --disable-xbel --disable-nls
--disable-cookies --disable-formhist --disable-globhist
--disable-mailcap --disable-mimetypes --disable-smb --disable-mouse
--disable-sysmouse --disable-leds --disable-marks --disable-css
--enable-small --enable-utf-8 --without-gpm --without-bzlib
--without-idn --without-spidermonkey --without-lua --without-gnutls
--without-openssl CFLAGS="-O2 -ggdb -Wall"
2006-09-24 11:59:23 +03:00
Kalle Olavi Niemitalo
359b131c6b Bug 810: Add a few comments pointing to the bug. 2006-09-24 00:21:03 +03:00
Kalle Olavi Niemitalo
677e5c7adc Callers of cp_to_unicode() assert that it didn't return UCS_NO_CHAR.
UCS_NO_CHAR here means the input was too short.  Because the strings
generally come from the source code or from PO files, they should not
end in the middle of a character.  However, the whole character may be
missing if the string is empty.  So select_button_by_key() now checks
for that case separately.

UCS_NO_CHAR must not be passed to unicode_fold_label_case() because
the result is undefined.
2006-09-17 19:54:37 +03:00
Kalle Olavi Niemitalo
388b1b0efd Define datarootdir in Makefile.config.in, for better Autoconf compatibility.
With Autoconf 2.60a, the default values of datadir, infodir, and
mandir refer to ${datarootdir}.  If Makefile.config.in does not define
datarootdir, Autoconf detects this and expands ${datarootdir} when it
substitutes expressions like @datadir@, but it also outputs the
following warning:

config.status: creating Makefile.config
config.status: WARNING:  /home/Kalle/src/elinks/Makefile.config.in seems to ignore the --datarootdir setting

According to a comment in config.status, "This hack should be removed
a few years after 2.60."  So it seems best to prepare for that now by
defining datarootdir = @datarootdir@ in Makefile.config.in.  Earlier
versions of Autoconf may leave that line unexpanded; but because the
makefiles do not directly refer to ${datarootdir}, there's no harm.
2006-09-17 17:55:53 +03:00
Kalle Olavi Niemitalo
9818f665a8 Fix spelling in the "Python support is incomplete" warning. 2006-09-17 17:32:07 +03:00
Kalle Olavi Niemitalo
9a695bfb0c Explain why the configure script tries to use -rdynamic. 2006-09-17 17:28:57 +03:00
Kalle Olavi Niemitalo
9c94a896b7 Internally rename the utf_8 codepage to utf8. 2006-09-17 16:23:17 +03:00
Kalle Olavi Niemitalo
92cb452a9e Rename CONFIG_UTF_8 to CONFIG_UTF8.
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files.  They will have to be changed to
"CONFIG_UTF8=yes".  This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.

The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Kalle Olavi Niemitalo
e8462980e5 Change "utf_8" to "utf8" in most identifiers.
Suggested by Miciah on #elinks.

What was renamed:
  add_utf_8                      => add_utf8
  cp2utf_8                       => cp2utf8
  encode_utf_8                   => encode_utf8
  get_translation_table_to_utf_8 => get_translation_table_to_utf8
  goto invalid_utf_8_start_byte  => goto invalid_utf8_start_byte
  goto utf_8                     => goto utf8
  goto utf_8_select              => goto utf8_select
  terminal_interlink.utf_8       => terminal_interlink.utf8
  utf_8_to_unicode               => utf8_to_unicode

What was not renamed:
  terminal._template_.utf_8_io option, TERM_OPT_UTF_8_IO
    Compatibility with existing elinks.conf files would require an alias.
  --enable-utf-8
    Because the name of the charset is UTF-8, --enable-utf-8 looks better
    than --enable-utf8.
  CONFIG_UTF_8
    Will be renamed in a later commit.
  Unicode/utf_8.cp, table_utf_8, aliases_utf_8
    Will be renamed in a later commit.
2006-09-17 16:06:22 +03:00
Kalle Olavi Niemitalo
b42f0ba153 Bug 772: Recognize ESC [ Z as Shift-Tab, and bind it like Alt-Tab by default. 2006-09-17 12:38:23 +03:00
Kalle Olavi Niemitalo
c6f871b3af terminal doc: Explain the "ECMA-48 Terminfo $TERM" comments. 2006-09-17 12:23:34 +03:00
Kalle Olavi Niemitalo
07cee4edee sig_tstp: Use _exit() rather than exit(). 2006-09-10 23:38:02 +03:00
Kalle Olavi Niemitalo
57a9871ea1 Prepend $(top_builddir) to @INSTALL@ if it is relative.
Reported to elinks-users on 2006-08-23.
2006-09-10 08:57:55 +03:00
Kalle Olavi Niemitalo
d1fb65120d "Resize terminal" tries to use the window size increment.
Previously, the window sizes computed for xterm were a few pixels off,
and this could result in too few character cells being displayed.
This new version tries to read the window size increment from the
WM_NORMAL_HINTS property set by xterm, and base the computations on
that.
2006-09-09 22:47:48 +03:00
Witold Filipczyk
15a5d91d2b Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-09-03 15:56:10 +02:00
Laurent MONIN
1a5f37bfcb French translation was updated. 2006-09-03 15:22:38 +02:00