Subject: FVWM: FvwmButtons bug

From: [email-masked] (Graeme McCaffery)
Date: Thu, 21 Aug 1997 16:32:47 +0100 (BST)

This is a bug which I found on the last release.
basically FvwmButtons won't accept a colour in

#??????  format because of the #  it does some 
unnecessary string processing looking for #'s
when it only has to search for a # at a beginning
of a line.

A patch to fix this is below (sorry if this is wrong 
I'm not too sure about patches yet)

apply as 

patch fvwm-2.0.46/modules/FvwmButtons/parse.c <name of this patch file>

---------------------------------

*** fvwm-2.0.46/modules/FvwmButtons/parse.c	Thu Jun 26 22:32:33 1997
--- fvwm-2.0.46/modules/FvwmButtons/parse.c.new	Thu Aug 21 15:42:07 1997
***************
*** 784,800 ****
        while((l=strlen(s))<sizeof(s) && s[l-1]=='\n' && s[l-2]=='\\')
  	fgets(s+l-2,sizeof(s)-l,f);
        /* And comments: */
        t=s;
!       while(*t)
! 	{
! 	  if(*t=='#' && (t==s || *(t-1)!='\\'))
! 	    {
! 	      *t=0;
! 	      break;
! 	    }
! 	  t++;
! 	}
!       t=s;trimleft(t);
        if(*t)ParseConfigLine(&ub,t);
      }
  
--- 784,795 ----
        while((l=strlen(s))<sizeof(s) && s[l-1]=='\n' && s[l-2]=='\\')
  	fgets(s+l-2,sizeof(s)-l,f);
        /* And comments: */
+ 
+ 
        t=s;
!       trimleft(t);
!       if (t[0]=='#')*t=0;
! 
        if(*t)ParseConfigLine(&ub,t);
      }
  
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Richard Lister <[email-masked]>
Date: Thu, 21 Aug 1997 15:09:37 -0400

On Thu, 21 Aug 1997 16:32:47 +0100 (BST)
[email-masked] (Graeme McCaffery) 
> #??????  format because of the #  it does some 

I don't think this is right. It works fine for me on both 2.0.45 and 46.

Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC.
Phone: 202-687 2878
Email: [email-masked] 
Web: http://www.giccs.georgetown.edu/
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].