[Scummvm-cvs-logs] SF.net SVN: scummvm:[38245] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Feb 15 15:46:42 CET 2009


Revision: 38245
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38245&view=rev
Author:   fingolfin
Date:     2009-02-15 14:46:42 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Fixed lots of warnings and errors (on my system) by backporting a patch I had sent the FreeSCI folks some time ago (but apparently it never made it, or only made it to a branch not imported?)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/engine/grammar.cpp
    scummvm/trunk/engines/sci/engine/kernel_compat.h
    scummvm/trunk/engines/sci/engine/kfile.cpp
    scummvm/trunk/engines/sci/engine/kmovement.cpp
    scummvm/trunk/engines/sci/engine/scriptconsole.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp
    scummvm/trunk/engines/sci/include/gfx_resource.h
    scummvm/trunk/engines/sci/include/kdebug.h
    scummvm/trunk/engines/sci/include/kernel.h
    scummvm/trunk/engines/sci/include/sci_memory.h
    scummvm/trunk/engines/sci/scicore/resource.cpp
    scummvm/trunk/engines/sci/scicore/tools.cpp
    scummvm/trunk/engines/sci/sfx/core.cpp
    scummvm/trunk/engines/sci/sfx/device.h
    scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
    scummvm/trunk/engines/sci/sfx/player/realtime.cpp
    scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp
    scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
    scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
    scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
    scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp
    scummvm/trunk/engines/sci/sfx/softseq/mt32.cpp
    scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
    scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp
    scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp
    scummvm/trunk/engines/sci/sfx/softseq.h

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -647,7 +647,7 @@
 int
 game_init(state_t *s)
 {
-#ifdef __GNUC__
+#ifdef __GNUC__XX
 #  warning "Fixme: Use new VM instantiation code all over the place"
 #endif
 	reg_t game_obj; /* Address of the game object */
@@ -750,7 +750,7 @@
 
 	sciprintf("Freeing miscellaneous data...\n");
 
-#ifdef __GNUC__
+#ifdef __GNUC__XX
 #warning "Free parser segment here"
 #endif
 	if (send_calls_allocated) {
@@ -758,7 +758,7 @@
 		send_calls_allocated = 0;
 	}
 
-#ifdef __GNUC__
+#ifdef __GNUC__XX
 #warning "Free scripts here"
 #endif
 

Modified: scummvm/trunk/engines/sci/engine/grammar.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/grammar.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/engine/grammar.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -104,60 +104,7 @@
   rule = NULL;
 }
 
-#if 0
-// Unreferenced - removed
-
 static parse_rule_t *
-_vbuild(int id, int argc, ...)
-{
-  va_list args;
-  int i;
-  parse_rule_t *rule = (parse_rule_t*)sci_malloc(sizeof(int) * (argc + 4));
-
-  ++_allocd_rules;
-  rule->id = id;
-  rule->first_special = 0;
-  rule->specials_nr = 0;
-  rule->length = argc;
-  va_start(args, argc);
-  for (i = 0; i < argc; i++) {
-    int v;
-    rule->data[i] = v = va_arg(args, int);
-    if ((v & TOKEN_TERMINAL)
-	|| !(v & TOKEN_NON_NT)) {
-
-      ++rule->specials_nr;
-
-      if (!rule->first_special)
-	rule->first_special = i;
-    }
-  }
-  va_end(args);
-  return rule;
-}
-#endif
-
-#if 0
-// Unreferenced - removed
-static parse_rule_t *
-_vcat(int id, parse_rule_t *a, parse_rule_t *b)
-{
-  parse_rule_t *rule = (parse_rule_t*)sci_malloc(sizeof(int) * (a->length + b->length + 4));
-
-  rule->id = id;
-  rule->length = a->length + b->length;
-  rule->specials_nr = a->specials_nr + b->specials_nr;
-  rule->first_special = a->first_special;
-  ++_allocd_rules;
-
-  memcpy(rule->data, a->data, sizeof(int) * a->length);
-  memcpy(&(rule->data[a->length]), b->data, sizeof(int) * b->length);
-
-  return rule;
-}
-#endif
-
-static parse_rule_t *
 _vdup(parse_rule_t *a)
 {
   parse_rule_t *rule = (parse_rule_t*)sci_malloc(sizeof(int) * (a->length + 4));
@@ -204,24 +151,6 @@
   return rule;
 }
 
-#if 0
-// Unreferenced - removed
-static int
-_greibach_rule_p(parse_rule_t *rule)
-{
-  int pos = rule->first_special;
-  while (pos < rule->length
-	 && (rule->data[pos] & TOKEN_NON_NT)
-	 && !(rule->data[pos] & TOKEN_TERMINAL))
-    ++pos;
-
-  if (pos == rule->length)
-    return 0;
-
-  return (rule->data[pos] & TOKEN_TERMINAL);
-}
-#endif
-
 static parse_rule_t *
 _vbuild_rule(parse_tree_branch_t *branch)
 {

Modified: scummvm/trunk/engines/sci/engine/kernel_compat.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_compat.h	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/engine/kernel_compat.h	2009-02-15 14:46:42 UTC (rev 38245)
@@ -29,7 +29,7 @@
 #ifndef _SCI_KERNEL_COMPAT_
 #define _SCI_KERNEL_COMPAT_
 
-#ifdef __GNUC__
+#ifdef __GNUC__XX
 #warning "Old kernel compatibility crap"
 #endif
 

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -577,7 +577,6 @@
   char *path = kernel_dereference_char_pointer(s, argv[0], 0);
   char *testpath = (char*)sci_malloc(strlen(path) + 15);
   char buf[1024];
-  int i;
   int fd;
   int failed = 0;
   int pathlen;
@@ -616,7 +615,7 @@
   }
 
   memset(buf, 0, sizeof(buf));
-  for (i = 0; i < 1024; i++) /* Check for 1 MB */
+  for (int i = 0; i < 1024; i++) /* Check for 1 MB */
     if (write(fd, buf, 1024) < 1024)
       failed = 1;
 
@@ -711,7 +710,7 @@
 }
 
 static void
-update_savegame_indices(char *gfname)
+update_savegame_indices(const char *gfname)
 {
 	int i;
 

Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -251,7 +251,7 @@
 	UNINITIALIZED
 } handle_movecnt = UNINITIALIZED;
 	
-int parse_reg_t(state_t *s, char *str, reg_t *dest); /* In scriptconsole.c */
+int parse_reg_t(state_t *s, const char *str, reg_t *dest); /* In scriptconsole.c */
 
 static int 
 checksum_bytes(byte *data, int size)

Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -350,10 +350,10 @@
 }
 
 int
