Module: wine Branch: master Commit: b05173486a12adaaa14d206da4c8f8aa3c9871c6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b05173486a12adaaa14d206da4...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Thu Dec 14 22:46:12 2006 +0800
wineoss: Make some data const.
---
dlls/winmm/wineoss/midi.c | 4 ++-- dlls/winmm/wineoss/midipatch.c | 6 ++---- dlls/winmm/wineoss/mixer.c | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/winmm/wineoss/midi.c b/dlls/winmm/wineoss/midi.c index 6b9cdf8..ffa7d86 100644 --- a/dlls/winmm/wineoss/midi.c +++ b/dlls/winmm/wineoss/midi.c @@ -1000,8 +1000,8 @@ typedef struct sFMextra { */ } sFMextra;
-extern unsigned char midiFMInstrumentPatches[16 * 128]; -extern unsigned char midiFMDrumsPatches [16 * 128]; +extern const unsigned char midiFMInstrumentPatches[16 * 128]; +extern const unsigned char midiFMDrumsPatches [16 * 128];
/************************************************************************** * modFMLoad [internal] diff --git a/dlls/winmm/wineoss/midipatch.c b/dlls/winmm/wineoss/midipatch.c index e991e04..1180c6f 100644 --- a/dlls/winmm/wineoss/midipatch.c +++ b/dlls/winmm/wineoss/midipatch.c @@ -26,7 +26,7 @@
#define NOT_DEFINED 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-unsigned char midiFMInstrumentPatches[128 * 16] = { +const unsigned char midiFMInstrumentPatches[128 * 16] = { /* 0 Acoustic Grand Piano */ 0x21, 0x11, 0x4c, 0x00, 0xf1, 0xf2, 0x63, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 Bright Acoustic Piano */ 0x01, 0x11, 0x4f, 0x00, 0xf1, 0xd2, 0x53, 0x74, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, /* 2 Electric Grand Piano */ 0x01, 0x01, 0x4f, 0x04, 0xf1, 0xd2, 0x50, 0x7c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -157,7 +157,7 @@ unsigned char midiFMInstrumentPatches[12 /* 127 Gunshot */ 0x0c, 0x50, 0x00, 0x21, 0xf8, 0x09, 0xb6, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, };
-unsigned char midiFMDrumsPatches[16 * 128] = { +const unsigned char midiFMDrumsPatches[16 * 128] = { /* 1 Not defined */ NOT_DEFINED /* 2 Not defined */ NOT_DEFINED /* 3 Not defined */ NOT_DEFINED @@ -287,5 +287,3 @@ unsigned char midiFMDrumsPatches[16 * 12 /* 127 Not defined */ NOT_DEFINED /* 128 Not defined */ NOT_DEFINED }; - - diff --git a/dlls/winmm/wineoss/mixer.c b/dlls/winmm/wineoss/mixer.c index bce0628..a28305b 100644 --- a/dlls/winmm/wineoss/mixer.c +++ b/dlls/winmm/wineoss/mixer.c @@ -79,8 +79,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mixer);
/* FIXME: the two following string arrays should be moved to a resource file in a string table */ /* if it's done, better use a struct to hold labels, name, and muted channel volume cache */ -static const char* MIX_Labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS; -static const char* MIX_Names [SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES; +static const char * const MIX_Labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS; +static const char * const MIX_Names [SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES;
struct mixerCtrl {