1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-20 00:15:31 +00:00

Merge branch 'elinks-0.12' into elinks-0.13

Conflicts:
	NEWS: merged
	configure.in: VERSION changed in elinks-0.12; kept 0.13.GIT
	doc/man/man1/elinks.1.in: regenerated
	doc/man/man5/elinks.conf.5: regenerated
	doc/man/man5/elinkskeys.5: regenerated
	po/fr.po: kept 0.13.GIT
	po/pl.po: kept 0.13.GIT
This commit is contained in:
Kalle Olavi Niemitalo 2009-05-31 16:18:23 +03:00 committed by Kalle Olavi Niemitalo
commit 683cfe4c86
11 changed files with 164 additions and 22 deletions

22
NEWS
View File

@ -72,11 +72,11 @@ have already been considered.
(mostly reverted)
//////////////////////////////////////////////////////////////////////
ELinks 0.12pre3.GIT now:
------------------------
ELinks 0.12pre4:
----------------
To be released as 0.12pre4, 0.12rc1, or even 0.12.0. This branch also
includes the changes listed under ``ELinks 0.11.6.GIT now'' below.
Released on 2009-05-31. This release also included the changes listed
under ``ELinks 0.11.6.GIT now'' below.
Incompatibilities:
@ -87,11 +87,21 @@ Incompatibilities:
Other changes:
* critical bug 1071: Fix crash in get_dom_node_child.
* Debian bug 528661: If using GNUTLS 2.1.7 or later, disable various
TLS extensions (including CERT and SERVERNAME) to help handshaking
with the SSLv3-only bugzilla.novell.com.
* Debian build bug 526349: Include asciidoc.py from AsciiDoc 7.1.2,
to remove all dependencies on the installed version.
* build enhancement: Recognize ``configure --without-tre''.
Bugs that should be removed from NEWS before the 0.12.0 release:
* critical bug 1071: Fix crash in get_dom_node_child. ELinks 0.12pre1
was the first release that had this bug.
* bug 765: Opening a new tab no longer asks about the document of the
previous tab. ELinks 0.12pre1 was the first release that had this
bug.
ELinks 0.12pre3:
----------------
@ -134,7 +144,7 @@ Bugs that should be removed from NEWS before the 0.12.0 release:
* critical bug 1067: Fixed a crash in the RSS parser that ``configure
--enable-html-highlight'' enables. ELinks 0.12pre1 was the first
release that supported RSS at all.
release that had this bug.
* bug 1069: ELinks didn't report ECMAScript errors, even if the
ecmascript.error_reporting option was turned on. ELinks 0.12pre2
was the first release that had this bug.

View File

@ -1148,23 +1148,35 @@ else
GNUTLS_LIBS=`pkg-config --libs gnutls`
AC_MSG_RESULT([[yes: $GNUTLS_CFLAGS $GNUTLS_LIBS]])
# Verify if it's really usable. gnutls_session was
# renamed to gnutls_session_t before GNU TLS 1.2.0
# (on 2004-06-13); ELinks now requires this.
AC_MSG_CHECKING([[whether GNUTLS can be linked with]])
EL_SAVE_FLAGS
LIBS="$GNUTLS_LIBS $LIBS"
CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
# Verify if it's really usable. gnutls_session was
# renamed to gnutls_session_t before GNU TLS 1.2.0
# (on 2004-06-13); ELinks now requires this.
AC_MSG_CHECKING([[whether GNUTLS can be linked with]])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
[[gnutls_session_t dummy;
gnutls_check_version(NULL)]])],
gnutls_check_version(NULL)]])],
[cf_result=yes],
[cf_result=no])
AC_MSG_RESULT([[$cf_result]])
if test "$cf_result" = yes; then
# According to gnutls/NEWS, the function was originally
# added as gnutls_set_default_priority2 in GNUTLS 2.1.4
# (released 2007-10-27) and then renamed to
# gnutls_priority_set_direct in GNUTLS 2.1.7 (released
# 2007-11-29).
AC_CHECK_FUNCS([gnutls_priority_set_direct])
fi
EL_RESTORE_FLAGS
else
AC_MSG_RESULT([[$cf_result]])
fi
# This can match either AC_MSG_CHECKING above. A bit hacky...
AC_MSG_RESULT([[$cf_result]])
if test "$cf_result" = yes; then
EL_CONFIG(CONFIG_GNUTLS, [GNUTLS])

