Commit 7f78908e authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 2.8.7dev10

parent e039600f
-- $LynxId: CHANGES,v 1.271 2008/04/27 23:03:14 tom Exp $ -- $LynxId: CHANGES,v 1.308 2008/09/21 21:12:42 tom Exp $
=============================================================================== ===============================================================================
Changes since Lynx 2.8 release Changes since Lynx 2.8 release
=============================================================================== ===============================================================================
2008-09-21 (2.8.7dev.10)
* remove rw.po, since the translation project no longer supplies it -TD
* implement "readonly" attribute for TEXTAREA and TEXT fields -TD
* update Lynx's tables of HTML attributes to cover (except for events) the
keywords from HTML 4.01 -TD
* modify initial active link in download-page to be the first download
action rather than the "help" link which is provided in Novice mode
(Debian #376259) -PBM, TD
* implement "chunked" transfer-encoding to work with servers that ignore the
version number in HTTP get's -TD
* change initialization of trace file, handing this during the first part of
argument parsing along with -help and -version, to show steps done for
initialization of presentors, etc -TD
* minor fix to LYstartPopup() to handle a case where the popup menu was too
large for the screen -TD
* fixes for srcdir!=objdir (report by FLWM) -TD
* modify man2hlp.sh to work from subdirectory, e.g., its parameter would be
"../lynx.man" -TD
* set POSIX locale for install-cfg.sh and man2hlp.sh since they use character
ranges -TD
* add switch -xhtml-parsing and lynx.cfg XHTML_PARSING setting to control
whether the extensions for XHTML 1.0 are used (prompted by bug report by
FLWM, as well as discussion on lynx-dev) -TD
* modify external editing of TEXTAREA to not do tab-conversion -TD
* modify LYhighlight() to limit display of multicolumn characters -TD
* rewrite LYRefreshEdit(), to display multibyte/multicolumn characters properly
when using wide-character curses -TD
* revise introductory comment written to ".lynxrc" (Debian #461158) -TD
* discard anchor's post_data field in HTLoadDocument() if Lynx is about to
reload a document. That would happen if the result of the form includes a
link back to the form. Removing the data causes Lynx to prompt the user,
e.g.,
Resubmit POST content to http://localhost/cgi-bin/lynxtest.pl ? (y/n)
to offer the user the choice between revisiting form or re-POST'ing the
data that was on the form (report by Andreas K Foerster) -TD
* fixes for LYHighlight() when the highlighted text is empty -TD
* translate named entities, etc., for "content" field of refresh-URL, cf:
2.8.5dev.13 (report by Ivan Shmakov) -TD
* suppress computation in TrimmedLength() for source-view, which is not needed
for Debian #204515 (patch by Mike Knight)
* add check-po rule to po/makefile -TD
* modify top-level makefile to work with configure --srcdir -TD
* add update-po rule to top-level makefile -TD
* update fr.po, nl.po, tr.po, vi.po, zh_TW.po,sv.po from
http://translationproject.org/latest/lynx/
* parse doctype for xhtml, to tell when empty tags such as "<textarea />" can
be discarded (report by Nils Dagsson Moskopp) -TD
* parse xml processing-instruction to turn on UTF-8 decoding, as well as
disable upper/lower case transforming in source view (discussion on
lynx-dev) -TD
* fix typo in Lynx_users_guide.html (report by Kristof Zelechovski)
* minor fix to documentation in lynx.cfg -PW
* use off_t rather than long for representing file sizes, e.g., when used to
print progress messages (reports by LP, Tomas Liska, TG, PG) -TD
* use dtd_util to replace most of HTMLDTD.h and HTMLDTD.c with source generated
from the existing tables in those files -TD
* add program dtd_util which can be used to dump the SGML tables in readable
form -TD
* change calls to LYhandlePopupList() to turn on (or off) numbering when
keypad_mode is not NUMBERS_AS_ARROWS -PBM
* move close of session-file outside ifdef for VLINK_IN_SESSION, closing
session file properly if that ifdef is disabled. Add a null-pointer check
for visited links that are saved -PBM
* make auto_session and session_file configurable with ENABLE_LYNXRC -PBM
* separate configure "--enable-sessions" option from "--enable-session-cache"
option -PBM
* add ncurses scroll-wheel support, which requires the extended-mouse configure
option of ncurses (Debian #476394) -TD
Caveat: if running on a local terminal, setting the ESCDELAY environment
variable to 0 (zero) helps, since the event rate is rather high. That would
not help on a network with delays (this is true of all text applications that
use xterm's mouse protocol, such as gpm and ncurses).
* adapt/extend parsdate.y from tin to improve parsing of cookie expiration
times (Debian #480144) -TD
* update de.po (patch by Fabian Fingerle)
2008-04-27 (2.8.7dev.9) 2008-04-27 (2.8.7dev.9)
* update nl.po, vi.po from * update nl.po, vi.po from
http://translationproject.org/latest/lynx/ http://translationproject.org/latest/lynx/
......
/* Access Manager HTAccess.c /*
* $LynxId: HTAccess.c,v 1.67 2008/09/06 14:44:37 tom Exp $
*
* Access Manager HTAccess.c
* ============== * ==============
* *
* Authors * Authors
...@@ -61,6 +64,7 @@ ...@@ -61,6 +64,7 @@
#include <LYGlobalDefs.h> #include <LYGlobalDefs.h>
#include <LYexit.h> #include <LYexit.h>
#include <LYStrings.h>
#include <LYUtils.h> #include <LYUtils.h>
#include <LYLeaks.h> #include <LYLeaks.h>
...@@ -681,21 +685,19 @@ static int HTLoad(const char *addr, ...@@ -681,21 +685,19 @@ static int HTLoad(const char *addr,
if (status == HT_FORBIDDEN) { if (status == HT_FORBIDDEN) {
/* prevent crash if telnet or similar was forbidden by rule. - kw */ /* prevent crash if telnet or similar was forbidden by rule. - kw */
LYFixCursesOn("show alert:"); LYFixCursesOn("show alert:");
return HTLoadError(sink, 500, gettext("Access forbidden by rule")); status = HTLoadError(sink, 500, gettext("Access forbidden by rule"));
} else if (status == HT_REDIRECTING) { } else if (status == HT_REDIRECTING) {
return status; /* fake redirection by rule, to redirecting_url */ ; /* fake redirection by rule, to redirecting_url */
} else if (status >= 0) {
/* prevent crash if telnet or similar mapped or proxied by rule. - kw */
LYFixCursesOnForAccess(addr, HTAnchor_physical(anchor));
p = (HTProtocol *) HTAnchor_protocol(anchor);
anchor->parent->underway = TRUE; /* Hack to deal with caching */
status = p->load(HTAnchor_physical(anchor),
anchor, format_out, sink);
anchor->parent->underway = FALSE;
LYUCPopAssumed();
} }
if (status < 0)
return status; /* Can't resolve or forbidden */
/* prevent crash if telnet or similar mapped or proxied by rule. - kw */
LYFixCursesOnForAccess(addr, HTAnchor_physical(anchor));
p = (HTProtocol *) HTAnchor_protocol(anchor);
anchor->parent->underway = TRUE; /* Hack to deal with caching */
status = p->load(HTAnchor_physical(anchor),
anchor, format_out, sink);
anchor->parent->underway = FALSE;
LYUCPopAssumed();
return status; return status;
} }
...@@ -903,11 +905,12 @@ static BOOL HTLoadDocument(const char *full_address, /* may include #fragment */ ...@@ -903,11 +905,12 @@ static BOOL HTLoadDocument(const char *full_address, /* may include #fragment */
return YES; return YES;
} else { } else {
ForcingNoCache = YES; ForcingNoCache = YES;
BStrFree(anchor->post_data);
CTRACE((tfp, "HTAccess: Auto-reloading document.\n")); CTRACE((tfp, "HTAccess: Auto-reloading document.\n"));
} }
} }
if (text && HText_HaveUserChangedForms(text)) { if (HText_HaveUserChangedForms(text)) {
/* /*
* Issue a warning. User forms content will be lost. * Issue a warning. User forms content will be lost.
* Will not restore changed forms, currently. * Will not restore changed forms, currently.
...@@ -1285,7 +1288,7 @@ BOOL HTSearch(const char *keywords, ...@@ -1285,7 +1288,7 @@ BOOL HTSearch(const char *keywords,
if (WHITE(*p)) { if (WHITE(*p)) {
*q++ = '+'; *q++ = '+';
} else if (HTCJK != NOCJK) { } else if (IS_CJK_TTY) {
*q++ = *p; *q++ = *p;
} else if (c >= 32 && c <= UCH(127) && isAcceptable[c - 32]) { } else if (c >= 32 && c <= UCH(127) && isAcceptable[c - 32]) {
*q++ = *p; /* 930706 TBL for MVS bug */ *q++ = *p; /* 930706 TBL for MVS bug */
......
/* /*
* $LynxId: HTAnchor.c,v 1.59 2007/07/02 23:42:54 tom Exp $ * $LynxId: HTAnchor.c,v 1.60 2008/09/18 21:35:24 tom Exp $
* *
* Hypertext "Anchor" Object HTAnchor.c * Hypertext "Anchor" Object HTAnchor.c
* ========================== * ==========================
...@@ -362,11 +362,11 @@ HTChildAnchor *HTAnchor_findChildAndLink(HTParentAnchor *parent, /* May not be 0 ...@@ -362,11 +362,11 @@ HTChildAnchor *HTAnchor_findChildAndLink(HTParentAnchor *parent, /* May not be 0
if (child->dest) { /* DUPLICATE_ANCHOR_NAME_WORKAROUND - kw */ if (child->dest) { /* DUPLICATE_ANCHOR_NAME_WORKAROUND - kw */
CTRACE((tfp, CTRACE((tfp,
"*** Duplicate ChildAnchor %p named `%s'", "*** Duplicate ChildAnchor %p named `%s'",
child, tag)); (void *) child, tag));
if ((HTAnchor *) dest != child->dest || ltype != child->type) { if ((HTAnchor *) dest != child->dest || ltype != child->type) {
CTRACE((tfp, CTRACE((tfp,
", different dest %p or type, creating unnamed child\n", ", different dest %p or type, creating unnamed child\n",
child->dest)); (void *) child->dest));
child = HTAnchor_addChild(parent); child = HTAnchor_addChild(parent);
} }
} }
...@@ -515,7 +515,7 @@ static BOOL HTAnchor_link(HTChildAnchor *child, ...@@ -515,7 +515,7 @@ static BOOL HTAnchor_link(HTChildAnchor *child,
if (!(child && destination)) if (!(child && destination))
return (NO); /* Can't link to/from non-existing anchor */ return (NO); /* Can't link to/from non-existing anchor */
CTRACE((tfp, "Linking child %p to anchor %p\n", child, destination)); CTRACE((tfp, "Linking child %p to anchor %p\n", (void *) child, (void *) destination));
if (child->dest) { if (child->dest) {
CTRACE((tfp, "*** child anchor already has destination, exiting!\n")); CTRACE((tfp, "*** child anchor already has destination, exiting!\n"));
return (NO); return (NO);
......
/* /*
* $LynxId: HTFTP.c,v 1.80 2007/08/02 19:55:46 tom Exp $ * $LynxId: HTFTP.c,v 1.81 2008/09/18 21:34:25 tom Exp $
* *
* File Transfer Protocol (FTP) Client * File Transfer Protocol (FTP) Client
* for a WorldWideWeb browser * for a WorldWideWeb browser
...@@ -882,7 +882,7 @@ static int get_connection(const char *arg, ...@@ -882,7 +882,7 @@ static int get_connection(const char *arg,
} }
CTRACE((tfp, "FTP connected, socket %d control %p\n", CTRACE((tfp, "FTP connected, socket %d control %p\n",
con->socket, con)); con->socket, (void *) con));
control = con; /* Current control connection */ control = con; /* Current control connection */
/* Initialise buffering for control connection */ /* Initialise buffering for control connection */
......
/* /*
* $LynxId: HTFile.c,v 1.104 2007/08/02 19:46:01 tom Exp $ * $LynxId: HTFile.c,v 1.105 2008/09/18 21:34:25 tom Exp $
* *
* File Access HTFile.c * File Access HTFile.c
* =========== * ===========
...@@ -2234,7 +2234,7 @@ static int decompressAndParse(HTParentAnchor *anchor, ...@@ -2234,7 +2234,7 @@ static int decompressAndParse(HTParentAnchor *anchor,
FREE(ultrixname); FREE(ultrixname);
} }
#endif /* VMS */ #endif /* VMS */
CTRACE((tfp, "HTLoadFile: Opening `%s' gives %p\n", localname, fp)); CTRACE((tfp, "HTLoadFile: Opening `%s' gives %p\n", localname, (void *) fp));
if (fp) { /* Good! */ if (fp) { /* Good! */
if (HTEditable(localname)) { if (HTEditable(localname)) {
HTAtom *put = HTAtom_for("PUT"); HTAtom *put = HTAtom_for("PUT");
...@@ -2271,7 +2271,7 @@ static int decompressAndParse(HTParentAnchor *anchor, ...@@ -2271,7 +2271,7 @@ static int decompressAndParse(HTParentAnchor *anchor,
fp = 0; fp = 0;
CTRACE((tfp, "HTLoadFile: zzopen of `%s' gives %p\n", CTRACE((tfp, "HTLoadFile: zzopen of `%s' gives %p\n",
localname, zzfp)); localname, (void *) zzfp));
internal_decompress = cftDeflate; internal_decompress = cftDeflate;
} else } else
#endif /* USE_ZLIB */ #endif /* USE_ZLIB */
...@@ -2318,7 +2318,7 @@ static int decompressAndParse(HTParentAnchor *anchor, ...@@ -2318,7 +2318,7 @@ static int decompressAndParse(HTParentAnchor *anchor,
fp = 0; fp = 0;
CTRACE((tfp, "HTLoadFile: zzopen of `%s' gives %p\n", CTRACE((tfp, "HTLoadFile: zzopen of `%s' gives %p\n",
localname, zzfp)); localname, (void *) zzfp));
internal_decompress = cftDeflate; internal_decompress = cftDeflate;
} }
#else /* USE_ZLIB */ #else /* USE_ZLIB */
......
/* /*
* $LynxId: HTFormat.c,v 1.62 2007/08/02 20:12:22 tom Exp $ * $LynxId: HTFormat.c,v 1.63 2008/09/10 23:22:59 tom Exp $
* *
* Manage different file formats HTFormat.c * Manage different file formats HTFormat.c
* ============================= * =============================
...@@ -101,6 +101,14 @@ void HTSetPresentation(const char *representation, ...@@ -101,6 +101,14 @@ void HTSetPresentation(const char *representation,
if (pres == NULL) if (pres == NULL)
outofmem(__FILE__, "HTSetPresentation"); outofmem(__FILE__, "HTSetPresentation");
CTRACE2(TRACE_CFG,
(tfp,
"HTSetPresentation rep=%s, command=%s, test=%s, qual=%f\n",
NonNull(representation),
NonNull(command),
NonNull(testcommand),
quality));
pres->rep = HTAtom_for(representation); pres->rep = HTAtom_for(representation);
pres->rep_out = WWW_PRESENT; /* Fixed for now ... :-) */ pres->rep_out = WWW_PRESENT; /* Fixed for now ... :-) */
pres->converter = HTSaveAndExecute; /* Fixed for now ... */ pres->converter = HTSaveAndExecute; /* Fixed for now ... */
...@@ -153,6 +161,13 @@ void HTSetConversion(const char *representation_in, ...@@ -153,6 +161,13 @@ void HTSetConversion(const char *representation_in,
if (pres == NULL) if (pres == NULL)
outofmem(__FILE__, "HTSetConversion"); outofmem(__FILE__, "HTSetConversion");
CTRACE2(TRACE_CFG,
(tfp,
"HTSetConversion rep_in=%s, rep_out=%s, qual=%f\n",
NonNull(representation_in),
NonNull(representation_out),
quality));
pres->rep = HTAtom_for(representation_in); pres->rep = HTAtom_for(representation_in);
pres->rep_out = HTAtom_for(representation_out); pres->rep_out = HTAtom_for(representation_out);
pres->converter = converter; pres->converter = converter;
......
...@@ -163,7 +163,7 @@ The HTPresentation and HTConverter types ...@@ -163,7 +163,7 @@ The HTPresentation and HTConverter types
float quality; /* Between 0 (bad) and 1 (good) */ float quality; /* Between 0 (bad) and 1 (good) */
float secs; float secs;
float secs_per_byte; float secs_per_byte;
long int maxbytes; off_t maxbytes;
BOOL get_accept; /* list in "Accept:" for GET */ BOOL get_accept; /* list in "Accept:" for GET */
int accept_opt; /* matches against LYAcceptMedia */ int accept_opt; /* matches against LYAcceptMedia */
}; };
......
/* A small List class HTList.c /*
* $LynxId: HTList.c,v 1.17 2008/09/18 21:36:59 tom Exp $
*
* A small List class HTList.c
* ================== * ==================
* *
* A list is represented as a sequence of linked nodes of type HTList. * A list is represented as a sequence of linked nodes of type HTList.
...@@ -70,7 +73,7 @@ HTList *HTList_appendList(HTList *start, ...@@ -70,7 +73,7 @@ HTList *HTList_appendList(HTList *start,
if (!start) { if (!start) {
CTRACE((tfp, CTRACE((tfp,
"HTList: Trying to append list %p to a nonexisting list\n", "HTList: Trying to append list %p to a nonexisting list\n",
tail)); (void *) tail));
return NULL; return NULL;
} }
if (!(tail && tail->next)) if (!(tail && tail->next))
...@@ -107,7 +110,7 @@ void HTList_linkObject(HTList *me, void *newObject, ...@@ -107,7 +110,7 @@ void HTList_linkObject(HTList *me, void *newObject,
*/ */
CTRACE((tfp, "*** HTList: Refuse linking already linked obj ")); CTRACE((tfp, "*** HTList: Refuse linking already linked obj "));
CTRACE((tfp, "%p, node %p, list %p\n", CTRACE((tfp, "%p, node %p, list %p\n",
newObject, newNode, me)); (void *) newObject, (void *) newNode, (void *) me));
} }
} else { } else {
......
/* /*
* $LynxId: HTMIME.c,v 1.62 2007/07/03 00:16:30 tom Exp $ * $LynxId: HTMIME.c,v 1.64 2008/09/17 00:04:44 tom Exp $
* *
* MIME Message Parse HTMIME.c * MIME Message Parse HTMIME.c
* ================== * ==================
...@@ -37,6 +37,16 @@ ...@@ -37,6 +37,16 @@
typedef enum { typedef enum {
MIME_TRANSPARENT, /* put straight through to target ASAP! */ MIME_TRANSPARENT, /* put straight through to target ASAP! */
/* states for "Transfer-Encoding: chunked" */
MIME_CHUNKED,
mcCHUNKED_COUNT_DIGIT,
mcCHUNKED_COUNT_CR,
mcCHUNKED_COUNT_LF,
mcCHUNKED_EXTENSION,
mcCHUNKED_DATA,
mcCHUNKED_DATA_CR,
mcCHUNKED_DATA_LF,
/* character state-machine */
miBEGINNING_OF_LINE, /* first character and not a continuation */ miBEGINNING_OF_LINE, /* first character and not a continuation */
miA, miA,
miACCEPT_RANGES, miACCEPT_RANGES,
...@@ -138,8 +148,12 @@ struct _HTStream { ...@@ -138,8 +148,12 @@ struct _HTStream {
char *refresh_url; /* "Refresh:" URL */ char *refresh_url; /* "Refresh:" URL */
HTFormat encoding; /* Content-Transfer-Encoding */ HTFormat c_t_encoding; /* Content-Transfer-Encoding */
char *compression_encoding; char *compression_encoding;
BOOL chunked_encoding; /* Transfer-Encoding: chunked */
long chunked_size; /* ...counter for "chunked" */
HTFormat format; /* Content-Type */ HTFormat format; /* Content-Type */
HTStream *target; /* While writing out */ HTStream *target; /* While writing out */
HTStreamClass targetClass; HTStreamClass targetClass;
...@@ -471,10 +485,11 @@ static int pumpData(HTStream *me) ...@@ -471,10 +485,11 @@ static int pumpData(HTStream *me)
if (me->target) { if (me->target) {
me->targetClass = *me->target->isa; me->targetClass = *me->target->isa;
/* /*
* Check for encoding and select state from there, someday, but until * Pump rest of data right through, according to the transfer encoding.
* we have the relevant code, from now push straight through. - FM
*/ */
me->state = MIME_TRANSPARENT; /* Pump rest of data right through */ me->state = (me->chunked_encoding
? MIME_CHUNKED
: MIME_TRANSPARENT);
} else { } else {
me->state = MIME_IGNORE; /* What else to do? */ me->state = MIME_IGNORE; /* What else to do? */
} }
...@@ -754,7 +769,7 @@ static int dispatchField(HTStream *me) ...@@ -754,7 +769,7 @@ static int dispatchField(HTStream *me)
* Force the Content-Transfer-Encoding value to all lower case. - FM * Force the Content-Transfer-Encoding value to all lower case. - FM
*/ */
LYLowerCase(me->value); LYLowerCase(me->value);
me->encoding = HTAtom_for(me->value); me->c_t_encoding = HTAtom_for(me->value);
break; break;
case miCONTENT_TYPE: case miCONTENT_TYPE:
HTMIME_TrimDoubleQuotes(me->value); HTMIME_TrimDoubleQuotes(me->value);
...@@ -937,6 +952,8 @@ static int dispatchField(HTStream *me) ...@@ -937,6 +952,8 @@ static int dispatchField(HTStream *me)
HTMIME_TrimDoubleQuotes(me->value); HTMIME_TrimDoubleQuotes(me->value);
CTRACE((tfp, "HTMIME: PICKED UP Transfer-Encoding: '%s'\n", CTRACE((tfp, "HTMIME: PICKED UP Transfer-Encoding: '%s'\n",
me->value)); me->value));
if (!strcmp(me->value, "chunked"))
me->chunked_encoding = YES;
break; break;
case miUPGRADE: case miUPGRADE:
HTMIME_TrimDoubleQuotes(me->value); HTMIME_TrimDoubleQuotes(me->value);
...@@ -990,9 +1007,82 @@ static int dispatchField(HTStream *me) ...@@ -990,9 +1007,82 @@ static int dispatchField(HTStream *me)
static void HTMIME_put_character(HTStream *me, static void HTMIME_put_character(HTStream *me,
char c) char c)
{ {
if (me->state == MIME_TRANSPARENT) { /* MUST BE FAST */
(*me->targetClass.put_character) (me->target, c); /* MUST BE FAST */ switch (me->state) {
begin_transparent:
case MIME_TRANSPARENT:
(*me->targetClass.put_character) (me->target, c);
return; return;
/* RFC-2616 describes chunked transfer coding */
case mcCHUNKED_DATA:
(*me->targetClass.put_character) (me->target, c);
me->chunked_size--;
if (me->chunked_size <= 0)
me->state = mcCHUNKED_DATA_CR;
return;
case mcCHUNKED_DATA_CR:
me->state = mcCHUNKED_DATA_LF;
if (c == CR) {
return;
}
case mcCHUNKED_DATA_LF:
me->state = MIME_CHUNKED;
if (c == LF) {
return;
}
CTRACE((tfp, "HTIME_put_character expected LF in chunked data\n"));
me->state = MIME_TRANSPARENT;
goto begin_transparent;
/* FALLTHRU */
begin_chunked:
case MIME_CHUNKED:
me->chunked_size = 0;
me->state = mcCHUNKED_COUNT_DIGIT;
/* FALLTHRU */
case mcCHUNKED_COUNT_DIGIT:
if (isxdigit(UCH(c))) {
me->chunked_size <<= 4;
if (isdigit(UCH(c)))
me->chunked_size += UCH(c) - '0';
else
me->chunked_size += TOUPPER(UCH(c)) - 'A' + 10;
return;
}
if (c == ';')
me->state = mcCHUNKED_EXTENSION;
/* FALLTHRU */
case mcCHUNKED_EXTENSION:
if (c != CR && c != LF) {
return;
}
me->state = mcCHUNKED_COUNT_CR;
/* FALLTHRU */
case mcCHUNKED_COUNT_CR:
me->state = mcCHUNKED_COUNT_LF;
if (c == CR) {
return;
}
/* FALLTHRU */
case mcCHUNKED_COUNT_LF:
me->state = ((me->chunked_size != 0)
? mcCHUNKED_DATA
: MIME_CHUNKED);
if (c == LF) {
return;
}
goto begin_chunked;
default:
break;
} }
/* /*
...@@ -1025,7 +1115,14 @@ static void HTMIME_put_character(HTStream *me, ...@@ -1025,7 +1115,14 @@ static void HTMIME_put_character(HTStream *me,
return; return;
case MIME_TRANSPARENT: /* Not reached see above */ case MIME_TRANSPARENT: /* Not reached see above */
(*me->targetClass.put_character) (me->target, c); case MIME_CHUNKED:
case mcCHUNKED_COUNT_DIGIT:
case mcCHUNKED_COUNT_CR:
case mcCHUNKED_COUNT_LF:
case mcCHUNKED_EXTENSION:
case mcCHUNKED_DATA:
case mcCHUNKED_DATA_CR:
case mcCHUNKED_DATA_LF:
return; return;
case MIME_NET_ASCII: case MIME_NET_ASCII:
...@@ -2049,7 +2146,7 @@ HTStream *HTMIMEConvert(HTPresentation *pres, ...@@ -2049,7 +2146,7 @@ HTStream *HTMIMEConvert(HTPresentation *pres,
me->set_cookie = NULL; /* Not set yet */ me->set_cookie = NULL; /* Not set yet */
me->set_cookie2 = NULL; /* Not set yet */ me->set_cookie2 = NULL; /* Not set yet */
me->refresh_url = NULL; /* Not set yet */ me->refresh_url = NULL; /* Not set yet */
me->encoding = 0; /* Not set yet */ me->c_t_encoding = 0; /* Not set yet */
me->compression_encoding = NULL; /* Not set yet */ me->compression_encoding = NULL; /* Not set yet */
me->net_ascii = NO; /* Local character set */ me->net_ascii = NO; /* Local character set */
HTAnchor_setUCInfoStage(me->anchor, current_char_set, HTAnchor_setUCInfoStage(me->anchor, current_char_set,
......
This diff is collapsed.
This diff is collapsed.
/* Plain text object HTWrite.c /*
* $LynxId: HTPlain.c,v 1.42 2008/09/06 14:45:09 tom Exp $
*
* Plain text object HTWrite.c
* ================= * =================
* *
* This version of the stream object just writes to a socket. * This version of the stream object just writes to a socket.
...@@ -28,6 +31,7 @@ ...@@ -28,6 +31,7 @@
#include <UCAux.h> #include <UCAux.h>
#include <LYCharSets.h> #include <LYCharSets.h>
#include <LYStrings.h>
#include <LYLeaks.h> #include <LYLeaks.h>
static int HTPlain_lastraw = -1; static int HTPlain_lastraw = -1;
...@@ -134,7 +138,7 @@ static void HTPlain_put_character(HTStream *me, char c) ...@@ -134,7 +138,7 @@ static void HTPlain_put_character(HTStream *me, char c)
* For now, don't repeat everything here that has been done below - KW * For now, don't repeat everything here that has been done below - KW
*/ */
HTPlain_write(me, &c, 1); HTPlain_write(me, &c, 1);
} else if (HTCJK != NOCJK) { } else if (IS_CJK_TTY) {
HText_appendCharacter(me->text, c); HText_appendCharacter(me->text, c);
} else if (TOASCII(UCH(c)) >= 127 && TOASCII(UCH(c)) < 161 && } else if (TOASCII(UCH(c)) >= 127 && TOASCII(UCH(c)) < 161 &&
HTPassHighCtrlRaw) { HTPassHighCtrlRaw) {
...@@ -470,7 +474,7 @@ static void HTPlain_write(HTStream *me, const char *s, int l) ...@@ -470,7 +474,7 @@ static void HTPlain_write(HTStream *me, const char *s, int l)
* display character set, and if not, the user should toggle off * display character set, and if not, the user should toggle off
* raw/CJK mode to reload. - FM * raw/CJK mode to reload. - FM
*/ */
if (HTCJK != NOCJK) { if (IS_CJK_TTY) {
HText_appendCharacter(me->text, c); HText_appendCharacter(me->text, c);
#define PASSHICTRL (me->T.transp || \ #define PASSHICTRL (me->T.transp || \
...@@ -616,12 +620,12 @@ static void HTPlain_write(HTStream *me, const char *s, int l) ...@@ -616,12 +620,12 @@ static void HTPlain_write(HTStream *me, const char *s, int l)
/* /*
* Ignore 8204 (zwnj) or 8205 (zwj), if we get to here. - FM * Ignore 8204 (zwnj) or 8205 (zwj), if we get to here. - FM
*/ */
CTRACE((tfp, "HTPlain_write: Ignoring '%ld'.\n", code)); CTRACE((tfp, "HTPlain_write: Ignoring '%" PRI_UCode_t "'.\n", code));
} else if (code == 8206 || code == 8207) { } else if (code == 8206 || code == 8207) {
/* /*
* Ignore 8206 (lrm) or 8207 (rlm), if we get to here. - FM * Ignore 8206 (lrm) or 8207 (rlm), if we get to here. - FM
*/ */
CTRACE((tfp, "HTPlain_write: Ignoring '%ld'.\n", code)); CTRACE((tfp, "HTPlain_write: Ignoring '%" PRI_UCode_t "'.\n", code));
} else { } else {
/* /*
* Out of luck, so use the UHHH notation (ugh). - FM * Out of luck, so use the UHHH notation (ugh). - FM
......
/* /*
* $LynxId: HTRules.c,v 1.30 2007/08/02 20:12:40 tom Exp $