Subject: Re: FVWM: Re: [...] Applied patch from Brad to fix empty function args

From: Brad Giaccio <[email-masked]>
Date: Wed, 26 May 1999 07:50:20 -0400

(Sorry Dan I ment to send it to the list)

On Tue, May 25, 1999 at 01:54:00PM -0400, Dan Espen wrote:
> 
> I propose  that after we   acquire this patch, we go   to 2.2.2.  I'll
> volunteer  to create the 2.2 ->  2.2.2  announcement.  (This time I'll
> stuff it in   the NEWS file  for good  measure.)  I  have this nagging
> feeling that  there  was something else   that  came up  recently that
> belongs in 2.2.2.  Any other candidates?
> 

here is the patch to complex.c for fvwm2.2.x I tested it and it seems to
work fine.

Index: complex.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/fvwm/Attic/complex.c,v
retrieving revision 1.7
diff -u -B -b -u -r1.7 complex.c
--- complex.c   1999/01/12 21:07:42     1.7
+++ complex.c   1999/05/26 11:47:37
@@ -214,10 +214,15 @@
 {
   int l,i,l2,n,k,j;
   char *out;
+  int addto = 0; /*special cas if doing addtofunc */
 
   l = strlen(input);
   l2 = l;
 
+  if(strncasecmp(input, "AddToFunc", 9) == 0 || input[0] == '+')
+  {     
+    addto = 1;
+  } 
   i=0;
   while(i<l)
     {
@@ -246,11 +251,22 @@
       if(input[i] == '$')
        {
          n = input[i+1] - '0';
-         if((n >= 0)&&(n <= 9)&&(arguments[n] != NULL))
+         if((n >= 0)&&(n <= 9))
+           {
+          if (arguments[n] != NULL)
            {
              for(k=0;k<strlen(arguments[n]);k++)
                out[j++] = arguments[n][k];
              i++;
+          } else if (addto == 1)
+          {
+            out[j++] = '$';
+          } else
+          {
+            i++;
+            if (isspace(input[i+1]))
+              i++; /*eliminates extra white space*/
+          }
            }
          else if(input[i+1] == 'w')
            {

----- End forwarded message -----

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]