Commit 5e0cf9b4 authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 2.8.7dev12

parent f0cc4320
-- $LynxId: CHANGES,v 1.325 2008/12/14 20:04:30 tom Exp $
-- $LynxId: CHANGES,v 1.352 2008/12/31 23:27:54 tom Exp $
===============================================================================
Changes since Lynx 2.8 release
===============================================================================
2008-12-31 (2.8.7dev.12)
* add configure option --enable-ascii-ctypes to enable EXP_ASCII_CTYPES -TD
* move EBCDIC tables to separate file LYebcdic.c to simplify building test
driver for parsdate.c on z/OS -PG
* fix an off-by-one difference between UTF-8/non-UTF-8 comparisons in
HText_appendCharacter() which would leave an extra character wrapped in some
cases, e.g., in the options menu when field-numbering was turned on -TD
* remove logic in GridText.c for ignoring "excess" characters in a field when
fields are numbered, since highlighting of wrapped multiline links works,
and this feature is incompatible with it -TD
* remove obsolete CF_VARARGS configure check -TD
* modify configure script to build with MinGW and MSYS -TD
* modify configure macro CF_XOPEN_SOURCE to define _ALL_SOURCE for AIX 6.x -TD
* implement a LONG_LIST equivalent for ftp, configurable as FTP_FORMAT -TD
* adapt some of the SH_EX ifdef'd features (TD):
+ extra keypad conversions in LYgetch_for() are for PDCurses.
+ add -show_cfg option.
+ entify embedded blanks in HTDOS_wwwName().
+ treat null file-pointer in HTParseFile(HTFormat() as end-of-file.
* change the phase during which "-help" option is processed, to allow it to
reflect the configured values of the options in the help-message (prompted
by discussion with Dan Jacobson regarding Debian #507083) -TD
* modify havevisible() and UCTransToUni() functions to process UTF-8 input,
fixing a problem saving bookmarks whose title is UTF-8 (prompted by patch by
Takao Fujiwara) -TD
* restore logic in HTLoadHTTP() to strip matching square brackets from host
name and certificate host (comments by TG) -TD
* modify UCdomap.c to work with Solaris iconv and handle additional encodings:
+ if "TRANSLIT" feature (an extension of glibc) does not succeed, retry
the call to iconv_open without "TRANSLIT"
+ add check for any MIME name beginning "iso8859", mapping to "iso-8859"
+ recognize "eucjp" MIME name as alias for "euc-jp"
+ recognize "pck" MIME name as alias for "shift_jis"
+ recognize "ansi-1251" MIME name as alias for "windows-1251"
(patch by Takao Fujiwara)
* add "*.dbg" to suffixes to ignore in autoconf script when checking for
executables and objects produced by C compile (report by PG, for z/OS) -TD
* modify parsdate.y to convert between EBCDIC/ASCII to work on z/OS -PG, -TD
* modify src/makefile.in to make it simple for a build script running in a
separate directory to regenerate parsdate.c (prompted by discussion with PG
regarding building on z/OS which uses EBCDIC) -TD
* add configure check for yacc (report by PG) -TD
* fixes to make configure --help agree with INSTALLATION (report by PW) -TD
* add id.po from
http://translationproject.org/latest/lynx/
* add a null-pointer check for content type, fix for dev.11 changes (Debian
#509321) -TD
* improve configurability with regard to pkg-config by adding --with-pkg-config
option, which can be used to enable/disable use of the program as well as
specify the pathname used (prompted by comments by TG) -TD
* correct handling of --with-ssl option when pkg-config is not found -TD
2008-12-14 (2.8.7dev.11)
* add support for HTML5 rel=author in link (mailing list comments) -TD
* modify cookie-writing to not write if no cookies were read from the file
......@@ -25,7 +77,7 @@ Changes since Lynx 2.8 release
* correct handling of the option value from configure "--with-ssl", which was
not being used in the search-list (report by PGNet) -TD
* update configure script macros -TD
CF_CURSES_LIBS - add "pdcurses", e.g., to link with mingw
CF_CURSES_LIBS - add "pdcurses", e.g., to link with MinGW
CF_UTF8_LIB - use CF_FIND_LINKAGE to better work with BSD ports.
CF_XOPEN_SOURCE - add case for dragonfly
* document width-limitation in manpage, fix a few stray 1024's still in the
......@@ -422,7 +474,7 @@ Changes since Lynx 2.8 release
of getfile() is unneeded, we restore the link number as well as the line
number (Debian #386561) -TD
* modify makefile.msc to allow building with slang configuration -TD
* fixes for keyboard input of slang configuration in win32 (not mingw) which
* fixes for keyboard input of slang configuration in win32 (not MinGW) which
was broken in 2.8.3dev.5 -TD
* fix LYgetTableString(), making the monochome appearance with an empty ".lss"
file for color-style look like the non-color-style (Debian #386216) -TD
......
This diff is collapsed.
/*
* $LynxId: LYMessages_en.h,v 1.68 2008/01/08 00:50:53 tom Exp $
* $LynxId: LYMessages_en.h,v 1.69 2008/12/26 22:20:58 tom Exp $
*
* Lynx - Hypertext navigation system
*
......@@ -761,6 +761,9 @@
#define SEGMENT_UP_TO gettext("Up to ")
#define SEGMENT_CURRENT_DIR gettext("Current directory is ")
/* HTFTP.c */
#define ENTRY_IS_SYMBOLIC_LINK gettext("Symbolic Link")
/* HTGopher.c */
#define FAILED_NO_RESPONSE gettext("No response from server!")
#define GOPHER_CSO_INDEX gettext("CSO index")
......
; $LynxId: lynx-curses.iss,v 1.4 2008/09/24 22:43:18 tom Exp $
; $LynxId: lynx-curses.iss,v 1.5 2008/12/29 13:21:17 tom Exp $
;
; This script assumes environment variables have been set, e.g., to point to
; data which is used by the installer:
; This is an installer for the "color-style" flavor of Lynx.
;
; LYNX_DOCSDIR - files and subdirectories installed from Unix with "make install-doc"
; LYNX_HELPDIR - files and subdirectories installed from Unix with "make install-help"
;
; TODO: install curses or slang dll with executable
#define MyAppName "Lynx"
#define MyAppVerName "Lynx 2.8.7dev.10"
#define MyAppPublisher "Thomas E Dickey"
#define MyAppURL "http://lynx.isc.org"
#define MyAppExeName "lynx.exe"
#define BinsSrcDir GetEnv("LYNX_BINDIR")
#if BinsSrcDir == ""
#define BinsSrcDir "..\bin"
#endif
#define DocsSrcDir GetEnv("LYNX_DOCSDIR")
#if DocsSrcDir == ""
#define DocsSrcDir "..\docs"
#endif
#define HelpSrcDir GetEnv("LYNX_HELPDIR")
#if HelpSrcDir == ""
#define HelpSrcDir "..\lynx_help"
#endif
[Setup]
AppName={#MyAppName}
AppVerName={#MyAppVerName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=..\COPYHEADER
InfoBeforeFile=..\README
OutputDir=..\PACKAGE\lynx-setup
OutputBaseFilename=lynx287dev-setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Dirs]
Name: "{app}\doc"
Name: "{app}\doc\samples"
Name: "{app}\doc\test"
Name: "{app}\help"
Name: "{app}\help\keystrokes"
Name: "{app}\icon"
Name: "{app}\tmp"
[Files]
#emit 'Source: "' + BinsSrcDir + '\lynx-cs.exe"; DestDir: "{app}"; DestName: lynx.exe; Flags: ignoreversion'
#emit 'Source: "' + DocsSrcDir + '\*.*"; DestDir: "{app}\doc"; Flags: '
#emit 'Source: "' + DocsSrcDir + '\samples\*.*"; DestDir: "{app}\doc\samples"; Flags: '
#emit 'Source: "' + DocsSrcDir + '\test\*.*"; DestDir: "{app}\doc\test"; Flags: '
#emit 'Source: "' + HelpSrcDir + '\*.*"; DestDir: "{app}\help"; Flags: '
#emit 'Source: "' + HelpSrcDir + '\keystrokes\*.*"; DestDir: "{app}\help\keystrokes"; Flags: '
; some of these data files are from an earlier installer by Claudio Santambrogio
Source: "..\samples\lynx.ico"; DestDir: "{app}\icon"
Source: "..\samples\lynx.bat"; DestDir: "{app}"
Source: "..\samples\jumps.htm"; DestDir: "{app}"
Source: "..\samples\home.htm"; DestDir: "{app}"
Source: "..\samples\lynx_bookmarks.htm"; DestDir: "{app}"
Source: "..\samples\opaque.lss"; DestDir: "{app}"
Source: "..\samples\lynx.bat"; DestDir: "{app}"
Source: "..\samples\lynx-demo.cfg"; DestDir: "{app}"
Source: "..\lynx.man"; DestDir: "{app}"
Source: "..\lynx.cfg"; DestDir: "{app}"
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: ..\samples\lynx.ico
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: ..\samples\lynx.ico
; The script assumes environment variables have been set, e.g., to point to
; data which is used by the installer (see "lynx.lss" for details).
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent
#define SetupBaseName "lynx-cs"
#define SourceExeName "lynx-cs.exe"
#include "lynx.iss"
; $LynxId: lynx-slang.iss,v 1.1 2008/12/29 13:28:38 tom Exp $
;
; This is an installer for the "color-style" flavor of Lynx.
;
; The script assumes environment variables have been set, e.g., to point to
; data which is used by the installer (see "lynx.lss" for details).
#define SetupBaseName "lynx-sl"
#define SourceExeName "lynx-slang.exe"
#define NoScreenDll
#include "lynx.iss"
; $LynxId: lynx.iss,v 1.1 2008/12/29 13:27:28 tom Exp $
;
; This is the BASE script for different flavors of the installer for Lynx.
; It can be overridden to select different source-executables (and their associated
; screen library, e.g., pdcurses or slang).
;
; The script assumes environment variables have been set, e.g., to point to
; data which is used by the installer:
;
; LYNX_BINDIR - directory containing lynx.exe (or different names)
; LYNX_DLLSDIR - directory containing curses or slang dlls.
; LYNX_DOCSDIR - files and subdirectories installed from Unix with "make install-doc"
; LYNX_HELPDIR - files and subdirectories installed from Unix with "make install-help"
#include "version.iss"
#ifndef MyAppExeName
#define MyAppExeName "lynx.exe"
#endif
#ifndef SourceExeName
#define SourceExeName "lynx.exe"
#endif
#ifndef NoScreenDll
#ifndef ScreenDllName
#define ScreenDllName "pdcurses.dll"
#endif
#endif
#ifndef SetupBaseName
#define SetupBaseName "lynx"
#endif
#ifndef BinsSrcDir
#define BinsSrcDir GetEnv("LYNX_BINDIR")
#if BinsSrcDir == ""
#define BinsSrcDir "..\bin"
#endif
#endif
#ifndef DllsSrcDir
#define DllsSrcDir GetEnv("LYNX_DLLSDIR")
#if DllsSrcDir == ""
#define DllsSrcDir "..\dlls"
#endif
#endif
#ifndef DocsSrcDir
#define DocsSrcDir GetEnv("LYNX_DOCSDIR")
#if DocsSrcDir == ""
#define DocsSrcDir "..\docs"
#endif
#endif
#ifndef HelpSrcDir
#define HelpSrcDir GetEnv("LYNX_HELPDIR")
#if HelpSrcDir == ""
#define HelpSrcDir "..\lynx_help"
#endif
#endif
[Setup]
AppName={#MyAppName}
AppVerName={#MyAppVerName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=..\COPYHEADER
InfoBeforeFile=..\README
OutputDir=..\PACKAGE\lynx-setup
#emit 'OutputBaseFilename=' + SetupBaseName + LYNX_VERSION + '-setup'
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Dirs]
Name: "{app}\doc"
Name: "{app}\doc\samples"
Name: "{app}\doc\test"
Name: "{app}\help"
Name: "{app}\help\keystrokes"
Name: "{app}\icon"
Name: "{app}\tmp"
[Files]
#emit 'Source: "' + BinsSrcDir + '\' + SourceExeName + '"; DestDir: "{app}"; DestName: ' + MyAppExeName + '; Flags: ignoreversion'
#ifndef NoScreenDll
#emit 'Source: "' + DllsSrcDir + '\' + ScreenDllName + '"; DestDir: "{app}"; DestName: ' + ScreenDllName + '; Flags: ignoreversion'
#endif
#emit 'Source: "' + DocsSrcDir + '\*.*"; DestDir: "{app}\doc"; Flags: '
#emit 'Source: "' + DocsSrcDir + '\samples\*.*"; DestDir: "{app}\doc\samples"; Flags: '
#emit 'Source: "' + DocsSrcDir + '\test\*.*"; DestDir: "{app}\doc\test"; Flags: '
#emit 'Source: "' + HelpSrcDir + '\*.*"; DestDir: "{app}\help"; Flags: '
#emit 'Source: "' + HelpSrcDir + '\keystrokes\*.*"; DestDir: "{app}\help\keystrokes"; Flags: '
; some of these data files are from an earlier installer by Claudio Santambrogio
Source: "..\samples\lynx.ico"; DestDir: "{app}\icon"
Source: "..\samples\lynx.bat"; DestDir: "{app}"
Source: "..\samples\jumps.htm"; DestDir: "{app}"
Source: "..\samples\home.htm"; DestDir: "{app}"
Source: "..\samples\lynx_bookmarks.htm"; DestDir: "{app}"
Source: "..\samples\opaque.lss"; DestDir: "{app}"
Source: "..\samples\lynx.bat"; DestDir: "{app}"
Source: "..\samples\lynx-demo.cfg"; DestDir: "{app}"
Source: "..\lynx.man"; DestDir: "{app}"
Source: "..\lynx.cfg"; DestDir: "{app}"
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: ..\samples\lynx.ico
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: ..\samples\lynx.ico
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent
; version used for Inno Setup files.
; $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$
#define LYNX_VERSION "2.8.7dev.12"
#define MyAppName "Lynx"
#define MyAppPublisher "Thomas E Dickey"
#define MyAppURL "http://lynx.isc.org"
#define MyAppVerName "Lynx " + LYNX_VERSION
/* MODULE HTAAUtil.c
/*
* $LynxId: HTAAUtil.c,v 1.27 2008/12/31 22:04:39 tom Exp $
*
* MODULE HTAAUtil.c
* COMMON PARTS OF ACCESS AUTHORIZATION MODULE
* FOR BOTH SERVER AND BROWSER
*
......@@ -51,6 +54,7 @@
#include <HTTP.h>
#include <LYStrings.h>
#include <LYUtils.h>
#include <LYLeaks.h>
/* PUBLIC HTAAScheme_enum()
......
/*
* $LynxId: HTAnchor.c,v 1.60 2008/09/18 21:35:24 tom Exp $
* $LynxId: HTAnchor.c,v 1.61 2008/12/31 22:02:20 tom Exp $
*
* Hypertext "Anchor" Object HTAnchor.c
* ==========================
......@@ -28,6 +28,7 @@
#include <GridText.h>
#include <LYUtils.h>
#include <LYCharSets.h>
#include <LYUtils.h>
#include <LYLeaks.h>
#define HASH_TYPE unsigned short
......
This diff is collapsed.
/* DOS specific routines
/*
* $LynxId: HTDOS.c,v 1.35 2008/12/26 18:07:02 tom Exp $
* DOS specific routines
*/
#include <HTUtils.h>
......@@ -20,8 +21,15 @@
static char *copy_plus(char **result, const char *source)
{
int length = strlen(source);
int extra = 10;
int n;
for (n = 0; n < length; ++n) {
if (source[n] == ' ')
++extra;
}
HTSprintf0(result, "%-*s", length + 10, source);
HTSprintf0(result, "%-*s", length + extra, source);
(*result)[length] = 0;
return (*result);
}
......@@ -40,8 +48,6 @@ const char *HTDOS_wwwName(const char *dosname)
static char *wwwname = NULL;
char *cp_url = copy_plus(&wwwname, dosname);
int wwwname_len;
#ifdef SH_EX
char ch;
while ((ch = *dosname) != '\0') {
......@@ -62,11 +68,6 @@ const char *HTDOS_wwwName(const char *dosname)
dosname++;
}
*cp_url = '\0';
#else
for (; *cp_url != '\0'; cp_url++)
if (*cp_url == '\\')
*cp_url = '/'; /* convert dos backslash to unix-style */
#endif
wwwname_len = strlen(wwwname);
if (wwwname_len > 1)
......
This diff is collapsed.
/*
* $LynxId: HTFile.c,v 1.110 2008/12/07 18:49:34 tom Exp $
* $LynxId: HTFile.c,v 1.116 2008/12/31 01:47:53 tom Exp $
*
* File Access HTFile.c
* ===========
......@@ -112,13 +112,13 @@ typedef struct {
#include <HTML.h> /* For directory object building */
#define PUTC(c) (*target->isa->put_character)(target, c)
#define PUTS(s) (*target->isa->put_string)(target, s)
#define START(e) (*target->isa->start_element)(target, e, 0, 0, -1, 0)
#define END(e) (*target->isa->end_element)(target, e, 0)
#define PUTC(c) (*target->isa->put_character)(target, c)
#define PUTS(s) (*target->isa->put_string)(target, s)
#define START(e) (*target->isa->start_element)(target, e, 0, 0, -1, 0)
#define END(e) (*target->isa->end_element)(target, e, 0)
#define MAYBE_END(e) if (HTML_dtd.tags[e].contents != SGML_EMPTY) \
(*target->isa->end_element)(target, e, 0)
#define FREE_TARGET (*target->isa->_free)(target)
#define FREE_TARGET (*target->isa->_free)(target)
#define ABORT_TARGET (*targetClass._abort)(target, NULL);
struct _HTStructured {
......@@ -147,14 +147,23 @@ static const char *HTCacheRoot = "/WWW$SCRATCH"; /* Where to cache things */
static const char *HTCacheRoot = "/tmp/W3_Cache_"; /* Where to cache things */
#endif /* VMS */
#define NO_SUFFIX "*"
#define UNKNOWN_SUFFIX "*.*"
/*
* Suffix registration.
*/
static HTList *HTSuffixes = 0;
static HTSuffix no_suffix =
{"*", NULL, NULL, NULL, 1.0};
{
NO_SUFFIX, NULL, NULL, NULL, 1.0
};
static HTSuffix unknown_suffix =
{"*.*", NULL, NULL, NULL, 1.0};
{
UNKNOWN_SUFFIX, NULL, NULL, NULL, 1.0
};
/* To free up the suffixes at program exit.
* ----------------------------------------
......@@ -499,9 +508,9 @@ void HTSetSuffix5(const char *suffix,
HTSuffix *suff;
BOOL trivial_enc = (BOOL) IsUnityEncStr(encoding);
if (strcmp(suffix, "*") == 0)
if (strcmp(suffix, NO_SUFFIX) == 0)
suff = &no_suffix;
else if (strcmp(suffix, "*.*") == 0)
else if (strcmp(suffix, UNKNOWN_SUFFIX) == 0)
suff = &unknown_suffix;
else {
HTList *cur = HTSuffixes;
......@@ -697,7 +706,7 @@ char *HTnameOfFile_WWW(const char *name,
}
} else if (WWW_prefix) { /* other access */
#ifdef VMS
if ((home = LYGetEnv("HOME")) == 0)
if ((home = LYGetEnv("HOME")) == NULL)
home = HTCacheRoot;
else
home = HTVMS_wwwName(home);
......@@ -707,7 +716,7 @@ char *HTnameOfFile_WWW(const char *name,
#else
home = LYGetEnv("HOME");
#endif
if (home == 0)
if (home == NULL)
home = "/tmp";
#endif /* VMS */
HTSprintf0(&result, "%s/WWW/%s/%s%s", home, acc_method, host, path);
......@@ -918,9 +927,11 @@ HTFormat HTFileFormat(const char *filename,
/* defaults tree */
suff = strchr(filename, '.') ? /* Unknown suffix */
(unknown_suffix.rep ? &unknown_suffix : &no_suffix)
: &no_suffix;
suff = (strchr(filename, '.')
? (unknown_suffix.rep
? &unknown_suffix
: &no_suffix)
: &no_suffix);
/*
* Set default encoding unless found with suffix already.
......@@ -1314,7 +1325,7 @@ CompressFileType HTEncodingToCompressType(const char *coding)
{
CompressFileType result = cftNone;
if (coding == 0) {
if (coding == NULL) {
result = cftNone;
} else if (!strcasecomp(coding, "gzip") ||
!strcasecomp(coding, "x-gzip")) {
......@@ -1336,8 +1347,10 @@ CompressFileType HTContentTypeToCompressType(const char *ct)
{
CompressFileType method = cftNone;
if (!strncasecomp(ct, "application/gzip", 16) ||
!strncasecomp(ct, "application/x-gzip", 18)) {
if (ct == NULL) {
method = cftNone;
} else if (!strncasecomp(ct, "application/gzip", 16) ||
!strncasecomp(ct, "application/x-gzip", 18)) {
method = cftGzip;
} else if (!strncasecomp(ct, "application/compress", 20) ||
!strncasecomp(ct, "application/x-compress", 22)) {
......@@ -1889,7 +1902,7 @@ static int print_local_dir(DIR *dp, char *localname,
pathname = HTParse(anchor->address, "",
PARSE_PATH + PARSE_PUNCTUATION);
if ((p = strrchr(pathname, '/')) == 0)
if ((p = strrchr(pathname, '/')) == NULL)
p = "/";
StrAllocCopy(tail, (p + 1));
FREE(pathname);
......@@ -2019,8 +2032,7 @@ static int print_local_dir(DIR *dp, char *localname,
#ifdef DISP_PARTIAL
/* optimize for expensive operation: */
if (num_of_entries % (partial_threshold > 0 ?
partial_threshold : display_lines)
== 0) {
partial_threshold : display_lines) == 0) {
if (HTCheckForInterrupt()) {
status = HT_PARTIAL_CONTENT;
break;
......@@ -2179,10 +2191,10 @@ static int print_local_dir(DIR *dp, char *localname,
/* optimize for expensive operation: */
#ifdef DISP_PARTIAL
if (num_of_entries_output %
(partial_threshold > 0 ? partial_threshold : display_lines)
== 0) {
((partial_threshold > 0)
? partial_threshold
: display_lines) == 0) {
/* num_of_entries, num_of_entries_output... */
/* HTReadProgress...(bytes, 0); */
HTDisplayPartial();
if (HTCheckForInterrupt()) {
......@@ -2455,16 +2467,16 @@ static int decompressAndParse(HTParentAnchor *anchor,
switch (internal_decompress) {
#ifdef USE_ZLIB
case cftDeflate:
failed_decompress = (zzfp == 0);
failed_decompress = (zzfp == NULL);
break;
case cftCompress:
case cftGzip:
failed_decompress = (gzfp == 0);
failed_decompress = (gzfp == NULL);
break;
#endif
#ifdef USE_BZLIB
case cftBzip2:
failed_decompress = (bzfp == 0);
failed_decompress = (bzfp == NULL);
break;
#endif
default:
......
/*
* $LynxId: HTFormat.c,v 1.65 2008/12/14 17:11:58 tom Exp $
* $LynxId: HTFormat.c,v 1.66 2008/12/26 18:08:32 tom Exp $
*
* Manage different file formats HTFormat.c
* =============================
......@@ -1441,10 +1441,8 @@ int HTParseFile(HTFormat rep_in,
HTStreamClass targetClass;
int rv;
#ifdef SH_EX /* 1998/01/04 (Sun) 16:04:09 */
if (fp == NULL)
return HT_LOADED;
#endif
stream = HTStreamStack(rep_in, format_out, sink, anchor);
......
/*
* $LynxId: HTString.c,v 1.54 2008/09/20 14:32:29 tom Exp $
* $LynxId: HTString.c,v 1.55 2008/12/31 22:03:25 tom Exp $
*
* Case-independent string comparison HTString.c
*
......@@ -14,6 +14,7 @@
#include <HTUtils.h>
#include <LYLeaks.h>
#include <LYUtils.h>
#include <LYStrings.h>
#ifndef NO_LYNX_TRACE
......
/* String handling for libwww
STRINGS
Case-independent string comparison and allocations with copies etc
/*
* $LynxId: HTString.h,v 1.30 2008/12/31 21:04:28 tom Exp $
* String handling for libwww
* STRINGS
*
* Case-independent string comparison and allocations with copies etc
*/
#ifndef HTSTRING_H
#define HTSTRING_H
......@@ -17,8 +18,8 @@ extern "C" {
extern const char *HTLibraryVersion; /* String for help screen etc */
/*
EBCDIC string comparison using ASCII collating sequence
*/
* EBCDIC string comparison using ASCII collating sequence
*/
#ifdef NOT_ASCII
extern int AS_casecomp(const char *a, const char *b);
extern int AS_ncmp(const char *a, const char *b, unsigned int n);
......@@ -32,13 +33,11 @@ extern "C" {
#endif /* NOT_ASCII */
/*
Case-insensitive string comparison
The usual routines (comp instead of cmp) had some problem.
*/
/*
* Case-insensitive string comparison
*
* The usual routines (comp instead of cmp) had some problem.
*/
extern int strcasecomp(const char *a, const char *b);
extern int strncasecomp(const char *a, const char *b, int n);
......@@ -53,33 +52,29 @@ Case-insensitive string comparison
* current display charset
*/
/*
Malloced string manipulation
*/
/*
* Malloced string manipulation
*/
#define StrAllocCopy(dest, src) HTSACopy (&(dest), src)
#define StrAllocCat(dest, src) HTSACat (&(dest), src)
extern char *HTSACopy(char **dest, const char *src);
extern char *HTSACat(char **dest, const char *src);
/*
optimized for heavily realloc'd strings in temp objects
*/
/*
* optimized for heavily realloc'd strings in temp objects
*/
#define StrAllocCopy_extra(dest, src) HTSACopy_extra (&(dest), src)
#define FREE_extra(x) {if (x != NULL) {HTSAFree_extra(x); x = NULL;}}
#define Clear_extra(x) {if (x != NULL) {*x = '\0';}}
extern char *HTSACopy_extra(char **dest, const char *src);
extern void HTSAFree_extra(char *s);
/*
Next word or quoted string
*/
/*
* Next word or quoted string
*/
extern char *HTNextField(char **pstr);
/* A more general parser - kw */
/* A more general parser - kw */
extern char *HTNextTok(char **pstr,
const char *delims, const char *bracks, char *found);
......
/*
* $LynxId: HTTP.c,v 1.99 2008/12/14 18:05:36 tom Exp $
* $LynxId: HTTP.c,v 1.101 2008/12/31 02:03:20 tom Exp $
*
* HyperText Tranfer Protocol - Client implementation HTTP.c
* ==========================
......@@ -466,6 +466,27 @@ static void show_cert_issuer(X509 * peer_cert GCC_UNUSED)
}
#endif
/*
* Remove IPv6 brackets (and any port-number) from the given host-string.
*/
static char *StripIpv6Brackets(char *host)
{
int port_number;
char *p;
if ((p = HTParsePort(host, &port_number)) != 0)
*p = '\0';
if (*host == '[') {
p = host + strlen(host) - 1;
if (*p == ']') {
*p = '\0';
++host;
}
}
return host;
}