FVWM: FvwmButtons bug

From: Graeme McCaffery <Graeme.McCaffery_at_astro.cf.ac.uk>
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Aug 21 1997 - 10:35:13 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST