1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00
Commit Graph

3224 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
9e3762e01c gpm-wheel.patch is not needed in 1.20.3pre5 and later 2009-05-31 10:57:46 +03:00
Kalle Olavi Niemitalo
f779054f05 NEWS: bug 765 has been fixed 2009-05-30 15:27:18 +03:00
Kalle Olavi Niemitalo
681e377027 Debian bug 528661: Check for gnutls_priority_set_direct
Avoid compilation error with GNUTLS 1.2.9:

/home/Kalle/src/elinks-0.12/src/network/ssl/ssl.c:258: error: implicit declaration of function ‘gnutls_priority_set_direct’

If the function is not available, use gnutls_set_default_priority instead.
Perhaps it'll work with bugzilla.novell.com, perhaps not.
2009-05-30 14:34:01 +03:00
Witold Filipczyk
864fa0b56a Debian bug 528661: Disable some TLS extensions on GNUTLS.
- gnutls_handshake_set_private_extensions: Do not enable private cipher
  suites that might not be supported by anything other than GNUTLS.
  The GNUTLS 2.8.0 documentation notes that enabling these extensions
  can cause interoperability problems.
- gnutls_set_default_priority: Explicitly disable OpenPGP certificates.
- gnutls_certificate_type_set_priority: Do not enable OpenPGP certificates.
  The GNUTLS 2.8.0 documentation notes that OpenPGP certificate support
  requires libgnutls-extra.  Because libgnutls-extra 2.2.0 and later are
  under GPLv3-or-later and thus not GPLv2 compatible, ELinks doesn't use
  libgnutls-extra, so OpenPGP certificates didn't work anyway.
- gnutls_server_name_set: Do not tell the server the hostname from the URL.
  This was supposed to let the server choose the appropriate certificate
  for each name-based virtual host, but ELinks actually always sent just
  "localhost", so it didn't work anyway.  This will have to be revisited
  when ELinks is changed to actually verify the subject name from the
  server's certificate (ELinks bug 1024).

These changes should help ELinks negotiate SSL with bugzilla.novell.com.

[NEWS and commit message by me.  --KON]
2009-05-30 11:21:17 +03:00
Miciah Dashiel Butler Masters
1eebbb9ede 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.
(cherry picked from commit 76377d9714)
2009-05-27 22:15:23 +03:00
Miciah Dashiel Butler Masters
f5103d0cc0 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.
(cherry picked from commit d6116ca83a)
2009-05-27 22:14:19 +03:00
Miciah Dashiel Butler Masters
f4a231cb9a Bug 765: Bypass checks on base tab's view state when copying to a new tab
In setup_session, use copy_location, add_to_history, and
render_document_frames instead of goto_uri and copy_vs to copy the base
tab's view state.  By avoiding goto_uri, setup_session now bypasses MIME
checks, form post confirmations, malicious URL checks, and so on when
copying the base tab's current location and view state to the new tab,
so the new tab should get exactly what was loaded in the base tab.

This fixes bug 765: Opening a new tab can ask about the document of the
previous tab.

(cherry picked from commit 5c96d430c9)

Conflicts:

	src/session/session.c:
		Both elinks-0.12 and master had the ses->doc_view->vs
		= vs assignment, but only elinks-0.12 had vs->doc_view
		= ses->doc_view as well.  Also, struct connection_state
		had been added after the original patch.
2009-05-27 22:05:22 +03:00
Kalle Olavi Niemitalo
b6aca8d9a7 Add tests for utf8_step_forward
I am not hooking these to "make test", for two reasons:

1. utf8_step_forward is inside #ifdef CONFIG_UTF8 and I don't see
   how to make tests conditional on such options.

2. test/libtest.sh was copied from Git, which is under GPLv2-only.
   Adding more dependencies on it could make ELinks more difficult
   to relicense under GPLv2-or-later.
