View | Details | Raw Unified
Collapse All | Expand All

(-) lynx2-8-5/CHANGES (+26 lines)
 Lines 1-6    Link Here 
Changes since Lynx 2.8 release
Changes since Lynx 2.8 release
===============================================================================
===============================================================================
2005-10-29 (2.8.5rel.5 fixes from 2.8.6dev.15)
* modify LYLoadCGI() to prompt user, displaying the command that would be
  executed, to confirm that it should be.  This makes it easier to notice when
  a local program would be run by activating a lynxcgi link.  This is not done
  in advanced mode, since the URL is already visible in the status line (report
  by vade79, comments by Greg MacManus) -TD
2005-10-25 (2.8.5rel.4 fixes from 2.8.6dev.14)
* fix error in rel.3 patch (report by Klaus Singvogel)
2005-10-17 (2.8.5rel.3 fixes from 2.8.6dev.14)
* eliminate fixed-size buffers in HTrjis() and related functions to avoid
  potential buffer overflow in nntp pages (report by Ulf Harnhammar,
  CAN-2005-3120) -TD
2004-04-22 (2.8.5rel.2 fixes from 2.8.6dev.1)
* correct ifdef in LYgetattrs() to ensure that getattrs() is used only if the
  configure script actually found it (report/patch by Paul Gilmartin).
* correct LYcommandList() to allocate data passed to HTList_addObject(), since
  LYRemoveFromCloset() may free it (report by FLWM) -TD
* add a null-pointer check to parameter of HTQuoteParameter(), fixes bug
  introduced in 2.8.5pre.4 (report by FLWM) -TD
* correct units shown by HTReadProgress() for very low rates - bug from
  2.8.5pre.3 changes (report by PG) -TD
* update current-version in README -LP
2004-02-04 (2.8.5rel.1)
2004-02-04 (2.8.5rel.1)
* build fixes for MINGW32 -DK
* build fixes for MINGW32 -DK
* build fixes for OS/2 (reported by IZ) -TD
* build fixes for OS/2 (reported by IZ) -TD
(-) lynx2-8-5/configure (-1 / +1 lines)
 Lines 723-729    Link Here 
PACKAGE=lynx
PACKAGE=lynx
# $Format: "VERSION=$ProjectVersion$"$
# $Format: "VERSION=$ProjectVersion$"$
VERSION=2.8.5rel.1
VERSION=2.8.5rel.5
(-) lynx2-8-5/configure.in (-2 / +2 lines)
 Lines 5-11    Link Here 
dnl
dnl
dnl ask PRCS to plug-in the project-version for the configure-script.
dnl ask PRCS to plug-in the project-version for the configure-script.
dnl $Format: "AC_REVISION($ProjectVersion$)"$
dnl $Format: "AC_REVISION($ProjectVersion$)"$
AC_REVISION(2.8.5rel.1)
AC_REVISION(2.8.5rel.5)
# Save the original $CFLAGS so we can distinguish whether the user set those
# Save the original $CFLAGS so we can distinguish whether the user set those
# in the environment, or whether autoconf added -O and -g options:
# in the environment, or whether autoconf added -O and -g options:
 Lines 33-39    Link Here 
PACKAGE=lynx
PACKAGE=lynx
dnl ask PRCS to plug-in the project-version for the packages.
dnl ask PRCS to plug-in the project-version for the packages.
# $Format: "VERSION=$ProjectVersion$"$
# $Format: "VERSION=$ProjectVersion$"$
VERSION=2.8.5rel.1
VERSION=2.8.5rel.5
AC_SUBST(PACKAGE)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(VERSION)
AC_SUBST(DESTDIR)
AC_SUBST(DESTDIR)
(-) lynx2-8-5/lynx.cfg (-2 / +2 lines)
 Lines 3-12    Link Here 
#                                     or Lynx_Dir:lynx.cfg (VMS)
#                                     or Lynx_Dir:lynx.cfg (VMS)
#
#
# $Format: "#PRCS LYNX_VERSION \"$ProjectVersion$\""$
# $Format: "#PRCS LYNX_VERSION \"$ProjectVersion$\""$
#PRCS LYNX_VERSION "2.8.5rel.1"
#PRCS LYNX_VERSION "2.8.5rel.5"
#
#
# $Format: "#PRCS LYNX_DATE \"$ProjectDate$\""$
# $Format: "#PRCS LYNX_DATE \"$ProjectDate$\""$
#PRCS LYNX_DATE "Wed, 04 Feb 2004 04:07:09 -0800"
#PRCS LYNX_DATE "Sat, 29 Oct 2005 12:33:45 -0700"
#
#
# Definition pairs are of the form  VARIABLE:DEFINITION
# Definition pairs are of the form  VARIABLE:DEFINITION
# NO spaces are allowed between the pair items.
# NO spaces are allowed between the pair items.
(-) lynx2-8-5/README (-1 / +1 lines)
 Lines 1-7    Link Here 
                             Lynx README file
                             Lynx README file
Lynx Version 2.8.4 is the latest release (July 2001).
Lynx Version 2.8.5 is the latest release (February 2004).
See the CHANGES file for a complete record of all changes and bug fixes.
See the CHANGES file for a complete record of all changes and bug fixes.
New releases are announced on the lynx-dev mailing list (see below).
New releases are announced on the lynx-dev mailing list (see below).
(-) lynx2-8-5/src/HTAlert.c (-7 / +10 lines)
 Lines 165-177    Link Here 
    static long kb_units = 1024;
    static long kb_units = 1024;
    CONST char *u = HTProgressUnits(LYTransferRate);
    CONST char *u = HTProgressUnits(LYTransferRate);
    if ( (LYTransferRate == rateKB || LYTransferRate == rateEtaKB_maybe)
    if (LYTransferRate == rateKB || LYTransferRate == rateEtaKB_maybe) {
	 && (n >= 10 * kb_units) )
	if (n >= 10 * kb_units) {
	sprintf(s, "%ld", n/kb_units);
	    sprintf(s, "%ld", n/kb_units);
    else if ((LYTransferRate == rateKB || LYTransferRate == rateEtaKB_maybe)
	} else if (n > 999) {	/* Avoid switching between 1016b/s and 1K/s */
	     && (n > 999))	/* Avoid switching between 1016b/s and 1K/s */
	    sprintf(s, "%.2g", ((double)n)/kb_units);
	sprintf(s, "%.2g", ((double)n)/kb_units);
	} else {
    else {
	    sprintf(s, "%ld", n);
	    u = HTProgressUnits(rateBYTES);
	}
    } else {
	sprintf(s, "%ld", n);
	sprintf(s, "%ld", n);
    }
    }
(-) lynx2-8-5/src/LYCgi.c (-4 / +36 lines)
 Lines 150-155    Link Here 
	return -1;
	return -1;
}
}
#else
#else
#ifdef LYNXCGI_LINKS
/*
 * Wrapper for exec_ok(), confirming with user if the link text is not visible
 * in the status line.
 */
