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

From: Dan Astoorian <djast_at_utopia.csas.com>
Date: Wed, 17 Jul 1996 08:18:03 -0400 (EDT)

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

> 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
> _at_@ -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

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
djast_at_utopia.csas.com 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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Jul 17 1996 - 07:20:24 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST