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

1416 Commits

Author SHA1 Message Date
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
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
c961564d0b SEE: use keystr as return value. Killed warning. 2006-09-03 13:21:23 +02:00
Kalle Olavi Niemitalo
a01be8bd6b UTF-8: Stepping functions set *count even if an assertion fails.
Previously, utf8_step_forward() and utf8_step_backward() left *count
unchanged if some parameter was invalid.  Now, they properly store 0.
This flaw had no effect in practice, because all current callers pass
count=NULL, and invalid parameters shouldn't be used anyway.
2006-09-03 03:08:56 +03:00
Kalle Olavi Niemitalo
86c9cb01ba add_accesskey_to_string: Add the Alt modifier to the string, too.
The link information window will now display e.g. "(Alt-f)" rather
than just "(f)", becoming easier to understand.
2006-09-03 00:12:34 +03:00
Kalle Olavi Niemitalo
cc6939b9f8 UTF-8: Don't update form_state.state_cell if it is not used.
FC_TEXT, FC_PASSWORD, and FC_FILE do not use state_cell.
FC_TEXTAREA does use it.
2006-09-02 23:16:32 +03:00
Kalle Olavi Niemitalo
8d77387f6f UTF-8: Fix scrolling of input fields.
form_state.state_cell is no longer used for FC_TEXT, FC_PASSWORD, nor FC_FILE.
Instead, get_link_cursor_offset() computes the cell with utf8_ptr2chars
(a new function) or utf8_ptr2cells.  This shouldn't slow down ELinks too
much, as it's done only for the selected link and only once per redraw.

The left side of a scrolled input field is always aligned at a
character boundary.  The right side might not be.
2006-09-02 23:03:45 +03:00
Kalle Olavi Niemitalo
92845d0b56 UTF-8: Reformat get_link_cursor_offset() a little. 2006-09-02 21:48:30 +03:00
Kalle Olavi Niemitalo
e2685ae7b2 New function colspan_is_in_box() 2006-09-02 21:48:19 +03:00
Kalle Olavi Niemitalo
216495188a UTF-8: New functions for stepping forward and backward in a string. 2006-09-02 21:48:03 +03:00
Kalle Olavi Niemitalo
a8c573a174 viewer: Document some members of struct form_state.
The new comments describe how the members were apparently intended to
be used.  However, the implementation does not actually work when
CONFIG_UTF_8 is defined, and the current semantics do not even allow
an efficient implementation of long (mostly scrolled out) strings.
2006-09-02 21:17:05 +03:00
Kalle Olavi Niemitalo
2d19e5ed94 Change elinks.or.cz to elinks.cz and one i.e. to e.g. in option docs.
Some other instances of elinks.or.cz still remain in the tree.
2006-09-02 17:50:53 +03:00
Witold Filipczyk
d9037cc4c3 Small comment about UTF-8 detection. 2006-09-01 21:06:08 +02:00
Witold Filipczyk
c1c494bd4b Preserved Linux console mode. When console was in one char mode, restore it.
When console was in UTF-8 mode, restore it, too.
2006-08-27 14:18:02 +02:00
Kalle Olavi Niemitalo
8850d85998 ECMAScript: If accessKey is a surrogate, throw an error when reading it.
Surrogates are now treated the same way as out-of-range characters
like U+110000; if a link has such an access key, then the ECMAScript
accessKey property cannot be read.  It seems currently impossible to
set such an access key though, because accesskey_string_to_unicode()
doesn't support multibyte characters yet.
2006-08-27 11:45:11 +03:00
Kalle Olavi Niemitalo
55212827c7 Outdent labels as instructed in doc/hacking.txt.
Reported by Jonas Fonseca.

Also add an empty line above the label in init_tab; but there are
still several labels elsewhere that don't have empty lines above them.
2006-08-27 10:44:36 +03:00
Witold Filipczyk
9597d403ee True color mode dumps. TODO: UTF-8 2006-08-26 20:04:09 +02:00
Witold Filipczyk
9d4b68a26b Adjusted max values for true color dumps. 2006-08-26 20:03:30 +02:00
Witold Filipczyk
7a84967453 Unification. Removed trailing '\n' from last line. 2006-08-26 19:34:14 +02:00
Witold Filipczyk
d299501076 Avoided white on white and similar cases in true color mode. 2006-08-26 19:21:08 +02:00
Witold Filipczyk
a094bddd1b Removed dead code. Add suffix _256 to TERM_COLOR_(BACK|FORE)GROUND. 2006-08-26 19:05:31 +02:00
Kalle Olavi Niemitalo
be7526d00a terminal UTF-8: Reject code points reserved for UTF-16 surrogates.
Those code points are allowed in CESU-8 but not in UTF-8.
2006-08-25 22:25:55 +03:00
Kalle Olavi Niemitalo
e333fb37ab terminal UTF-8: Have an array for the interlink->utf_8.min values.
The previous scheme incorrectly accepted 0xC1 0x80 as U+0040.
That could have been fixed by tweaking the loop, but the constant
array is surely easier to verify.
2006-08-25 22:20:33 +03:00
Kalle Olavi Niemitalo
38fe5b72f7 Define and use macros for handling UTF-16 surrogates. 2006-08-24 23:30:41 +03:00
Jonas Fonseca
b9d66bd9bd Fix compilation on Minix3
- Include arpa/inet.h to get hton* ntoh* functions.
 - Use socklen_t instead of int.
 - Try to define PF_INET to AF_INET if it doesn't exist.