PRIVATE BOOL can_exec_cgi ARGS2(const char *, linktext, const char *, linkargs)
{
    const char *format = gettext("Do you want to execute \"%s\"?");
    char *message = NULL;
    char *command = NULL;
    char *p;
    BOOL result = TRUE;
    if (!exec_ok(HTLoadedDocumentURL(), linktext, CGI_PATH)) {
	/* exec_ok gives out msg. */
	result = FALSE;
    } else if (user_mode < ADVANCED_MODE) {
	StrAllocCopy(command, linktext);
	if (non_empty(linkargs)) {
	    HTSprintf(&command, " %s", linkargs);
	}
	HTUnEscape(command);
	for (p = command; *p; ++p)
	    if (*p == '+')
		*p = ' ';
	HTSprintf0(&message, format, command);
	result = HTConfirm(message);
	FREE(message);
	FREE(command);
    }
    return result;
}
#endif /* LYNXCGI_LINKS */
PRIVATE int LYLoadCGI ARGS4(
PRIVATE int LYLoadCGI ARGS4(
	CONST char *, 		arg,
	CONST char *, 		arg,
	HTParentAnchor *,	anAnchor,
	HTParentAnchor *,	anAnchor,
 Lines 281-288    Link Here 
	       strcmp(arg, HTLoadedDocumentURL()) &&
	       strcmp(arg, HTLoadedDocumentURL()) &&
	       HText_AreDifferent(anAnchor, arg) &&
	       HText_AreDifferent(anAnchor, arg) &&
	       HTUnEscape(orig_pgm) &&
	       HTUnEscape(orig_pgm) &&
	       !exec_ok(HTLoadedDocumentURL(), orig_pgm,
	       !can_exec_cgi(orig_pgm, "")) {
			CGI_PATH)) { /* exec_ok gives out msg. */
	/*
	/*
	 *  If we have extra path info and are not just reloading
	 *  If we have extra path info and are not just reloading
	 *  the current, check the full file path (after unescaping)
	 *  the current, check the full file path (after unescaping)
 Lines 313-320    Link Here 
	       !(reloading && anAnchor->document) &&
	       !(reloading && anAnchor->document) &&
	       strcmp(arg, HTLoadedDocumentURL()) &&
	       strcmp(arg, HTLoadedDocumentURL()) &&
	       HText_AreDifferent(anAnchor, arg) &&
	       HText_AreDifferent(anAnchor, arg) &&
	       !exec_ok(HTLoadedDocumentURL(), pgm,
	       !can_exec_cgi(pgm, pgm_args)) {
			CGI_PATH)) { /* exec_ok gives out msg. */
	/*
	/*
	 *  If we are reloading a lynxcgi document that had already been
	 *  If we are reloading a lynxcgi document that had already been
	 *  loaded, the various checks above should allow it even if
	 *  loaded, the various checks above should allow it even if
(-) lynx2-8-5/src/LYKeymap.c (-2 / +5 lines)
 Lines 1075-1082    Link Here 
	unsigned j;
	unsigned j;
	myList = HTList_new();
	myList = HTList_new();
	for (j = 0; revmap[j].name != 0; j++) {
	for (j = 0; revmap[j].name != 0; j++) {
	    if (revmap[j].doc != 0)
	    if (revmap[j].doc != 0) {
		HTList_addObject(myList, (char *)revmap[j].name);
		char *data = NULL;
		StrAllocCopy(data, revmap[j].name);
		HTList_addObject(myList, data);
	    }
	}
	}
    }
    }
    return myList;
    return myList;
(-) lynx2-8-5/src/LYMainLoop.c (-2 / +2 lines)
 Lines 5207-5214    Link Here 
    char cfile[128];
    char cfile[128];
    FILE *cfp;
    FILE *cfp;
    char *cp;
    char *cp;
    int ch, recall;
    int ch = 0, recall = 0;
    int URLTotal;
    int URLTotal = 0;
    int URLNum;
    int URLNum;
    BOOLEAN FirstURLRecall = TRUE;
    BOOLEAN FirstURLRecall = TRUE;
    char *temp = NULL;
    char *temp = NULL;
(-) lynx2-8-5/src/LYOptions.c (-2 / +2 lines)
 Lines 2488-2494    Link Here 
    PostPair *data = 0;
    PostPair *data = 0;
    DocAddress WWWDoc;  /* need on exit */
    DocAddress WWWDoc;  /* need on exit */
    int i;
    int i;
    int code;
    int code = 0;
    BOOLEAN save_all = FALSE;
    BOOLEAN save_all = FALSE;
    int display_char_set_old = current_char_set;
    int display_char_set_old = current_char_set;
    BOOLEAN raw_mode_old = LYRawMode;
    BOOLEAN raw_mode_old = LYRawMode;
 Lines 2642-2648    Link Here 
	/* Keypad Mode: SELECT */
	/* Keypad Mode: SELECT */
	if (!strcmp(data[i].tag, keypad_mode_string)) {
	if (!strcmp(data[i].tag, keypad_mode_string)) {
	    int newval;
	    int newval = 0;
	    if (GetOptValues(keypad_mode_values, data[i].value, &newval)
	    if (GetOptValues(keypad_mode_values, data[i].value, &newval)
		 && keypad_mode != newval) {
		 && keypad_mode != newval) {
		keypad_mode = newval;
		keypad_mode = newval;
(-) lynx2-8-5/src/LYStrings.c (-1 / +1 lines)
 Lines 1046-1052    Link Here 
    BOOLEAN ok = FALSE;
    BOOLEAN ok = FALSE;
    if (*src == SQUOTE) {
    if (*src == SQUOTE) {
	int keysym;
	int keysym = 0;
	unescaped_char(src, &keysym);
	unescaped_char(src, &keysym);
	if (keysym >= 0) {
	if (keysym >= 0) {
	    dst[0] = keysym;
	    dst[0] = keysym;
(-) lynx2-8-5/userdefs.h (-2 / +2 lines)
 Lines 1360-1370    Link Here 
 * the version definition with the Project Version on checkout.  Just
 * the version definition with the Project Version on checkout.  Just
 * ignore it. - kw */
 * ignore it. - kw */
/* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
/* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
#define LYNX_VERSION "2.8.5rel.1"
#define LYNX_VERSION "2.8.5rel.5"
#define LYNX_WWW_HOME "http://lynx.isc.org/"
#define LYNX_WWW_HOME "http://lynx.isc.org/"
#define LYNX_WWW_DIST "http://lynx.isc.org/current/"
#define LYNX_WWW_DIST "http://lynx.isc.org/current/"
/* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */
/* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */
#define LYNX_DATE "Wed, 04 Feb 2004 04:07:09 -0800"
#define LYNX_DATE "Sat, 29 Oct 2005 12:33:45 -0700"
#define LYNX_DATE_OFF 5		/* truncate the automatically-generated date */
#define LYNX_DATE_OFF 5		/* truncate the automatically-generated date */
#define LYNX_DATE_LEN 11	/* truncate the automatically-generated date */
#define LYNX_DATE_LEN 11	/* truncate the automatically-generated date */
(-) lynx2-8-5/WWW/Library/Implementation/HTGopher.c (+1 lines)
 Lines 1117-1122    Link Here 
    };
    };
    out = 0;
    out = 0;
    memset(&ctx, 0, sizeof(ctx));
    ctx.host = host;
    ctx.host = host;
    ctx.seek = (char *) 0;
    ctx.seek = (char *) 0;
    ctx.port = port;
    ctx.port = port;
(-) lynx2-8-5/WWW/Library/Implementation/HTMIME.c (-36 / +50 lines)
 Lines 2062-2088    Link Here 
**
**
**	Written by S. Ichikawa,
**	Written by S. Ichikawa,
**	partially inspired by encdec.c of <jh@efd.lth.se>.
**	partially inspired by encdec.c of <jh@efd.lth.se>.
**	Assume caller's buffer is LINE_LENGTH bytes, these decode to
**	no longer than the input strings.
*/
*/
#define LINE_LENGTH 512		/* Maximum length of line of ARTICLE etc */
#ifdef ESC
#undef ESC
#endif /* ESC */
#include <LYCharVals.h>  /* S/390 -- gil -- 0163 */
#include <LYCharVals.h>  /* S/390 -- gil -- 0163 */
#define ESC	CH_ESC
PRIVATE char HTmm64[] =
PRIVATE char HTmm64[] =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" ;
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" ;
PRIVATE char HTmmquote[] = "0123456789ABCDEF";
PRIVATE char HTmmquote[] = "0123456789ABCDEF";
PRIVATE int HTmmcont = 0;
PRIVATE int HTmmcont = 0;
PUBLIC void HTmmdec_base64 ARGS2(
PRIVATE void HTmmdec_base64 ARGS2(
	char *,		t,
	char **,	t,
	char *,		s)
	char *,		s)
{
{
    int   d, count, j, val;
    int   d, count, j, val;
    char  buf[LINE_LENGTH], *bp, nw[4], *p;
    char *buf, *bp, nw[4], *p;
    if ((buf = malloc(strlen(s) * 3 + 1)) == 0)
	outofmem(__FILE__, "HTmmdec_base64");
    for (bp = buf; *s; s += 4) {
    for (bp = buf; *s; s += 4) {
	val = 0;
	val = 0;
 Lines 2113-2126    Link Here 
	    *bp++ = nw[2];
	    *bp++ = nw[2];
    }
    }
    *bp = '\0';
    *bp = '\0';
    strcpy(t, buf);
    StrAllocCopy(*t, buf);
    FREE(buf);
}
}
PUBLIC void HTmmdec_quote ARGS2(
PRIVATE void HTmmdec_quote ARGS2(
	char *,		t,
	char **,	t,
	char *,		s)
	char *,		s)
{
{
    char  buf[LINE_LENGTH], cval, *bp, *p;
    char *buf, cval, *bp, *p;
    if ((buf = malloc(strlen(s) + 1)) == 0)
	outofmem(__FILE__, "HTmmdec_quote");
    for (bp = buf; *s; ) {
    for (bp = buf; *s; ) {
	if (*s == '=') {
	if (*s == '=') {
 Lines 2147-2169    Link Here 
	}
	}
    }
    }
    *bp = '\0';
    *bp = '\0';
    strcpy(t, buf);
    StrAllocCopy(*t, buf);
    FREE(buf);
}
}
/*
/*
**	HTmmdecode for ISO-2022-JP - FM
**	HTmmdecode for ISO-2022-JP - FM
*/
*/
PUBLIC void HTmmdecode ARGS2(
PUBLIC void HTmmdecode ARGS2(
	char *,		trg,
	char **,	target,
	char *,		str)
	char *,		source)
{
{
    char buf[LINE_LENGTH], mmbuf[LINE_LENGTH];
    char *buf;
    char *mmbuf = NULL;
    char *m2buf = NULL;
    char *s, *t, *u;
    char *s, *t, *u;
    int  base64, quote;
    int  base64, quote;
    buf[0] = '\0';
    if ((buf = malloc(strlen(source) + 1)) == 0)
	outofmem(__FILE__, "HTmmdecode");
    for (s = str, u = buf; *s; ) {
  
    for (s = source, u = buf; *s;) {
	if (!strncasecomp(s, "=?ISO-2022-JP?B?", 16)) {
	if (!strncasecomp(s, "=?ISO-2022-JP?B?", 16)) {
	    base64 = 1;
	    base64 = 1;
	} else {
	} else {
 Lines 2177-2191    Link Here 
	if (base64 || quote) {
	if (base64 || quote) {
	    if (HTmmcont) {
	    if (HTmmcont) {
		for (t = s - 1;
		for (t = s - 1;
		    t >= str && (*t == ' ' || *t == '\t'); t--) {
		    t >= source && (*t == ' ' || *t == '\t'); t--) {
			u--;
			u--;
		}
		}
	    }
	    }
	    if (mmbuf == 0)	/* allocate buffer big enough for source */
		StrAllocCopy(mmbuf, source);
	    for (s += 16, t = mmbuf; *s; ) {
	    for (s += 16, t = mmbuf; *s; ) {
		if (s[0] == '?' && s[1] == '=') {
		if (s[0] == '?' && s[1] == '=') {
		    break;
		    break;
		} else {
		} else {
		    *t++ = *s++;
		    *t++ = *s++;
		    *t = '\0';
		}
		}
	    }
	    }
	    if (s[0] != '?' || s[1] != '=') {
	    if (s[0] != '?' || s[1] != '=') {
 Lines 2195-2208    Link Here 
		*t = '\0';
		*t = '\0';
	    }
	    }
	    if (base64)
	    if (base64)
		HTmmdec_base64(mmbuf, mmbuf);
		HTmmdec_base64(&m2buf, mmbuf);
	    if (quote)
	    if (quote)
		HTmmdec_quote(mmbuf, mmbuf);
		HTmmdec_quote(&m2buf, mmbuf);
	    for (t = mmbuf; *t; )
	    for (t = m2buf; *t; )
		*u++ = *t++;
		*u++ = *t++;
	    HTmmcont = 1;
	    HTmmcont = 1;
	    /* if (*s == ' ' || *s == '\t') *u++ = *s; */
	    /* for ( ; *s == ' ' || *s == '\t'; s++) ; */
	} else {
	} else {
	    if (*s != ' ' && *s != '\t')
	    if (*s != ' ' && *s != '\t')
		HTmmcont = 0;
		HTmmcont = 0;
 Lines 2211-2217    Link Here 
    }
    }
    *u = '\0';
    *u = '\0';
end:
end:
    strcpy(trg, buf);
    StrAllocCopy(*target, buf);
    FREE(m2buf);
    FREE(mmbuf);
    FREE(buf);
}
}
/*
/*
 Lines 2219-2240    Link Here 
**  (The author of this function "rjis" is S. Ichikawa.)
**  (The author of this function "rjis" is S. Ichikawa.)
*/
*/
PUBLIC int HTrjis ARGS2(
PUBLIC int HTrjis ARGS2(
	char *,		t,
	char **,	t,
	char *,		s)
	char *,		s)
{
{
    char *p, buf[LINE_LENGTH];
    char *p;
    char *buf = NULL;
    int kanji = 0;
    int kanji = 0;
    if (strchr(s, ESC) || !strchr(s, '$')) {
    if (strchr(s, CH_ESC) || !strchr(s, '$')) {
	if (s != t)
	if (s != *t)
	    strcpy(t, s);
	    StrAllocCopy(*t, s);
	return 1;
	return 1;
    }
    }
    if ((buf = malloc(strlen(s) * 2 + 1)) == 0)
	outofmem(__FILE__, "HTrjis");
    for (p = buf; *s; ) {
    for (p = buf; *s; ) {
	if (!kanji && s[0] == '$' && (s[1] == '@' || s[1] == 'B')) {
	if (!kanji && s[0] == '$' && (s[1] == '@' || s[1] == 'B')) {
	    if (HTmaybekanji((int)s[2], (int)s[3])) {
	    if (HTmaybekanji((int)s[2], (int)s[3])) {
		kanji = 1;
		kanji = 1;
		*p++ = ESC;
		*p++ = CH_ESC;
		*p++ = *s++;
		*p++ = *s++;
		*p++ = *s++;
		*p++ = *s++;
		*p++ = *s++;
		*p++ = *s++;
 Lines 2246-2252    Link Here 
	}
	}
	if (kanji && s[0] == '(' && (s[1] == 'J' || s[1] == 'B')) {
	if (kanji && s[0] == '(' && (s[1] == 'J' || s[1] == 'B')) {
	    kanji = 0;
	    kanji = 0;
	    *p++ = ESC;
	    *p++ = CH_ESC;
	    *p++ = *s++;
	    *p++ = *s++;
	    *p++ = *s++;
	    *p++ = *s++;
	    continue;
	    continue;
 Lines 2255-2261    Link Here 
    }
    }
    *p = *s;	/* terminate string */
    *p = *s;	/* terminate string */
    strcpy(t, buf);
    StrAllocCopy(*t, buf);
    FREE(buf);
    return 0;
    return 0;
}
}
(-) lynx2-8-5/WWW/Library/Implementation/HTMIME.h (-10 / +2 lines)
 Lines 67-86    Link Here 
  For handling Japanese headers.
  For handling Japanese headers.
*/
*/
extern void HTmmdec_base64 PARAMS((
	char *	t,
	char *	s));
extern void HTmmdec_quote PARAMS((
	char *	t,
	char *	s));
extern void HTmmdecode PARAMS((
extern void HTmmdecode PARAMS((
	char *	trg,
	char **	trg,
	char *	str));
	char *	str));
extern int HTrjis PARAMS((
extern int HTrjis PARAMS((
	char *	t,
	char **	t,
	char *	s));
	char *	s));
extern int HTmaybekanji PARAMS((
extern int HTmaybekanji PARAMS((
(-) lynx2-8-5/WWW/Library/Implementation/HTNews.c (-61 / +22 lines)
 Lines 940-946    Link Here 
    }
    }
}
}
#ifdef SH_EX	/* for MIME */
#ifdef NEWS_DEBUG
#ifdef NEWS_DEBUG
/* for DEBUG 1997/11/07 (Fri) 17:20:16 */
/* for DEBUG 1997/11/07 (Fri) 17:20:16 */
void debug_print(unsigned char *p)
void debug_print(unsigned char *p)
 Lines 962-1006    Link Here 
}
}
#endif
#endif
static char *decode_mime(char *str)
static char *decode_mime(char **str)
{
{
    char temp[LINE_LENGTH];	/* FIXME: what determines the actual size? */
#ifdef SH_EX
    char *p, *q;
    if (str == NULL)
	return "";
    if (HTCJK != JAPANESE)
    if (HTCJK != JAPANESE)
	return str;
	return *str;
    LYstrncpy(temp, str, sizeof(temp) - 1);
    q = temp;
    while ((p = strchr(q, '=')) != 0) {
	if (p[1] == '?') {
	    HTmmdecode(p, p);
	    q = p + 2;
	} else {
	    q = p + 1;
	}
    }
#ifdef NEWS_DEBUG
    printf("new=[");
    debug_print(temp);
#endif
#endif
    HTrjis(temp, temp);
    HTmmdecode(str, *str);
    strcpy(str, temp);
    return HTrjis(str, *str) ? *str : "";
    return str;
}
}
#else /* !SH_EX */
static char *decode_mime ARGS1(char *, str)
{
    HTmmdecode(str, str);
    HTrjis(str, str);
    return str;
}
#endif
/*	Read in an Article					read_article
/*	Read in an Article					read_article
**	------------------
**	------------------
 Lines 1087-1108    Link Here 
		} else if (match(full_line, "SUBJECT:")) {
		} else if (match(full_line, "SUBJECT:")) {
		    StrAllocCopy(subject, HTStrip(strchr(full_line,':')+1));
		    StrAllocCopy(subject, HTStrip(strchr(full_line,':')+1));
		    decode_mime(subject);
		    decode_mime(&subject);
		} else if (match(full_line, "DATE:")) {
		} else if (match(full_line, "DATE:")) {
		    StrAllocCopy(date, HTStrip(strchr(full_line,':')+1));
		    StrAllocCopy(date, HTStrip(strchr(full_line,':')+1));
		} else if (match(full_line, "ORGANIZATION:")) {
		} else if (match(full_line, "ORGANIZATION:")) {
		    StrAllocCopy(organization,
		    StrAllocCopy(organization,
				 HTStrip(strchr(full_line,':')+1));
				 HTStrip(strchr(full_line,':')+1));
		    decode_mime(organization);
		    decode_mime(&organization);
		} else if (match(full_line, "FROM:")) {
		} else if (match(full_line, "FROM:")) {
		    StrAllocCopy(from, HTStrip(strchr(full_line,':')+1));
		    StrAllocCopy(from, HTStrip(strchr(full_line,':')+1));
		    decode_mime(from);
		    decode_mime(&from);
		} else if (match(full_line, "REPLY-TO:")) {
		} else if (match(full_line, "REPLY-TO:")) {
		    StrAllocCopy(replyto, HTStrip(strchr(full_line,':')+1));
		    StrAllocCopy(replyto, HTStrip(strchr(full_line,':')+1));
		    decode_mime(replyto);
		    decode_mime(&replyto);
		} else if (match(full_line, "NEWSGROUPS:")) {
		} else if (match(full_line, "NEWSGROUPS:")) {
		    StrAllocCopy(newsgroups, HTStrip(strchr(full_line,':')+1));
		    StrAllocCopy(newsgroups, HTStrip(strchr(full_line,':')+1));
 Lines 1711-1718    Link Here 
	int,		last_required)
	int,		last_required)
{
{
    char line[LINE_LENGTH+1];
    char line[LINE_LENGTH+1];
    char author[LINE_LENGTH+1];
    char *author = NULL;
    char subject[LINE_LENGTH+1];
    char *subject = NULL;
    char *date = NULL;
    char *date = NULL;
    int i;
    int i;
    char *p;
    char *p;
 Lines 1725-1731    Link Here 
    int status, count, first, last;	/* Response fields */
    int status, count, first, last;	/* Response fields */
					/* count is only an upper limit */
					/* count is only an upper limit */
    author[0] = '\0';
    START(HTML_HEAD);
    START(HTML_HEAD);
    PUTC('\n');
    PUTC('\n');
    START(HTML_TITLE);
    START(HTML_TITLE);
 Lines 1946-1953    Link Here 
			case 'S':
			case 'S':
			case 's':
			case 's':
			    if (match(line, "SUBJECT:")) {
			    if (match(line, "SUBJECT:")) {
				LYstrncpy(subject, line+9, sizeof(subject)-1);/* Save subject */
				StrAllocCopy(subject, line + 9);
				decode_mime(subject);
				decode_mime(&subject);
			    }
			    }
			    break;
			    break;
 Lines 1964-1973    Link Here 
			case 'F':
			case 'F':
			    if (match(line, "FROM:")) {
			    if (match(line, "FROM:")) {
				char * p2;
				char * p2;
				LYstrncpy(author,
				StrAllocCopy(author, strchr(line, ':') + 1);
					author_name(strchr(line,':')+1),
				decode_mime(&author);
					sizeof(author)-1);
				decode_mime(author);
				p2 = author + strlen(author) - 1;
				p2 = author + strlen(author) - 1;
				if (*p2==LF)
				if (*p2==LF)
				    *p2 = '\0'; /* Chop off newline */
				    *p2 = '\0'; /* Chop off newline */
 Lines 1988-1998    Link Here 
		PUTC('\n');
		PUTC('\n');
		START(HTML_LI);
		START(HTML_LI);
#ifdef SH_EX	/* for MIME */
		p = decode_mime(&subject);
		HTSprintf0(&temp, "\"%s\"", decode_mime(subject));
		HTSprintf0(&temp, "\"%s\"", NonNull(p));
#else
		HTSprintf0(&temp, "\"%s\"", subject);
#endif
		if (reference) {
		if (reference) {
		    write_anchor(temp, reference);
		    write_anchor(temp, reference);
		    FREE(reference);
		    FREE(reference);
 Lines 2001-2018    Link Here 
		}
		}
		FREE(temp);
		FREE(temp);
		if (author[0] != '\0') {
		if (author != NULL) {
		     PUTS(" - ");
		     PUTS(" - ");
		     if (LYListNewsDates)
		     if (LYListNewsDates)
			 START(HTML_I);
			 START(HTML_I);
#ifdef SH_EX	/* for MIME */
		    PUTS(decode_mime(&author));
		     PUTS(decode_mime(author));
#else
		     PUTS(author);
#endif
		     if (LYListNewsDates)
		     if (LYListNewsDates)
			 END(HTML_I);
			 END(HTML_I);
		     author[0] = '\0';
		    FREE(author);
		}
		}
		if (date) {
		if (date) {
		    if (!diagnostic) {
		    if (!diagnostic) {
 Lines 2055-2060    Link Here 
		MAYBE_END(HTML_LI);
		MAYBE_END(HTML_LI);
	    } /* Handle response to HEAD request */
	    } /* Handle response to HEAD request */
	} /* Loop over article */
	} /* Loop over article */
	FREE(author);
	FREE(subject);
    } /* If read headers */
    } /* If read headers */
    PUTC('\n');
    PUTC('\n');
    if (LYListNewsNumbers)
    if (LYListNewsNumbers)
(-) lynx2-8-5/WWW/Library/Implementation/HTString.c (-1 / +5 lines)
 Lines 877-887    Link Here 
    CONST char *,	parameter)
    CONST char *,	parameter)
{
{
    size_t i;
    size_t i;
    size_t last = strlen(parameter);
    size_t last;
    size_t n = 0;
    size_t n = 0;
    size_t quoted = 0;
    size_t quoted = 0;
    char * result;
    char * result;
    if (parameter == 0)
	parameter = "";
    last = strlen(parameter);
    for (i=0; i < last; ++i)
    for (i=0; i < last; ++i)
	if (strchr("\\&#$^*?(){}<>\"';`|", parameter[i]) != 0
	if (strchr("\\&#$^*?(){}<>\"';`|", parameter[i]) != 0
	 || isspace(UCH(parameter[i])))
	 || isspace(UCH(parameter[i])))
(-) lynx2-8-5/WWW/Library/Implementation/HTUtils.h (+4 lines)
 Lines 571-576    Link Here 
#define TRACE_CFG       (TRACE_bit(3))
#define TRACE_CFG       (TRACE_bit(3))
#define TRACE_BSTRING   (TRACE_bit(4))
#define TRACE_BSTRING   (TRACE_bit(4))
#if defined(USE_VERTRACE) && !defined(LY_TRACELINE)
#define LY_TRACELINE __LINE__
#endif
#if defined(LY_TRACELINE)
#if defined(LY_TRACELINE)
#define LY_SHOWWHERE fprintf( tfp, "%s: %d: ", __FILE__, LY_TRACELINE ),
#define LY_SHOWWHERE fprintf( tfp, "%s: %d: ", __FILE__, LY_TRACELINE ),
#else
#else