[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev HTML.c pre.6 patch
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev HTML.c pre.6 patch |
Date: |
Fri, 21 Apr 2000 01:57:39 +0400 (MSD) |
20-Apr-2000 07:47 Klaus Weide wrote:
> On Wed, 19 Apr 100, T.E.Dickey wrote:
>> > * Correct handling of CHARSET attributes on LINK and A. Basically this
>> > reverts back to original 2.7.2ac logic.
>> > * Enable handling of CHARSET attributes on LINK - it was disabled,
>> > probably accidentally.
>> > * Prevent CHARSET attributes from modifying the charset assumption
>> > for the _current_ document.
>>
>> thanks (is this a stable change, or will we be discussing it?)
> This should be stable. Whether CHARSET attributes do always have the
> desired effect or not, that may be up for discussion - but this isn't
> really used in Web pages today since no other browser afaik does anything
> with it. But the important correction - prevent this code from kicking
> in when it shouldn't - should be acceptable to everyone interested.
> (I.e., Leonid and me :) ).
> Klaus
That was my changes (>1 year ago), perhaps without exact
understanding the subject.
But please check the comment marked with (**) below:
certain parts of code relay on it
(_many_ checks like current_char_set>=0 etc. were removed
due to this invariant, I don't know whether it is
always true for UCLYhndl_for_unspec now).
LYMain.c:
/*
* Make sure we have the character sets declared.
* This will initialize the CHARTRANS handling. - KW
*/
if (!LYCharSetsDeclared()) {
fprintf(stderr, gettext("\nLynx character sets not declared.\n\n"));
exit(-1);
}
/*
* (**) in Lynx, UCLYhndl_HTFile_for_unspec and UCLYhndl_for_unrec may be
* valid or not, but current_char_set and UCLYhndl_for_unspec SHOULD
* ALWAYS be a valid charset. Initialized here and may be changed later
* from lynx.cfg/command_line/options_menu. - LP (**)
*/
/*
* Set up the compilation default character set. - FM
*/
current_char_set = safeUCGetLYhndl_byMIME(CHARACTER_SET);
/*
* Set up HTTP default for unlabeled charset (iso-8859-1).
*/
UCLYhndl_for_unspec = LATIN1;
StrAllocCopy(UCAssume_MIMEcharset,
LYCharSet_UC[UCLYhndl_for_unspec].MIMEname);