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

190 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
3e16757753 Bug 784: Keep form_control.default_value in the document charset.
Previously, html_special_form_control converted
form_control.default_value to the terminal charset, and init_form_state
then copied the value to form_state.value.  However, when CONFIG_UTF8
is defined and UTF-8 I/O is enabled, form_state.value is supposed to
be in UTF-8, rather than in the terminal charset.

This mismatch could not be conveniently fixed in
html_special_form_control because that does not know which terminal is
being used and whether UTF-8 I/O is enabled there.  Also, constructing
a conversion table from the document charset to form_state.value could
have ruined renderer_context.convert_table, because src/intl/charsets.c
does not support multiple concurrent conversion tables.

So instead, we now keep form_control.default_value in the document
charset, and convert it in the viewer each time it is needed.  Because
the result of the conversion is kept in form_state.value between
incremental renderings, this shouldn't even slow things down too much.

I am not implementing the proper charset conversions for the DOM
defaultValue property yet, because the current code doesn't have
them for other string properties either, and bug 805 is already open
for that.
2007-05-20 14:05:39 +02:00
Kalle Olavi Niemitalo
ec5d0cf0a7 Apply form history to fs->value, not fc->default_value.
I am going make fc->default_value use the charset of the document, and
recoding the string from the form history to that might lose characters.

This change also affects what ECMAScript sees in the defaultValue property.
<http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-26091157>
says it should represent the HTML "value" attribute, so changing it
based on form history is not appropriate.
2007-05-20 14:05:32 +02:00
Kalle Olavi Niemitalo
53cd0dcc95 Document the charset of form_state.value for FC_TEXTAREA. 2007-05-20 14:05:17 +02:00
Witold Filipczyk
e887efc611 onsubmit: Reverted commit fa93d05b7e.
I don't remember why I cleared "returns", but it doesn't work
with www.hypermedia.pl/altkom/ and probably with many more sites.
2007-05-19 18:47:20 +02:00
Laurent MONIN
a4f1b7e489 Mark all module names for translation and include needed header files. 2007-05-01 20:20:15 +02:00
Kalle Olavi Niemitalo
7e71f929af Cast the NULL argument of straconcat to unsigned char *.
straconcat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).

Many places pass string literals of type char * to straconcat.  This
is in principle also a violation, but I'm ignoring it for now because
if it becomes a problem with some C implementation, then so will the
use of unsigned char * with printf "%s", which is so widespread in
ELinks that I'm not going to try fixing it now.
2007-05-01 20:05:04 +02:00
Kalle Olavi Niemitalo
33b8f7175e Cast variadic arguments of add_to_ml to void *.
getml reads the args with va_arg(ap, void *), and the NULL macro in
particular may have the wrong type.
2007-05-01 20:04:57 +02:00
Kalle Olavi Niemitalo
d00d702e7d Fix compiler errors without HAVE_VARIADIC_MACROS. 2007-05-01 20:04:10 +02:00
Kalle Olavi Niemitalo
d2e806b611 textarea_edit: Cast size_t fx_maxlength to match "%u". 2007-05-01 19:58:35 +02:00
Witold Filipczyk
2a3be5260a forms: Buttons should not submit forms.
This reverts Commit: 6fe1a431f1
    Sometimes scripts submit forms using buttons
I don't remember why I did previous change, but it was broken.
2007-04-18 16:19:18 +02:00
Witold Filipczyk
426e5f2b3b ecamscript: Delayed submit_given_form.
This probably fixes many bugs.
2007-03-22 09:52:52 +01:00
Witold Filipczyk
1a8aae50fb speech: Ignore frame chars. 2007-03-19 18:00:59 +01:00
Witold Filipczyk
b6e862f539 forms: allow submit empty forms
Empty forms like this:
<form name="aaa" action="tralalala"></form>
is used by www.mbank.com.pl.
2007-03-13 13:53:46 +01:00
Witold Filipczyk
0f58529b7d ecmascript: Added onchange hook for SELECT.
It works, but not for test case yet.
2007-03-12 21:03:24 +01:00
Witold Filipczyk
d008728ab0 festival: Drop MAX_LINE_LENGTH
Limit number of bytes to be written by PIPE_BUF.
2007-03-12 17:01:55 +01:00
Witold Filipczyk
9362dfb9ae festival: Use the terminal codepage for the speech output.
Also limit the number of bytes written do the pipe to PIPE_BUF.
The configuration of the speech engine (proper encoding, voice, etc.)
is left to the user.
2007-03-10 19:21:17 +01:00
Kalle Olavi Niemitalo
44852d9cba festival: Assert that writes are not short. Add comments. 2007-03-10 15:38:57 +01:00
Witold Filipczyk
9465425b16 festival: 240 chars should be enough for line length. 2007-03-07 17:49:03 +01:00
Witold Filipczyk
3a56964990 festival: do not segfault when closing current tab 2007-03-07 10:43:25 +01:00
Witold Filipczyk
0bc767fed4 Merge with master.
Conflicts resolved by copying files of master branch.
2007-03-06 19:09:31 +01:00
Laurent MONIN
86686983c0 save_textarea_file(): do not open file for writing if not needed. Patch
by Alexey Tourbin.
2007-03-05 21:48:42 +01:00
Laurent MONIN
ecce8bfa91 save_textarea_file(): handle return values of fwrite() and fclose(). Patch
by Alexey Tourbin.
2007-03-05 21:47:09 +01:00
Laurent MONIN
1e00f2d10d save_textarea_file(): cleanup handling of error, closing descriptors
and unlinking created file. Patch by Alexey Tourbin.
2007-03-05 21:44:58 +01:00
Laurent MONIN
12ec62810b save_textarea_file(): h -> fd, file -> fp. Idea by Alexey Tourbin. 2007-03-05 21:41:17 +01:00
Laurent MONIN
31865ef953 Fix gcc warning: value computed is not used. Patch by Alexey Tourbin. 2007-03-05 21:11:19 +01:00
Witold Filipczyk
0da23da6b2 Added espeak as another speech synthesis engine. 2007-03-03 13:55:25 +01:00
Witold Filipczyk
8bb34f124f Merge with master 2007-02-12 13:00:11 +01:00
Witold Filipczyk
c2d1952a08 accesskey: start iterating with next link.
Rotating between links with the same accesskey works.
2007-02-11 09:21:35 +01:00
Witold Filipczyk
5008fb697d Accesskey didn't work as it should. 2007-02-10 22:12:27 +01:00
Miciah Dashiel Butler Masters
93aea42b96 Unhighlight previously selected link when using goto-mark
In goto_mark, copy the current_link of the old view state to the
old_current_link of the new view state so that clear_link will properly
clear the highlight for that link.

