Subject: Test defaults to True?

From: Tavis Ormandy <[email-masked]>
Date: Sat, 08 May 2004 11:16:16 +0100

Hello, looking in fvwm/conditional.c the Test command defaults to a match
being found, so checking for Test (True) Blah.. (around line 1611) is
essentially useless, shouldn't it default to no match, for example:

$ cvs diff conditional.c 
Index: conditional.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/fvwm/conditional.c,v
retrieving revision 1.92
diff -u -w -r1.92 conditional.c
--- conditional.c       2 Apr 2004 12:09:33 -0000       1.92
+++ conditional.c       8 May 2004 10:12:37 -0000
@@ -1594,7 +1594,7 @@
        tmp = flags;
        tmp = GetNextSimpleOption(tmp, &condition);
 
-       match = True;
+       match = False;
        error = False;
        while (condition)
        {

This way Test ($0) in functions can look for True/False or similar :)

-- 
-------------------------------------
[email-masked] | finger me for my gpg key.
-------------------------------------------------------

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 8 May 2004 22:53:27 +0000

> essentially useless, shouldn't it default to no match, for example:

And what if $0 contains some meaningful Test option like "Version" or
"Quit"?  No, if you want to extend Test, you should add [!]IsEmpty or a
similar option and use quotes here, for example: Test (IsEmpty "$0").

IMHO, the Test condition should default to true just like with all other
conditional commands.

Regards,
Mikhael.
--
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]

---

From: Tavis Ormandy <[email-masked]>
Date: Sun, 09 May 2004 12:17:48 +0100

> IMHO, the Test condition should default to true just like with all other

I see, how about changing the test for "True" to check for "False"?