Subject: FVWM: Patch to fvwm 2.0.41 to match window names like "!Fvwm*"

From: "Douglas K. Rand" <[email-masked]>
Date: Thu, 28 Mar 1996 08:03:39 -0600 (CST)

The following is a patch (and somewhat of a hack with the NoClass and
NoResource strings) to allow conditions like !Fvwm*. Specifically I
use key definitions like: 

Key Prior       A       M       Next [!Iconic CurrentDesk CurrentScreen !Fvwm*] Focus
Key Next        A       M       Prev [!Iconic CurrentDesk CurrentScreen !Fvwm*] Focus
Key Prior       A       MC      Next [!Iconic CurrentDesk !Fvwm*] Focus
Key Next        A       MC      Prev [!Iconic CurrentDesk !Fvwm*] Focus

Which allows me to cycle through the windows on the current screen (or
all windows on the current desk) but ignoring the FVWM windows like
FvwmButtons. 

The solution to the hack on NoClass and NoResource would be to make
them global variables throughout libfvwm.a, but I wasn't that
ambitious. 

Maybe somebody will like this.

BTW: I'm not subscribed to this mailing list, so you'll have to
contact me directly if you want to suggest changes to the patch.

*** /usr/X11R6/local/fvwm-2.0.41/libs/wild.c    Tue Sep 13 14:11:47 1994
--- wild.c      Thu Mar 28 07:54:36 1996
***************
*** 13,32 ****
   *      This code donated by  Paul Hudson <[email-masked]>    
   *      It is public domain, no strings attached. No guarantees either.
   *
   *****************************************************************************/
  int matchWildcards(char *pattern, char *string)
  {
!   if(string == NULL)
      {
!       if(pattern == NULL)
        return TRUE;
-       else if(strcmp(pattern,"*")==0)
-       return TRUE;
        else
        return FALSE;
      }
-   if(pattern == NULL)
-     return TRUE;
  
    while (*string && *pattern)
      {
--- 13,39 ----
   *      This code donated by  Paul Hudson <[email-masked]>    
   *      It is public domain, no strings attached. No guarantees either.
   *
+  *    Simple code to understand patterns that begin with '!' by
+  *    Dougals K. Rand <[email-masked]>
+  *
   *****************************************************************************/
  int matchWildcards(char *pattern, char *string)
  {
!   if(pattern == NULL)
!     return TRUE;
!   else if(*pattern == '!')
      {
!       if(strcmp(string, "NoClass")==0 || strcmp(string, "NoResource")==0)
!         return FALSE;
!       else return !matchWildcards(pattern + 1, string);
!     }
!   else if(string == NULL)
!     {
!       if(strcmp(pattern,"*")==0)
        return TRUE;
        else
        return FALSE;
      }
  
    while (*string && *pattern)
      {

--
Douglas K. Rand                                        [email-masked]
System/Network Administrator      Scientific Computing Center -- UND Aerospace
Office: +1 701 777 2801                             University of North Dakota
FAX:    +1 701 777 2940                   Box 9022, Grand Forks ND  58202-9022
 echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc
--
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].