This fixes a bug introduced with the removal of link_bg in commit
c91c763d49.
2007-02-04 23:13:39 +00:00
Kalle Olavi Niemitalo
2e5488ba3d option_changed: Merge the 2nd and 3rd parameter.
All callers were passing the same value for both.
2007-01-27 19:52:49 +02:00
Kalle Olavi Niemitalo
f4709c3794 Bug 882: Replace C1 controls with spaces in UTF-8 to the terminal. 2007-01-27 11:12:22 +02:00
Witold Filipczyk
4d7c491a22 Missing include. 2007-01-07 21:41:46 +01:00
Witold Filipczyk
ff2e55c647 Merge with master 2007-01-07 16:03:24 +01:00
Kalle Olavi Niemitalo
f796051b4c Bug 921, add_document_to_string: Fixed the UTF-8 half of the code.
* Recompute the pos variable for each cell, rather than just once per line.
  This fixes the bug that only the first cell was being examined.

* Moved the bulk of the code outside the "if (frame && data >= 176 &&
  data < 224)" conditional.  This fixes the bug that only frame
  characters were being added to the string.

* If the cell has UCS_NO_CHAR in it, don't add that to the string.

* Call encode_utf8 even for characters that originated from a frame.
  This does not matter yet but will be correct if the function is
  later changed to use the Unicode line-drawing characters for frames.
2007-01-07 00:09:34 +02:00
Witold Filipczyk
1e8f8aa4a6 warning: ctext is used only with CONFIG_UTF8. 2007-01-03 21:55:39 +02:00
Witold Filipczyk
2109be1587 warning: ctext is used only with CONFIG_UTF8. 2007-01-03 18:18:56 +01:00
Witold Filipczyk
07ea72242e Merge with master 2007-01-02 22:09:51 +01:00
Kalle Olavi Niemitalo
ef96caad01 Make u2cp and u2cp_no_nbsp return a pointer to const. 2007-01-02 20:08:59 +02:00
Witold Filipczyk
7a424fca7a Merge with master 2006-12-30 13:45:33 +01:00
Miciah Dashiel Butler Masters
896cdab771 Re-use @fs in activate_link instead of introducing a new local variable
This optimisation is made possible by commit
15dce57bc9.
2006-12-30 11:17:43 +00:00
Witold Filipczyk
91be2ea6b8 Use popen for flite. 2006-12-29 00:21:30 +01:00
Witold Filipczyk
60fc3bd04f '' is used instead of "" to quote text for the flite.
With this change executing an arbitrary code is not possible.
At least, I think so.
2006-12-28 18:48:20 +01:00
Witold Filipczyk
e965d07055 speech: added flite - the alternative synthesis engine.
Added the document.speech.system option:
0 - festival
1 - flite

Flite is faster and uses less memory than Festival.
2006-12-26 22:40:22 +01:00
Witold Filipczyk
87702bd491 Merge with master 2006-12-25 12:39:49 +01:00
Kalle Olavi Niemitalo
c56fb7d630 Bug 871: Fall back to 16 colors if color_mode is unsupported.
There may currently be no way to select an unsupported mode,
but the next commit will change that.
2006-12-25 11:25:06 +02:00
Witold Filipczyk
c83fd84900 Merge with master 2006-12-23 13:22:44 +01:00
Kalle Olavi Niemitalo
15dce57bc9 Bug 908, activate_link: Set fs->state before the fs pointer becomes invalid. 2006-12-23 02:11:01 +02:00
Witold Filipczyk
c187df9a0a Small comment according to UTF-8. 2006-12-11 20:55:22 +01:00
Witold Filipczyk
f260691ac4 Set nonblocking mode for output. 2006-12-11 20:51:32 +01:00