lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV fotemods chartrans & SSL


From: Foteos Macrides
Subject: Re: LYNX-DEV fotemods chartrans & SSL
Date: Fri, 24 Oct 1997 13:39:11 -0500 (EST)

Klaus Weide <address@hidden> wrote:
>On Thu, 23 Oct 1997, Foteos Macrides wrote:
>
>> Klaus Weide <address@hidden> wrote:
>> >
>> >(gdb) set args -source -preparsed http://www.microsoft.com
>> >(gdb) run
>> > [ ... ]
>> >Breakpoint 1, LYCheckForCSI (me=0x141900, url=0x141b9c) at 
>> >./LYCharUtils.c:4467
>> >4467        if (!me)
>> >(gdb) p *me
>> >$4 = {isa = 0xe689c, node_anchor = 0x1417a0, text = 0xd28d8,
>> >  target = 0x687e4, targetClass = {name = 0x68e48 "\235c?\220!",
>> >    _free = 0x68764 <HTFWriter_put_character>,
>> >    _abort = 0x687ac <HTFWriter_put_string>,
>> >    put_character = 0x687c4 <HTFWriter_write>,
>> >    put_string = 0x3c2f5441 <MessageSecs+1008458489>,
>> >    put_block = 0x424c453e <MessageSecs+1111018486>}, CurrentA = 0xd0a6172,
>> >  CurrentANum = 2033150317,
>> > [ ... ]
>> >(gdb) p me->isa
>> >$5 = (HTStructuredClass *) 0xe689c
>> >(gdb) p *me->isa
>> >$6 = {name = 0xe68c0 "HTMLGen", _free = 0x983e0 <HTMLGen_free>,
>> >  _abort = 0x98448 <HTMLGen_abort>,
>> >  put_character = 0x97cb8 <HTMLGen_put_character>,
>> >  put_string = 0x97ffc <HTMLGen_put_string>, _write = 0x98034 
>> > <HTMLGen_write>,
>> >  start_element = 0x9806c <HTMLGen_start_element>,
>> >  end_element = 0x982cc <HTMLGen_end_element>,
>> >  put_entity = 0x98384 <HTMLGen_put_entity>}
>> >(gdb)
>> 
>>      LYCheckForCSI() is not called when you use -source and have
>> a target associated with the HTML generator.  It *will* be called when
>> you have -preparsed without -source, it's appropriate to call it in
>> that case, will have the appropriate target argument, and it will not
>> crash.  
>
>It seems you are just speculating and haven't actually tried it,
>and you haven't understood what the debug output means.  Or you must
>be talking about some other code set, not 2.7.1ac-0.84 (or following).

        Of course I tried it, both here on VMS and for solaris2 at slcc,
and walked through it with my debugger, and advised you to actually try
it again and think about it some more.


>> There was no need to change what you had before in the devel
>> code.
>
>If by "before" you mean before -83 but after -63 or so - yes it did
>"work", but it is you who wrote "but that would defeat the point of this
>example."  I happen to agree.
>
>> Could you at least restore that, instead of what you have now
>> with your interdigitated, false comments?
>
>They are not false.  Please try to understand what they are saying.
>If you have a better formulation to offer which takes account
>of how that function actually may be called, please contribute it.

        When you added the -preparsed stuff to the devel code, which
I did not add to the fotemods (and would not as part of mainline code
without a compilation option, like LY_FIND_LEAKS, since it's a debugging
tool and there's no need to make a yet bigger mainline image for people
like Henry with restricted resources to swallow, even though he and his
userbase would never use that feature), you created a situation in the
existing handle_comment() function of SGML.c for which LYCheckForCSI()
of LYCharUtils.c could be called inappropriately - with the wrong target
argument.  You dealt with it in the simple, and logically correct, way of
replacing the *target* argument with essentially a string argument derived
from the SGML parser's own copy of the anchor.  You, in effect, took the
LYCheckForCSI() function out of the Lynx_HTML_parser function group,
and the only flaw in the devel code set was that you did not also (as
would have been appropriate to complete your change in a manner that
would make sense to some future developers, when you someday become a
displaced hone-kay :) is that you did not also move LYCheckForCSI()
out of LYCharUtils.c to LYUtils.c, next to LYDoCSI(), because it became
a general string handling utility, not a specific target handling
utility in the Lynx_HTML_parser group.

        What you have now -- in the devel code set -- is again a call to
LYCheckForCSI() with a target argument that could be inappropriate, and
a check for whether it is inappropriate.  So, for example, when you
access http://www.microsoft.com/ with the -source -preparsed switches
set, it returns NO, but because of the check for an "appropriate" isa
signature -- not because it's an http://host rather than file://localhost
URL -- and handle_comment() doesn't know the difference.  You claim that
you did this, as in the fotemods, because it's an example for future
developers on how to do such things, and interdigitated your comments
and added that check to correct my naivete.  But the fotemods doesn't
have -preparsed, and LYCheckForCSI() would never be called with an
inapproriate target argument.  It won't be called at all when the
-source switch is set, as I stressed in a previous message.  If I were
to add -preparsed (which I don't plan to do), I would modify the
handle_comment() function so that it does not make calls with an
inappropriate target argument -- as no other functions which use
target arguments do in any Lynx code set.   If, indeed, your comments
and changes in LYCheckForCSI() are intended to be didactic, they teach
a very bad lesson:  how to deal with buggy code in which inappropriate
targets are used as arguments, instead of fixing the bugs.

Henry:
        This is not as complicated or esoteric as it may sound, and
I, personally, am confident Klaus would never do this kind of thing
when he's himself.  I went through the same kind of thing when my
daughter started getting her hormone surges (she switched from
deferentially seeking my opinions and presumed wisdom, to the
attitude that I know nothing :).  Fortunately, that phase didn't
last very long.  Now she appropriately perceives herself as a
hone-kay, and earnestly looks out for my best interests.  I thought
it was that way in Japan.  Has it really been Westernized to the
point where hone-kay means the same as honkey in US black communities?

        Also note that neither this, nor the INTERNAL_LINK stuff, affect
me personally, because these problems are not in the code set that I
personally use.  But they do affect the Lynx User Community, people like
you, who depend on their current hone-kay to exercise sound judgment.

        Finally, note that I have sought to get out from under the
burden of Lynx hone-kay since the release of Lynx2-6 in Sept. 1996,
and will not accept the role of "extern BOOLEAN hone-kay".  But
don't worry about it, OK?

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]