[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Default __FILE__ and __LINE__
From: |
pg |
Subject: |
lynx-dev Default __FILE__ and __LINE__ |
Date: |
Sun, 21 Mar 1999 17:00:35 -0700 (MST) |
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?
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>
- lynx-dev Default __FILE__ and __LINE__,
pg <=