Commit eccdce41 authored by Atsuhito Kohda's avatar Atsuhito Kohda Committed by Axel Beckert

Imported Debian patch 2.8.6-13

parent 47217047
Changes since Lynx 2.8 release
===============================================================================
2005-06-02 (2.8.6dev.12)
* add rw.po, vi.po from
http://www.iro.umontreal.ca/translation/maint/lynx/
* modify ".lss" files to work equally well on terminals setup with white text
on black background, or the reverse. This also required fixing a few places
in LYsubwindow() and curses_w_style() to make window backgrounds use the
colors given in the ".lss" default- and normal-colors lines -TD
* make ".lss" example files somewhat readable by modifying parser to remove
blanks from the color description lines and modifying the example files to
use this feature -TD
* modify scripts/cfg2html.pl to use strict variable checking, Getopt::Std
to eliminate a uninitialized variable warning -TD
* modified fix for slang 2.0 which makes it clearer that the last parameter
of SLexpand_escaped_string is for UTF-8 -JED
* when SOURCE_CACHE_MEMORY is used, avoid repeated realloc's of the same
memory chunk (really annoying for a long document) -LP
* HTChunk extended to a linked list of chunks, additional put methods added.
Useful for pool infrastructure -LP
* add ".h" to .SUFFIXES rule in src/chrtrans/makefile.in to work around change
made in NetBSD "make" late in 2003, incorporated into the 2.0 release.
The CVS change notes:
Trim .SUFFIXES to only contain those used in this file.
(reported by Stef Caunter, comments by Klaus Klein and Martin Husemann) -TD
* modify LYhighlight() to allow for the case where a form link extends for
several lines. It was not providing enough padding to fill in the "_"
characters past the first line of the link -TD
* modify LYwaddnstr() to account for the case where LYhighlight calls it to
display a link which extends beyond the current line, i.e., it should be
wrapped. When lynx is built to use curses-pads, the highlighting was instead
truncated since it was computed according to the pad's limits. Fixing this
exposes some related problems with off-by-one's in GridText.c -TD
* correct parsing of "key 0xNN" lines in command-scripts, had omitted a "!"
to invert a check (report by Silvio Moioli) -TD
* correct off-by-one in expression for LYHideCursor(), since dev.6 changes
modified the LYcolLimit variable, changing it from the last usable column
value to the number of columns (report by DK) -TD
* correct expression in HText_appendCharacter() which was simplified in
2.8.5dev.4, but broke a comparison used for text-justification -TD
* adjust wide-character offset computation in HText_trimHightext() to account
for soft newlines, i.e., the cell reserved to show continuation lines -TD
* modify source-view toggle to keep the current anchor visible. Toggling
source view may change the line number on which the anchor is found,
requiring some adjustment. This feature is implemented only for source
cached pages -TD
* remove obsolete ifdef in LYwaddnstr() for ncurses 5.1's experimental UTF-8
support -TD
* modify HTConfirmCookie() and statusline() to allow cookie prompt message in
Japanese to not be truncated when using wide-curses -TD
* modify logic for locale_charset configuration variable so it is not modified
simply by saving the .lynxrc while in running in a non-locale configuration.
That does not alter the display charset used by lynx -TD
* correct calculation of extra space available for justification in
split_line() for the wide-curses configuration. Changes from dev.6
made this count formatting control characters twice, resulting in some
lines too long when justification was enabled -TD
* improve description of command-line option syntax in the manpage, including
noting how to find the default values for most options (Debian #292393) -TD
* modify is_true/is_false macros for processing command-line options to accept
"true" and "false" strings for consistency with the lynx.cfg parser, and to
ignore case of the boolean option values -TD
* add -notitle option to suppress title line and following blank line to
maximize screen use for small displays (request by Daniele Baggio) -TD
* add -nomargins option to suppress left/right margins to maximize screen use
for small displays (request by Daniele Baggio) -TD
* add null-pointer checks in HText_setLastOptionValue() to guard against empty
<select> (report by Al Viro) -TD
* fixes to allow compiling with slang 2.0 prerelease 5 -GV
* fix to avoid divide-by-zero in ws_netread() -GV
* modify ifdef for popup_choice() to work with handle_LYK_LINEWRAP_TOGGLE() on
NetBSD 2.0 (report by Gabor Z Papp) -TD
2005-01-05 (2.8.6dev.11)
* add presentation type for application/xml and text/xml mime types as per
http://www.w3.org/TR/xhtml-media-types/
......@@ -2498,7 +2569,7 @@ recently, FreeBSD 4.1, NetBSD 1.5 and OpenBSD 2.8 (curses/ncurses).
ttyname(), and adding fallback definitions for Win32 and VMS -TD
* for slang configurations past 1.3.6, call SLsmg_touch_screen() in
start_curses to ensure that the screen is properly initialized for non-bce
terminals (John Davis)
terminals -JED (John Davis)
* move call on lynx_initialize_keymaps() for slang configuration into the
start_curses() function, avoiding premature reference to $TERM, especially
when Lynx is running in dump mode, e.g., via cron (report by Hamish Moffatt
......
......@@ -637,7 +637,6 @@ void LYUCPushAssumed(HTParentAnchor *anchor)
*/
int LYUCPopAssumed(void)
{
if (pushed_assume_LYhndl >= 0) {
/* some diagnostics */
if (UCLYhndl_for_unspec != pushed_assume_LYhndl)
......
......@@ -13,7 +13,7 @@
* (c) Copyright CERN 1991 - See Copyright.html
*/
#define HASH_SIZE 101 /* Arbitrary prime. Memory/speed tradeoff */
#define HASH_SIZE 1001 /* Arbitrary prime. Memory/speed tradeoff */
#include <HTUtils.h>
#include <HTAnchor.h>
......
......@@ -32,7 +32,7 @@ extern "C" {
#endif
/* Main definition of anchor
* =========================
*/ struct _HTAnchor {
*/ struct _HTAnchor {
/* Generic anchor */
HTParentAnchor0 *parent; /* Parent of this anchor (self for adults) */
};
......
......@@ -83,13 +83,19 @@ void HTChunkClear(HTChunk *ch)
ch->allocated = 0;
}
/* Free a chunk
* ------------
/* Free a chunk (and it's chain, if any)
* -------------------------------------
*/
void HTChunkFree(HTChunk *ch)
{
FREE(ch->data);
FREE(ch);
HTChunk *next;
do {
next = ch->next;
FREE(ch->data);
FREE(ch);
ch = next;
} while (ch != NULL);
}
/* Realloc the chunk
......@@ -119,8 +125,6 @@ BOOL HTChunkRealloc(HTChunk *ch, int growby)
/* Append a character
* ------------------
*/
/* Warning: the code of this function is defined as macro in SGML.c. Change
the macro or undefine it in SGML.c when changing this function. -VH */
void HTChunkPutc(HTChunk *ch, char c)
{
if (ch->size >= ch->allocated) {
......@@ -130,6 +134,20 @@ void HTChunkPutc(HTChunk *ch, char c)
ch->data[ch->size++] = c;
}
/* like above but no realloc: extend to another chunk if necessary */
HTChunk *HTChunkPutc2(HTChunk *ch, char c)
{
if (ch->size >= ch->allocated) {
HTChunk *chunk = HTChunkCreateMayFail(ch->growby, ch->failok);
ch->next = chunk;
HTChunkPutc(chunk, c);
return chunk;
}
ch->data[ch->size++] = c;
return ch;
}
/* Ensure a certain size
* ---------------------
*/
......@@ -139,13 +157,17 @@ void HTChunkEnsure(HTChunk *ch, int needed)
return;
ch->allocated = needed - 1 - ((needed - 1) % ch->growby)
+ ch->growby; /* Round up */
ch->data = ch->data ? (char *) realloc(ch->data, ch->allocated)
: typecallocn(char, ch->allocated);
ch->data = (ch->data
? (char *) realloc(ch->data, ch->allocated)
: typecallocn(char, ch->allocated));
if (ch->data == NULL)
outofmem(__FILE__, "HTChunkEnsure");
}
/*
* Append a block of characters.
*/
void HTChunkPutb(HTChunk *ch, const char *b, int l)
{
if (l <= 0)
......@@ -160,9 +182,34 @@ void HTChunkPutb(HTChunk *ch, const char *b, int l)
ch->size += l;
}
/* like above but no realloc: extend to another chunk if necessary */
HTChunk *HTChunkPutb2(HTChunk *ch, const char *b, int l)
{
if (l <= 0)
return ch;
if (ch->size + l > ch->allocated) {
HTChunk *chunk;
int m = ch->allocated - ch->size;
memcpy(ch->data + ch->size, b, m);
ch->size += m;
chunk = HTChunkCreateMayFail(ch->growby, ch->failok);
ch->next = chunk;
HTChunkPutb(chunk, b + m, l - m);
return chunk;
}
memcpy(ch->data + ch->size, b, l);
ch->size += l;
return ch;
}
#define PUTC(code) ch->data[ch->size++] = (char)(code)
#define PUTC2(code) ch->data[ch->size++] = (char)(0x80|(0x3f &(code)))
/*
* Append a character encoded as UTF-8.
*/
void HTChunkPutUtf8Char(HTChunk *ch, UCode_t code)
{
int utflen;
......@@ -255,3 +302,23 @@ void HTChunkPuts(HTChunk *ch, const char *s)
}
}
}
/* like above but no realloc: extend to another chunk if necessary */
HTChunk *HTChunkPuts2(HTChunk *ch, const char *s)
{
const char *p;
if (s != NULL) {
for (p = s; *p; p++) {
if (ch->size >= ch->allocated) {
HTChunk *chunk = HTChunkCreateMayFail(ch->growby, ch->failok);
ch->next = chunk;
HTChunkPuts(chunk, p);
return chunk;
}
ch->data[ch->size++] = *p;
}
}
return ch;
}
......@@ -19,13 +19,16 @@
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
typedef struct _HTChunk HTChunk;
struct _HTChunk {
int size; /* In bytes */
int growby; /* Allocation unit in bytes */
int allocated; /* Current size of *data */
char *data; /* Pointer to malloc'd area or 0 */
int failok; /* allowed to fail without exiting program? */
} HTChunk;
HTChunk *next; /* pointer to the next chunk */
};
/*
* Initialize a chunk's allocation data and allocation-increment.
......@@ -191,6 +194,31 @@ extern "C" {
extern void HTChunkTerminate(HTChunk *ch);
/* like the above but no realloc: extend to another chunk if necessary */
/*
*
* Append a character (string, data) to a chunk
*
* ON ENTRY,
*
* ch A valid chunk pointer made by HTChunkCreate()
*
* c The character to be appended
*
* ON EXIT,
*
* returns original chunk or a pointer to the new chunk
* (orginal chunk is referenced to the new one
* by the field 'next')
*
*/
extern HTChunk *HTChunkPutc2(HTChunk *ch, char c);
extern HTChunk *HTChunkPuts2(HTChunk *ch, const char *str);
extern HTChunk *HTChunkPutb2(HTChunk *ch, const char *b, int l);
/* New pool infrastructure: UNlike the above, store data using alignment */
extern HTChunk *HTChunkPutb0(HTChunk *ch, const char *b, int l);
#ifdef __cplusplus
}
#endif
......
......@@ -130,7 +130,7 @@ typedef struct _connection {
#elif defined(SYS_HPUX)
# if defined(_XOPEN_SOURCE_EXTENDED) && defined(SO_PROTOTYPE)
# define LY_SOCKLEN socklen_t
# else /* HPUX 10.20, etc. */
# else /* HPUX 10.20, etc. */
# define LY_SOCKLEN int
# endif
#elif defined(SYS_TRU64)
......@@ -1278,11 +1278,7 @@ static int get_listen_socket(void)
/* Cast to generic sockaddr */
sizeof(soc_address)
#ifndef SHORTENED_RBIND
#ifdef INET6
socks_bind_remoteAddr
#else
,socks_bind_remoteAddr
#endif /* INET6 */
#endif /* !SHORTENED_RBIND */
);
else
......
......@@ -968,24 +968,18 @@ int HTMemCopy(HTChunk *chunk, HTStream *sink)
{
HTStreamClass targetClass;
int bytes = 0;
const char *data = chunk->data;
int rv = HT_OK;
targetClass = *(sink->isa);
HTReadProgress(0, 0);
for (;;) {
for (; chunk != NULL; chunk = chunk->next) {
/* Push the data down the stream a piece at a time, in case we're
* running a large document on a slow machine.
*/
int n = INPUT_BUFFER_SIZE;
(*targetClass.put_block) (sink, chunk->data, chunk->size);
bytes += chunk->size;
if (n > chunk->size - bytes)
n = chunk->size - bytes;
if (n == 0)
break;
(*targetClass.put_block) (sink, data, n);
bytes += n;
data += n;
HTReadProgress(bytes, 0);
HTDisplayPartial();
......
/* The Stream class definition -- libwww
STREAM OBJECT DEFINITION
A Stream object is something which accepts a stream of text.
The creation methods will vary on the type of Stream Object. All creation
methods return a pointer to the stream type below.
As you can see, but the methods used to write to the stream and close it are
pointed to be the object itself.
*/
#ifndef HTSTREAM_H
#define HTSTREAM_H
......@@ -25,12 +25,8 @@ extern "C" {
/*
These are the common methods of all streams. They should be
self-explanatory, except for end_document which must be called before free.
It should be merged with free in fact: it should be dummy for new streams.
The put_block method was write, but this upset systems which had macros for
write().
self-explanatory.
*/
typedef struct _HTStreamClass {
......@@ -38,18 +34,13 @@ extern "C" {
void (*_free) (HTStream *me);
void (*_abort) (HTStream *me,
HTError e);
void (*_abort) (HTStream *me, HTError e);
void (*put_character) (HTStream *me,
char ch);
void (*put_character) (HTStream *me, char ch);
void (*put_string) (HTStream *me,
const char *str);
void (*put_string) (HTStream *me, const char *str);
void (*put_block) (HTStream *me,
const char *str,
int len);
void (*put_block) (HTStream *me, const char *str, int len);
} HTStreamClass;
......
......@@ -1643,11 +1643,10 @@ int HTDoConnect(const char *url,
#else
status = Rconnect(*s, (struct sockaddr *) &soc_address,
sizeof(soc_address));
#endif /* INET6 */
/*
* For long Rbind.
*/
#ifndef SHORTENED_RBIND
socks_bind_remoteAddr = soc_address.sin_addr.s_addr;
#endif
#endif /* INET6 */
} else
#endif /* SOCKS */
#ifdef INET6
......
......@@ -304,11 +304,13 @@ int ws_netread(int fd, char *buf, int len)
HTInfoMsg("Thread terminate Failed");
}
now_TickCount = GetTickCount();
if (now_TickCount > save_TickCount)
if (now_TickCount >= save_TickCount)
process_time = now_TickCount - save_TickCount;
else
process_time = now_TickCount + (0xffffffff - save_TickCount);
if (process_time == 0)
process_time = 1;
g_total_times += process_time;
g_total_bytes += exitcode;
......@@ -326,7 +328,7 @@ int ws_netread(int fd, char *buf, int len)
LeaveCriticalSection(&critSec_READ);
return ret_val;
}
#endif
#endif /* _WINDOWS */
/*
* Strip any username from the given string so we retain only the host.
......
......@@ -20,7 +20,8 @@
#include <SGML.h>
#include <HTMLDTD.h>
#include <HTCJK.h>
#include <HTAccess.h>
#include <HTCJK.h> /* FIXME: this doesn't belong in SGML.c */
#include <UCMap.h>
#include <UCDefs.h>
#include <UCAux.h>
......@@ -33,6 +34,7 @@
#include <LYGlobalDefs.h>
#include <LYStrings.h>
#include <LYLeaks.h>
#include <LYUtils.h>
#ifdef USE_COLOR_STYLE
# include <LYStyle.h>
......@@ -43,6 +45,8 @@
#define INVALID (-1)
static int sgml_offset;
#ifdef USE_PRETTYSRC
static char *entity_string; /* this is used for printing entity name.
......@@ -854,9 +858,9 @@ static void handle_marked(HTStream *context)
charset once it is in include - kw */
} else if (!strncmp(context->string->data, "![CDATA[", 8)) {
(*context->actions->_write) (context->target,
context->string->data + 8,
context->string->size - 11);
(*context->actions->put_block) (context->target,
context->string->data + 8,
context->string->size - 11);
}
return;
......@@ -1499,6 +1503,8 @@ static void SGML_character(HTStream *context, char c_in)
#endif
char saved_char_in = '\0';
++sgml_offset;
/*
* Now some fun with the preprocessor. Use copies for c and unsign_c ==
* clong, so that we can revert back to the unchanged c_in. - KW
......@@ -4474,9 +4480,23 @@ HTStream *SGML_new(const SGML_dtd * dtd,
}
#endif
sgml_offset = 0;
return context;
}
/*
* Return the offset within the document where we're parsing. This is used
* to help identify anchors which shift around while reparsing.
*/
int SGML_offset(void)
{
#ifdef USE_PRETTYSRC
return sgml_offset + psrc_view;
#else
return sgml_offset;
#endif
}
/* Asian character conversion functions
* ====================================
*
......
......@@ -25,9 +25,9 @@
extern "C" {
#endif
/*
SGML content types
*
* SGML content types
*
*/ typedef enum {
SGML_EMPTY, /* No content. */
SGML_LITTERAL, /* Literal character data. Recognize exact close tag only.
......@@ -203,8 +203,9 @@ Structured Object definition
void (*put_string) (HTStructured * me, const char *str);
void (*_write) (HTStructured * me, const char *str,
int len);
void (*put_block) (HTStructured * me, const char *str, int len);
/* HTStreamClass ends here */
int (*start_element) (HTStructured * me, int element_number,
const BOOL *attribute_present,
......@@ -238,6 +239,11 @@ Find a Tag by Name
extern HTTag *SGMLFindTag(const SGML_dtd * dtd,
const char *string);
/*
* Return the current offset within the file that SGML is parsing
*/
extern int SGML_offset(void);
/*
Create an SGML parser
......
......@@ -1221,7 +1221,7 @@ fi;
PACKAGE=lynx
# $Format: "VERSION=$ProjectVersion$"$
VERSION=2.8.6dev.11
VERSION=2.8.6dev.12
test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
......
......@@ -5,7 +5,7 @@ dnl and Jim Spath <jspath@mail.bcpl.lib.md.us>
dnl
dnl ask PRCS to plug-in the project-version for the configure-script.
dnl $Format: "AC_REVISION($ProjectVersion$)"$
AC_REVISION(2.8.6dev.11)
AC_REVISION(2.8.6dev.12)
# Save the original $CFLAGS so we can distinguish whether the user set those
# in the environment, or whether autoconf added -O and -g options:
......@@ -37,7 +37,7 @@ AC_ARG_WITH(system-type,
PACKAGE=lynx
dnl ask PRCS to plug-in the project-version for the packages.
# $Format: "VERSION=$ProjectVersion$"$
VERSION=2.8.6dev.11
VERSION=2.8.6dev.12
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(DESTDIR)
......
This diff is collapsed.
lynx-cur (2.8.6-13) unstable; urgency=low
* This is of 2.8.6dev.12
-- Atsuhito KOHDA <kohda@debian.org> Sun, 5 Jun 2005 08:18:01 +0900
lynx-cur (2.8.6-12) unstable; urgency=low
* Added Vietnamese translation for debconf messages. Thanks to Clytie
......
......@@ -3,10 +3,10 @@
# or Lynx_Dir:lynx.cfg (VMS)
#
# $Format: "#PRCS LYNX_VERSION \"$ProjectVersion$\""$
#PRCS LYNX_VERSION "2.8.6dev.11"
#PRCS LYNX_VERSION "2.8.6dev.12"
#
# $Format: "#PRCS LYNX_DATE \"$ProjectDate$\""$
#PRCS LYNX_DATE "Wed, 05 Jan 2005 16:42:15 -0800"
#PRCS LYNX_DATE "Thu, 02 Jun 2005 15:36:59 -0700"
#
# Definition pairs are of the form VARIABLE:DEFINITION
# NO spaces are allowed between the pair items.
......
1 LYNX
1
2 Name
lynx - a general purpose distributed information browser for the World
Wide Web
......@@ -38,13 +38,36 @@
(in the reference below options are with one dash before them and with
underscores).
- If the argument is only `-', then Lynx expects to receive the
arguments from stdin. This is to allow for the potentially very
long command line that can be associated with the -get_data or
-post_data arguments (see below). It can also be used to avoid
having sensitive information in the invoking command line (which
would be visible to other processes on most systems), especially
when the -auth or -pauth options are used.
Lynx provides many command-line options. Some options require a value
(string, number or keyword). These are noted in the reference below.
The other options set boolean values in the program. There are three
types of boolean options: set, unset and toggle. If no option value is
given, these have the obvious meaning: set (to true), unset (to false),
or toggle (between true/false). For any of these, an explicit value
can be given in different forms to allow for operating system
constraints, e.g.,
-center:off
-center=off
-center-
Lynx recognizes "1", "+", "on" and "true" for true values, and "0",
"-", "off" and "false" for false values. Other option-values are
ignored.
The default boolean, number and string option values that are compiled
into lynx are displayed in the help-message provided by lynx -help.
Some of those may differ according to how lynx was built; see the help
message itself for these values. The -help option is processed before
any option, including those that control reading from the lynx.cfg
file. Therefore runtime configuration values are not reflected in the
help-message.
- If the argument is only `-', then Lynx expects to receive the
arguments from the standard input. This is to allow for the
potentially very long command line that can be associated with
the -get_data or -post_data arguments (see below). It can also
be used to avoid having sensitive information in the invoking
command line (which would be visible to other processes on most
systems), especially when the -auth or -pauth options are used.
-accept_all_cookies
accept all cookies.
......@@ -158,7 +181,7 @@
to ask Lynx to force a core dump if a fatal error occurs.
-crawl with -traversal, output each page to a file. with -dump, format
output as with -traversal, but to stdout.
output as with -traversal, but to the standard output.
-curses_pads
toggles the use of curses "pad" feature which supports
......@@ -228,9 +251,9 @@
-ftp disable ftp access.
-get_data
properly formatted data for a get form are read in from stdin
and passed to the form. Input is terminated by a line that
starts with `---'.
properly formatted data for a get form are read in from the
standard input and passed to the form. Input is terminated by a
line that starts with `---'.
-head send a HEAD request for the mime headers.
......@@ -326,6 +349,9 @@
-nolog disable mailing of error messages to document owners.
-nomargins
disable left/right margins in the default style sheet.
-nonrestarting_sigwinch
This flag is not available on all systems, Lynx needs to be
compiled with HAVE_SIGACTION defined. If available, this flag
......@@ -358,6 +384,9 @@
-nostatus
disable the retrieval status messages.
-notitle
disable title and blank line from top of page.
-nounderline
disable underline video-attribute.
......@@ -383,9 +412,9 @@
windows or as lists of radio buttons.
-post_data
properly formatted data for a post form are read in from stdin
and passed to the form. Input is terminated by a line that
starts with `---'.
properly formatted data for a post form are read in from the
standard input and passed to the form. Input is terminated by a
line that starts with `---'.
-preparsed
show HTML source preparsed and reformatted when used with
......
......@@ -62,10 +62,40 @@ names can begin with double dash as well,
underscores and dashes can be intermixed in
option names (in the reference below options
are with one dash before them and with underscores).
.PP
\fILynx\fR provides many command-line options.
Some options require a value (string, number or keyword).
These are noted in the reference below.
The other options set boolean values in the program.
There are three types of boolean options: set, unset and toggle.
If no option value is given, these have the obvious meaning:
set (to true), unset (to false), or toggle (between true/false).
For any of these, an explicit value can be given in different
forms to allow for operating system constraints,
e.g.,
.RS
.nf
\fB-center:off\fP
\fB-center=off\fP
\fB-center-\fP
.fi
.RE
\fILynx\fR recognizes
"1", "+", "on" and "true" for true values, and
"0", "-", "off" and "false" for false values.
Other option-values are ignored.
.PP
The default boolean, number and string option values that are compiled
into lynx are displayed in the help-message provided by \fBlynx -help\fP.
Some of those may differ according to how lynx was built;
see the help message itself for these values.
The \fB-help\fP option is processed before any option, including those