lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Default __FILE__ and __LINE__


From: dickey
Subject: Re: lynx-dev Default __FILE__ and __LINE__
Date: Sun, 21 Mar 1999 20:16:57 -0500 (EST)

> 
> HTUtils.H attempts to provide default definitions of __LINE__ 
> and __FILE__, presumably for non-ANSI compilers.  But ANSI defines 
> __LINE__ as an integral type; Lynx as a string; all formats print 
> it as "%d".  Admittedly, there's little harm in printing a (char *) 
> as "%d", but it might as well be consistent with the ANSI type. 
>  
> Also, I suggest making the default value of __FILE__ a visible 
> obvious value, rather than "".  Should the default value of 
> __LINE__ also be something easily greppable, such as -98765 
> or -23456? 

a -1 is ok (I would have chosen 0).
  
> Editor's choice. 
>  
> -- gil 
> ================================================================ 
> %%% Created Sun Mar 21 16:48:46 MST 1999 by target lynx.patch. %%% 
> diff -bru orig/lynx2-8-2/WWW/Library/Implementation/HTUtils.h 
> lynx2-8-2/WWW/Library/Implementation/HTUtils.h 
> --- orig/lynx2-8-2/WWW/Library/Implementation/HTUtils.h       Wed Mar 17 
> 20:17:11 1999 
> +++ lynx2-8-2/WWW/Library/Implementation/HTUtils.h    Sun Mar 21 10:59:23 
> 1999 
> @@ -367,8 +373,8 @@ 
>   
>   */ 
>  #ifndef __FILE__ 
> -#define __FILE__ "" 
> -#define __LINE__ "" 
> +#define __FILE__ "__FILE__" 
> +#define __LINE__ (-1) 
>  #endif 
>   
>  #include <LYexit.h> 


-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

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