Commit c4a1a3bc authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 2.8.8dev.2

parent 3b3aaa7e
// $LynxId: lynx_cfg.h,v 1.2 2009/02/01 23:08:47 tom Exp $
// definitions abstracted from makefile.msc
#ifndef LYNX_CFG_H
#define LYNX_CFG_H 1
#define __WIN32__
#define _WINDOWS
#define _WIN32_WINNT 0x0400
#define ACCESS_AUTH 1
#define CJK_EX 1
#define DIRED_SUPPORT 1
#define DISP_PARTIAL 1
#define DOSPATH 1
#define EXP_ALT_BINDINGS 1
#define EXP_CMD_LOGGING 1
#define EXP_JUSTIFY_ELTS 1
#define EXP_NESTED_TABLES 1
#define HAVE_KEYPAD 1
#define HAVE_PUTENV 1
#define LONG_LIST 1
#define NDEBUG 1
#define NO_CONFIG_INFO 1
#define NO_CUSERID 1
#define NO_FILIO_H 1
#define NO_TTYTYPE 1
#define NO_UNISTD_H 1
#define NO_UTMP 1
#define NOSIGHUP 1
#define NOUSERS 1
#define OK_OVERRIDE 1
#define SH_EX 1
#define USE_EXTERNALS 1
#define USE_FILE_UPLOAD 1
#define USE_MULTIBYTE_CURSES 1
#define USE_PERSISTENT_COOKIES 1
#define USE_PRETTYSRC 1
#define USE_READPROGRESS 1
#define USE_SCROLLBAR 1
#define USE_SOURCE_CACHE 1
#define USE_ZLIB 1
#define WIN_EX 1
// definitions to account for using this file (see HTUtils.h, userdefs.h)
#define ANSI_VARARGS 1
#define HAVE_GETCWD 1
#define HAVE_STDARG_H 1
#define HAVE_STDLIB_H 1
#define LYNX_CFG_FILE "./lynx.cfg"
#define UNDERLINE_LINKS FALSE
#define socklen_t int
// configuration choices
#define PDCURSES 1
#define USE_WINSOCK2_H 1
#ifdef PDCURSES
#define USE_COLOR_STYLE 1
#define COLOR_CURSES 1
#define FANCY_CURSES 1
#endif
#pragma warning (disable : 4244) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4267) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4311) /* 'type cast': pointer truncation from 'xxx' to 'yyy' FIXME */
// $LynxId: lynx_cfg.h,v 1.4 2009/11/21 16:33:41 tom Exp $
// definitions abstracted from makefile.msc
#ifndef LYNX_CFG_H
#define LYNX_CFG_H 1
#define __WIN32__
#define _WINDOWS
#define _WIN32_WINNT 0x0400
#define ACCESS_AUTH 1
#define CJK_EX 1
#define DIRED_SUPPORT 1
#define DISP_PARTIAL 1
#define DOSPATH 1
#define EXP_ALT_BINDINGS 1
#define EXP_NESTED_TABLES 1
#define HAVE_KEYPAD 1
#define HAVE_PUTENV 1
#define LONG_LIST 1
#define NDEBUG 1
#define NOSIGHUP 1
#define NOUSERS 1
#define NO_CONFIG_INFO 1
#define NO_CUSERID 1
#define NO_FILIO_H 1
#define NO_TTYTYPE 1
#define NO_UNISTD_H 1
#define NO_UTMP 1
#define OK_OVERRIDE 1
#define SH_EX 1
#define USE_CMD_LOGGING 1
#define USE_EXTERNALS 1
#define USE_FILE_UPLOAD 1
#define USE_JUSTIFY_ELTS 1
#define USE_MULTIBYTE_CURSES 1
#define USE_PERSISTENT_COOKIES 1
#define USE_PRETTYSRC 1
#define USE_READPROGRESS 1
#define USE_SCROLLBAR 1
#define USE_SOURCE_CACHE 1
#define USE_ZLIB 1
#define WIN_EX 1
// definitions to account for using this file (see HTUtils.h, userdefs.h)
#define ANSI_VARARGS 1
#define HAVE_GETCWD 1
#define HAVE_STDARG_H 1
#define HAVE_STDLIB_H 1
#define LYNX_CFG_FILE "./lynx.cfg"
#define UNDERLINE_LINKS FALSE
#define socklen_t int
// configuration choices
#define PDCURSES 1
#define USE_WINSOCK2_H 1
#ifdef PDCURSES
#define USE_COLOR_STYLE 1
#define COLOR_CURSES 1
#define FANCY_CURSES 1
#endif
#pragma warning (disable : 4244) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4267) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4311) /* 'type cast': pointer truncation from 'xxx' to 'yyy' FIXME */
#endif /* LYNX_CFG_H */
\ No newline at end of file
// $LynxId: lynx_cfg.h,v 1.1 2007/06/30 14:30:52 tom Exp $
// definitions abstracted from makefile.msc
#ifndef LYNX_CFG_H
#define LYNX_CFG_H 1
#define __WIN32__
#define _WINDOWS
#define _WIN32_WINNT 0x0400
#define WIN32_LEAN_AND_MEAN 1 // fixes redefinition of winsock2.h
#define ACCESS_AUTH 1
#define CJK_EX 1
#define DIRED_SUPPORT 1
#define DISP_PARTIAL 1
#define DOSPATH 1
#define EXP_ALT_BINDINGS 1
#define EXP_CMD_LOGGING 1
#define EXP_JUSTIFY_ELTS 1
#define EXP_NESTED_TABLES 1
#define HAVE_KEYPAD 1
#define HAVE_PUTENV 1
#define LONG_LIST 1
#define NDEBUG 1
#define NO_CONFIG_INFO 1
#define NO_CUSERID 1
#define NO_FILIO_H 1
#define NO_TTYTYPE 1
#define NO_UNISTD_H 1
#define NO_UTMP 1
#define NOSIGHUP 1
#define NOUSERS 1
#define OK_OVERRIDE 1
#define SH_EX 1
#define USE_EXTERNALS 1
#define USE_FILE_UPLOAD 1
#define USE_MULTIBYTE_CURSES 1
#define USE_PERSISTENT_COOKIES 1
#define USE_PRETTYSRC 1
#define USE_READPROGRESS 1
#define USE_SCROLLBAR 1
#define USE_SOURCE_CACHE 1
#define USE_ZLIB 1
#define WIN_EX 1
// definitions to account for using this file (see HTUtils.h, userdefs.h)
#define ANSI_VARARGS 1
#define HAVE_GETCWD 1
#define HAVE_STDARG_H 1
#define HAVE_STDLIB_H 1
#define LYNX_CFG_FILE "./lynx.cfg"
#define UNDERLINE_LINKS FALSE
#define socklen_t int
// configuration choices
#define PDCURSES 1
#define USE_WINSOCK2_H 1
#ifdef PDCURSES
#define USE_COLOR_STYLE 1
#define COLOR_CURSES 1
#define FANCY_CURSES 1
#endif
#pragma warning (disable : 4244) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4267) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4311) /* 'type cast': pointer truncation from 'xxx' to 'yyy' FIXME */
#pragma warning (disable : 4996) /* 'xxx': This function or variable may be unsafe. Consider using yyy instead. */
// $LynxId: lynx_cfg.h,v 1.3 2009/11/21 16:33:41 tom Exp $
// definitions abstracted from makefile.msc
#ifndef LYNX_CFG_H
#define LYNX_CFG_H 1
#define __WIN32__
#define _WINDOWS
#define _WIN32_WINNT 0x0400
#define WIN32_LEAN_AND_MEAN 1 // fixes redefinition of winsock2.h
#define ACCESS_AUTH 1
#define CJK_EX 1
#define DIRED_SUPPORT 1
#define DISP_PARTIAL 1
#define DOSPATH 1
#define EXP_ALT_BINDINGS 1
#define EXP_NESTED_TABLES 1
#define HAVE_KEYPAD 1
#define HAVE_PUTENV 1
#define LONG_LIST 1
#define NDEBUG 1
#define NOSIGHUP 1
#define NOUSERS 1
#define NO_CONFIG_INFO 1
#define NO_CUSERID 1
#define NO_FILIO_H 1
#define NO_TTYTYPE 1
#define NO_UNISTD_H 1
#define NO_UTMP 1
#define OK_OVERRIDE 1
#define SH_EX 1
#define USE_CMD_LOGGING 1
#define USE_EXTERNALS 1
#define USE_FILE_UPLOAD 1
#define USE_JUSTIFY_ELTS 1
#define USE_MULTIBYTE_CURSES 1
#define USE_PERSISTENT_COOKIES 1
#define USE_PRETTYSRC 1
#define USE_READPROGRESS 1
#define USE_SCROLLBAR 1
#define USE_SOURCE_CACHE 1
#define USE_ZLIB 1
#define WIN_EX 1
// definitions to account for using this file (see HTUtils.h, userdefs.h)
#define ANSI_VARARGS 1
#define HAVE_GETCWD 1
#define HAVE_STDARG_H 1
#define HAVE_STDLIB_H 1
#define LYNX_CFG_FILE "./lynx.cfg"
#define UNDERLINE_LINKS FALSE
#define socklen_t int
// configuration choices
#define PDCURSES 1
#define USE_WINSOCK2_H 1
#ifdef PDCURSES
#define USE_COLOR_STYLE 1
#define COLOR_CURSES 1
#define FANCY_CURSES 1
#endif
#pragma warning (disable : 4244) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4267) /* conversion from 'xxx' to 'yyy', possible loss of data */
#pragma warning (disable : 4311) /* 'type cast': pointer truncation from 'xxx' to 'yyy' FIXME */
#pragma warning (disable : 4996) /* 'xxx': This function or variable may be unsafe. Consider using yyy instead. */
#endif /* LYNX_CFG_H */
\ No newline at end of file
-- $LynxId: CHANGES,v 1.438 2009/08/27 23:27:42 tom Exp $
-- $LynxId: CHANGES,v 1.460 2009/11/25 10:31:39 tom Exp $
===============================================================================
Changes since Lynx 2.8 release
===============================================================================
2009-11-25 (2.8.8dev.2)
* modify trimming of URI in LYSetCookie() to eliminate trimming of final leaf
(Debian #460108) -TD
* document the various xxx_PATH settings in lynx.cfg -TD
* modify cfg2html.pl to improve formatting of cattoc.html -TD
* split-up top-level makefile install-html rule to allow generating the htmlized
cfg without doing an install -TD
* suppress positioning for editor when using it to edit files via dired -TD
* modify samples/lynx-demo.cfg to suppress external file-utilities, since the
intent is to make the installer work standalone, but allow extension -TD
* add traces for builtin dired operations -TD
* modify built-in "touch" for dired to use binary mode when opening file -TD
* remove check from 2.8.5dev.11 which prevents user from moving a directory in
dired unless the external program "mv" is provided -TD
* regularize use of isEmpty(), non_empty() -BL
* match built-in "positionable" editor names more liberally -BL
* promote some experimental options to normal, tidy up related EXP_xxx vs
USE_xxx symbols -TD
EXP_ASCII_CTYPES is now USE_ASCII_CTYPES
EXP_JUSTIFY_ELTS is now USE_JUSTIFY_ELTS
EXP_CHARSET_CHOICE is now USE_CHARSET_CHOICE
The scrollbar, progressbar, sessions and session-cache options are now
enabled by default.
* modify scanning in HTRules.c to only trim comments where '#' is either at
the beginning of a line, or follows whitespace (patch by Kihara Hideto).
* correct a place where LYStrExtent2 was used where byte-count is needed
(patch by Bake Timmons).
* modify LYExecv() in LYLocal.c to allow win32 applications to use this
function -TD
* modify ok_stat() in LYLocal.c to retry with "." appended when the path syntax
indicates that it is probably a directory name -TD
* fix an old typo in configure macro CF_CHECK_FUNCDECL -TD
* change library dependency for gnutls from crypt to gcrypt, originally in
2.8.5dev.15 (Debian #555579) -TD
* update de.po from
http://translationproject.org/latest/lynx
* fix some tidy- and linklint-warnings in help-files -TD
* amend change from 2.8.7dev.14 to not use clrscr() function in stop_curses()
if using PDCurses, since clrscr() is not in the win32 api -TD
* modify configure script to check if linkage for bzlib and zlib succeeded,
before defining symbol which makes the compiler uses these libraries -TD
* update lynx_help_main.html to point to "release/lynx2-8-7" documentation -TD
2009-08-28 (2.8.8dev.1)
* add <sys/types.h> include in socklen_t configure check, from OpenBSD CVS
* add <sys/types.h> include in socklen_t configure check (from OpenBSD CVS)
* eliminate UCPutUtf8ToBuffer() - redundant -TD
* use memset's to simplify some initialization in HTML.c, extending a change
made in 2.8.7dev.10 (prompted by issue in OpenBSD) -TD
......@@ -33,7 +76,7 @@ Changes since Lynx 2.8 release
* update config.guess (2009-08-19), config.sub (2009-08-19)
2009-07-05 (2.8.7rel.1)
* update metrics for 2.8.7 release.
* update metrics for 2.8.7 release -TD
* fix ifdef'ing for cfg_bad_html (report by Gabor Z Papp) -TD
2009-06-23 (2.8.7pre.6)
......@@ -90,8 +133,8 @@ Changes since Lynx 2.8 release
FEDORA-2008-9597), and modify compiled-in configuration default for
consistency with other lynx.cfg settings to require that lynx.cfg be set to
permit use of lynxcgi scripts -TD
* correct parsing of "--" command-line parameter (Redhat #311031)
* check for malformed select before adding last-option (Redhat #152146)
* correct parsing of "--" command-line parameter (Redhat #311031) -TD
* check for malformed select before adding last-option (Redhat #152146) -TD
* change default for --enable-ascii-ctypes to true -TD
* modify Lynx's DTD information to allow it to display form-related tags that
are inline, even without being in a form as indicated in
......
......@@ -308,7 +308,7 @@ II. Compile instructions -- UNIX
requested, the configure script will otherwise use the messages in the
./po subdirectory.
--disable-justify-elts (define EXP_JUSTIFY_ELTS)
--disable-justify-elts (define USE_JUSTIFY_ELTS)
Do not use element-justification logic.
--disable-largefile (prevent defining LONG_LIST)
......@@ -335,25 +335,43 @@ II. Compile instructions -- UNIX
it.
--disable-persistent-cookies (prevent defining USE_PERSISTENT_COOKIES)
Use this option to tell configure whether to compile-in support for
saving cookies to a file, for subsequent reuse. Persistent cookie
support will use (or create) the file specified by the 'COOKIE_FILE'
option, or default to ".lynx_cookies" in the home directory.
(Currently there is no protection against conflict if several lynx
sessions are active from the same account).
Turn off support for saving cookies to a file, for subsequent reuse.
Persistent cookie support will use (or create) the file specified by
the 'COOKIE_FILE' option, or default to ".lynx_cookies" in the home
directory. (Currently there is no protection against conflict if
several lynx sessions are active from the same account).
--disable-prettysrc (define USE_PRETTYSRC)
Use this option to compile-in support for colorizing the source view of
HTML pages. If compiled-in, new source view mode is available with
-prettysrc command line option.
Turn off support for colorizing the source view of HTML pages. If
compiled-in, new source view mode is available with -prettysrc command
line option.
--disable-progressbar (define USE_PROGRESSBAR)
Turn off support for a "progress bar" which displays at the bottom
of the screen when doing downloads and other time-consuming (but
interruptible) processes. This feature can be selected in the
options menu.
--disable-read-eta (define USE_READPROGRESS)
Enhance the read-progress message to show ETA (estimated time to
Turn off enhanced read-progress message showing ETA (estimated time to
completion), as well as the amount of time stalled without any data
transferred.
--disable-scrollbar (define USE_SCROLLBAR)
Turn off support for scrollbar on the right-margin of the screen.
If you configure with ncurses, this works with the mouse on xterm,
etc.
--disable-session-cache (define USE_CACHE_JAR)
Turn off support for saving/restoring session information in files.
Configurable from lynx.cfg
--disable-sessions (define USE_SESSIONS)
Turn off support for sessions, which allows the user to automatically
save and restore history information.
--disable-source-cache (define USE_SOURCE_CACHE)
Use this option to compile-in support for caching HTML pages locally,
Turn off support for caching HTML pages locally,
in files or in memory. Configurable from lynx.cfg
--disable-trace (define NO_LYNX_TRACE)
......@@ -366,7 +384,7 @@ II. Compile instructions -- UNIX
Compiles-in an alternative list-page, bound to 'A' rather than 'l',
which always lists URLs rather than titles.
--enable-ascii-ctypes (define EXP_ASCII_CTYPES)
--enable-ascii-ctypes (define USE_ASCII_CTYPES)
Compiles-in alternative case-conversion functions which ensure that
configuration names, etc., are compared in POSIX locale. This is
important for operating in some locale such as Turkish.
......@@ -379,7 +397,7 @@ II. Compile instructions -- UNIX
Allow users to change the execution status within the options screen.
See EXEC_LINKS and EXEC_SCRIPTS.
--enable-charset-choice (define EXP_CHARSET_CHOICE)
--enable-charset-choice (define USE_CHARSET_CHOICE)
Add logic for ASSUMED_DOC_CHARSET_CHOICE and DISPLAY_CHARSET_CHOICE in
lynx.cfg, allowing user to configure a subset of the compiled-in
charsets for normal use.
......@@ -466,7 +484,7 @@ II. Compile instructions -- UNIX
Use nl_langinfo(CODESET) to determine initial value for display
charset, overrides character_set value in .lynxrc file.
--enable-nested-tables
--enable-nested-tables (define EXP_NESTED_TABLES)
Extends TRST to format nested tables, as well as be smarter about
<BR> and <P> tags in table cells.
......@@ -477,26 +495,6 @@ II. Compile instructions -- UNIX
Disabled by default, this allows interruption of NSL requests,
so that `z' will stop the `look-up' phase of a connection.
--enable-progressbar (define USE_PROGRESSBAR)
Compile-in support for a "progress bar" which displays at the bottom
of the screen when doing downloads and other time-consuming (but
interruptible) processes. This feature can be selected in the
options menu.
--enable-scrollbar (define USE_SCROLLBAR)
Compile-in support for scrollbar on the right-margin of the screen.
If you configure with ncurses, this works with the mouse on xterm,
etc.
--enable-session-cache (define USE_CACHE_JAR)
Use this option to compile-in experimental support for
saving/restoring session information in files. Configurable from
lynx.cfg
--enable-sessions (define USE_SESSIONS)
Compile-in experimental support for sessions, which allow the user
to automatically save and restore history information.
--enable-syslog (define SYSLOG_REQUESTED_URLS)
Use this option to log NSL requests via syslog().
......@@ -1377,4 +1375,4 @@ VIII. Acknowledgment
-- 1999/04/24 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp>
-- vile:txtmode
-- $LynxId: INSTALLATION,v 1.107 2009/08/27 21:00:43 tom Exp $
-- $LynxId: INSTALLATION,v 1.110 2009/11/21 16:23:25 tom Exp $
; $LynxId: lynx.iss,v 1.3 2009/03/17 23:11:46 tom Exp $
; $LynxId: lynx.iss,v 1.4 2009/11/22 23:59:04 tom Exp $
; vile:ts=2 sw=2 notabinsert
;
; This is the BASE script for different flavors of the installer for Lynx.
......@@ -307,6 +307,15 @@ begin
SaveStringToFile(CfgFile, 'HELPFILE:' + AppDir + '/help/Lynx_help_main.html.gz' + #10, True);
SaveStringToFile(CfgFile, 'COLOR_STYLE:' + AppDir + '/opaque.lss' + #10, True);
SaveStringToFile(CfgFile, 'CHMOD_PATH:' + #10, True);
SaveStringToFile(CfgFile, 'COPY_PATH:' + #10, True);
SaveStringToFile(CfgFile, 'MKDIR_PATH:' + #10, True);
SaveStringToFile(CfgFile, 'MV_PATH:' + #10, True);
SaveStringToFile(CfgFile, 'RMDIR_PATH:' + #10, True);
SaveStringToFile(CfgFile, 'RM_PATH:' + #10, True);
SaveStringToFile(CfgFile, 'TOUCH_PATH:' + #10, True);
Log('** customized ' + CfgFile);
if isTaskSelected('use_sendto') then
......
; version used for Inno Setup files.
; $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$
#define LYNX_VERSION "2.8.8dev.1"
#define LYNX_VERSION "2.8.8dev.2"
#define MyAppName "Lynx"
#define MyAppPublisher "Thomas E Dickey"
......
/*
* $LynxId: HTAABrow.c,v 1.29 2009/01/03 00:55:16 tom Exp $
* $LynxId: HTAABrow.c,v 1.30 2009/11/21 17:05:33 Bela.Lubkin Exp $
*
* MODULE HTAABrow.c
* BROWSER SIDE ACCESS AUTHORIZATION MODULE
......@@ -1078,12 +1078,12 @@ BOOL HTAA_shouldRetryWithAuth(char *start_of_headers,
0 == strcasecomp(fieldname, "Proxy-Authenticate:")) ||
(!IsProxy &&
0 == strcasecomp(fieldname, "WWW-Authenticate:"))) {
if (!(arg1 && *arg1 && args && *args)) {
if (isEmpty(arg1) || isEmpty(args)) {
HTSprintf0(&temp, gettext("Invalid header '%s%s%s%s%s'"), line,
(!isEmpty(arg1) ? " " : ""),
(!isEmpty(arg1) ? arg1 : ""),
(!isEmpty(args) ? " " : ""),
(!isEmpty(args) ? args : ""));
(non_empty(arg1) ? " " : ""),
NonNull(arg1),
(non_empty(args) ? " " : ""),
NonNull(args));
HTAlert(temp);
FREE(temp);
} else if (HTAA_UNKNOWN != (scheme = HTAAScheme_enum(arg1))) {
......
/*
* $LynxId: HTDOS.c,v 1.36 2009/01/03 01:58:39 tom Exp $
* $LynxId: HTDOS.c,v 1.37 2009/09/09 00:40:55 tom Exp $
* DOS specific routines
*/
......@@ -103,7 +103,7 @@ char *HTDOS_slashes(char *path)
* ON EXIT:
* returns DOS file specification
*/
char *HTDOS_name(char *wwwname)
char *HTDOS_name(const char *wwwname)
{
static char *result = NULL;
int joe;
......@@ -150,7 +150,7 @@ char *HTDOS_name(char *wwwname)
}
#ifdef WIN_EX
char *HTDOS_short_name(char *path)
char *HTDOS_short_name(const char *path)
{
static char sbuf[LY_MAXPATH];
char *ret;
......
/* DOS specific routines */
/*
* $LynxId: HTDOS.h,v 1.14 2009/09/09 00:16:06 tom Exp $
*
* DOS specific routines
*/
#ifndef HTDOS_H
#define HTDOS_H
......@@ -33,10 +37,10 @@ char *HTDOS_slashes(char *path);
*
* Bug: Returns pointer to static -- non-reentrant
*/
char *HTDOS_name(char *wwwname);
char *HTDOS_name(const char *wwwname);
#ifdef WIN_EX
char *HTDOS_short_name(char *fn);
char *HTDOS_short_name(const char *fn);
#else
#define HTDOS_short_name(fn) fn
......
/*
* $LynxId: HTFTP.c,v 1.89 2009/02/01 12:49:00 tom Exp $
* $LynxId: HTFTP.c,v 1.90 2009/09/07 23:36:28 tom Exp $
*
* File Transfer Protocol (FTP) Client
* for a WorldWideWeb browser
......@@ -1631,8 +1631,10 @@ static void parse_eplf_line(char *line,
static void parse_ls_line(char *line,
EntryInfo *entry)
{
#ifdef LONG_LIST
char *next;
char *cp;
#endif
int i, j;
unsigned long base = 1;
unsigned long size_num = 0;
......
/*
* $LynxId: HTParse.c,v 1.52 2009/08/27 18:43:30 tom Exp $
* $LynxId: HTParse.c,v 1.53 2009/09/06 18:18:06 tom Exp $
*
* Parse HyperText Document Address HTParse.c
* ================================
......@@ -280,8 +280,8 @@ static void convert_to_idna(char *host)
code = idna_to_ascii_8z(buffer, &output, IDNA_USE_STD3_ASCII_RULES);
if (code == IDNA_SUCCESS) {
strcpy(host, output);
free(output);
}
FREE(output);
free(buffer);
}
}
......
/*
* $LynxId: HTRules.c,v 1.38 2009/02/01 21:19:02 tom Exp $
* $LynxId: HTRules.c,v 1.39 2009/11/21 15:01:20 Kihara.Hideto Exp $
*
* Configuration manager for Hypertext Daemon HTRules.c
* ==========================================
......@@ -462,10 +462,17 @@ int HTSetConfiguration(char *config)
StrAllocCopy(line, config);
{
char *p = strchr(line, '#'); /* Chop off comments */
char *p = line;
if (p)
*p = 0;
/* Chop off comments */
while ((p = strchr(p, '#'))) {
if (p == line || isspace(UCH(*(p - 1)))) {
*p = 0;
break;
} else {
p++;
}
}
}
pointer = line;
word1 = HTNextField(&pointer);
......
/*
* $LynxId: HTString.c,v 1.57 2009/03/17 22:27:59 tom Exp $
* $LynxId: HTString.c,v 1.58 2009/11/21 17:05:33 Bela.Lubkin Exp $
*
* Case-independent string comparison HTString.c
*
......@@ -1307,7 +1307,7 @@ bstring *HTBprintf(bstring **pstr, const char *fmt,...)
LYva_start(ap, fmt);
{
temp = StrAllocVsprintf(&temp, 0, fmt, &ap);
if (!isEmpty(temp)) {
if (non_empty(temp)) {
HTSABCat(pstr, temp, strlen(temp));
}
FREE(temp);
......
/*
* $LynxId: HTTP.c,v 1.110 2009/08/27 00:56:00 tom Exp $
* $LynxId: HTTP.c,v 1.112 2009/11/21 17:05:33 Bela.Lubkin Exp $
*
* HyperText Tranfer Protocol - Client implementation HTTP.c
* ==========================
......@@ -1159,7 +1159,7 @@ static int HTLoadHTTP(const char *arg,
}
if (LYSendUserAgent || no_useragent) {
if (!isEmpty(LYUserAgent)) {
if (non_empty(LYUserAgent)) {
char *cp = LYSkipBlanks(LYUserAgent);
/* Won't send it at all if all blank - kw */
......@@ -1977,12 +1977,13 @@ static int HTLoadHTTP(const char *arg,
switch (server_status) {
case 401: /* Unauthorized */
/*
* Authorization for orgin server required. If show_401 is
* set, proceed to showing the 401 body. Otherwise, if we
* can set up authorization based on the WWW-Authenticate
* header, and the user provides a username and password,
* try again. Otherwise, check whether to show the 401
* body or restore the current document. - FM
* Authorization for origin server required. If show_401
* is set, proceed to showing the 401 body. Otherwise, if
* we can set up authorization based on the
* WWW-Authenticate header, and the user provides a
* username and password, try again. Otherwise, check
* whether to show the 401 body or restore the current
* document - FM
*/
if (show_401)
break;
......
/*
* $LynxId: HTTelnet.c,v 1.38 2007/07/01 23:13:22 Daniel.Dickman Exp $
* $LynxId: HTTelnet.c,v 1.39 2009/11/21 17:05:33 Bela.Lubkin Exp $
*
* Telnet Access, Rlogin, etc HTTelnet.c
* ==========================
......@@ -44,11 +44,11 @@ static void do_system(char *) GCC_UNUSED;
static void do_system(char *command)
{
if (!isEmpty(command)) {
if (non_empty(command)) {
CTRACE((tfp, "HTTelnet: Command is: %s\n\n", command));
LYSystem(command);
FREE(command);
}
FREE(command);
}
/* Telnet or "rlogin" access
......
/*
* $LynxId: HTUtils.h,v 1.94 2009/05/10 23:06:31 tom Exp $
* $LynxId: HTUtils.h,v 1.96 2009/11/21 17:05:33 Bela.Lubkin Exp $
*
* Utility macros for the W3 code library
* MACROS FOR GENERAL USE
......@@ -310,6 +310,7 @@ Standard C library for malloc() etc
#endif
#define isEmpty(s) ((s) == 0 || *(s) == 0)
#define non_empty(s) !isEmpty(s)
#define NonNull(s) (((s) != 0) ? s : "")
#define NONNULL(s) (((s) != 0) ? s : "(null)")
......@@ -466,7 +467,7 @@ Out Of Memory checking for malloc() return:
#ifndef TOLOWER
#ifdef EXP_ASCII_CTYPES
#ifdef USE_ASCII_CTYPES
#define TOLOWER(c) ascii_tolower(UCH(c))
#define TOUPPER(c) ascii_toupper(UCH(c))
......@@ -738,7 +739,7 @@ extern int WWW_TraceMask;
extern "C" {
#endif
#ifndef TOLOWER
#ifdef EXP_ASCII_CTYPES
#ifdef USE_ASCII_CTYPES
extern int ascii_toupper(int);
extern int ascii_tolower(int);
extern int ascii_isupper(int);
......