2009-05-27 01:11:03 +03:00
Kalle Olavi Niemitalo
5aae1b81cc Define die() with __attribute__((noreturn))
This will prevent some compiler warnings in the test I'm about to
commit.
2009-05-27 01:11:03 +03:00
Kalle Olavi Niemitalo
6d7b904fe3 Don't overcount in utf8_step_forward
Reported by witekfl.
2009-05-27 01:11:02 +03:00
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
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
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
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
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
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
Kalle Olavi Niemitalo
b4567b402b Bug 1071: Add precautionary assertions and recovery 2009-04-05 20:59:41 +03:00
Kalle Olavi Niemitalo
b7f45ca80b Bug 1071: Add NULL check in get_dom_node_list_index
If the parent parameter of get_dom_node_list_index referred to a node
that did not have children, then get_dom_node_list called by it could
return the address of a null pointer, and get_dom_node_list_index would
then pass that null pointer to get_dom_node_list_pos, which would crash.
That would be the same kind of crash as the one in get_dom_node_child.
It never happened in practice though: because all calls are in the form
get_dom_node_list_index(node->parent, node), the list must contain at
least the given node, and the pointer cannot be null.  The documentation
of get_dom_node_list_index allows arbitrary nodes as arguments however,
so it's best to add a check.
2009-04-04 22:41:43 +03:00
Kalle Olavi Niemitalo
0c1a27ee99 Bug 1071: Document get_dom_node_value return values 2009-04-04 22:38:56 +03:00
Kalle Olavi Niemitalo
8465b19d0c Bug 1071: Fix null-ptr crash in get_dom_node_child
struct dom_node contains a union that contains various structs that
have members of type struct dom_node * in them.
get_dom_node_list_by_type returns the address (struct dom_node **) of
one of those members, or NULL.  However the member itself can also be
NULL if no nodes have been added to the list and the list has thus not
yet been allocated.  (add_to_dom_node_list lazily allocates the lists.)
get_dom_node_child did not expect a null pointer there and crashed, as
shown in bug 1071.  Fix by adding a check so that it treats a NULL list
as an empty list.
2009-04-04 21:56:53 +03:00
Kalle Olavi Niemitalo
22fe77d14f ELinks 0.12pre3 was released on 2009-03-29. 2009-03-29 15:05:34 +03:00
Kalle Olavi Niemitalo
a845050c3b ELinks 0.12pre3.GIT 2009-03-29 01:14:06 +02:00
Kalle Olavi Niemitalo
3801698ff1 ELinks 0.12pre3 2009-03-29 01:14:03 +02:00
Kalle Olavi Niemitalo
e2d60a373a NEWS: ELinks 0.12pre3 2009-03-29 01:13:42 +02:00
Kalle Olavi Niemitalo
d7d18e4e43 bug 1047: inline functions C99 conformance
C99 6.7.4p3 and 6.7.4p6 set some constraints on what can be done in
inline functions and how they can be declared.  In particular, any
function declared inline must also be defined in the same translation
unit.  To comply with that, remove inline specifiers from function
declarations in header files when the functions are not also defined
in those header files.

Sun Studio 11 on Solaris 9 is stricter than C99 and does not allow
references to static identifiers in extern inline functions.  Make the
configure script detect this and define NONSTATIC_INLINE accordingly
in config.h.  Then use that in the definitions of all non-static
inline functions.

Document the restrictions and this scheme in doc/hacking.txt.
2009-03-28 20:15:08 +02:00
Kalle Olavi Niemitalo
255cbf6ae0 doc: We're using Git rather than CVS. 2009-03-24 07:37:16 +02:00
Kalle Olavi Niemitalo
58b5e3968f Restore original wording of Pasky's comment
The SEE_FLAGS configury may be derived from Guile but there are no
SEE_FLAGS in the Guile source tree.
2009-03-24 07:37:16 +02:00
Kalle Olavi Niemitalo
d84166a641 Finnish translation updates 2009-03-24 00:54:57 +02:00
Kalle Olavi Niemitalo
16c3a7c350 NEWS: sync from 0.11.6 2009-03-22 00:48:49 +02:00
Kalle Olavi Niemitalo
1eb4d60128 Finnish translation partial update 2009-03-18 10:16:38 +02:00
Witold Filipczyk
7854b70bae pl.po updated. 2009-03-13 15:07:00 +01:00
Kalle Olavi Niemitalo
5a43c55c9e Rewrap lines in option documentation.
Documentation strings of most options used to contain a "\n" at the
end of each source line.  When the option manager displayed these
strings, it treated each "\n" as a hard newline.  On 80x24 terminals
however, the option description window has only 60 columes available
for the text (with the default setup.h), and the hard newlines were
further apart, so the option manager wrapped the text a second time,
resulting in rather ugly output where long lones are interleaved with
short ones.  This could also cause the text to take up too much
vertical space and not fit in the window.

Replace most of those hard newlines with spaces so that the option
manager (or perhaps BFU) will take care of the wrapping.  At the same
time, rewrap the strings in source code so that the source lines are
at most 79 columns wide.

In some options though, there is a list of possible values and their
meanings.  In those lists, if the description of one value does not
fit in one line, then continuation lines should be indented.  The
option manager and BFU are not currently able to do that.  So, keep
the hard newlines in those lists, but rewrap them to 60 columns so
that they are less likely to require further wrapping at runtime.
2009-03-08 15:18:10 +02:00
Kalle Olavi Niemitalo
a277c0ad3b Wrap option descriptions in --config-help, --long-help 2009-03-08 13:29:51 +02:00
Kalle Olavi Niemitalo
bd5d3a173f Add wrap_option_desc() in conf.c, still static
Move the description wrapping code from smart_config_output_fn()
to a separate function wrap_option_desc() so that --config-help
can soon use it too.
2009-03-08 13:29:51 +02:00