[Top][All Lists]

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

Re: LYNX-DEV Re: DOS, DOS and Windows

From: Wayne Buttles
Subject: Re: LYNX-DEV Re: DOS, DOS and Windows
Date: Fri, 25 Oct 1996 08:19:47 -0400 (EDT)

On Fri, 25 Oct 1996, Doug Lawson wrote:
> > One thing I missed about compiling Lynx code (actually most Un*x code) 
> > with Borland C 3.1 (not sure about other versions) is 0 != NULL.  
> It's been a while since I used Borland 3.anything but I don't remember 
> having that problem.  Are you saying 
>       - there is no #define NULL 0
>         - the base of the heap (NULL pointer) does not resolve to 0 ?
>           or
>         - the compiler doesn't treat 
>                 if(ptr == NULL) 
>           the same way as 
>                 if(ptr)
> Only the third case should present a serious problem, and I don't 
> remember BC 3.1 having that problem.....  Even though the base of the
> heap may not have a numerical address of 0, I remember the compiler being 
> compliant and treating it as if it were 0, which is all the ANSI C specs 
> call for.

Umm, maybe it is a case of me not quite understanding the real problem. 
Here is a sample from HTTP.c (in HTML_FORM): 

source = HTAnchor_findChildAndLink(me->node_anchor, 0, action, 0); 

Needed to be:

source = HTAnchor_findChildAndLink(me->node_anchor, NULL, action, NULL); 

With the first I didn't get a valid action string.  The second fixed the
problem.  Here is HTAnchor_findChildAndLink:

PUBLIC HTChildAnchor * HTAnchor_findChildAndLink
       HTParentAnchor *,parent, /* May not be 0 */
       CONST char *,tag,        /* May be "" or 0 */
       CONST char *,href,       /* May be "" or 0 */
       HTLinkType *,ltype       /* May be 0 */

Thats the jist of it.  


; 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]