1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-06 23:44:43 -04:00
Commit Graph

3785 Commits

Author SHA1 Message Date
Witold Filipczyk
68ccb4513d bug 765: If set download->callback set also download->data.
In the task.c line 517 there is:
	if (is_in_progress_state((*download_p)->state)) {
		if (have_location(ses))
			*download_p = &cur_loc(ses)->download;
			^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here the download was changed. download->data and download->callback
were NULL after the assignment, but later in loading_callback
only download->callback had new value. download->data was still NULL.
2009-05-27 01:11:02 +03:00
Kalle Olavi Niemitalo
5def50bed9 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	configure.in
	doc/installation.txt
2009-05-23 12:40:52 +03:00
Kalle Olavi Niemitalo
3d4919507a configure: More extensible choice of SSL library
In 0.13.GIT, the configure script sets disable_gnutls=yes if it
decides to use nss_compat_ossl.  In recent elinks-0.12, the script
logs "explicitly disabled" if $disable_gnutls is set.  Thus, merging
those together could have caused an incorrect claim to be logged.

Rearrange the logic to make it easier to extend to multiple libraries.
Code that deals with one library no longer needs to worry about each
alternative library separately.  Instead just test and set the one
shared chosen_ssl_library variable.

While at it, get rid of openssl_withval, which merely mirrored the
with_openssl variable provided by Autoconf.
2009-05-23 10:48:16 +03:00
Kalle Olavi Niemitalo
a7fe06be06 Debian bug 529821: Mention loss of --with-gnutls=DIR in NEWS 2009-05-23 10:48:16 +03:00
Miciah Dashiel Butler Masters
76377d9714 Bug 765: use ses_load to load old tab's document
Yet another valiant wack at the beast.  This one violates abstractions
a little less deeply, so maybe it will work better.

The last attempt caused a crash when a tab was cloned after the tab's
loading had been aborted.
2009-05-22 23:10:54 +00:00
Miciah Dashiel Butler Masters
d16e0c974f Use cache if at all possible if CACHE_MODE_ALWAYS
In load_uri, if there is no valid cache entry and no existing connection
for the requested URI, make one last check in case there is an
incomplete cache entry.
2009-05-22 23:09:07 +00:00
Miciah Dashiel Butler Masters
60c50ea378 Fix a compilation error.
Fix another silly error that I introduced in commit
3334efb32c.
2009-05-22 21:54:47 +00:00
Miciah Dashiel Butler Masters
30a8d2faed Fix compilation error in src/bfu/listbox.c
Fix a silly error introduced by me in commit
66e1baec77.
2009-05-22 21:48:10 +00:00
Miciah Dashiel Butler Masters
bd752e95ad get_search_region_from_search_nodes: add comment
Document why we add pattern_len to doclen.
2009-05-22 20:39:47 +00:00
Miciah Dashiel Butler Masters
812c4bafc1 get_search_region_from_search_nodes: simplify
Simplify the end-of-line check in get_search_region_from_search_nodes by
relying on the fact that the n member of an instance of struct search
that marks the end of a line will be 0.
2009-05-22 20:26:32 +00:00
Miciah Dashiel Butler Masters
aafebad3f5 Document struct search 2009-05-22 20:24:34 +00:00
Miciah Dashiel Butler Masters
da838a9317 Include last character of document in search range
Allow searching on the last character of the document.  Plain-text searches
already match on the last character as long as it isn't the first character
of a match, and regular-expression searches match on the last character if
the search pattern is longer than 1 character, so the problem addressed by
this commit is very much a corner case.

This commit reverts a portion of commit
fd15049622594d151104d43917984c7ce10993e6 (CVS revision 1.17).
2009-05-22 20:19:59 +00:00
Miciah Dashiel Butler Masters
8d8ff02bbf Fix behaviour for search-toggle-regex
text_typeahead_handler: Document that passing -2 for action_id will cause
a search without error reporting.  This behaviour is unintentionally the
current behaviour of text_typeahead_handler, but now it is documented so
that it can be used.

input_line_event_handler: When rewinding, pass -2 for the action_id
parameter to the handler instead of passing again whatever action led to
the rewinding.

The old behavior of input_line_event_handler was particularly problematic
with the search-toggle-regex action and the text_typeahead_handler handler:
input_line_event_handler would call the handler with
ACT_EDIT_SEARCH_TOGGLE_REGEX, and the handler would toggle the setting and
perform the search again; then if the search string no longer matched
anything, the handler would return INPUT_LINE_REWIND to
input_line_event_handler, which would rewind and call the handler with
ACT_EDIT_SEARCH_TOGGLE_REGEX again, thus toggling the option back to the
original setting.

With the new behaviour, input_line_event_handler will not repeat the same
action when re-invoking the handler; in the above example with
search-toggle-regex, the search string will simply be rewound until it
matches with the new setting.
2009-05-22 20:15:52 +00:00
Miciah Dashiel Butler Masters
0ced0c9851 do_typeahead: restructure.
Reduce indentation, eliminate a goto, and make the code a little clearer
(IMO).
2009-05-22 20:11:26 +00:00
Miciah Dashiel Butler Masters
d17a632417 field_op: use goto_link (micro-optimisation)
Use the newly introduced goto_link instead of goto_current_link in field_op
since field_op already looks up the current link.
2009-05-22 20:05:16 +00:00
Miciah Dashiel Butler Masters
9e5d79a803 Follow right link when link onClick changes docs
When a link had an onClick event handler that changed the current
document and that link was clicked, ELinks would follow the current link
of the document displayed after executing the handler instead of the
link that was clicked.

Factor goto_link out of goto_current_link.

Use goto_link instead of goto_current_link in activate_link to ensure that
the link that is passed in by enter() is followed.
2009-05-22 20:00:59 +00:00
Miciah Dashiel Butler Masters
76de375d3d Do not redraw listbox when deleting invisible item
In done_listbox_item, do not call update_hierbox_browser if the item
that is being deleted was not visible.
2009-05-22 19:58:41 +00:00
Miciah Dashiel Butler Masters
66e1baec77 Fix hierbox line characters WRT item visibility
Hierarchical listboxes draw items with upper-left corner, lower-left
corner, or horizontal border characters to indicate whether a given item is
the first item in a listbox, the last, or any other, respectively.
However, the wrong character can be drawn if there are invisible items: if
an item is the first (or last) visible item but there is an invisible item
before (or after) it, it will be drawn with a horizontal border character,
not a corner.

This patch fixes that problem using traverse_listbox_items_list in
display_listbox_item to ignore invisible items when determining whether
an item is either the first or the last among its siblings.
2009-05-22 19:53:45 +00:00
Kalle Olavi Niemitalo
bd87e0915e Mention pkg-config dependency in doc/installation.txt 2009-05-22 22:53:06 +03:00
Kalle Olavi Niemitalo
f8bbf1a227 Debian bug 529821: Use pkg-config, not libgnutls-config
The configure script used to run libgnutls-config in order to find the
compiler and linker options needed for using GNUTLS, but GNUTLS 2.7
apparently doesn't ship that script any more.  Use pkg-config instead.
GNUTLS 1.2.0 is the oldest version supported by ELinks, and that already
installs the gnutls.pc file required by pkg-config.

This commit also removes support for configure --with-gnutls=DIR.
The configure script used to look for libgnutls-config in DIR.
DIR thus had to be a directory where executable programs were installed,
and it's unlikely that gnutls.pc would be found there.  So, any callers
that used this feature would have to be changed anyway, and they can as
well be changed to set the PKG_CONFIG_PATH environment variable instead.
2009-05-22 22:53:06 +03:00
Kalle Olavi Niemitalo
feb640f29c configure: Cosmetic changes in C99 inline check 2009-05-22 22:53:06 +03:00
Kalle Olavi Niemitalo
284ac21486 configure: Require Autoconf 2.61 or later
Autoconf 2.61 has been installed on elinks.cz.  I don't know when.
2009-05-22 22:53:05 +03:00
Kalle Olavi Niemitalo
ca1d540a41 configure: Fix "not a valid shell variable" with Autoconf 2.63
Fix this error:

configure.in:1430: error: AC_SUBST: `[CONFIG_TRE]' is not a valid shell variable name
acinclude.m4:31: EL_LOG_CONFIG is expanded from...
configure.in:1430: the top level
autom4te: /usr/bin/m4 failed with exit status: 1

Reported by witekfl.
2009-05-22 22:53:01 +03:00
Miciah Dashiel Butler Masters
f1dee0d04f Drop special handling of ctrl-l
Drop special handling of ctrl-l in handle_interlink_event.

To make sure that the 'redraw' action works everywhere, first modify
menu_kbd_handler and mainmenu_kbd_handler to handle ACT_MENU_REDRAW; and
second, drop the ACTION_REQUIRE_VIEW_STATE flag from the 'redraw' action in
the 'main' keymap so that it works even if there is no document loaded.

Ctrl-l is already bound to 'redraw' in all keymaps by default, so the
current default behaviour is preserved.
2009-05-22 19:50:28 +00:00
Miciah Dashiel Butler Masters
3334efb32c Add support for ECMA-48 SGR italic
Add 'Italic' checkbox to Terminal options dialog box.

Enable italic text by default for rxvt-unicode (and also enable
frames, 88-colour mode, and underline).
2009-05-22 19:48:59 +00:00
Miciah Dashiel Butler Masters
d6116ca83a Bug 765: use load_uri to load old tab's document
Kalle reported that after commit 5c96d430c9,
ELinks would crash if the document in the old tab was still loading when a
new tab was opened.  The problem was that the new session's download.data
pointer was not updated to point to the session as doc_loading_callback
expects.

Instead of just calling render_document_frames, set up the download and
call load_uri.
2009-05-22 19:47:07 +00:00
Kalle Olavi Niemitalo
82e67f8ebc Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/intl/charsets.h
	src/viewer/text/search.c
2009-05-21 19:50:16 +03:00
Kalle Olavi Niemitalo
ec4bca9cb3 NEWS: mention configure --without-tre 2009-05-21 19:48:35 +03:00
Kalle Olavi Niemitalo
0c756fc3e8 TRE: Check for 32-bit wchar_t at configure time
This check used to be in src/elinks.h.  Move it to configure.in so
that (1) the result can be logged and (2) ELinks won't even link with
TRE if wchar_t prevents its use.

Also, rename HAVE_TRE_REGEX_H to CONFIG_TRE, to reflect that it is not
always defined if the header exists.
2009-05-21 17:22:12 +03:00
Kalle Olavi Niemitalo
07c90ea438 --without-tre: Don't nest AC_MSG_CHECKING...AC_MSG_RESULT
The previous version could display its progress like this:

checking for TRE... checking for TRE in pkg-config... yes
checking for TRE header and library... yes
no

Omit the outer "checking for TRE..." and "no" (which was untrue
anyway), unless --without-tre causes the inner checks to be skipped.
2009-05-21 14:57:54 +03:00
Kalle Olavi Niemitalo
4850a136fe Add Hema Seetharamaiah to AUTHORS
The licence grants are in these messages posted to elinks-dev:

Subject: Re: Patch to make libtre dependency optional.
Date: Tue, 28 Apr 2009 20:16:25 +0530
Message-ID: <49F716C1.40004@treap.net>

Subject: Re: Patch to make libtre dependency optional.
Date: Thu, 21 May 2009 09:06:15 +0530 (IST)
Message-ID: <1126.122.167.155.194.1242876975.squirrel@www.treap.net>
2009-05-21 13:55:25 +03:00
Hema Seetharamaiah
4c95dd86a7 Add --without-tre option
elinks-lite in Debian does not depend on any libraries (except
gnutls). Including this option will allow elinks-lite to be built
without libtre dependency.
2009-05-21 13:49:29 +03:00
Witold Filipczyk
4f0e2bbddd pl.po: Updated. 2009-05-12 19:54:11 +02:00
Kalle Olavi Niemitalo
180ddcddb0 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/session/session.c: Kept the elinks-0.13 version.
		Bug 1077 did not occur in elinks-0.13 because
		setup_session here calls render_document_frames
		directly and that sets ses->doc_view->vs.
2009-05-10 11:49:41 +03:00
Kalle Olavi Niemitalo
adeac4720a bug 1077: NEWS entry 2009-05-10 09:00:44 +03:00
Witold Filipczyk
387aeac953 No segfault
At the end of the destroy_vs there two assignments vs->doc_view->vs = NULL and
vs->doc_view = NULL. In the setup_session the copy_vs left the vs "unbound"
with any variable. At least one of these two is wrong.
2009-05-05 20:44:07 +03:00
Kalle Olavi Niemitalo
8e20417bdb Debian bug 526349: Bundle asciidoc.py with ELinks.
The AsciiDoc 7.1.2 configuration files included in the ELinks
source tree apparently aren't compatible with AsciiDoc 8.4.4:

 [ASCIIDOC]   doc/elinks.1.xml
FAILED: [listdef-bulleted] missing section: [listtags-None]
make[1]: *** [elinks.1.xml] Error 1

Fix this by including asciidoc.py from AsciiDoc 7.1.2 as well.
The build system now doesn't care at all whether the user has
installed some version of AsciiDoc or not.
2009-05-01 20:40:25 +03:00
Kalle Olavi Niemitalo
2a6042eb9b Add OpenSSL acknowledgements to elinks.conf.5.html in web
The warning about OpenSSL vs. GPL in the INSTALL file remains unchanged.
2009-05-01 00:40:23 +03:00
Kalle Olavi Niemitalo
21697bfa27 Delete the unused help2doc script
The help2doc script was replaced with help2xml on 2008-05-03.
2009-05-01 00:00:42 +03:00
Kalle Olavi Niemitalo
922ef4cd9a doc fix in help2xml script 2009-04-30 22:52:49 +03:00
Kalle Olavi Niemitalo
e3ce7e4274 Bug 1070: Add fbterm to terminal options dialog box 2009-04-26 18:43:53 +03:00
Witold Filipczyk
7751102ce7 Bug 1070: Support for fbterm.
fbterm uses different 256 color sequences than xterm.
color256_seqs are part of the driver info.
2009-04-26 18:12:00 +03:00
Kalle Olavi Niemitalo
6dfc25f5d2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS
	src/config/options.c (session-specific options vs. TERM_* constants)
2009-04-26 17:16:00 +03:00
Kalle Olavi Niemitalo
a5f273446e big dialogs: call it enhancement 1075 in NEWS
The changes were originally made without a bug number,
but an enhancement request has now been filed in the bugzilla,
so mention the number in NEWS.
2009-04-26 17:07:35 +03:00
Kalle Olavi Niemitalo
8acf2e36c3 big dialogs: Always show help in terminal options dialog
We now have scrollable dialog boxes so the height check is no longer
necessary.
2009-04-26 17:07:03 +03:00
Kalle Olavi Niemitalo
35acde4a10 big dialogs: fix unused term in dlg_format_text_do
Fix this error when configured with --enable-debug --disable-utf-8:

      [CC]   src/bfu/text.o
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.13/src/bfu/text.c: In function ‘dlg_format_text_do’:
/home/Kalle/src/elinks-0.13/src/bfu/text.c:220: error: unused variable ‘term’
2009-04-26 17:07:02 +03:00
Kalle Olavi Niemitalo
fe8cd7d7ba big dialogs: fix unused term in dlg_format_buttons
Fix this error when configured with --enable-debug --disable-utf-8:

      [CC]   src/bfu/button.o
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.13/src/bfu/button.c: In function ‘dlg_format_buttons’:
/home/Kalle/src/elinks-0.13/src/bfu/button.c:122: error: unused variable ‘term’
2009-04-26 17:07:02 +03:00
Kalle Olavi Niemitalo
a91a08f82b Named constants in terminal option defaults
When setting up default values for terminal options, use named
constants like TERM_VT100 or COLOR_MODE_16, rather than plain integers
like 1.  This is just to make the source code easier to read and
perhaps more resistant to future bugs.  The binary should not change.
2009-04-19 20:32:37 +03:00
Kalle Olavi Niemitalo
5e0032551b Fix out-of-memory crash in globhist
If globhist_simple_search ran out of memory in stracpy(search_url), it
could leave gh_last_searched_title pointing to freed memory and cause
a crash in the next call.  Fix by not freeing gh_last_searched_title.
It is then possible to have gh_last_searched_title and
gh_last_searched_url pointing to strings from different searches;
but that was already possible if stracpy(search_title) failed.

Because this bug occurs only in out-of-memory situations and I don't
think ELinks in general has been properly tested in those, the fix is
perhaps not worth mentioning in NEWS and backporting to elinks-0.11.
2009-04-19 20:25:37 +03:00
Kalle Olavi Niemitalo
3bcca8e889 Bug 1071: NEWS entry 2009-04-05 21:00:10 +03:00