-parse_reg_t(state_t *s, char *str, reg_t *dest)
+parse_reg_t(state_t *s, const char *str, reg_t *dest)
 { /* Returns 0 on success */
 	int rel_offsetting = 0;
-	char *offsetting = NULL;
+	const char *offsetting = NULL;
 	/* Non-NULL: Parse end of string for relative offsets */
 	char *endptr;
 
@@ -415,26 +415,27 @@
 	} else if (*str == '?') {
 		int index = -1;
 		int times_found = 0;
-		char *str_objname;
+		char *tmp;
+		const char *str_objname;
 		char *str_suffix;
 		char suffchar = 0; /* Supress spurious -Wall warning */
 		int i;
 		/* Parse obj by name */
 
-		str_objname = strchr(str, '+');
+		tmp = strchr(str, '+');
 		str_suffix = strchr(str, '-');
-		if (str_objname < str_suffix)
-			str_suffix = str_objname;
+		if (tmp < str_suffix)
+			str_suffix = tmp;
 		if (str_suffix) {
 			suffchar = (*str_suffix);
 			*str_suffix = 0;
 		}
 
-		str_objname = strchr(str, '.');
+		tmp = strchr(str, '.');
 
-		if (str_objname) {
-			*str_objname = 0;
-			index = strtol(str_objname+1, &endptr, 16);
+		if (tmp) {
+			*tmp = 0;
+			index = strtol(tmp+1, &endptr, 16);
 			if (*endptr)
 				return -1;
 		}
@@ -1053,7 +1054,6 @@
 			else if (!strcmp("words", cmd_params[0].str))
 				return c_list_words(s);
 			else if (strcmp ("restypes", cmd_params[0].str) == 0) {
-				int i;
 				for (i = 0; i < sci_invalid_resource; i++)
 					sciprintf ("%s\n", sci_resource_types[i]);
 			}
@@ -1062,7 +1062,6 @@
 				if (res == -1)
 					sciprintf ("Unknown resource type: '%s'\n", cmd_params[0].str);
 				else {
-					int i;
 					for (i = 0; i < sci_max_resource_nr[s->resmgr->sci_version]; i++)
 						if (scir_test_resource (s->resmgr, res, i))
 							sciprintf ("%s.%03d\n", sci_resource_types[res], i);

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -529,7 +529,6 @@
 	seeker = resource + header_size;
 	for (i = 0; i < view->loops_nr; i++)
 	{
-		static char *truth[2] = {"not ",""};
 		int loop_offset = get_uint_16(seeker + V2_LOOP_OFFSET);
 		int cels = seeker[V2_CELS_NUM];
 		int mirrored = seeker[V2_IS_MIRROR];

Modified: scummvm/trunk/engines/sci/include/gfx_resource.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_resource.h	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/include/gfx_resource.h	2009-02-15 14:46:42 UTC (rev 38245)
@@ -424,13 +424,13 @@
 
 
 static inline int
-get_uint_16(byte *offset)
+get_uint_16(const byte *offset)
 {
 	return ((unsigned int) offset[0] | (((unsigned int) offset[1]) << 8));
 }
 
 static inline int
-get_int_16(byte *offset)
+get_int_16(const byte *offset)
 {
 	return ((int) offset[0] | (((int) offset[1]) << 8));
 }

Modified: scummvm/trunk/engines/sci/include/kdebug.h
===================================================================
--- scummvm/trunk/engines/sci/include/kdebug.h	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/include/kdebug.h	2009-02-15 14:46:42 UTC (rev 38245)
@@ -67,7 +67,7 @@
 
 #ifdef SCI_KERNEL_DEBUG
 
-#ifdef __GNUC__
+#ifdef __GNUC__XXX
 
 #define SCIkdebug(arguments...) _SCIGNUkdebug(__PRETTY_FUNCTION__,  ## arguments)
 
@@ -85,7 +85,7 @@
 
 
 
-#ifdef __GNUC__
+#ifdef __GNUC__XXX
 
 #define SCIkwarn(arguments...) _SCIGNUkdebug(__PRETTY_FUNCTION__, ## arguments)
 

Modified: scummvm/trunk/engines/sci/include/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/include/kernel.h	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/include/kernel.h	2009-02-15 14:46:42 UTC (rev 38245)
@@ -32,6 +32,7 @@
 #include "sci/include/kdebug.h"
 #include "sci/include/uinput.h"
 #include "sci/include/event.h"
+#include "sci/include/vm.h"
 #include "sci/include/console.h" /* sciprintf() */
 
 #ifdef HAVE_FNMATCH_H

Modified: scummvm/trunk/engines/sci/include/sci_memory.h
===================================================================
--- scummvm/trunk/engines/sci/include/sci_memory.h	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/include/sci_memory.h	2009-02-15 14:46:42 UTC (rev 38245)
@@ -134,15 +134,15 @@
 
 #define ALLOC_MEM(alloc_statement, size, filename, linenum, funcname)\
 do {\
-	if (size < 0)\
+	if (size == 0)\
 	{\
+		PANIC_MEMORY(size, filename, linenum, funcname, "WARNING: allocating zero bytes of memory.")\
+	}\
+	else if (!(size > 0))\
+	{\
 		PANIC_MEMORY(size, filename, linenum, funcname, "Cannot allocate negative bytes of memory!")\
 		BREAKPOINT()\
 	}\
-	else if (size == 0)\
-	{\
-		PANIC_MEMORY(size, filename, linenum, funcname, "WARNING: allocating zero bytes of memory.")\
-	}\
 \
 	alloc_statement; /* attempt to allocate the memory */\
 \

Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -441,7 +441,7 @@
 			     int allow_patches,
 			     char *dir)
 {
-	char *trailing_slash = "";
+	const char *trailing_slash = "";
 	//char path_separator;
 	sci_dir_t dirent;
 	char *name;

Modified: scummvm/trunk/engines/sci/scicore/tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/tools.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/scicore/tools.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -63,18 +63,10 @@
 	} while (0);
 #endif
 
-#if !defined(HAVE_FNMATCH) && !defined(_WIN32)
-#  include <beos/fnmatch.h>
-#endif
-
 #ifdef _DREAMCAST
 #  include <kos/thread.h>
 #endif
 
-#ifdef __BEOS__
-#  include <be/kernel/OS.h>
-#endif
-
 #ifdef HAVE_MEMFROB
 void *memfrob(void *s, size_t n);
 #endif

Modified: scummvm/trunk/engines/sci/sfx/core.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/core.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/core.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -863,8 +863,6 @@
 
 static const song_handle_t midi_send_base = 0xffff0000;
 
-static song_handle_t midi_send_handle = 0xffff0000;
-
 int
 sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel,
 	      int command, int arg1, int arg2)
@@ -875,7 +873,7 @@
 	/* Yes, in that order. SCI channel mutes are actually done via
 	   a counting semaphore. 0 means to decrement the counter, 1
 	   to increment it. */
-	static char *channel_state[] = {"ON","OFF"}; 
+	static const char *channel_state[] = {"ON","OFF"}; 
 
 	if (command == 0xb0 &&
 	    arg1 == SCI_MIDI_CHANNEL_MUTE)

Modified: scummvm/trunk/engines/sci/sfx/device.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/device.h	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/device.h	2009-02-15 14:46:42 UTC (rev 38245)
@@ -52,6 +52,9 @@
 	*/
 };
 
+// FIXME: This evil hack below is needed to create the
+// decorated_midi_writer struct in instrumen-map.c -- in C++, this can
+// be replaced by simple subclassing.
 #define MIDI_WRITER_BODY	\
 	char *name; /* Name description of the device */		\
 									\

Modified: scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -250,18 +250,7 @@
 	BREAKPOINT();
 }
 
-#if 0
-// Unreferenced - removed
 static void
-mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed)
-{
-	ACQUIRE_LOCK();
-	_mix_unsubscribe(self, feed);
-	RELEASE_LOCK();
-}
-#endif
-
-static void
 mix_exit(sfx_pcm_mixer_t *self)
 {
 	ACQUIRE_LOCK();

Modified: scummvm/trunk/engines/sci/sfx/player/realtime.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/realtime.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/player/realtime.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -159,7 +159,7 @@
 }
 
 static resource_t *
-find_patch(resource_mgr_t *resmgr, const char *seq, int patchfile)
+find_patch(resource_mgr_t *resmgr, const char *seq_name, int patchfile)
 {
 	resource_t *res = NULL;
 
@@ -167,7 +167,7 @@
 		res = scir_find_resource(resmgr, sci_patch, patchfile, 0);
 		if (!res) {
 			fprintf(stderr, "[SFX] " __FILE__": patch.%03d requested by sequencer (%s), but not found\n",
-				patchfile, seq);
+				patchfile, seq_name);
 		}
 	}
 

Modified: scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -219,6 +219,7 @@
 /* Output with the instrument map */
 #define MIDI_CHANNELS_NR 0x10
 
+// FIXME: Replace this ugly hack with simple subclassing once converting to C++
 typedef struct decorated_midi_writer {
 	MIDI_WRITER_BODY
 
@@ -271,7 +272,7 @@
 	sfx_instrument_map_free(self->map);
 	self->map = NULL;
 	self->writer->close(self->writer);
-	sci_free(self->name);
+	sci_free((void *)self->name);
 	self->name = NULL;
 	sci_free(self);
 }
@@ -279,7 +280,7 @@
 #define BOUND_127(x) (((x) < 0)? 0 : (((x) > 0x7f)? 0x7f : (x)))
 
 static int