Reported-by: Andy Tanenbaum <ast@cs.vu.nl>
2006-08-22 22:18:00 +02:00
Jonas Fonseca
0ae69652dd Define SCREEN_COLOR_SIZE to hold the number of bytes in screen_char->color 2006-08-20 21:24:20 +02:00
Kalle Olavi Niemitalo
2d898272c1 ECMAScript: Preserve all of Unicode when setting the accessKey property.
Well, almost all.  U+0000 cannot be used because ELinks thinks that
means the link has no access key.
2006-08-20 17:40:27 +03:00
Kalle Olavi Niemitalo
45b194d1e7 ECMAScript: Fix previous careless SEE changes. 2006-08-20 17:36:06 +03:00
Witold Filipczyk
77d7741726 Fixed transparency in true color mode. 2006-08-20 15:19:25 +02:00
Witold Filipczyk
60544f748e Fixed issue with CONFIG_TRUE_COLOR and 16 colors mode. inline functions used
instead of macros. Still problems with transparency in true color mode.
2006-08-20 14:51:06 +02:00
Kalle Olavi Niemitalo
00a5b88371 ECMAScript: Preserve all of Unicode when reading the accessKey property.
Setting the property does not yet support Unicode.
2006-08-20 13:37:03 +03:00
Kalle Olavi Niemitalo
245c8cb020 parse_keystroke: Fold the case of Ctrl-letter after read_key(), not before. 2006-08-20 13:07:57 +03:00
Kalle Olavi Niemitalo
35290f92e9 parse_keystroke: Fold the case of Ctrl-letter only if the letter is ASCII. 2006-08-20 13:05:47 +03:00
Kalle Olavi Niemitalo
e054a15960 Change the description of the connection.try_ipv4 option.
Use "e.g." rather than "i.e." because the syntax cannot be deduced
from the preceding text.
2006-08-20 13:04:00 +03:00
Witold Filipczyk
13dc5f01ea Note about efficiency. I know that normal 16 color mode is broken (menu).
Maybe someone knows how to fix it.
2006-08-19 23:57:50 +02:00
Witold Filipczyk
4f78b0dda1 True color mode. See new konsole.
TODO: dump
2006-08-19 23:39:40 +02:00
Kalle Olavi Niemitalo
0748ee8c92 UTF-8: Split UCS_REPLACEMENT_CHARACTER off UCS_NO_CHAR.
In the previous version, invalid UTF-8 from a terminal caused
UCS_NO_CHAR (0xFFFFFFFD) to be stored in a term_event_key_T, resulting
in -3 which was then incidentally treated as an unassigned special key.

Now, invalid UTF-8 is instead mapped to UCS_REPLACEMENT_CHARACTER
and treated as a character.  The fact that handle_interlink_event
calls term_send_ucs when it receives invalid UTF-8 makes it pretty
clear that this is how it was intended.

src/viewer/text/link.c (not changed in this commit) already referred
to UCS_REPLACEMENT_CHARACTER in a comment even though it was not
previously defined.
2006-08-19 13:35:21 +03:00
Kalle Olavi Niemitalo
dd22535b8c config: Change an error message in the keybinding manager.
The message appears when the user has selected e.g. "Main mapping"
rather than an action inside it.  Because the main mapping is a keymap,
ELinks must not tell the user to select a keymap.
2006-08-19 10:40:30 +03:00
Witold Filipczyk
8615cb529e Added output parameter to the get_filesize_from_RETR. It indicates
whether we ought to add the conn->progress->start to
the conn->est_length. Currently displaying resuming works correctly with
ftp.task.gda.pl and ftp.pld-linux.org.
2006-08-19 09:11:53 +02:00
Witold Filipczyk
77470526ba vsftpd shows total filesize, so I commented out addition.
I know that this is not correct for every server.
Show me ftp sites, where resuming displays wrong filesize.
2006-08-19 00:06:04 +02:00
Miciah Dashiel Butler Masters
e53b7416d6 Fix -dump with charsets other than UTF-8
Restring the spaghetti in dump_to_file to fix a bug that was introduced
in commit 2a6125e3d0 whereby when
document.dump.codepage != "utf-8", the document itself was not output,
only the references list.
2006-08-17 05:16:08 +00:00
Jonas Fonseca
c8c8325092 Fix assertion failure related to closing all tabs but the current
Decrement term->current_tab before calling delete_window() instead of after
deleting all backgrounded tabs, so get_tab_by_number() will see a
consistent value.
2006-08-14 16:12:54 +02:00
Miciah Dashiel Butler Masters
0cca8d4af0 Call set_screen_dirty in draw_link
I dropped this in c91c763d49, but it seems
necessary to fix some drawing artefacts exhibited with a local patch.
2006-08-14 07:59:10 +00:00
Jonas Fonseca
8a8fc52eec cp_to_unicode: Simplify and cleanup 2006-08-14 02:19:44 +02:00
Jonas Fonseca
c5005ceeb3 Merge with http://www.iki.fi/kon/2006/elinks.git#ucs_kbdbind 2006-08-14 02:14:04 +02:00