View File

@ -1,3 +1,6 @@
Make GPM emit mouse-wheel-only events so you can use the wheel to
scroll in ELinks. GPM 1.20.3pre5 already contains a similar patch.
--- gpm-1.20.1/src/gpm.c.old 2006-07-27 22:52:10.095084528 +0200
+++ gpm-1.20.1/src/gpm.c 2006-07-27 22:52:48.503245600 +0200
@@ -530,7 +530,7 @@

View File

@ -1,11 +1,11 @@
.\" Title: elinks
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: 03/29/2009
.\" Date: 05/31/2009
.\" Manual: The Elinks text-browser
.\" Source: ELinks 0.13.GIT
.\"
.TH "ELINKS" "1" "03/29/2009" "ELinks 0\&.13\&.GIT" "The Elinks text\-browser"
.TH "ELINKS" "1" "05/31/2009" "ELinks 0\&.13\&.GIT" "The Elinks text\-browser"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)

View File

@ -1,11 +1,11 @@
.\" Title: elinks.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: 03/29/2009
.\" Date: 05/31/2009
.\" Manual: ELinks configuration file
.\" Source: ELinks 0.13.GIT
.\"
.TH "ELINKS\&.CONF" "5" "03/29/2009" "ELinks 0\&.13\&.GIT" "ELinks configuration file"
.TH "ELINKS\&.CONF" "5" "05/31/2009" "ELinks 0\&.13\&.GIT" "ELinks configuration file"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@ -1701,6 +1701,10 @@ Terminal type; matters mostly only when drawing frames and dialog box borders:
.RS 4
\h'-04'\(bu\h'+03'4 is FreeBSD
.RE
.sp
.RS 4
\h'-04'\(bu\h'+03'5 is fbterm
.RE
.RE
.PP
terminal\&._template_\&.latin1_title \fB[0|1]\fR (default: 1)
@ -1785,6 +1789,11 @@ ELinks
document color handling will still assume the background is black so if you have a bright background you might experience contrast problems)\&. Note that this option makes sense only when colors are enabled\&.
.RE
.PP
terminal\&._template_\&.italic \fB[0|1]\fR (default: 0)
.RS 4
If we should use italics\&.
.RE
.PP
terminal\&._template_\&.underline \fB[0|1]\fR (default: 0)
.RS 4
If we should use underline or enhance the color instead\&.

View File

@ -457,7 +457,7 @@ utf8_step_forward(unsigned char *string, unsigned char *end,
case UTF8_STEP_CELLS_FEWER:
case UTF8_STEP_CELLS_MORE:
while (steps < max) {
while (steps < max && current < end) {
unicode_val_T u;
unsigned char *prev = current;
int width;

View File

@ -0,0 +1,11 @@
#! /bin/sh -e
./utf8-step-test forward cells-more 999 日本人 9 6
./utf8-step-test forward cells-more 6 日本人 9 6
./utf8-step-test forward cells-more 5 日本人 9 6
./utf8-step-test forward cells-more 4 日本人 6 4
./utf8-step-test forward cells-fewer 999 日本人 9 6
./utf8-step-test forward cells-fewer 6 日本人 9 6
./utf8-step-test forward cells-fewer 5 日本人 6 4
./utf8-step-test forward cells-fewer 4 日本人 6 4

View File

@ -0,0 +1,85 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "intl/charsets.h"
#include "util/test.h"
enum direction {
DIRECTION_FORWARD,
DIRECTION_BACKWARD
};
static enum direction
parse_direction(const char *name)
{
if (strcmp(name, "forward") == 0)
return DIRECTION_FORWARD;
else if (strcmp(name, "backward") == 0)
return DIRECTION_BACKWARD;
else
die("direction must be forward or backward, not %s\n", name);
}
static enum utf8_step
parse_way(const char *name)
{
if (strcmp(name, "characters") == 0)
return UTF8_STEP_CHARACTERS;
else if (strcmp(name, "cells-fewer") == 0)
return UTF8_STEP_CELLS_FEWER;
else if (strcmp(name, "cells-more") == 0)
return UTF8_STEP_CELLS_MORE;
else
die("way must be characters, cells-fewer, or cells-more; not %s\n", name);
}
int
main(int argc, char **argv)
{
enum direction direction;
enum utf8_step way;
int max_steps;
unsigned char *begin, *end;
int expect_bytes;
int expect_steps;
int bytes;
int steps;
if (argc != 7)
die("usage: %s (forward|backward) (characters|cells-fewer|cells-more) \\\n"
"\tMAX-STEPS STRING EXPECT-BYTES EXPECT-STEPS\n",
argc ? argv[0] : "utf8-step-test");
direction = parse_direction(argv[1]);
way = parse_way(argv[2]);
max_steps = atoi(argv[3]);
begin = argv[4];
end = begin + strlen(begin);
expect_bytes = atoi(argv[5]);
expect_steps = atoi(argv[6]);
switch (direction) {
case DIRECTION_FORWARD:
bytes = utf8_step_forward(begin, end, max_steps, way, &steps) - begin;
break;
case DIRECTION_BACKWARD:
bytes = end - utf8_step_backward(end, begin, max_steps, way, &steps);
break;
default:
abort();
}
if (bytes != expect_bytes || steps != expect_steps)
die("FAIL: bytes=%d (expected %d); steps=%d (expected %d)\n",
bytes, expect_bytes, steps, expect_steps);
return 0;
}

View File

@ -253,7 +253,7 @@ init_ssl_connection(struct socket *socket)
socket->ssl = SSL_new(context);
if (!socket->ssl) return S_SSL_ERROR;
#elif defined(CONFIG_GNUTLS)
const unsigned char server_name[] = "localhost";
/* const unsigned char server_name[] = "localhost"; */
ssl_t *state = mem_alloc(sizeof(ssl_t));
if (!state) return S_SSL_ERROR;
@ -278,13 +278,21 @@ init_ssl_connection(struct socket *socket)
return S_SSL_ERROR;
}
#ifdef HAVE_GNUTLS_PRIORITY_SET_DIRECT
if (gnutls_priority_set_direct(*state, "NORMAL:-CTYPE-OPENPGP", NULL)) {
gnutls_deinit(*state);
mem_free(state);
return S_SSL_ERROR;
}
#else
gnutls_set_default_priority(*state);
gnutls_handshake_set_private_extensions(*state, 1);
#endif
/* gnutls_handshake_set_private_extensions(*state, 1); */
gnutls_cipher_set_priority(*state, cipher_priority);
gnutls_kx_set_priority(*state, kx_priority);
gnutls_certificate_type_set_priority(*state, cert_type_priority);
/* gnutls_certificate_type_set_priority(*state, cert_type_priority);
gnutls_server_name_set(*state, GNUTLS_NAME_DNS, server_name,
sizeof(server_name) - 1);
sizeof(server_name) - 1); */
socket->ssl = state;
#endif

View File

@ -540,6 +540,7 @@ loading_callback(struct download *download, struct session *ses)
if (d == DO_MOVE_DISPLAY) {
download->callback = (download_callback_T *) doc_loading_callback;
download->data = ses;
display_timer(ses);
}

View File

@ -6,6 +6,9 @@
#include <stdlib.h>
static inline void
#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2
__attribute__((noreturn))
#endif
die(const char *msg, ...)
{
va_list args;