-bound_hard_127(int i, char *descr)
+bound_hard_127(int i, const char *descr)
 {
 	int r = BOUND_127(i);
 	if (r != i)
@@ -325,7 +326,7 @@
 	assert (len >= 1);
 
 	if (op == 0xC0 && chan != MIDI_RHYTHM_CHANNEL) { /* Program change */
-		int patch = bound_hard_127(buf[1], "program change");
+		/*int*/ patch = bound_hard_127(buf[1], "program change");
 		int instrument = map->patch_map[patch].patch;
 		int bend_range = map->patch_bend_range[patch];
 

Modified: scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -37,7 +37,7 @@
 
 #define DEBUG_MT32_TO_GM
 
-static char
+static const char
 *GM_Instrument_Names[] = {
 	/*000*/  "Acoustic Grand Piano",
 	/*001*/  "Bright Acoustic Piano",
@@ -170,7 +170,7 @@
 };
 
 /* The GM Percussion map is downwards compatible to the MT32 map, which is used in SCI */
-static char
+static const char
 *GM_Percussion_Names[] = {
 	/*00*/  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	/*10*/  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -232,7 +232,7 @@
 
 
 static struct {
-	char *name;
+	const char *name;
 	gint8 gm_instr;
 	gint8 gm_rhythm_key;
 } MT32_PresetTimbreMaps[] = {
@@ -367,7 +367,7 @@
 };
 
 static struct {
-	char *name;
+	const char *name;
 	gint8 gm_instr;
 	gint8 gm_rhythmkey;
 } MT32_RhythmTimbreMaps[] = {
@@ -428,7 +428,7 @@
    ??? - I'm clueless?
    R   - Rhythm... */
 static struct {
-	char *name;
+	const char *name;
 	gint8 gm_instr;
 	gint8 gm_rhythm_key;
 } MT32_MemoryTimbreMaps[] = {
@@ -562,11 +562,11 @@
 	{"Wind2   MS", SFX_UNMAPPED, SFX_UNMAPPED}, /* ? (CoC) */
 	{"Woodpecker", 115, SFX_UNMAPPED},   /* ? (CB) */
 	{"WtrFall MS", SFX_UNMAPPED, SFX_UNMAPPED}, /* ? (CoC, HQ, iceMan) */
-	{0, 0}
+	{0, 0, 0}
 };
 
 static gint8
-lookup_instrument(char *iname)
+lookup_instrument(const char *iname)
 {
 	int i = 0;
 
@@ -579,7 +579,7 @@
 }
 
 static gint8
-lookup_rhythm_key(char *iname)
+lookup_rhythm_key(const char *iname)
 {
 	int i = 0;
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -48,7 +48,7 @@
 
 
 static int
-SN76496_set_option(sfx_softseq_t *self, char *name, char *value)
+SN76496_set_option(sfx_softseq_t *self, const char *name, const char *value)
 {
 	return SFX_ERROR;
 }

Modified: scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -466,7 +466,7 @@
 }
 
 static int
-ami_set_option(sfx_softseq_t *self, char *name, char *value)
+ami_set_option(sfx_softseq_t *self, const char *name, const char *value)
 {
 	return SFX_ERROR;
 }

Modified: scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -229,7 +229,7 @@
 }
 
 static int
-fluidsynth_set_option(sfx_softseq_t *self, char *name, char *value)
+fluidsynth_set_option(sfx_softseq_t *self, const char *name, const char *value)
 {
 	return SFX_ERROR;
 }

Modified: scummvm/trunk/engines/sci/sfx/softseq/mt32.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/mt32.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq/mt32.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -197,7 +197,7 @@
 }
 
 static int
-mt32_set_option(sfx_softseq_t *self, char *name, char *value)
+mt32_set_option(sfx_softseq_t *self, const char *name, const char *value)
 {
 	return SFX_ERROR;
 }

Modified: scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -682,7 +682,7 @@
 }
 
 int
-opl2_set_option(sfx_softseq_t *self, char *name, char *value)
+opl2_set_option(sfx_softseq_t *self, const char *name, const char *value)
 {
 	return SFX_ERROR;
 }

Modified: scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -42,7 +42,7 @@
 
 
 static int
-sps_set_option(sfx_softseq_t *self, char *name, char *value)
+sps_set_option(sfx_softseq_t *self, const char *name, const char *value)
 {
 	return SFX_ERROR;
 }

Modified: scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp	2009-02-15 14:46:42 UTC (rev 38245)
@@ -54,7 +54,7 @@
 
 
 sfx_softseq_t *
-sfx_find_softseq(char *name)
+sfx_find_softseq(const char *name)
 {
 	if (!name)
 		return sw_sequencers[0];

Modified: scummvm/trunk/engines/sci/sfx/softseq.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq.h	2009-02-15 14:42:27 UTC (rev 38244)
+++ scummvm/trunk/engines/sci/sfx/softseq.h	2009-02-15 14:46:42 UTC (rev 38245)
@@ -42,11 +42,11 @@
 	const char *version;
 
 	int
-	(*set_option)(struct sfx_softseq *self, char *name, char *value);
+	(*set_option)(struct sfx_softseq *self, const char *name, const char *value);
 	/* Sets an option for the sequencer
 	** Parameters: (sfx_softseq_t *) self: Self reference
-	**             (char *) name: Name of the option to set
-	**             (char *0 value: Value to set the option to
+	**             (const char *) name: Name of the option to set
+	**             (const char *) value: Value to set the option to
 	** Returns   : (int) GFX_OK on success, or GFX_ERROR if not supported
 	*/
 
@@ -125,9 +125,9 @@
 
 
 sfx_softseq_t *
-sfx_find_softseq(char *name);
+sfx_find_softseq(const char *name);
 /* Finds a given or default software sequencer
-** Parameters: (char *) name: Name of the sequencer to look up, or NULL for default
+** Parameters: (const char *) name: Name of the sequencer to look up, or NULL for default
 ** Returns   : (sfx_softseq_t *) The requested sequencer, or NULL if not found 
 */
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list