lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev TRACE code anomaly


From: Thomas E. Dickey
Subject: Re: lynx-dev TRACE code anomaly
Date: Thu, 1 Mar 2001 11:32:14 -0500 (EST)

On Thu, 1 Mar 2001 address@hidden wrote:

> Hello, Lyncei,
> 
> Please consider the following:
> 
> ########################################################################
> %%% Created Thu Mar  1 09:13:59 MST 2001 by target lynx.patch. %%%
> diff -ru orig/lynx2-8-4/src/LYCharUtils.c lynx2-8-4/src/LYCharUtils.c
> --- orig/lynx2-8-4/src/LYCharUtils.c  Mon Feb 26 19:41:57 2001
> +++ lynx2-8-4/src/LYCharUtils.c       Thu Mar  1 08:54:11 2001
> @@ -3623,11 +3623,10 @@
>                  : me->node_anchor->address[4]) == 's') {
>                   str = "s";
>               }
> -             if (TRACE) {
> -                 CTRACE((tfp, "LYLegitimizeHREF: Bad value '%s' for http%s 
> URL.\n",
> -                              *href, str);)

ok (I thought I caught all of those).

if(TRACE) ... CTRACE is redundant, btw, but it makes it a lot simpler to 
find.

> -                 CTRACE((tfp, "                  Stripping lead dots.\n"));
> -             } else if (!me->inBadHREF) {
> +             CTRACE((tfp, "LYLegitimizeHREF: Bad value '%s' for http%s 
> URL.\n",
> +                     *href, str));
> +             CTRACE((tfp, "                  Stripping lead dots.\n"));
> +             if (!me->inBadHREF) {
>                   HTUserMsg(BAD_PARTIAL_REFERENCE);
>                   me->inBadHREF = TRUE;
>               }
> ########################################################################
> 
> for at lease a couple reasons:
> 
> o The ");)" sequence is probably a typo and should be "));".  This
>   appeared only in dev.19.  At best, it's esthetically jarring.
>   In fact, it interfered with a hack I was trying to perform to
>   call CTRACE within expressions.
> 
> o The "else" also bothers me.  It causes some code (a message and
>   an assignment) to be performed only in the case that tracing is
>   turned off.  This strikes me as bad practice.

I've noticed something like that before, decided that Fote was trying
to move warning messages off the screen into the trace file.

> 
> Thanks,
> gil
> 

-- 
T.E.Dickey <address@hidden>
http://dickey.his.com
ftp://dickey.his.com


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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