[Prev][Next][Index][Thread]
Questions about HTRequest structure.
-
To: www-lib@w3.org
-
Subject: Questions about HTRequest structure.
-
From: fiorenti@cli.di.unipi.it (Giacomo Fiorentini)
-
Date: Wed, 17 Jan 96 00:00:28 +0100
-
From fiorenti@cli.di.unipi.it Tue Jan 16 18: 01:20 1996
-
Message-Id: <9601162300.AA29405@rebecca.pisa.ccr.it>
-
X-Mailer: Windows Eudora Version 1.4.4
-
X-Sender: giacomo@rebecca.pisa.ccr.it
Hi,
I'd like to know what's the semanthic differents of the next two
fields in the HTRequest structure :
struct _HTRequest {
.....
HTParentAnchor * anchor ; /* The client anchor for this
request */
HTParentAnchor * parentAnchor ; /* For refere fields */
.....
} HTRequest ;
My doubt come out from the current implementation of the Robot: in
the HText_beginAnchor definition, every call to the method HTRequest_parent
return a null pointer. The problem is that this method returns the second
field of the HTRequest structure that is NULL all the times. The solution is
trivial: we must simply reach the first field. That is :
[HTRobot.c]
PUBLIC void HText_beginAnchor (HText * text , HTChildAnchor * anchor)
{
if (text && anchor ) {
.........
if (mr->flags & MR_LINK) && dest_parent && !hd) {
HTParentAnchor * parent = HTRequest_parent ( text->request
); /* <- ????????? */
.................
}
.........
}
}
[Simple Solution]
PUBLIC void HText_beginAnchor (HText * text , HTChildAnchor * anchor)
{
if (text && anchor ) {
.........
if (mr->flags & MR_LINK) && dest_parent && !hd) {
HTParentAnchor * parent = HTRequest_anchor(text->request);
/* <- !!!!!!!!! */
..............
}
.........
}
}
This simple solution resolve the problem of the correct depth in the
robot.
Here I have another question :
In the Robot, why is the start HyperDoc object not linked to
the first anchor created in the Main function ? Perhaps for question of
flexibility ?
Congratulations. You've made a very good job.
Thank you.
Giacomo Fiorentini
E-mail addresses : fiorenti@cli.di.unipi.it
giacomo@pisa.ccr.it
University student. ( Pisa University )