1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-19 01:36:33 -04:00
Commit Graph

2302 Commits

Author SHA1 Message Date
Witold Filipczyk
7116daf43e 1038: Remove remembering last 8 URLs. It did not work.
Enable the rate limiting of opening new windows in SEE
to be consistent with SpiderMonkey.
Fixed a possible memleak (the frame variable).
2008-07-21 00:39:30 +03:00
Kalle Olavi Niemitalo
327fc1e46e 1034: NEWS, comments, and tests 2008-07-20 14:34:12 +03:00
Kalle Olavi Niemitalo
b9d48ad7e8 1034: Initialize l in deflate_read to shut up GCC
Avoid this warning:

      [CC]   src/encoding/deflate.o
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.12/src/encoding/deflate.c: In function ‘deflate_read’:
/home/Kalle/src/elinks-0.12/src/encoding/deflate.c:96: warning: ‘l’ may be used uninitialized in this function
2008-07-20 14:34:11 +03:00
Witold Filipczyk
e213a91bad 1034: Fixed deflate decompression.
First try decompress in zlib format.
If this fails, restart with the raw deflate.
Works for both blogs.msdn.com and for URL of the bug 1034.
2008-07-20 13:58:11 +03:00
Kalle Olavi Niemitalo
83ccaa3673 Bug 698: Keep forms contiguous and non-overlapping and start from 0.
In document.forms, each struct form has form_num and form_end members
that reserve a subrange of [0, INT_MAX] to that form.  Previously,
multiple forms in the list could have form_end == INT_MAX and thus
overlap each other.  Prevent that by adjusting form_end of each form
newly added to the list.

Revert 438f039bda,
"check_html_form_hierarchy: Old code was buggy.", which made
check_html_form_hierarchy attach controls to the wrong forms.
Instead, construct the dummy form ("for those Flying Dutchmans") at
form_num == 0 always before adding any real forms to the list.
This prevents the assertion failure by ensuring that every possible
form_control.position is covered by some form, if there are any forms.

Add a function assert_forms_list_ok, which checks that the set of
forms actually covers the [0, INT_MAX] range without overlapping,
as intended.  Call that from check_html_form_hierarchy to detect
any corruption.

I have tested this code (before any cherry-picking) with:
- bug 613 attachment 210: didn't crash
- bug 714 attachment 471: didn't crash
- bug 961 attachment 382: didn't crash
- bug 698 attachment 239: all the submit buttons showed the right URLs
- bug 698 attachment 470: the submit button showed the right URL

(cherry picked from commit 386a5d517b)
2008-07-20 11:46:01 +03:00
Kalle Olavi Niemitalo
85bfba4530 SEE: Do not check thisobj->objectclass in window functions.
init_js_window_object() copies the alert, open, and setTimeout methods
from the window object to the global object.  My fix for bug 846 on
2006-12-10 incorrectly made the corresponding C functions refuse to
work if they were not called as methods of the window object.
2008-07-20 09:26:52 +03:00
Kalle Olavi Niemitalo
ae8080b172 952, 954: Finalize form_view.ecmascript_obj for SEE 2008-07-19 14:58:11 +03:00
Kalle Olavi Niemitalo
c81e2051f8 952, 954: Finalize form_state.ecmascript_obj for SEE 2008-07-19 14:58:11 +03:00
Kalle Olavi Niemitalo
f4213ac350 952, 954: Finalize form_view.ecmascript_obj for SpiderMonkey 2008-07-19 14:58:07 +03:00
Kalle Olavi Niemitalo
2d49f6e9cd 952, 954: Finalize form_state.ecmascript_obj for SpiderMonkey
JSObject instances of input_class now again contain a private pointer
directly to struct form_state.  This pointer is cleared or updated
when appropriate.
2008-07-19 14:57:25 +03:00
Kalle Olavi Niemitalo
759fbb1142 952, 954: Add ecmascript_detach_form_view stub
Anything that frees struct form_view must now call the new function
ecmascript_detach_form_view.  This function should then clear out any
dangling pointers, but that has not yet been implemented.
2008-07-18 20:00:16 +03:00
Kalle Olavi Niemitalo
bbadb99dd1 952, 954: Add ecmascript_{detach,moved}_form_state stubs
Anything that frees or reallocates struct form_state must now call the
new functions ecmascript_detach_form_state or ecmascript_moved_form_state.
These functions should then clear out any dangling pointers, but that has
not yet been implemented.
2008-07-18 19:56:49 +03:00
Kalle Olavi Niemitalo
8f2f9e7265 952, 954: Add spidermonkey_empty_context 2008-07-18 19:24:29 +03:00
Kalle Olavi Niemitalo
5ad675e244 Remove my comment about prefixes used with SpiderMonkey 2008-07-18 19:01:48 +03:00
Witold Filipczyk
e9f3a4a9d3 1033: Fixed memory leak in open(...). 2008-07-16 16:38:50 +03:00
Kalle Olavi Niemitalo
031c1e6143 1031: Replace jsrt with spidermonkey_runtime
src/ecmascript/spidermonkey/ now uses a JSRuntime managed by
spidermonkey-shared.c.
2008-07-16 14:50:41 +03:00
Kalle Olavi Niemitalo
2024ea610b 1031: Replace smjs_rt with spidermonkey_runtime
src/scripting/smjs/ now uses a JSRuntime managed by spidermonkey-shared.c.
2008-07-16 14:28:22 +03:00
Kalle Olavi Niemitalo
32889bf908 1031: Add spidermonkey-shared.c used for both web and user scripts
Rename src/ecmascript/spidermonkey/util.c to
src/ecmascript/spidermonkey-shared.c and compile it also when
CONFIG_SCRIPTING_SMJS is enabled but CONFIG_ECMASCRIPT_SPIDERMONKEY is
not.  Then use its functions from src/scripting/smjs/ too.  Move the
corresponding declarations, as well as the inline functions needed by
src/scripting/smjs/, from src/ecmascript/spidermonkey/util.h to
src/ecmascript/spidermonkey-shared.h.

ELinks is nowadays using two JSRuntimes and SpiderMonkey has bugs that
make it crash in such use.  To work around them, ELinks will need to
be changed to use only one JSRuntime.  I am planning to define and
initialize that JSRuntime in src/ecmascript/spidermonkey-shared.c,
now that it's compiled whenever either of the modules is enabled.
2008-07-16 12:32:24 +03:00
Kalle Olavi Niemitalo
e9d4d3aef2 Fix crash after a tab was opened during reload.
Commit 0b99fa70ca "Bug 620: Reset form
fields to default values on reload" made render_document() decrement
vs->form_info_len to 0 while vs->form_info remained non-NULL.
copy_vs() then copied the whole structure with copy_struct and did not
change form_info because form_info_len was 0.  Both view_state
structures had form_info pointing to the same memory block, causing a
segfault when destroy_vs() tried to free that block a second time.

