Subject: FVWM: wrong sounds in FvwmAudio (fvwm-2.0.43)

From: Steve VanDevender <[email-masked]>
Date: Tue, 16 Jul 1996 22:07:40 -0700

The FvwmAudio module produces the wrong startup and shutdown sounds,
because there are 22 defined sound names in
modules/FvwmAudio/FvwmAudio.c but MAX_MESSAGES is defined as 23 in
fvwm/module.h.  The following patch gets the right sounds to happen for
me:

--- fvwm/module.h~      Mon May 27 17:12:33 1996
+++ fvwm/module.h       Tue Jul 16 20:03:49 1996
@@ -39,7 +39,7 @@
 #define M_ICON_FILE          (1<<20)
 #define M_DEFAULTICON        (1<<21)
 #define M_STRING             (1<<22)
-#define MAX_MESSAGES         23
+#define MAX_MESSAGES         22
 #define MAX_MASK             ((1<<MAX_MESSAGES)-1)
 
 #define HEADER_SIZE         4
--
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: [email-masked] (Dan Astoorian)
Date: Wed, 17 Jul 1996 08:18:03 -0400 (EDT)

The Utopia Oracle has pondered Steve VanDevender's question deeply.

> +++ fvwm/module.h       Tue Jul 16 20:03:49 1996

This is the wrong fix.  The real problem is that a new packet type
(M_STRING) was added to FVWM, but not to FvwmAudio.c.  23 is the correct
value for MAX_MESSAGES.

A more correct way to fix the problem is to add the new type to the
definition of *messages[] in FvwmAudio.c, so that the indices match up.

Of course, this only fixes things until the next time MAX_MESSAGES
changes or the packet types change.  It would probably be better if
FvwmAudio.c did an explicit lookup into its own table, or at least if it
ensured that the indices for its builtins in the *messages[] array
didn't rely on a particular value of MAX_MESSAGES.

--                          People shouldn't think that it's better to have
Dan Astoorian               loved and lost than never loved at all.  It's
http://www.utopia.csas.com  not, it's better to have loved and won.  All
[email-masked]       the other options really suck.    --Dan Redican
--
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].