[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev [PATCH] Source Line Numbers in Lynx.trace
From: |
pg |
Subject: |
lynx-dev [PATCH] Source Line Numbers in Lynx.trace |
Date: |
Thu, 22 Feb 2001 13:46:38 -0700 (MST) |
Hello, Lyncei,
The attached patch prefixes lines in Lynx.trace with the source
filename and line number. The facility is disabled by default
and enabled by "configure --enable-vertrace"
Written because I've done too much grepping source code to find
where a line in Lynx.trace came from. Minimal source bloat;
disabled by default because executable bloat is significant.
-- gil
--
StorageTek
INFORMATION made POWERFUL
########################################################################
%%% Created Thu Feb 22 08:38:52 MST 2001 by target lynx.patch. %%%
diff -bru orig/lynx2-8-4/INSTALLATION lynx2-8-4/INSTALLATION
--- orig/lynx2-8-4/INSTALLATION Thu Feb 8 19:50:00 2001
+++ lynx2-8-4/INSTALLATION Thu Feb 22 08:35:48 2001
@@ -314,6 +314,10 @@
information to diagnose problems with either Lynx or the sites to which
you connect.
+ --enable-vertrace (define LY_TRACELINE __LINE__)
+ Turn on code that prefixes trace output lines with source filename
+ and line number.
+
--enable-addrlist-page (define EXP_ADDRLIST_PAGE)
Compiles-in an alternative list-page, bound to 'A' rather than 'l',
which always lists URLs rather than titles.
diff -bru orig/lynx2-8-4/WWW/Library/Implementation/HTUtils.h
lynx2-8-4/WWW/Library/Implementation/HTUtils.h
--- orig/lynx2-8-4/WWW/Library/Implementation/HTUtils.h Mon Feb 12 18:33:21 2001
+++ lynx2-8-4/WWW/Library/Implementation/HTUtils.h Thu Feb 22 07:52:25 2001
@@ -491,7 +491,16 @@
#define LF FROMASCII('\012') /* ASCII line feed LOCAL EQUIVALENT */
#define CR FROMASCII('\015') /* Will be converted to ^M for transmission */
-#define CTRACE(p) if(TRACE)fprintf p
+#if defined(LY_TRACELINE)
+#define LY_SHOWWHERE fprintf( tfp, "%s: %d: ", __FILE__, LY_TRACELINE );
+#else
+#define LY_SHOWWHERE /* nothing */
+#endif
+
+#define CTRACE(p) if(TRACE) {\
+ LY_SHOWWHERE \
+ fprintf p; }
+
#define tfp TraceFP()
#define CTRACE_SLEEP(secs) if (TRACE && LYTraceLogFP == 0) sleep(secs)
#define CTRACE_FLUSH(fp) if(TRACE) fflush(fp)
diff -bru orig/lynx2-8-4/config.hin lynx2-8-4/config.hin
--- orig/lynx2-8-4/config.hin Mon Feb 12 18:33:21 2001
+++ lynx2-8-4/config.hin Thu Feb 22 07:52:25 2001
@@ -170,6 +170,7 @@
#undef NO_CONFIG_INFO /* CF_ARG_DISABLE(config-info) */
#undef NO_EXTENDED_HTMLDTD /* CF_ARG_DISABLE(extended-dtd) */
#undef NO_LYNX_TRACE /* CF_ARG_DISABLE(trace) */
+#undef LY_TRACELINE /* CF_ARG_ENABLE(vertrace) */
#undef NO_OPTION_FORMS /* CF_ARG_DISABLE(forms-options) */
#undef NO_OPTION_MENU /* CF_ARG_DISABLE(option-menu) */
#undef NO_PARENT_DIR_REFERENCE /* configure --disable-parent-dir */
diff -bru orig/lynx2-8-4/configure.in lynx2-8-4/configure.in
--- orig/lynx2-8-4/configure.in Mon Feb 12 18:33:21 2001
+++ lynx2-8-4/configure.in Thu Feb 22 07:52:26 2001
@@ -109,6 +109,14 @@
AC_MSG_RESULT($with_trace)
test $with_trace = no && AC_DEFINE(NO_LYNX_TRACE)
+AC_MSG_CHECKING(if you want verbose trace code)
+CF_ARG_ENABLE(vertrace,
+ [ --enable-vertrace verbose trace code],
+ [with_vertrace=yes],
+ [with_vertrace=no])
+AC_MSG_RESULT($with_vertrace)
+test $with_vertrace = yes && AC_DEFINE(LY_TRACELINE,__LINE__)
+
if test -n "$GCC"
then
AC_MSG_CHECKING(if you want to turn on gcc warnings)
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev [PATCH] Source Line Numbers in Lynx.trace,
pg <=