Reported by أحمد المحمودي.
2008-07-15 11:43:03 +03:00
Kalle Olavi Niemitalo
e287ca9265 1030: Wrap get_search_region_from_search_nodes in #ifdef HAVE_REGEX_H
This change avoids the following error:

gcc -DHAVE_CONFIG_H -I../../.. -I/home/Kalle/src/elinks-0.11/src -I/home/Kalle/prefix/include -I/usr/include/smjs -I/usr/include -I/usr/include/lua50 -I/usr/include -I/usr/include -O0 -ggdb -Wall -Wall -Werror -fno-strict-aliasing -Wno-pointer-sign -Wno-address -fno-strict-overflow -o search.o -c /home/Kalle/src/elinks-0.11/src/viewer/text/search.c
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.11/src/viewer/text/search.c:257: warning: 'get_search_region_from_search_nodes' defined but not used
make[3]: *** [search.o] Error 1
make[3]: Leaving directory `/home/Kalle/build/i686-pc-linux-gnu/elinks-0.11/src/viewer/text'

get_search_region_from_search_nodes is called only from
search_for_pattern, which already was inside #ifdef HAVE_REGEX_H.
(cherry picked from commit 2aec302d47)
2008-07-14 22:38:08 +03:00
Witold Filipczyk
e83f76b79e 1030: Fixed issue with undefined HAVE_REGEX_H.
(cherry picked from commit 442b0d83b0)
2008-07-14 22:36:52 +03:00
Kalle Olavi Niemitalo
c5a012eca5 Bug 1029: Use JS_CallFunctionValue in keybinding.c
JS_CallFunction does not support closures in SpiderMonkey versions
earlier than 1.8.  Test case:

elinks.keymaps.main["\""] = function() {
    elinks.keymaps.main["e"] = function() {
	elinks.alert("hello!");
    };
}
2008-07-12 01:54:49 +03:00
Kalle Olavi Niemitalo
e3830cfd67 Bug 1029: Use JS_CallFunctionValue in elinks_object.c
JS_CallFunction does not support closures in SpiderMonkey versions
earlier than 1.8.  Test case:

function set_suffix(suffix) {
    elinks.preformat_html = function(cached, vs) {
	cached.content += suffix;
    }
}
set_suffix("hello");
2008-07-12 01:49:08 +03:00
Kalle Olavi Niemitalo
079b97d21b Bug 1026: Protect callback of elinks.load_uri from GC 2008-07-12 01:37:51 +03:00
Kalle Olavi Niemitalo
b2c387f1f4 Bug 1029: Use JS_CallFunctionValue in load_uri.c
JS_CallFunction does not support closures in SpiderMonkey versions
earlier than 1.8.  Test case:

elinks.keymaps.main["!"] = function() {
    elinks.load_uri("http://www.eldar.org/cgi-bin/fortune.pl?text_format=yes",
		    function (cached) { elinks.alert(cached.content); });
}
2008-07-12 01:24:51 +03:00
Kalle Olavi Niemitalo
fd27acf784 Bug 1027, SMJS: make null mean "none" in elinks.keymaps
elinks.keymaps.main["/"] = null;
used to crash ELinks with a segfault in JS_ObjectIsFunction.
Fix that by recognizing JSVAL_NULL explicitly and treating it as "none".
Likewise, if keymap_get_property would return "none" to ECMAScript,
return JSVAL_NULL instead.
2008-07-11 17:08:35 +03:00
Kalle Olavi Niemitalo
8ee5e8c4a1 Bug 951: Revert "Garbage-collect SMJS objects before flushing caches."
This reverts commit c33d195ff4.
ELinks no longer needs to collect garbage in this situation
because it can now free cache entries even if the corresponding
SMJS objects remain.
2008-07-08 15:21:07 +03:00
Kalle Olavi Niemitalo
06c39a8ac4 Bug 951: Lock the cache entry while the hook runs. 2008-07-08 15:20:38 +03:00
Kalle Olavi Niemitalo
314a41588c Bug 951: weaken pointer from JSObject to cache_entry
The SpiderMonkey scripting module handles the "pre-format-html" event
by constructing a JSObject for the struct cache_entry and then calling
elinks.preformat_html(cache_entry, view_state) if such a function
exists.  The problem with this was that each such JSObject kept the
struct cache_entry locked until SpiderMonkey garbage-collected the
JSObject, even if the user had not defined an elinks.preformat_html
function and the JSObject was thus never needed at all.  To work
around that, the SpiderMonkey scripting module ran a garbage
collection whenever the user told ELinks to flush caches.

Remove the SpiderMonkey scripting module's use of object_lock and
object_unlock on struct cache_entry, and instead make the pointers
weak so that ELinks can free the cache_entry whenever it wants even if
a JSObject is pointing to it.  Each cache_entry now has a pointer back
to the JSObject; done_cache_entry calls smjs_detach_cache_entry_object,
which follows the pointer and detaches the cache_entry and the JSObject
from each other.

This commit does not yet remove the workaround mentioned above.
2008-07-07 23:24:43 +03:00
Kalle Olavi Niemitalo
5c0128d82d Bug 1021: initialize version in http_got_header
gcc-4.3 -O2 was complaining that http_got_header may use uninitialized
version.major and version.minor.  That indeed happened with HTTP/0.9
servers, and the PRE_HTTP_1_1(version) check then had an undefined
result, so http->close could remain 0 even though it should have
become 1; fortunately, it was then set to 1 anyway, because there was
no Content-Length header.  The undefined version was also saved in
http->recv_version, but it appears nothing ever reads that.  So in the
end, the bug did not cause any symptoms at runtime, but the warning
broke the build on gcc-4.3 if ELinks was configured with --enable-debug.
2008-07-04 16:42:35 +03:00
Miciah Dashiel Butler Masters
5733f17856 goto_current_link: do nothing on input buttons
The following is in the HTML 4 standard
(<http://www.w3.org/TR/html401/interact/forms.html#push-button>):

    push buttons: Push buttons have no default behavior. Each push
    button may have client-side scripts associated with the element's
    event attributes. When an event occurs (e.g., the user presses the
    button, releases it, etc.), the associated script is triggered.

Currently, a button such created by such HTML as "<input type="button"
value="foo" />" submits the form by default in ELinks.  According to
the above, it shouldn't.
2008-07-03 13:48:08 +03:00
Witold Filipczyk
429e08e073 bug 955: Do not call onsubmit for RESET. 2008-07-03 13:48:07 +03:00
Jonas Fonseca
26e8e52f23 Fix sgml-parser so it compiles
The test does however segfault in the incremental parsing test.
2008-07-03 01:45:45 +02:00
Jonas Fonseca
1bd98053b0 Fix memory leak in the DOM configuration module
... by making the (only) user (which is the RSS renderer) responsible
allocation of the dom_config structure.
2008-06-21 00:19:15 +02:00
Kalle Olavi Niemitalo
ed17eb18df Bug 1016: Avoid JSFunctionSpec.
(cherry picked from commit 6bfaa7ca8d)

Conflicts:

	src/ecmascript/spidermonkey/form.c
	src/scripting/smjs/elinks_object.c
2008-06-17 00:25:59 +03:00
Miciah Dashiel Butler Masters
0b99fa70ca Bug 620: Reset form fields to default values on reload
Do not retain changed values in form fields when the user reloads.  Doing
so can be confusing or even cause data-loss when new default values are
specified in the updated document.  For example, when editing an article on
Wikipedia, one loads the edit page for the article, makes and submits
changes, goes back to the edit page to make further modifications, and
reloads to get the new article text.  Before this change, reloading the
edit page would not update the textarea on the page with the new article
source, which can lead one (and has led me) to make changes to the original
version of the article by accident.

This fixes bug 620.
(cherry picked from commit 9e1e94bee0)
2008-06-15 22:49:57 +03:00
Kalle Olavi Niemitalo
69cae5d791 Revert "Gradual rendering in pager mode. ELinks is almost as good as less."
I am reverting all /dev/fd recognition because of bug 917.
This reverts commit c283f8cfd9,
except src/protocol/file/file.c still needs #include "osdep/osdep.h"
for STRING_DIR_SEP.
2008-06-15 19:31:29 +03:00
Kalle Olavi Niemitalo
006b68716b Revert "set_nonblocking_fd seems to be superfluous"
I am reverting all /dev/fd recognition because of bug 917.
This reverts commit 9c3817675f.
2008-06-15 19:24:53 +03:00
Kalle Olavi Niemitalo
fcb3ba5ba4 Revert "Some day in the future ELinks will handle copiousoutput without external"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 8ebcddeff4.
2008-06-15 14:39:02 +03:00
Kalle Olavi Niemitalo
eb8bbc9286 Revert "Copiousoutput part II. To be continued ..."
I am reverting all copiousoutput support because of bug 917.
This reverts commit f6115e65ec.

Conflicts:

	src/session/download.h: type_query.cgi, and Doxygen comments.
2008-06-15 14:38:48 +03:00
Kalle Olavi Niemitalo
196c3a8134 Revert "int_min instead of int_max. Valgrind said: invalid read"
I am reverting all copiousoutput support because of bug 917.
This reverts commit a2c12d7653.

Conflicts:

	src/session/download.c: The int_min vs. int_max change had
	  already been obsoleted by using safe_strncpy instead,
	  in commit efcd6c9758 for bug 896 on 2007-07-24.
	  Also, TERM_EXEC_FG and TERM_EXEC_BG had been added.
2008-06-15 14:31:17 +03:00
Kalle Olavi Niemitalo
6e0d4cf4bf Revert "Copiousoutput final stage. I doubt that /dev/fd/%d is portable. It works"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 6ead4e9c65.

Conflicts:

	src/session/download.c: TERM_EXEC_FG and TERM_EXEC_BG had been
	  added after the original commit.
2008-06-15 14:21:55 +03:00
Kalle Olavi Niemitalo
bfb034c953 Revert "copiousoutput: cleanup after copiousoutput handling. Temporary files should"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 4dc4ea47f2.

Conflicts:

	src/network/connection.h: After the original commit, the declaration
	  of copiousoutput_data had been changed to use the LIST_OF macro.
	  Also, connection.cgi had been added next to the connection.popen
	  member added by the original commit.
	src/session/download.c: After the original commit, the definition of
	  copiousoutput_data had been changed to use the INIT_LIST_OF macro.
2008-06-15 14:17:44 +03:00
Kalle Olavi Niemitalo
5ef6c9e395 Revert "copiousoutput: only mark /dev/fd/%d as popen data . I reflect if ELinks may"
I am reverting all copiousoutput support because of bug 917.
This reverts commit f377e6f4af.
2008-06-15 14:09:12 +03:00
Kalle Olavi Niemitalo
1661109a99 Revert "copiousoutput: I'm not sure about this. pclose may hang ELinks for long time,"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 47f3dd0421.
2008-06-15 14:08:18 +03:00
Kalle Olavi Niemitalo
95c2c941eb Revert "Fix to the new internal copiousoutput handling"
I am reverting all copiousoutput support because of bug 917.
This reverts commit ae58ab8fd7.
2008-06-15 14:06:47 +03:00
Kalle Olavi Niemitalo
01dd1b3b65 Revert "When prompting a program for copiousoutput don't show the block checkbox"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 0c2ce62459.
2008-06-15 14:05:55 +03:00
Witold Filipczyk
1544b5f4b9 bug 991: fix crash when the file is already cached
If the user opens the same file again after it is in the cache, then
ELinks does not always open a new connection, so download->conn can be
NULL in init_type_query(), and download->conn->cgi would crash.
Don't read that, then; instead add a new flag cache_entry.cgi, which
http_got_header() sets or clears as soon as possible after the cache
entry has been created.
(cherry picked from commit 81f8ee1fa2)
2008-06-15 13:53:34 +03:00
Witold Filipczyk
d15439edff bug 991: Added the bit field cgi to the structs connection and type_query.
CGI scripts are distinguishable from normal files. I hope that this
fixes the bug 991. This commit also reverts the previous revert.
(cherry picked from commit 7ceba1e461)
2008-06-15 13:07:02 +03:00
Kalle Olavi Niemitalo
a3fba83f80 Remove a comment about kill_timer()
The comment said "it is not possible to call kill_timer from a timer
handler."  Sure, such calls used to crash occasionally, but that was
bug 868 and has already been fixed.
2008-06-15 11:41:52 +03:00
Kalle Olavi Niemitalo
a833d6d093 Bug 1015: Define and use Py_ssize_t. 2008-06-09 23:18:03 +03:00
Kalle Olavi Niemitalo
5e4a565603 Bug 1014: Fix incompatible pointer type in init_perl.
The second argument of PERL_SYS_INIT3 should be a char ***
but ELinks was giving it a char *(*)[1].

Also, enlarge the array to 2 elements, so that my_argv[my_argc] == NULL
like in main().  PERL_SYS_INIT3 seems hardly documented at all so I'm
not sure this is necessary, but it shouldn't hurt.
(cherry picked from commit 8d0677e76a)
2008-06-08 20:40:17 +03:00
Kalle Olavi Niemitalo
bed84c483e Bug 517: read_encoded() == 0 might not mean EOF if non-blocking.
Without this patch, ELinks showed garbage at
<http://www.dwheeler.com/oss_fs_why.html> when bzip2 decompression was
enabled.  safe_read() in bzip2_read() did not see all of the body
bytes that ELinks had received from the server.  After bzip2_read()
received EAGAIN from safe_read() and returned 0, something skipped
1460 bytes.

decompress_data() apparently assumed that read_encoded() returning 0
meant the end of the file, and returned even though len still was
nonzero, i.e. it had not yet written to the pipe all the data that
the caller (read_chunked_http_data() or read_normal_http_data()) had
provided.  The caller did not know this, and discarded the data.
(cherry picked from commit 7e5e05ca60)
2008-06-07 23:33:23 +03:00
Paul B. Mahol
b03ddccf08 Recognize Insert key on cons25 (FreeBSD console) 2008-05-31 13:04:25 +03:00
Kalle Olavi Niemitalo
2463c1b2f8 Bug 939: Documented the fix.
The fix itself is in the parent commit.
(cherry picked from commit 4c390589ea,
 rewriting the NEWS entry because the bug also occurred on Debian)
2008-04-28 11:04:27 +03:00
Witold Filipczyk
8a02678bed fsp: Fixed a serious bug.
*fresult pointed to nowhere. On FreeBSD *fresult == NULL
and directories weren't displayed.
Check also if safe_write writes all data.
(cherry picked from commit 06bcc48487)
2008-04-28 11:04:06 +03:00
Witold Filipczyk
f994ef4335 mkalldirs: Reset ret when errno is EEXIST.
This bug was revelead while using bittorrent.
For filenames started with a dot and two slashes .//
the open_bittorrent_file returned -1 and set errno to EEXIST.
2008-03-29 18:41:22 +02:00
Witold Filipczyk
08894be379 bittorrent: Overflow occuring when a piece was rejected. 2008-03-25 22:35:06 +01:00
Kalle Olavi Niemitalo
4b408dd860 Display subtrees last in --config-help.
elinks --config-help used to sort options like this:

  document.history
  document.history.global
    document.history.global.enable
    document.history.global.max_items
    document.history.global.display_type
    document.history.keep_unhistory

Now it'll instead be:

  document.history
    document.history.keep_unhistory
  document.history.global
    document.history.global.enable
    document.history.global.max_items
    document.history.global.display_type

i.e. all the options listed under a subheading are children of the
tree named by it.  This makes elinks.conf(5) look saner.
2008-03-23 19:20:12 +02:00
Witold Filipczyk
dafb726a49 bug 976: do not use stdout and stderr in a child processing smb://
libsmbclient's stdout and stderr interferred with ELinks's stdout
and stdin. That caused an assertion failure. Now the ELinks uses
different streams for processing of the smb protocol.
2008-03-15 18:09:23 +02:00
Kalle Olavi Niemitalo
cd4a9d77b9 Revert "bug 991: Added the bit field cgi to the structs connection and type_query."
This reverts commit 7ceba1e461,
which is causing an assertion to fail if I open the same PDF
twice in a row, even if I cancel the dialog box when ELinks
first asks which program to run:

INTERNAL ERROR at /home/Kalle/src/elinks-0.12/src/session/download.c:980: assertion download && download->conn failed!

Forcing core dump! Man the Lifeboats! Women and children first!

But please DO NOT report this as a segfault!!! It is an internal error, not a
normal segfault, there is a huge difference in these for us the developers.
Also, noting the EXACT error you got above is crucial for hunting the problem
down. Thanks, and please get in touch with us.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216698688 (LWP 17877)]
0xb7a02d76 in raise () from /lib/libc.so.6
(gdb) backtrace 6
    at /home/Kalle/src/elinks-0.12/src/util/error.c:179
    fmt=0x816984c "assertion download && download->conn failed!")
    at /home/Kalle/src/elinks-0.12/src/util/error.c:122
    cached=0x8253ca8) at /home/Kalle/src/elinks-0.12/src/session/download.c:980
    cached=0x8253ca8, frame=0)
    at /home/Kalle/src/elinks-0.12/src/session/download.c:1339
    at /home/Kalle/src/elinks-0.12/src/session/task.c:493
(More stack frames follow...)

There is a fix available but I don't trust it yet.
2008-03-11 10:51:20 +02:00
Witold Filipczyk
7ceba1e461 bug 991: Added the bit field cgi to the structs connection and type_query.
CGI scripts are distinguishable from normal files. I hope that this
fixes the bug 991. This commit also reverts the previous revert.
2008-03-09 15:47:35 +02:00
Kalle Olavi Niemitalo
13a04b8fbc Bug 991: Revert "When requested to open local files with a handler use the file in place"
This reverts commit d0be89a16c, and thus
restores the ELinks 0.11 behaviour: always copy the data to a
temporary file before passing it to a MIME handler, even if the
"file:" URI scheme is being used.  Previously, ELinks 0.12.GIT passed
the name of the original file directly to the handler.  That was more
efficient but unfortunately gave the wrong result with local CGI.

The commit being reverted also claims to partially fix bug 238
(caching of local files).  That bug is still open.
2008-03-08 21:20:58 +02:00
Kalle Olavi Niemitalo
5419414b59 Bug 991: Tell users not to quote % in MIME handlers.
ELinks quotes the file name automatically and user-written quote
characters would just interfere with that.
2008-03-08 21:20:58 +02:00
Witold Filipczyk
19079733df Bug 991: URI-decode and shell-quote file name for MIME handler
Currently, when ELinks passes the name of a local file to an external
MIME handler program, it encodes the name as a URI.  Programs
typically do not expect this, and they then fail to open the file.
This patch makes ELinks instead quote the file name for the shell.

(The patch was attachment 425 of bug 991, by Witold Filipczyk.
 This commit message was written by Kalle Olavi Niemitalo.)
2008-03-08 21:20:58 +02:00
Witold Filipczyk
a6966e9472 Bug 991: Replace '%s' by % in the mailcap.c
Currently, when ELinks passes the name of a local file to an external
MIME handler program, it encodes the name as a URI.  Programs
typically do not expect this, and they then fail to open the file.
ELinks should instead quote the file name for the shell.
Unfortunately, Debian has lines like this in /etc/mailcap:

audio/mpeg; xmms '%s'; test=test "$DISPLAY" != ""

If ELinks were changed to replace the %s with e.g.
'/home/Kalle/doc/Topfield/How to upgraded the Firmware(English).pdf'
(quotes included), then the quotes would cancel out and the shell
would split the file name into multiple arguments.  That could even
provide a way for malicious persons to make ELinks run arbitrary
shell commands.

The examples in RFC 1524 all have %s without any quotes.
Debian has two bug reports about the quoting behaviour:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=90483
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=221717

This patch therefore tries to detect whether the %s has been quoted
already, and remove the quotes if so.  That way, the next patch will
be able to safely add its own quotes.  This removal of quotes applies
only to mailcap files; MIME handlers defined in elinks.conf should
already be in the format preferred by ELinks.

(The patch was attachment 438 of bug 991, by Witold Filipczyk.
 This commit message was written by Kalle Olavi Niemitalo.)
2008-03-08 21:20:57 +02:00
Jonas Fonseca
e04b420897 Minor fixes and improvements to option strings
This syncs some changes (ie. -> e.g. etc.) from elinks-0.12 or beyond.
I noticed them while updating the web pages, and apologize that I will
not spent the time to attribute it to the individual commits.

(cherry picked from commit 2bfc7b3724,
 omitting generated files)
2008-03-06 10:31:20 +02:00
Kalle Olavi Niemitalo
4d06362a50 Mark option changed in "File extensions -> Add".
Previously, file extensions added or modified via the menu did not get
saved to elinks.conf when config.saving_style was 3 (the default).
This patch makes the file-extension dialog box call option_changed,
which then sets OPT_TOUCHED, so that the option appears modified in
the option manager and will be saved.

Reported and patch reviewed by Witold Filipczyk.
2008-03-04 23:33:05 +02:00
Witold Filipczyk
8f46de65d6 bug 1000: Do not discard the query part of URI.
(cherry picked from commit 3a4c053bd5)
2008-03-02 17:45:29 +02:00
Kalle Olavi Niemitalo
8b5de30f72 Bug 1001: fix uninitialized-pointer crash in URI rewriting
(cherry picked from commit 6d2e034007)
2008-03-01 16:09:41 +02:00
Kalle Olavi Niemitalo
b0c5da3ddf BUILD_ID: Fix dirt check when srcdir != builddir.
I also tried git --work-tree=$(top_srcdir) but did not get it to work.
2008-03-01 14:30:57 +02:00
Kalle Olavi Niemitalo
747b32b735 BUILD_ID: Show the full SHA-1, instead of git describe.
Git describe happily picks whatever annotated tag is closest to the
commit.  I make use of many annotated tags that correspond not to
ELinks releases but rather to patches posted in bugzilla or sent in
email.  So with git describe, the About window can display e.g.
"email/witekfl/2008-02-29-2-g705acfa-dirty", which is not the intended
use of this tag.

In the "next" branch of git.git, git describe apparently supports a
--match option with which it could be made to consider ELinks releases
only.  However, that option is not yet in any released version of Git,
and anyhow ELinks should support older versions too.

Instead of using git describe, just show the full SHA-1, like
cg-commit-id would.  The About dialog box also displays VERSION
from configure.in, so it isn't even particularly useful to show
the name of the latest tag.  (The commit count might help though.)
2008-03-01 14:01:28 +02:00
Jonas Fonseca
705acfa05a Use git tools instead of cogito for getting the build ID
The build ID now includes both last tagged version, commit generation
since last tagged version, as well as the leading characters of the
commit ID and a flag for dirty working tree.
(cherry picked from commit c2a0d3b969)
2008-03-01 13:55:16 +02:00
Witold Filipczyk
d8a062cffc http encoding: Moved the accept_encoding_header to the http.c. 2008-02-29 15:32:10 +01:00
Jonas Fonseca
8bb0f20471 FTP: Test and fix handling of symbolic link name containing spaces
The bug was reported by Paul B. Mahol on elinks-users. The example is
from the FTP site he provided:

	ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-ia64/

Message-ID: <3a142e750802262008l6fd55be5v44207bc4479dd3fc@mail.gmail.com>
(cherry picked from commit c069403b75)
2008-02-28 23:39:04 +02:00
Jonas Fonseca
1ad9d5b2b8 Fix the FTP parser test program to handle multiline responses
... so all the tests with responses stretching multiple lines are
actually tested in their entirety.

(cherry picked from commit aa9a847c00,
 resolving a conflict due to the use of get_test_opt)
2008-02-28 23:38:55 +02:00
Jonas Fonseca
577c241438 parse_time: set tm_sec to zero before conditional second parsing
This fixes test 9 (Basic VMS responses) that uses time specs with
seconds left out (e.g. 17:44) for me.
(cherry picked from commit 397bef882b)
2008-02-28 23:38:42 +02:00
Kalle Olavi Niemitalo
3aecdfc095 Content-Encoding: deflate means neither zlib nor gzip header.
deflate.c used to call inflateInit2(stream, MAX_WBITS + 32).
This makes zlib first check for a gzip header, and if it doesn't
find one, assume a zlib header.  However, if the server said
"Content-Encoding: deflate", then neither header is there, and
zlib does not detect this automatically.  So ELinks has to
distinguish between the gzip and deflate encodings, and tell
zlib which one was meant.

This bug resulted in blank pages at blogs.msdn.com accessed
through proxy.suomi.net.
2008-02-27 00:52:24 +02:00
Kalle Olavi Niemitalo
a03698d695 lzma: Set *new_len even if data was truncated.
Commit 474f1f4268 did the same
to bzip2 and deflate.
2008-02-24 20:45:33 +02:00
Witold Filipczyk
26607d2263 decompress_data: Do not leak memory in mem_realloc. 2008-02-24 20:45:33 +02:00
Witold Filipczyk
902522fbdf content encoding: New function accept_encoding_header. 2008-02-24 20:45:32 +02:00
Witold Filipczyk
8492e6b1af lzma: used the lzma library from tukaani.org. 2008-02-24 20:45:32 +02:00
Kalle Olavi Niemitalo
a7232792dd encoding: Don't leak a pipe fd if open_encoded() fails. 2008-02-17 21:54:19 +02:00
Kalle Olavi Niemitalo
474f1f4268 encoding: Set *new_len even if data was truncated.
Previously, bzip2_decode_buffer and deflate_decode_buffer left
*new_len unchanged if the compressed input data ended unexpectedly.
This behaviour was also inherited by decode_encoded_buffer,
whose only caller render_encoded_document preinitializes the variable
and so did not crash.

With this change, the functions now store in *new_len the number of
bytes that were successfully decoded, even if more bytes were expected.
An error should perhaps be reported to the user, but I don't think the
previous version did that either, as it returned a non-NULL pointer.
2008-02-17 21:54:19 +02:00
Witold Filipczyk
0b363eb245 content encoding: handle the case when the len is 0 in the chunked encoding.
We do not want to start decompression when the len is 0
with the chunked encoding.
2008-02-17 21:54:18 +02:00
Witold Filipczyk
cfb2ef63d6 encoding: Fixed a chunked decompression and added the deflate. 2008-02-17 21:54:18 +02:00
Y Giridhar Appaji Nag
4a1e296c3b Bug 1002: Fix build failure on Debian GNU/Linux arch powerpc
Change char id to enum bittorrent_message_id id to prevent FTBFS on
powerpc and s390
(cherry picked from commit 01b0c81227,
 with a conflict)
2008-02-10 14:34:21 +02:00
Kalle Olavi Niemitalo
76d803bbb9 config: Count backslashed newlines in str_rd.
If a newline has a backslash in front of it, then str_rd replaces it
with a space.  However, the newline was in the original config file,
so the line number must still be incremented.
2008-02-10 14:30:26 +02:00
Kalle Olavi Niemitalo
61019c3130 Debian bug 464384: fix OFF_T_FORMAT mismatches on amd64
On AMD64 apparently, off_t is long but ELinks detected SIZEOF_OFF_T == 8
and defined OFF_T_FORMAT as "lld", which expects long long and so causes
GCC to warn about a mismatching format specifier.  Because --enable-debug
adds -Werror to $CFLAGS, this warning breaks the build.  When both
SIZEOF_LONG and SIZEOF_LONG_LONG are 8, ELinks cannot know which type
it should use.

To fix this, do not attempt to find a format specifier for off_t itself.
Instead cast all printed off_t values to a new typedef off_print_T that
is large enough, and replace OFF_T_FORMAT with OFF_PRINT_FORMAT which
is suitable for off_print_T altough not necessarily for off_t.  ELinks
already had a similar scheme with time_print_T and TIME_PRINT_FORMAT.
2008-02-10 11:30:27 +02:00
Kalle Olavi Niemitalo
6555359f8e Debian bug 464384: fix cast warning in ssl_connect
There are warnings about casts in the Debian amd64 build logs:
http://buildd.debian.org/fetch.cgi?&pkg=elinks&ver=0.11.3-2&arch=amd64&stamp=1200348983&file=log

	[CC]   src/intl/gettext/dcigettext.o
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c: In function '_nl_find_msg':
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c:745: warning: cast from pointer to integer of different size
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c:746: warning: cast from pointer to integer of different size
...
	[CC]   src/network/ssl/socket.o
/build/buildd/elinks-0.11.3/src/network/ssl/socket.c: In function 'ssl_connect':
/build/buildd/elinks-0.11.3/src/network/ssl/socket.c:219: warning: cast to pointer from integer of different size

The warnings in _nl_find_msg were caused by alignof, which I already
fixed.  This commit ought to fix the gnutls_transport_set_ptr call in
ssl_connect.  This warning did not yet happen in bug 464384 because
the others broke the build before it got that far.
2008-02-09 15:19:20 +02:00
Laurent MONIN
9ba7079735 Patch: fix for bug 938
This patch prevents  handle_itrm_stdin() and clear_handlers(itrm->in.std) to be
called when -remote is set and in.std < 0.
It adds two assertions for in.std >= 0 in handle_itrm_stdin() and
unhandle_itrm_stdin().
May be a bad fix, please test and review.

[Added a NEWS entry.  --KON]
2008-02-09 14:11:21 +02:00
Kalle Olavi Niemitalo
3b93dcc472 Debian bug 464384: fix cast warning in alignof 2008-02-09 00:24:45 +02:00
Kalle Olavi Niemitalo
a3d093bd25 Bug 54: Don't disable XON/XOFF flow control.
Do not clear the IXON flag in termios.c_iflag.
Bug 54 did not actually ask for this flag to be kept,
but the cable I am using doesn't seem to have the handshake
lines connected right, so XON/XOFF is a must at 38400 bps,
at least until ELinks learns to send padding based on terminfo.

Any user who has bound actions to Ctrl+S or Ctrl+Q and finds that
they no longer work should just "stty -ixon" before running ELinks.
We don't have any default bindings for those keys, fortunately.
2008-02-04 23:22:15 +02:00
Kalle Olavi Niemitalo
cb1454918a Bug 54: Don't force 8-bit characters and no parity.
Actually, don't use the cfmakeraw function at all,
and don't look for it during configure either.

(cherry picked from commit 87f1661314
 but moved the NEWS entry into the 0.12 section)
2008-02-04 23:19:40 +02:00
Kalle Olavi Niemitalo
054852ae23 config: Fix the "include" command.
Previously, it only pretended to rewrite the configuration file, so it
set or cleared OPT_MUST_SAVE but never changed or output any options.
Now, it actually sets the options when ELinks is loading the
configuration file.  Also, when ELinks is rewriting the configuration
file, it now compares the values in the included file to the current
values of the options, and sets or clears OPT_MUST_SAVE accordingly.
2008-02-03 20:28:27 +02:00
Kalle Olavi Niemitalo
92b430f3dc config: Access OPT_MUST_SAVE in the real option, not alias.
So, if elinks.conf contains a "set" command for an alias and ELinks
updates that, it now knows it doesn't have to append another "set"
command for the underlying option.
2008-02-03 20:27:56 +02:00
Kalle Olavi Niemitalo
c47d3798a3 config: Negate the value in redir_rd too.
So if ELinks is rewriting a configuration file that contains a "set"
command for a negated alias, then it properly writes the value of the
alias, rather than the value of the underlying option.
2008-02-03 20:27:54 +02:00
Kalle Olavi Niemitalo
2dbe6ec34f config: In redir_set, negate the incoming value.
That is, let the setter function of the underlying option store the
negated value.  Previously, redir_set used to tweak the value of the
option after it has already called the underlying setter.
2008-02-03 20:27:52 +02:00
Kalle Olavi Niemitalo
7cdbc908d8 config: Rewrite "set" to "unset" and vice versa.
Also, replace OPT_WATERMARK with OPT_MUST_SAVE, which has the opposite
meaning.

Watermarking of aliases does not yet work correctly in this version.
Neither does the "include" command.
2008-02-03 20:27:48 +02:00
Kalle Olavi Niemitalo
6bd961246a config: Reset OPT_TOUCHED flags after a successful save.
Previously, they were reset by smart_config_string(), which was not
called if the value of the option was saved by rewriting an existing
command in elinks.conf.  Also, it is better to reset the flags only
after the file operations have actually succeeded.
2008-02-03 20:27:45 +02:00
Kalle Olavi Niemitalo
ab8ef9698f config: In saving style 2, save deleted options too.
Previously, ELinks set the OPT_WATERMARK flag in all deleted options
when config.saving_style was 2, thus mostly preventing them from being
saved.  This had the unfortunate consequence that if you started with
no elinks.conf, set config.saving_style = 2, deleted some built-in
option (e.g. a URL rewriting rule), saved the settings, and restarted
ELinks, then the built-in option would reappear.
2008-02-03 20:27:41 +02:00
Kalle Olavi Niemitalo
6d55be2043 config: Let mirroring be implicit unless values are rewritten. 2008-02-03 20:27:37 +02:00
Kalle Olavi Niemitalo
72de752f84 config: Rearrange mirror-or-not checks. 2008-02-03 20:27:08 +02:00
Kalle Olavi Niemitalo
661dda04c9 config: Let "unset" delete built-in options too. 2008-02-03 20:26:50 +02:00
Kalle Olavi Niemitalo
2c9d966c99 config: Unsetting a missing option is not an error. 2008-02-03 14:43:43 +02:00
Kalle Olavi Niemitalo
3f077d109a config: Remember the address and length of the option name.
A later commit will take advantage of this.
2008-02-03 14:43:40 +02:00
Kalle Olavi Niemitalo
e7bd23ff37 config: More cleverly skip unrecognized or malformed commands. 2008-02-03 14:43:38 +02:00
Kalle Olavi Niemitalo
e06416d248 config: Skip values of unrecognized options.
To avoid parsing them as commands.
2008-02-03 14:43:36 +02:00
Kalle Olavi Niemitalo
edad2ddccd config: Report errors before the line number is lost. 2008-02-03 14:43:34 +02:00
Kalle Olavi Niemitalo
1f0c361ead config, Bug 503: Keep track of what has been mirrored. 2008-02-03 14:43:31 +02:00
Kalle Olavi Niemitalo
4c64afec26 config: Add struct conf_parsing_state. 2008-02-03 14:43:29 +02:00
Kalle Olavi Niemitalo
63e82e68e4 config: Reduce the interface offered to exmode. 2008-02-03 14:43:26 +02:00
Kalle Olavi Niemitalo
912cff7975 config: Use memacpy instead of stracpy.
So there is no need to substitute a '\0' into the string, and undo
that afterwards.
2008-02-03 14:43:23 +02:00
Kalle Olavi Niemitalo
753aa3054b config: Fix two bogus end-of-file checks. 2008-02-03 14:43:21 +02:00
Kalle Olavi Niemitalo
09829a0b52 config: Don't mem_free(NULL). 2008-02-03 14:43:18 +02:00
Kalle Olavi Niemitalo
c92cd01e0b config: Plug some memory leaks in error handling. 2008-02-03 14:43:16 +02:00
Kalle Olavi Niemitalo
4960c65f20 config: Explain why get_opt_rec() does not follow OPT_ALIAS. 2008-02-03 14:43:13 +02:00
Kalle Olavi Niemitalo
1d16e90dca config: Swap the "unknown command" and "parse error" messages.
They should be in the same order as in enum parse_error.
2008-02-03 14:43:11 +02:00
Kalle Olavi Niemitalo
b216a21b79 config: Each backslash escapes only one character.
Previously, if you did this in elinks.conf:
set document.dump.header = "\'\\"
then str_rd() failed to detect the end of the string.
2008-02-03 14:43:09 +02:00
Kalle Olavi Niemitalo
9becd108a8 config: more const in elinks.conf parsing 2008-02-03 14:43:06 +02:00
Kalle Olavi Niemitalo
11e9a816f5 const in name_to_language 2008-02-03 14:42:07 +02:00
Kalle Olavi Niemitalo
cb90ed94f0 const in get_cp_index 2008-02-03 14:41:35 +02:00
Kalle Olavi Niemitalo
49ea10a74d Bug 994: Treat only termios.c_cc[VERASE] as "Backspace".
When setting the tty device to raw mode, save the VERASE character.
Later, compare incoming bytes to that.

This is somewhat complicated because "stty verase undef"
sets termios.c_cc[VERASE] = _POSIX_VDISABLE, and e.g. Linux
defines _POSIX_VDISABLE as 0 but that must not cause ELinks
to treat incoming null bytes as backspaces.  Furthermore,
some systems may use different VDISABLE values for different
terminal devices, in which case _POSIX_VDISABLE is undefined
and ELinks must instead read the value from fpathconf().
2008-02-02 13:19:55 +02:00
Miciah Dashiel Butler Masters
e6276bf7ac Missing change from last commit 2008-01-27 18:50:29 +00:00
Miciah Dashiel Butler Masters
ad5b6e0a87 Add KEYMAP_INVALID value for enum keymap_id and properly check for it
get_keymap_id returns -1 when it can't find the keymap.  Because the return
type of get_keymap_id is enum keymap_id and enum keymap_id did not have any
explicit values defined, it could be unsigned, which meant that when
get_keymap_id returned -1, it was really returning a huge positive number.
This meant that when callers checker whether the return value was negative,
they were essentially performing no check at all, so they might give
get_keymap_id an invalid keymap name, get back an invalid keymap_id, and
use that invalid keymap_id.

This commit adds KEYMAP_INVALID = -1 to enum keymap_id and makes all
functions that deal with the enumeration use that symbol.
2008-01-27 18:50:29 +00:00
Miciah Dashiel Butler Masters
3a0286e447 Strings corrections from Malcolm Parsons
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:19:23 +00:00
Kalle Olavi Niemitalo
a831beb6c8 const in BitTorrent 2008-01-26 18:10:35 +02:00
Kalle Olavi Niemitalo
cab0b3fbd5 const in CSS 2008-01-26 18:10:13 +02:00
Kalle Olavi Niemitalo
0689443ad2 const in map_scanner_string 2008-01-26 17:57:14 +02:00
Kalle Olavi Niemitalo
f02e471762 const in decode_color 2008-01-26 17:53:14 +02:00
Kalle Olavi Niemitalo
3f508a9803 const in fastfind_search 2008-01-26 17:52:22 +02:00
Kalle Olavi Niemitalo
721af4e749 Detect all overflows in BitTorrent parse_bencoding_integer.
The previous check (integer > (off_t) integer * 10) did not detect all
overflows.  Examples with 32-bit off_t:

integer = 0x1C71C71D (0x100000000/9 rounded up);
integer * 10 = 0x11C71C722, wraps to 0x1C71C722 which is > integer.

integer = 0x73333333;
integer * 10 = 0x47FFFFFFE, wraps to 0x7FFFFFFE which is > integer.

Examples with 64-bit off_t:

integer = 0x1C71C71C71C71C72 (0x10000000000000000/9 rounded up);
integer * 10 = 0x11C71C71C71C71C74, wraps to 0x1C71C71C71C71C74
which is > integer.

integer = 0x7333333333333333;
integer * 10 = 0x47FFFFFFFFFFFFFFE, wraps to 0x7FFFFFFFFFFFFFFE
which is > integer.

It is unclear to me what effect an undetected overflow would actually
have from the user's viewpoint, so I'm not adding a NEWS entry.
(cherry picked from commit a25fd18e56)
2008-01-26 16:47:51 +02:00
Kalle Olavi Niemitalo
9699a03e74 Don't assume sizeof(int)==4 in bittorrent
(cherry picked from commit f3bad399e2)
2008-01-26 16:47:47 +02:00
Miciah Dashiel Butler Masters
cade70e745 Fix -dump with multicell characters
(cherry picked from commit e0f0112de9)
2008-01-25 09:57:48 +02:00
Kalle Olavi Niemitalo
e5922e4fe1 Bug 997: Fix unlikely stack corruption in get_pasv_socket.
It is unlikely because the standard members of struct sockaddr_in
(sin_family, sin_port, sin_addr) already require at least 8 bytes
and I don't know of any system that has size_t larger than that.
Besides, at least glibc pads the structure to 16 bytes.
2008-01-22 00:42:13 +02:00
Kalle Olavi Niemitalo
0c1b52637f get_pasv_socket: Use AF_INET6 when appropriate.
When get_pasv6_socket was merged into get_pasv_socket on 2005-04-15,
the AF_INET6 of get_pasv6_socket was lost and the merged function
always returned AF_INET sockets.  This then made getsockname fill
only part of the struct sockaddr_in6, and ELinks sent to the server
an EPRT command that had half the bits missing from the IPv6 address.
At least ftp.funet.fi then rejected the command, helpfully saying
what the address should have been.

This commit fixes active FTP over IPv6.  Passive FTP was already fixed
in 0.11.3.GIT (887d650efe), on 2007-05-01.
2008-01-22 00:41:25 +02:00
Kalle Olavi Niemitalo
a307371d9e Comments about arithmetic in scrolling.
(cherry picked from commit 4871ad0643)
2007-12-16 01:14:08 +02:00
Witold Filipczyk
04387d8d6c Added function move_cursor_rel_count and used it
in move-link-left-line and others, so move-link-left-line ans others
do not use the keyboard prefix.
(cherry picked from commit 8b281e1404)
(cherry picked from commit 4f2a9eadfc)
2007-12-16 01:14:02 +02:00
Witold Filipczyk
f33b7dea02 Removed not existent function. Spotted by Kalle.
(cherry picked from commit a76ecfb8ca)
(cherry picked from commit 54cf868429)
2007-12-16 01:13:53 +02:00
Witold Filipczyk
617e33187d move-link-up-line and others: changed mode to NAVIGATE_CURSOR_ROUTING when
there is no link.
(cherry picked from commit 7db2f8c629)
(cherry picked from commit f62eca8d92)
2007-12-16 01:13:46 +02:00
Witold Filipczyk
61eb46e94d New action: move-cursor-line-start.
It moves cursor to the start of the line.
(cherry picked from commit 5ee1d3b2b3)
(cherry picked from commit 3a87ec55fc)
2007-12-16 01:13:39 +02:00
Witold Filipczyk
d358810a5f move-link-prev(next)-line: Typo with cut-n-paste. s/line/last/.
(cherry picked from commit 848852b75f)
(cherry picked from commit 64c385f0db)
2007-12-16 01:13:32 +02:00
Witold Filipczyk
d1d8c0632a move-link-up-line: segfault when cursor was below last line.
(cherry picked from commit c646c860cd)
(cherry picked from commit 9561d8d0fd)
2007-12-16 01:13:25 +02:00
Witold Filipczyk
175f355320 move-link-prev-line: Really fixed.
(cherry picked from commit 052f7a93bb)
(cherry picked from commit 1a9112945b)
2007-12-16 01:13:18 +02:00
Witold Filipczyk
885adc7a57 move-link-prev-line .. move-link-down-line: Fixed.
(cherry picked from commit bb0166279f)
(cherry picked from commit 27361d141a)
2007-12-16 01:13:12 +02:00
Witold Filipczyk
f2de26b2d5 Fixed the issue with multiline links.
(cherry picked from commit 3555f68059)
(cherry picked from commit 8863f4335f)
2007-12-16 01:13:04 +02:00
Witold Filipczyk
a282a98d4a Avoid segfault.
Go to the page with a few lines. Follow a link to a page with more lines.
Move cursor down, do not stay on a link.
Go back and do move-link-prev-line. This caused a segmentation fault.
(cherry picked from commit 888ba87516)
(cherry picked from commit 1cbd02c141)
2007-12-16 01:12:57 +02:00
Witold Filipczyk
d830833e62 move-link-down-line, move-link-prev-line, etc.:
Change mode to NAVIGATE_LINKWISE to preserve the link position when
going back.
(cherry picked from commit 14b37d0362)
(cherry picked from commit a594b2a002)
2007-12-16 01:12:49 +02:00
Witold Filipczyk
cb07a2630c actions: Fixed moving in frames.
(cherry picked from commit 2045574edc)
(cherry picked from commit 02af6696f5)
2007-12-16 01:12:41 +02:00
Witold Filipczyk
52dfc92523 viewer: Added new four actions requested by Ligesh.
move-link-down-line moves the cursor down to the line with a link.
move-link-up-line moves the cursor up to the line with a link.
move-link-prev-line moves to the previous link horizontally.
move-link-next-line moves to the next link horizontally.
(cherry picked from commit 8259a56e99)
(cherry picked from commit 2eb3532416)
2007-12-16 01:12:31 +02:00