[Scummvm-cvs-logs] SF.net SVN: scummvm:[40514] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed May 13 01:30:10 CEST 2009


Revision: 40514
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40514&view=rev
Author:   fingolfin
Date:     2009-05-12 23:30:10 +0000 (Tue, 12 May 2009)

Log Message:
-----------
SCI: Removed sci_memory.h/.cpp

Modified Paths:
--------------
    scummvm/trunk/dists/iphone/scummvm.xcodeproj/project.pbxproj
    scummvm/trunk/dists/msvc7/sci.vcproj
    scummvm/trunk/dists/msvc71/sci.vcproj
    scummvm/trunk/dists/msvc8/sci.vcproj
    scummvm/trunk/dists/msvc9/sci.vcproj
    scummvm/trunk/engines/sci/engine/grammar.cpp
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/kmenu.cpp
    scummvm/trunk/engines/sci/engine/kpathing.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp
    scummvm/trunk/engines/sci/engine/said.cpp
    scummvm/trunk/engines/sci/engine/said.y
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/scriptconsole.cpp
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
    scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
    scummvm/trunk/engines/sci/gfx/gfx_system.h
    scummvm/trunk/engines/sci/gfx/gfx_test.cpp
    scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
    scummvm/trunk/engines/sci/gfx/menubar.cpp
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/res_font.cpp
    scummvm/trunk/engines/sci/gfx/res_pal.cpp
    scummvm/trunk/engines/sci/gfx/res_pic.cpp
    scummvm/trunk/engines/sci/gfx/res_view0.cpp
    scummvm/trunk/engines/sci/gfx/res_view1.cpp
    scummvm/trunk/engines/sci/module.mk
    scummvm/trunk/engines/sci/scicore/resource.cpp
    scummvm/trunk/engines/sci/scicore/sciconsole.cpp
    scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
    scummvm/trunk/engines/sci/scicore/vocabulary.cpp
    scummvm/trunk/engines/sci/sfx/iterator.cpp
    scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp
    scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
    scummvm/trunk/engines/sci/sfx/songlib.cpp

Removed Paths:
-------------
    scummvm/trunk/engines/sci/sci_memory.cpp
    scummvm/trunk/engines/sci/sci_memory.h

Modified: scummvm/trunk/dists/iphone/scummvm.xcodeproj/project.pbxproj
===================================================================
--- scummvm/trunk/dists/iphone/scummvm.xcodeproj/project.pbxproj	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/dists/iphone/scummvm.xcodeproj/project.pbxproj	2009-05-12 23:30:10 UTC (rev 40514)
@@ -910,7 +910,6 @@
 		DF0942020F63CB26002D821E /* unzip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFE473C10D81F4E800B6D1FB /* unzip.cpp */; };
 		DF0942030F63CB26002D821E /* console.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFAAD2390F50120E00C3A4E2 /* console.cpp */; };
 		DF0942040F63CB26002D821E /* exereader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFAAD23B0F50120E00C3A4E2 /* exereader.cpp */; };
-		DF0942050F63CB26002D821E /* sci_memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BF30F5A81D400961A72 /* sci_memory.cpp */; };
 		DF0942070F63CB26002D821E /* intmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BFA0F5A81EA00961A72 /* intmap.cpp */; };
 		DF0942080F63CB26002D821E /* kdebug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BFC0F5A81EA00961A72 /* kdebug.cpp */; };
 		DF0942090F63CB26002D821E /* state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573C010F5A81EA00961A72 /* state.cpp */; };
@@ -1024,7 +1023,6 @@
 		DF2FFD2B0F48717F0006E566 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = DF2FFD290F48717F0006E566 /* Default.png */; };
 		DF2FFD2C0F48717F0006E566 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = DF2FFD2A0F48717F0006E566 /* icon.png */; };
 		DF2FFD2D0F48719E0006E566 /* scummclassic.zip in Resources */ = {isa = PBXBuildFile; fileRef = DF2FFBDB0F485E480006E566 /* scummclassic.zip */; };
-		DF573BF60F5A81D400961A72 /* sci_memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BF30F5A81D400961A72 /* sci_memory.cpp */; };
 		DF573C060F5A81EA00961A72 /* intmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BFA0F5A81EA00961A72 /* intmap.cpp */; };
 		DF573C070F5A81EA00961A72 /* kdebug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BFC0F5A81EA00961A72 /* kdebug.cpp */; };
 		DF573C080F5A81EA00961A72 /* state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573C010F5A81EA00961A72 /* state.cpp */; };
@@ -2824,7 +2822,6 @@
 		DFF95C880FB22D5700A3EC78 /* unzip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFE473C10D81F4E800B6D1FB /* unzip.cpp */; };
 		DFF95C890FB22D5700A3EC78 /* console.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFAAD2390F50120E00C3A4E2 /* console.cpp */; };
 		DFF95C8A0FB22D5700A3EC78 /* exereader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFAAD23B0F50120E00C3A4E2 /* exereader.cpp */; };
-		DFF95C8B0FB22D5700A3EC78 /* sci_memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BF30F5A81D400961A72 /* sci_memory.cpp */; };
 		DFF95C8C0FB22D5700A3EC78 /* intmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BFA0F5A81EA00961A72 /* intmap.cpp */; };
 		DFF95C8D0FB22D5700A3EC78 /* kdebug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573BFC0F5A81EA00961A72 /* kdebug.cpp */; };
 		DFF95C8E0FB22D5700A3EC78 /* state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF573C010F5A81EA00961A72 /* state.cpp */; };
@@ -3082,8 +3079,6 @@
 		DF2FFD0F0F4870E50006E566 /* tucker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tucker.h; sourceTree = "<group>"; };
 		DF2FFD290F48717F0006E566 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
 		DF2FFD2A0F48717F0006E566 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
-		DF573BF30F5A81D400961A72 /* sci_memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sci_memory.cpp; sourceTree = "<group>"; };
-		DF573BF40F5A81D400961A72 /* sci_memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sci_memory.h; sourceTree = "<group>"; };
 		DF573BF50F5A81D400961A72 /* uinput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uinput.h; sourceTree = "<group>"; };
 		DF573BF80F5A81EA00961A72 /* aatree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aatree.h; sourceTree = "<group>"; };
 		DF573BF90F5A81EA00961A72 /* heapmgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = heapmgr.h; sourceTree = "<group>"; };
@@ -6287,8 +6282,6 @@
 			children = (
 				DF573CC40F5A863100961A72 /* tools.cpp */,
 				DF573CC50F5A863100961A72 /* tools.h */,
-				DF573BF30F5A81D400961A72 /* sci_memory.cpp */,
-				DF573BF40F5A81D400961A72 /* sci_memory.h */,
 				DF573BF50F5A81D400961A72 /* uinput.h */,
 				DFAAD2390F50120E00C3A4E2 /* console.cpp */,
 				DFAAD23A0F50120E00C3A4E2 /* console.h */,
@@ -7999,7 +7992,6 @@
 				DFD6470C0F495B51008E18EF /* unzip.cpp in Sources */,
 				DFAAD23D0F50120E00C3A4E2 /* console.cpp in Sources */,
 				DFAAD23E0F50120E00C3A4E2 /* exereader.cpp in Sources */,
-				DF573BF60F5A81D400961A72 /* sci_memory.cpp in Sources */,
 				DF573C060F5A81EA00961A72 /* intmap.cpp in Sources */,
 				DF573C070F5A81EA00961A72 /* kdebug.cpp in Sources */,
 				DF573C080F5A81EA00961A72 /* state.cpp in Sources */,
@@ -8934,7 +8926,6 @@
 				DF0942020F63CB26002D821E /* unzip.cpp in Sources */,
 				DF0942030F63CB26002D821E /* console.cpp in Sources */,
 				DF0942040F63CB26002D821E /* exereader.cpp in Sources */,
-				DF0942050F63CB26002D821E /* sci_memory.cpp in Sources */,
 				DF0942070F63CB26002D821E /* intmap.cpp in Sources */,
 				DF0942080F63CB26002D821E /* kdebug.cpp in Sources */,
 				DF0942090F63CB26002D821E /* state.cpp in Sources */,
@@ -9881,7 +9872,6 @@
 				DFF95C880FB22D5700A3EC78 /* unzip.cpp in Sources */,
 				DFF95C890FB22D5700A3EC78 /* console.cpp in Sources */,
 				DFF95C8A0FB22D5700A3EC78 /* exereader.cpp in Sources */,
-				DFF95C8B0FB22D5700A3EC78 /* sci_memory.cpp in Sources */,
 				DFF95C8C0FB22D5700A3EC78 /* intmap.cpp in Sources */,
 				DFF95C8D0FB22D5700A3EC78 /* kdebug.cpp in Sources */,
 				DFF95C8E0FB22D5700A3EC78 /* state.cpp in Sources */,

Modified: scummvm/trunk/dists/msvc7/sci.vcproj
===================================================================
--- scummvm/trunk/dists/msvc7/sci.vcproj	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/dists/msvc7/sci.vcproj	2009-05-12 23:30:10 UTC (rev 40514)
@@ -488,12 +488,6 @@
 			RelativePath="..\..\engines\sci\sci.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\sci\sci_memory.cpp">
-		</File>
-		<File
-			RelativePath="..\..\engines\sci\sci_memory.h">
-		</File>
-		<File
 			RelativePath="..\..\engines\sci\engine\script.cpp">
 		</File>
 		<File

Modified: scummvm/trunk/dists/msvc71/sci.vcproj
===================================================================
--- scummvm/trunk/dists/msvc71/sci.vcproj	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/dists/msvc71/sci.vcproj	2009-05-12 23:30:10 UTC (rev 40514)
@@ -502,12 +502,6 @@
 			RelativePath="..\..\engines\sci\sci.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\sci\sci_memory.cpp">
-		</File>
-		<File
-			RelativePath="..\..\engines\sci\sci_memory.h">
-		</File>
-		<File
 			RelativePath="..\..\engines\sci\engine\script.cpp">
 		</File>
 		<File

Modified: scummvm/trunk/dists/msvc8/sci.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/sci.vcproj	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/dists/msvc8/sci.vcproj	2009-05-12 23:30:10 UTC (rev 40514)
@@ -679,14 +679,6 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\engines\sci\sci_memory.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\engines\sci\sci_memory.h"
-			>
-		</File>
-		<File
 			RelativePath="..\..\engines\sci\engine\script.cpp"
 			>
 		</File>

Modified: scummvm/trunk/dists/msvc9/sci.vcproj
===================================================================
--- scummvm/trunk/dists/msvc9/sci.vcproj	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/dists/msvc9/sci.vcproj	2009-05-12 23:30:10 UTC (rev 40514)
@@ -680,14 +680,6 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\engines\sci\sci_memory.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\engines\sci\sci_memory.h"
-			>
-		</File>
-		<File
 			RelativePath="..\..\engines\sci\engine\script.cpp"
 			>
 		</File>

Modified: scummvm/trunk/engines/sci/engine/grammar.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/grammar.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/grammar.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -31,7 +31,6 @@
 #include "sci/tools.h"
 #include "sci/scicore/vocabulary.h"
 #include "sci/scicore/sciconsole.h"
-#include "sci/sci_memory.h"
 
 namespace Sci {
 
@@ -104,7 +103,7 @@
 }
 
 static parse_rule_t *_vdup(parse_rule_t *a) {
-	parse_rule_t *rule = (parse_rule_t*)sci_malloc(sizeof(int) * (a->length + 4));
+	parse_rule_t *rule = (parse_rule_t*)malloc(sizeof(int) * (a->length + 4));
 
 	rule->id = a->id;
 	rule->length = a->length;
@@ -127,7 +126,7 @@
 	if ((firstnt == turkey->length) || (turkey->data[firstnt] != stuffing->id))
 		return NULL;
 
-	rule = (parse_rule_t*)sci_malloc(sizeof(int) * (turkey->length - 1 + stuffing->length + 4));
+	rule = (parse_rule_t*)malloc(sizeof(int) * (turkey->length - 1 + stuffing->length + 4));
 	rule->id = turkey->id;
 	rule->specials_nr = turkey->specials_nr + stuffing->specials_nr - 1;
 	rule->first_special = firstnt + stuffing->first_special;
@@ -160,7 +159,7 @@
 			return NULL; // invalid
 	}
 
-	rule = (parse_rule_t*)sci_malloc(sizeof(int) * (4 + tokens));
+	rule = (parse_rule_t*)malloc(sizeof(int) * (4 + tokens));
 
 	++_allocd_rules;
 	rule->id = branch->id;
@@ -205,7 +204,7 @@
 
 	if (((dep & TOKEN_TERMINAL_CLASS) && ((dep & 0xffff) & input._class)) ||
 			((dep & TOKEN_TERMINAL_GROUP) && ((dep & 0xffff) & input._group))) {
-		parse_rule_t *retval = (parse_rule_t*)sci_malloc(sizeof(int) * (4 + rule->length));
+		parse_rule_t *retval = (parse_rule_t*)malloc(sizeof(int) * (4 + rule->length));
 		++_allocd_rules;
 		retval->id = rule->id;
 		retval->specials_nr = rule->specials_nr - 1;
@@ -251,7 +250,7 @@
 	if (!rule)
 		return list;
 
-	new_elem = (parse_rule_list_t*)sci_malloc(sizeof(parse_rule_list_t));
+	new_elem = (parse_rule_list_t*)malloc(sizeof(parse_rule_list_t));
 	term = rule->data[rule->first_special];
 
 	new_elem->rule = rule;

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -518,7 +518,7 @@
 	if (!src)
 		return; // NULL signature: Nothing to do
 
-	result = (char*)sci_malloc(strlen(*s) + 1);
+	result = (char*)malloc(strlen(*s) + 1);
 
 	while (*src) {
 		char c;

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -1655,7 +1655,7 @@
 
 		if (entries_nr) { // determine list_top, selection, and the entries_list
 			seeker = text;
-			entries_list = (char**)sci_malloc(sizeof(char *) * entries_nr);
+			entries_list = (char**)malloc(sizeof(char *) * entries_nr);
 			for (i = 0; i < entries_nr; i++) {
 				entries_list[i] = seeker;
 				seeker += entry_size	;

Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -77,7 +77,7 @@
 	s->status_bar_background = bgcolor;
 
 	if (text.segment) {
-		const char *tmp = sci_strdup(kernel_dereference_char_pointer(s, text, 0));
+		const char *tmp = strdup(kernel_dereference_char_pointer(s, text, 0));
 		s->_statusBarText = tmp ? tmp : "";
 	}
 

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -1448,7 +1448,7 @@
 	}
 
 	// Allocate and build vertex index
-	pf_s->vertex_index = (Vertex**)sci_malloc(sizeof(Vertex *) * (count + 2));
+	pf_s->vertex_index = (Vertex**)malloc(sizeof(Vertex *) * (count + 2));
 
 	count = 0;
 

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -179,7 +179,7 @@
 	memcpy(clone_obj, parent_obj, sizeof(Clone));
 	clone_obj->flags = 0;
 	varblock_size = parent_obj->variables_nr * sizeof(reg_t);
-	clone_obj->variables = (reg_t*)sci_malloc(varblock_size);
+	clone_obj->variables = (reg_t*)malloc(varblock_size);
 	memcpy(clone_obj->variables, parent_obj->variables, varblock_size);
 
 	// Mark as clone

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -505,7 +505,7 @@
 	SCIkdebug(SCIkSTRINGS, "Formatting \"%s\"\n", source);
 
 
-	arguments = (int*)sci_malloc(sizeof(int) * argc);
+	arguments = (int*)malloc(sizeof(int) * argc);
 #ifdef SATISFY_PURIFY
 	memset(arguments, 0, sizeof(int) * argc);
 #endif

Modified: scummvm/trunk/engines/sci/engine/said.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/said.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/said.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -209,7 +209,7 @@
 static int yylex(void);
 
 static int yyerror(const char *s) {
-	said_parse_error = sci_strdup(s);
+	said_parse_error = strdup(s);
 	return 1; /* Abort */
 }
 

Modified: scummvm/trunk/engines/sci/engine/said.y
===================================================================
--- scummvm/trunk/engines/sci/engine/said.y	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/said.y	2009-05-12 23:30:10 UTC (rev 40514)
@@ -102,7 +102,7 @@
 static int yylex(void);
 
 static int yyerror(const char *s) {
-	said_parse_error = sci_strdup(s);
+	said_parse_error = strdup(s);
 	return 1; /* Abort */
 }
 

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -31,7 +31,6 @@
 #include <time.h>	// FIXME: For struct tm
 
 
-#include "sci/sci_memory.h"
 #include "sci/gfx/operations.h"
 #include "sci/gfx/menubar.h"
 #include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxContainer
@@ -271,7 +270,7 @@
 
 	s.syncAsSint32LE(obj.nr);
 	if (!obj.locals && obj.nr)
-		obj.locals = (reg_t *)sci_calloc(obj.nr, sizeof(reg_t));
+		obj.locals = (reg_t *)calloc(obj.nr, sizeof(reg_t));
 	for (int i = 0; i < obj.nr; ++i)
 		sync_reg_t(s, obj.locals[i]);
 }
@@ -285,7 +284,7 @@
 
 	s.syncAsSint32LE(obj.variables_nr);
 	if (!obj.variables && obj.variables_nr)
-		obj.variables = (reg_t *)sci_calloc(obj.variables_nr, sizeof(reg_t));
+		obj.variables = (reg_t *)calloc(obj.variables_nr, sizeof(reg_t));
 	for (int i = 0; i < obj.variables_nr; ++i)
 		sync_reg_t(s, obj.variables[i]);
 }
@@ -368,7 +367,7 @@
 	s.syncAsSint32LE(obj._size);
 	syncCStr(s, &obj._description);
 	if (!obj._buf && obj._size) {
-		obj._buf = (byte *)sci_calloc(obj._size, 1);
+		obj._buf = (byte *)calloc(obj._size, 1);
 	}
 	if (obj._size)
 		s.syncBytes(obj._buf, obj._size);
@@ -378,7 +377,7 @@
 	s.syncAsUint32LE(obj.nr);
 	if (s.isLoading()) {
 		//free(obj.entries);
-		obj.entries = (reg_t *)sci_calloc(obj.nr, sizeof(reg_t));
+		obj.entries = (reg_t *)calloc(obj.nr, sizeof(reg_t));
 	}
 }
 

Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -26,7 +26,6 @@
 /* Second half of the console implementation: VM dependent stuff */
 /* Remember, it doesn't have to be fast. */
 
-#include "sci/sci_memory.h"
 #include "sci/engine/state.h"
 #include "sci/scicore/sciconsole.h"
 
@@ -160,7 +159,7 @@
 			cmd_mm[i].size_per_entry = cmd_mm_sizes_per_entry[i];
 			cmd_mm[i].entries = 0;
 			cmd_mm[i].allocated = CMD_MM_DEFAULT_ALLOC;
-			cmd_mm[i].data = sci_calloc(cmd_mm[i].allocated, cmd_mm[i].size_per_entry);
+			cmd_mm[i].data = calloc(cmd_mm[i].allocated, cmd_mm[i].size_per_entry);
 			cmd_mm[i].print = cmd_mm_printers[i];
 		}
 
@@ -398,7 +397,7 @@
 }
 
 void con_parse(EngineState *s, const char *command) {
-	char *cmd = (command && command[0]) ? (char *)sci_strdup(command) : (char *)sci_strdup(" ");
+	char *cmd = (command && command[0]) ? (char *)strdup(command) : (char *)strdup(" ");
 	char *_cmd = cmd;
 	int pos = 0;
 
@@ -882,7 +881,7 @@
 	}
 
 	seeklen = cmdParams.size() - 1;
-	seekstr = (unsigned char *)sci_malloc(seeklen);
+	seekstr = (unsigned char *)malloc(seeklen);
 
 	if (NULL == seekstr) {
 		fprintf(stderr, "console.c: c_hexgrep(): malloc failed for seekstr\r\n");

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -2312,7 +2312,7 @@
 } ;
 
 void set_debug_mode(EngineState *s, int mode, const char *areas) {
-	char *param = (char*)sci_malloc(strlen(areas) + 2);
+	char *param = (char*)malloc(strlen(areas) + 2);
 
 	param[0] = (mode) ? '+' : '-';
 	strcpy(param + 1, areas);
@@ -2583,10 +2583,10 @@
 		bp = s->bp_list;
 		while (bp->next)
 			bp = bp->next;
-		bp->next = (Breakpoint *)sci_malloc(sizeof(Breakpoint));
+		bp->next = (Breakpoint *)malloc(sizeof(Breakpoint));
 		bp = bp->next;
 	} else {
-		s->bp_list = (Breakpoint *)sci_malloc(sizeof(Breakpoint));
+		s->bp_list = (Breakpoint *)malloc(sizeof(Breakpoint));
 		bp = s->bp_list;
 	}
 
@@ -2605,7 +2605,7 @@
 	bp = bp_alloc(s);
 
 	bp->type = BREAK_SELECTOR;
-	bp->data.name = (char *)sci_malloc(strlen(cmdParams [0].str) + 1);
+	bp->data.name = (char *)malloc(strlen(cmdParams [0].str) + 1);
 	strcpy(bp->data.name, cmdParams [0].str);
 	s->have_bp |= BREAK_SELECTOR;
 

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -175,7 +175,7 @@
 	// allocate the script.buf
 
 	setScriptSize(scr, s, script_nr);
-	scr.buf = (byte *)sci_malloc(scr.buf_size);
+	scr.buf = (byte *)malloc(scr.buf_size);
 
 	dbgPrint("scr.buf ", scr.buf);
 	if (!scr.buf) {
@@ -672,7 +672,7 @@
 		       + (is_class ? functions_nr * 2 : 0) < scr->buf_size, "Function area extends beyond end of script");
 
 		obj->variables_nr = variables_nr;
-		obj->variables = (reg_t *)sci_malloc(sizeof(reg_t) * variables_nr);
+		obj->variables = (reg_t *)malloc(sizeof(reg_t) * variables_nr);
 
 		obj->methods_nr = functions_nr;
 		obj->base = scr->buf;
@@ -729,7 +729,7 @@
 
 		obj->variables_nr = variables_nr;
 		obj->variable_names_nr = variables_nr;
-		obj->variables = (reg_t *)sci_malloc(sizeof(reg_t) * variables_nr);
+		obj->variables = (reg_t *)malloc(sizeof(reg_t) * variables_nr);
 
 		obj->methods_nr = functions_nr;
 		obj->base = scr->buf;
@@ -768,7 +768,7 @@
 
 		locals = scr->locals_block = (LocalVariables *)mobj;
 		locals->script_id = scr->nr;
-		locals->locals = (reg_t *)sci_calloc(count, sizeof(reg_t));
+		locals->locals = (reg_t *)calloc(count, sizeof(reg_t));
 		locals->nr = count;
 
 		return locals;
@@ -879,7 +879,7 @@
 /*
 static char *SegManager::dynprintf(char *msg, ...) {
 	va_list argp;
-	char *buf = (char *)sci_malloc(strlen(msg) + 100);
+	char *buf = (char *)malloc(strlen(msg) + 100);
 
 	va_start(argp, msg);
 	vsprintf(buf, msg, argp);
@@ -893,7 +893,7 @@
 	MemObject *mobj = allocNonscriptSegment(MEM_OBJ_STACK, segid);
 	DataStack *retval = (DataStack *)mobj;
 
-	retval->entries = (reg_t *)sci_calloc(size, sizeof(reg_t));
+	retval->entries = (reg_t *)calloc(size, sizeof(reg_t));
 	retval->nr = size;
 
 	return retval;
@@ -943,7 +943,7 @@
 	if (!h)
 		return NULL;
 
-	h->mem = sci_malloc(size);
+	h->mem = malloc(size);
 	h->size = size;
 	h->type = hunk_type;
 
@@ -1093,9 +1093,9 @@
 	if (size == 0)
 		d._buf = NULL;
 	else
-		d._buf = (byte *)sci_malloc(size);
+		d._buf = (byte *)malloc(size);
 
-	d._description = sci_strdup(descr);
+	d._description = strdup(descr);
 
 	return (unsigned char *)(d._buf);
 }

Modified: scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_gui.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/gfx_gui.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -366,7 +366,7 @@
 
 		list->add(GFXWC(list), text_handle);
 	} else {
-		char *textdup = (char *)sci_malloc(strlen(text) + 1);
+		char *textdup = (char *)malloc(strlen(text) + 1);
 
 		strncpy(textdup, text, cursor);
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -65,7 +65,7 @@
 	assert(bytespp == COPY_BYTES);
 
 	if (separate_alpha_map && !alpha_dest)
-		alpha_dest = pxm->alpha_map = (byte *)sci_malloc(pxm->index_width * xfact * pxm->index_height * yfact);
+		alpha_dest = pxm->alpha_map = (byte *)malloc(pxm->index_width * xfact * pxm->index_height * yfact);
 
 	// Calculate all colors
 	for (i = 0; i < pxm->colors_nr(); i++) {
@@ -227,7 +227,7 @@
 	shifts[3] = mode->alpha_shift;
 
 	if (separate_alpha_map && !alpha_dest)
-		alpha_dest = pxm->alpha_map = (byte *)sci_malloc(pxm->index_width * xfact * pxm->index_height * yfact);
+		alpha_dest = pxm->alpha_map = (byte *)malloc(pxm->index_width * xfact * pxm->index_height * yfact);
 
 	for (y = 0; y < pxm->index_height; y++) {
 		byte *linepos = dest;
@@ -380,7 +380,7 @@
 		return;
 
 	if (separate_alpha_map && !alpha_dest)
-		alpha_dest = pxm->alpha_map = (byte *)sci_malloc(pxm->index_width * xfact * pxm->index_height * yfact);
+		alpha_dest = pxm->alpha_map = (byte *)malloc(pxm->index_width * xfact * pxm->index_height * yfact);
 
 	src -= pxm->index_width + 1;
 
@@ -614,13 +614,13 @@
 
 
 	if (!pxm->data) {
-		pxm->data = (byte*)sci_malloc(mode->xfact * mode->yfact * pxm->index_width * pxm->index_height * mode->bytespp + 1);
+		pxm->data = (byte*)malloc(mode->xfact * mode->yfact * pxm->index_width * pxm->index_height * mode->bytespp + 1);
 		// +1: Eases coying on BE machines in 24 bpp packed mode
 		// Assume that memory, if allocated already, will be sufficient
 
 		// Allocate alpha map
 		if (!mode->alpha_mask && pxm->colors_nr() < GFX_PIC_COLORS)
-			pxm->alpha_map = (byte*)sci_malloc(mode->xfact * mode->yfact * pxm->index_width * pxm->index_height + 1);
+			pxm->alpha_map = (byte*)malloc(mode->xfact * mode->yfact * pxm->index_width * pxm->index_height + 1);
 	} else
 		was_allocated = 1;
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -118,7 +118,7 @@
 			gfxr_remove_artifacts_pic0(scaled_pic, unscaled_pic);
 
 		if (!scaled_pic->undithered_buffer)
-			scaled_pic->undithered_buffer = sci_malloc(scaled_pic->undithered_buffer_size);
+			scaled_pic->undithered_buffer = malloc(scaled_pic->undithered_buffer_size);
 
 		memcpy(scaled_pic->undithered_buffer, scaled_pic->visual_map->index_data, scaled_pic->undithered_buffer_size);
 
@@ -359,7 +359,7 @@
 			return NULL;
 		}
 		if (!res) {
-			res = (gfx_resource_t *)sci_malloc(sizeof(gfx_resource_t));
+			res = (gfx_resource_t *)malloc(sizeof(gfx_resource_t));
 			res->ID = GFXR_RES_ID(GFX_RESOURCE_TYPE_PIC, num);
 #ifdef CUSTOM_GRAPHICS_OPTIONS
 			res->lock_sequence_nr = _options->buffer_pics_nr;
@@ -548,7 +548,7 @@
 		}
 
 		if (!res) {
-			res = (gfx_resource_t *)sci_malloc(sizeof(gfx_resource_t));
+			res = (gfx_resource_t *)malloc(sizeof(gfx_resource_t));
 			res->scaled_data.view = NULL;
 			res->ID = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr);
 			res->lock_sequence_nr = _tagLockCounter;
@@ -619,7 +619,7 @@
 		gfx_bitmap_font_t *font = gfxr_read_font(fontRes->id, fontRes->data, fontRes->size);
 
 		if (!res) {
-			res = (gfx_resource_t *)sci_malloc(sizeof(gfx_resource_t));
+			res = (gfx_resource_t *)malloc(sizeof(gfx_resource_t));
 			res->scaled_data.font = NULL;
 			res->ID = GFXR_RES_ID(GFX_RESOURCE_TYPE_FONT, num);
 			res->lock_sequence_nr = _tagLockCounter;
@@ -665,7 +665,7 @@
 			return NULL;
 
 		if (!res) {
-			res = (gfx_resource_t *)sci_malloc(sizeof(gfx_resource_t));
+			res = (gfx_resource_t *)malloc(sizeof(gfx_resource_t));
 			res->scaled_data.pointer = NULL;
 			res->ID = GFXR_RES_ID(GFX_RESOURCE_TYPE_CURSOR, num);
 			res->lock_sequence_nr = _tagLockCounter;

Modified: scummvm/trunk/engines/sci/gfx/gfx_system.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/gfx_system.h	2009-05-12 23:30:10 UTC (rev 40514)
@@ -28,7 +28,6 @@
 
 #include "common/scummsys.h"
 #include "common/rect.h"
-#include "sci/sci_memory.h"
 #include "sci/tools.h"
 #include "sci/gfx/palette.h"
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_test.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_test.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/gfx_test.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -70,10 +70,6 @@
 	return r;
 }
 
-#ifdef FREESCI_PRIMARY_RESOURCE_H_
-#  include "../scicore/sci_memory.c"
-#endif
-
 void sci_gettime(long *seconds, long *useconds) {
 	struct timeval tv;
 
@@ -178,7 +174,7 @@
 
 
 int *arrdup(int *src, int count) {
-	int *retval = sci_malloc(sizeof(int) * count);
+	int *retval = malloc(sizeof(int) * count);
 	memcpy(retval, src, sizeof(int) * count);
 	return retval;
 }
@@ -221,7 +217,7 @@
 };
 
 gfxr_pic_t *gfxr_interpreter_init_pic(int version, gfx_mode_t *mode, int ID, void *internal) {
-	gfxr_pic_t *pic = sci_malloc(sizeof(gfxr_pic_t));
+	gfxr_pic_t *pic = malloc(sizeof(gfxr_pic_t));
 
 	pic->mode = mode;
 	pic->undithered_buffer = NULL;
@@ -338,7 +334,7 @@
 	if (nr < 0 || nr > TEST_VIEWS_NR)
 		return NULL;
 
-	view = sci_malloc(sizeof(gfxr_view_t));
+	view = malloc(sizeof(gfxr_view_t));
 	view->ID = nr | 2048;
 	view->flags = GFX_PIXMAP_FLAG_EXTERNAL_PALETTE;
 
@@ -346,10 +342,10 @@
 	view->colors = view_colors;
 
 	view->loops_nr = 1;
-	view->loops = loop = sci_malloc(sizeof(gfxr_loop_t));
+	view->loops = loop = malloc(sizeof(gfxr_loop_t));
 
 	loop->cels_nr = 3;
-	loop->cels = sci_malloc(sizeof(gfx_pixmap_t *) * loop->cels_nr);
+	loop->cels = malloc(sizeof(gfx_pixmap_t *) * loop->cels_nr);
 
 	for (i = 0; i < 3; i++) {
 		gfx_pixmap_t *pxm = gfx_pixmap_alloc_index_data(gfx_new_pixmap(16, 16, 2048 | nr, 0, i));
@@ -402,10 +398,10 @@
 	if (nr < 0 || nr > TEST_FONTS_NR)
 		return NULL;
 
-	font = sci_malloc(sizeof(gfx_bitmap_font_t));
+	font = malloc(sizeof(gfx_bitmap_font_t));
 	font->ID = nr;
 	font->chars_nr = BUILTIN_CHARS_NR;
-	font->widths = sci_malloc(sizeof(int) * BUILTIN_CHARS_NR);
+	font->widths = malloc(sizeof(int) * BUILTIN_CHARS_NR);
 	for (i = 0; i < BUILTIN_CHARS_NR; i++)
 		font->widths[i] = BUILTIN_CHARS_WIDTH;
 	font->row_size = (BUILTIN_CHARS_WIDTH + 7) >> 3;
@@ -1060,7 +1056,7 @@
 
 		case 'g':
 			if (driver) sci_free(driver);
-			driver = sci_strdup(optarg);
+			driver = strdup(optarg);
 			break;
 
 		case 'l': {

Modified: scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -23,7 +23,6 @@
  *
  */
 
-#include "sci/sci_memory.h"
 #include "sci/gfx/gfx_tools.h"
 
 namespace Sci {
@@ -45,7 +44,7 @@
 }
 
 gfx_mode_t *gfx_new_mode(int xfact, int yfact, const Graphics::PixelFormat &format, Palette *palette, int flags) {
-	gfx_mode_t *mode = (gfx_mode_t *)sci_malloc(sizeof(gfx_mode_t));
+	gfx_mode_t *mode = (gfx_mode_t *)malloc(sizeof(gfx_mode_t));
 
 	mode->xfact = xfact;
 	mode->yfact = yfact;
@@ -108,7 +107,7 @@
 }
 
 gfx_pixmap_t *gfx_clone_pixmap(gfx_pixmap_t *pxm, gfx_mode_t *mode) {
-	gfx_pixmap_t *clone = (gfx_pixmap_t *)sci_malloc(sizeof(gfx_pixmap_t));
+	gfx_pixmap_t *clone = (gfx_pixmap_t *)malloc(sizeof(gfx_pixmap_t));
 	*clone = *pxm;
 	clone->index_data = NULL;
 	clone->palette = NULL;
@@ -117,7 +116,7 @@
 
 	memcpy(clone->data, pxm->data, clone->data_size);
 	if (clone->alpha_map) {
-		clone->alpha_map = (byte *) sci_malloc(clone->width * clone->height);
+		clone->alpha_map = (byte *) malloc(clone->width * clone->height);
 		memcpy(clone->alpha_map, pxm->alpha_map, clone->width * clone->height);
 	}
 
@@ -125,7 +124,7 @@
 }
 
 gfx_pixmap_t *gfx_new_pixmap(int xl, int yl, int resid, int loop, int cel) {
-	gfx_pixmap_t *pxm = (gfx_pixmap_t *)sci_malloc(sizeof(gfx_pixmap_t));
+	gfx_pixmap_t *pxm = (gfx_pixmap_t *)malloc(sizeof(gfx_pixmap_t));
 
 	pxm->alpha_map = NULL;
 	pxm->data = NULL;
@@ -169,7 +168,7 @@
 	if (!size)
 		size = 1;
 
-	pixmap->index_data = (byte*)sci_malloc(size);
+	pixmap->index_data = (byte*)malloc(size);
 
 	memset(pixmap->index_data, 0, size);
 
@@ -207,7 +206,7 @@
 	if (!size)
 		size = 1;
 
-	pixmap->data = (byte*)sci_malloc(pixmap->data_size = size);
+	pixmap->data = (byte*)malloc(pixmap->data_size = size);
 	return pixmap;
 }
 
@@ -251,7 +250,7 @@
 	xl = pixmap->index_width;
 	yl = pixmap->index_height;
 	linewidth = xfact * xl;
-	initial_new_data = new_data = (byte *)sci_malloc(linewidth * yfact * yl);
+	initial_new_data = new_data = (byte *)malloc(linewidth * yfact * yl);
 
 	for (yc = 0; yc < yl; yc++) {
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -23,7 +23,6 @@
  *
  */
 
-#include "sci/sci_memory.h"
 #include "sci/gfx/gfx_gui.h"		// for kWindowAutoRestore
 #include "sci/gfx/gfx_widgets.h"
 #include "sci/gfx/gfx_state_internal.h"
@@ -1754,7 +1753,7 @@
 }
 
 gfxw_snapshot_t *gfxw_make_snapshot(GfxVisual *visual, rect_t area) {
-	gfxw_snapshot_t *retval = (gfxw_snapshot_t*)sci_malloc(sizeof(gfxw_snapshot_t));
+	gfxw_snapshot_t *retval = (gfxw_snapshot_t*)malloc(sizeof(gfxw_snapshot_t));
 
 	retval->serial = widget_serial_number_counter++;
 

Modified: scummvm/trunk/engines/sci/gfx/menubar.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -28,7 +28,6 @@
 ** used for any actual actions on behalf of the interpreter.
 */
 
-#include "sci/sci_memory.h"
 #include "sci/engine/state.h"
 #include "sci/gfx/menubar.h"
 #include "sci/engine/kernel.h"
@@ -41,7 +40,7 @@
 ** Parameters: (char *) src: The source string
 **             (int) length: The maximum length of the string (not counting
 **                           a trailing \0).
-** Returns   : (char *) The resulting copy, allocated with sci_malloc().
+** Returns   : (char *) The resulting copy, allocated with malloc().
 ** To free this string, use the free() command.
 ** See _SCI_MALLOC() for more information if call fails.
 */

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -25,7 +25,6 @@
 
 // Graphical operations, called from the widget state manager
 
-#include "sci/sci_memory.h"
 #include "sci/gfx/operations.h"
 #include "sci/gfx/font.h"
 #include "sci/sci.h"	// for g_engine, evil hack

Modified: scummvm/trunk/engines/sci/gfx/res_font.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_font.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/res_font.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -23,7 +23,6 @@
  *
  */
 
-#include "sci/sci_memory.h"
 #include "sci/gfx/gfx_system.h"
 #include "sci/gfx/gfx_resource.h"
 #include "sci/gfx/gfx_tools.h"
@@ -64,7 +63,7 @@
 }
 
 gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size) {
-	gfx_bitmap_font_t *font = (gfx_bitmap_font_t*)sci_calloc(sizeof(gfx_bitmap_font_t), 1);
+	gfx_bitmap_font_t *font = (gfx_bitmap_font_t*)calloc(sizeof(gfx_bitmap_font_t), 1);
 	int chars_nr;
 	int max_width = 0, max_height;
 	int i;
@@ -96,7 +95,7 @@
 	}
 
 	font->ID = id;
-	font->widths = (int*)sci_malloc(sizeof(int) * chars_nr);
+	font->widths = (int*)malloc(sizeof(int) * chars_nr);
 
 	for (i = 0; i < chars_nr; i++) {
 		int offset = READ_LE_UINT16(resource + (i << 1) + 6);
@@ -125,7 +124,7 @@
 		font->row_size = (font->row_size + 3) & ~3;
 
 	font->char_size = font->row_size * max_height;
-	font->data = (byte *)sci_calloc(font->char_size, chars_nr);
+	font->data = (byte *)calloc(font->char_size, chars_nr);
 
 	for (i = 0; i < chars_nr; i++) {
 		int offset = READ_LE_UINT16(resource + (i << 1) + 6);

Modified: scummvm/trunk/engines/sci/gfx/res_pal.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_pal.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/res_pal.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -26,7 +26,6 @@
 /* SCI1 palette resource defrobnicator */
 
 #include "common/file.h"
-#include "sci/sci_memory.h"
 #include "sci/gfx/gfx_system.h"
 #include "sci/gfx/gfx_resource.h"
 

Modified: scummvm/trunk/engines/sci/gfx/res_pic.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/res_pic.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -24,7 +24,6 @@
  */
 
 #include <time.h>	// for time() to seed rand() via srand()
-#include "sci/sci_memory.h"
 #include "sci/gfx/gfx_resource.h"
 #include "sci/gfx/gfx_tools.h"
 
@@ -148,7 +147,7 @@
 
 
 gfxr_pic_t *gfxr_init_pic(gfx_mode_t *mode, int ID, int sci1) {
-	gfxr_pic_t *pic = (gfxr_pic_t*)sci_malloc(sizeof(gfxr_pic_t));
+	gfxr_pic_t *pic = (gfxr_pic_t*)malloc(sizeof(gfxr_pic_t));
 
 	pic->mode = mode;
 
@@ -1569,7 +1568,7 @@
 
 				p0printf("Explicit priority table @%d\n", pos);
 				if (!pic->priorityTable) {
-					pic->priorityTable = (int*)sci_malloc(16 * sizeof(int));
+					pic->priorityTable = (int*)malloc(16 * sizeof(int));
 				} else {
 					// This occurs in the title screen of Longbow, perhaps with the animated Robin sprite
 					GFXWARN("pic->priorityTable is not NULL (%p); this only occurs with overlaid pics, otherwise it's a bug", (void *)pic->priorityTable);
@@ -1592,7 +1591,7 @@
 				int *pri_table;
 
 				if (!pic->priorityTable) {
-					pic->priorityTable = (int*)sci_malloc(16 * sizeof(int));
+					pic->priorityTable = (int*)malloc(16 * sizeof(int));
 				} else {
 					GFXERROR("pic->priorityTable is not NULL (%p); possible memory corruption", (void *)pic->priorityTable);
 				}

Modified: scummvm/trunk/engines/sci/gfx/res_view0.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_view0.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/res_view0.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -25,7 +25,6 @@
 
 #include "common/endian.h"
 
-#include "sci/sci_memory.h"
 #include "sci/gfx/gfx_system.h"
 #include "sci/gfx/gfx_resource.h"
 #include "sci/gfx/gfx_tools.h"
@@ -132,7 +131,7 @@
 		return 1;
 	}
 
-	dest->cels = (gfx_pixmap_t**)sci_malloc(sizeof(gfx_pixmap_t *) * cels_nr);
+	dest->cels = (gfx_pixmap_t**)malloc(sizeof(gfx_pixmap_t *) * cels_nr);
 
 	for (i = 0; i < cels_nr; i++) {
 		int cel_offset = READ_LE_UINT16(resource + offset + 4 + (i << 1));
@@ -174,7 +173,7 @@
 		return NULL;
 	}
 
-	view = (gfxr_view_t *)sci_malloc(sizeof(gfxr_view_t));
+	view = (gfxr_view_t *)malloc(sizeof(gfxr_view_t));
 	view->ID = id;
 
 	view->loops_nr = resource[V0_LOOPS_NR_OFFSET];
@@ -198,7 +197,7 @@
 		return NULL;
 	}
 
-	view->loops = (gfxr_loop_t*)sci_malloc(sizeof(gfxr_loop_t) * ((view->loops_nr) ? view->loops_nr : 1)); /* Alloc 1 if no loop */
+	view->loops = (gfxr_loop_t*)malloc(sizeof(gfxr_loop_t) * ((view->loops_nr) ? view->loops_nr : 1)); /* Alloc 1 if no loop */
 
 	for (i = 0; i < view->loops_nr; i++) {
 		int error_token = 0;

Modified: scummvm/trunk/engines/sci/gfx/res_view1.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/res_view1.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/gfx/res_view1.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -27,7 +27,6 @@
 
 #include "common/endian.h"
 
-#include "sci/sci_memory.h"
 #include "sci/gfx/gfx_system.h"
 #include "sci/gfx/gfx_resource.h"
 #include "sci/gfx/gfx_tools.h"
@@ -249,7 +248,7 @@
 		return 1;
 	}
 
-	dest->cels = (gfx_pixmap_t**)sci_malloc(sizeof(gfx_pixmap_t *) * cels_nr);
+	dest->cels = (gfx_pixmap_t**)malloc(sizeof(gfx_pixmap_t *) * cels_nr);
 
 	for (i = 0; i < cels_nr; i++) {
 		int cel_offset = READ_LE_UINT16(resource + offset + 4 + (i << 1));
@@ -286,7 +285,7 @@
 		return NULL;
 	}
 
-	view = (gfxr_view_t*)sci_malloc(sizeof(gfxr_view_t));
+	view = (gfxr_view_t*)malloc(sizeof(gfxr_view_t));
 	view->ID = id;
 	view->flags = 0;
 
@@ -320,7 +319,7 @@
 		view->palette = NULL;
 	}
 
-	view->loops = (gfxr_loop_t*)sci_malloc(sizeof(gfxr_loop_t) * view->loops_nr);
+	view->loops = (gfxr_loop_t*)malloc(sizeof(gfxr_loop_t) * view->loops_nr);
 
 	for (i = 0; i < view->loops_nr; i++) {
 		int error_token = 0;
@@ -348,7 +347,7 @@
 	int i;
 
 	result->cels_nr = cels_nr;
-	result->cels = (gfx_pixmap_t **)sci_malloc(sizeof(gfx_pixmap_t *) * cels_nr);
+	result->cels = (gfx_pixmap_t **)malloc(sizeof(gfx_pixmap_t *) * cels_nr);
 
 	for (i = 0; i < cels_nr; i++) {
 		result->cels[i] = gfxr_draw_cel1(id, loop, i, mirrored, resource_base, seeker, size, view, 0, true);
@@ -368,7 +367,7 @@
 	int i;
 	byte *seeker;
 
-	view = (gfxr_view_t *)sci_malloc(sizeof(gfxr_view_t));
+	view = (gfxr_view_t *)malloc(sizeof(gfxr_view_t));
 
 	memset(view, 0, sizeof(gfxr_view_t));
 	view->ID = id;

Modified: scummvm/trunk/engines/sci/module.mk
===================================================================
--- scummvm/trunk/engines/sci/module.mk	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/module.mk	2009-05-12 23:30:10 UTC (rev 40514)
@@ -5,7 +5,6 @@
 	detection.o \
 	exereader.o \
 	sci.o \
-	sci_memory.o \
 	tools.o \
 	engine/game.o \
 	engine/gc.o \

Deleted: scummvm/trunk/engines/sci/sci_memory.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci_memory.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/sci_memory.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -1,98 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#include "common/util.h"
-#include "sci/tools.h"
-#include "sci/sci_memory.h"
-
-namespace Sci {
-
-/********** the memory allocation macros **********/
-
-#ifdef UNCHECKED_MALLOCS
-
-#define ALLOC_MEM(alloc_statement, size, filename, linenum, funcname)\
-do {\
-	alloc_statement;\
-} while (0);
-
-#else /* !UNCHECKED_MALLOCS */
-
-#define ALLOC_MEM(alloc_statement, size, filename, linenum, funcname)\
-do {\
-	if (size == 0) {\
-		warning("Allocating zero bytes of memory [%s (%s) : %u]", filename, funcname, linenum);\
-	} else if (!(size > 0)) {\
-		error("Cannot allocate negative bytes of memory [%s (%s) : %u]", filename, funcname, linenum);\
-	}\
-\
-	alloc_statement; /* attempt to allocate the memory */\
-\
-	if (res == NULL) {\
-		/* exit immediately */\
-		error("Memory allocation of %u bytes failed [%s (%s) : %u]", (uint)(size), filename, funcname, linenum);\
-	}\
-} while (0);
-
-#endif /* !UNCHECKED_MALLOCS */
-
-
-void * sci_malloc(size_t size) {
-	void *res;
-
-	ALLOC_MEM((res = malloc(size)), size, __FILE__, __LINE__, "")
-	return res;
-}
-
-
-void * sci_calloc(size_t num, size_t size) {
-	void *res;
-
-	ALLOC_MEM((res = calloc(num, size)), num * size, __FILE__, __LINE__, "")
-	return res;
-}
-
-void *sci_realloc(void *ptr, size_t size) {
-	void *res;
-
-	ALLOC_MEM((res = realloc(ptr, size)), size, __FILE__, __LINE__, "")
-	return res;
-}
-
-char *sci_strdup(const char *src) {
-	void *res;
-
-	if (!src) {
-		fprintf(stderr, "_SCI_STRDUP() [%s (%s) : %u]\n",
-		        __FILE__, "", __LINE__);
-		fprintf(stderr, " attempt to strdup NULL pointer\n");
-		BREAKPOINT();
-	}
-	ALLOC_MEM((res = strdup(src)), strlen(src), __FILE__, __LINE__, "")
-
-	return (char*)res;
-}
-
-} // End of namespace Sci

Deleted: scummvm/trunk/engines/sci/sci_memory.h
===================================================================
--- scummvm/trunk/engines/sci/sci_memory.h	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/sci_memory.h	2009-05-12 23:30:10 UTC (rev 40514)
@@ -1,80 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-
-// This header file defines a portable library for allocating memory safely.
-
-
-#ifndef SCI_SCI_MEMORY_H
-#define SCI_SCI_MEMORY_H
-
-#include "common/scummsys.h"
-
-namespace Sci {
-
-/********** memory allocation routines **********/
-
-extern void *sci_malloc(size_t size);
-/* Allocates the specified amount of memory.
-** Parameters: (size_t) size: Number of bytes to allocate
-** Returns   : (void *) A pointer to the allocated memory chunk
-** To free this string, use the free() command.
-** If the call fails, behaviour is dependent on the definition of SCI_ALLOC.
-*/
-
-extern void *sci_calloc(size_t num, size_t size);
-/* Allocates num * size bytes of zeroed-out memory.
-** Parameters: (size_t) num: Number of elements to allocate
-**             (size_t) size: Amount of memory per element to allocate
-** Returns   : (void *) A pointer to the allocated memory chunk
-** To free this string, use the free() command.
-** See _SCI_MALLOC() for more information if call fails.
-*/
-
-extern void *sci_realloc(void *ptr, size_t size);
-/* Increases the size of an allocated memory chunk.
-** Parameters: (void *) ptr: The original pointer
-**             (size_t) size: New size of the memory chunk
-** Returns   : (void *) A possibly new pointer, containing 'size'
-**             bytes of memory and everything contained in the original 'ptr'
-**             (possibly minus some trailing data if the new memory area is
-**             smaller than the old one).
-** To free this string, use the free() command.
-** See _SCI_MALLOC() for more information if call fails.
-*/
-
-
-extern char *sci_strdup(const char *src);
-/* Duplicates a string.
-** Parameters: (const char *) src: The original pointer
-** Returns   : (char *) a pointer to the storage location for the copied
-**             string.
-** To free this string, use the free() command.
-** See _SCI_MALLOC() for more information if call fails.
-*/
-
-} // End of namespace Sci
-
-#endif	// SCI_SCI_MEMORY_H

Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -31,7 +31,6 @@
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
 #include "sci/tools.h"
-#include "sci/sci_memory.h"
 #include "sci/scicore/resource.h"
 #include "sci/scicore/vocabulary.h"
 #include "sci/scicore/decompressor.h"

Modified: scummvm/trunk/engines/sci/scicore/sciconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/sciconsole.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/scicore/sciconsole.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -26,7 +26,6 @@
 /* First part of the console implmentation: VM independent stuff */
 /* Remember, it doesn't have to be fast. */
 
-#include "sci/sci_memory.h"
 #include "sci/engine/state.h"
 #include "sci/scicore/sciconsole.h"
 
@@ -53,7 +52,7 @@
 	va_end(argp);
 
 	// Allocate buffer for the full printed string
-	char *buf = (char *)sci_malloc(bufsize + 1);
+	char *buf = (char *)malloc(bufsize + 1);
 	assert(buf);
 
 	// Print everything according to fmt into buf

Modified: scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab_debug.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/scicore/vocab_debug.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -289,7 +289,7 @@
 	if ((r = resmgr->findResource(kResourceTypeVocab, 996, 0)) == NULL)
 		return 0;
 
-	c = (int *)sci_malloc(sizeof(int) * r->size / 2);
+	c = (int *)malloc(sizeof(int) * r->size / 2);
 	for (i = 2; i < r->size; i += 4) {
 		c[i/4] = READ_LE_UINT16(r->data + i);
 	}
@@ -356,13 +356,13 @@
 
 	count = READ_LE_UINT16(r->data);
 
-	o = (opcode*)sci_malloc(sizeof(opcode) * 256);
+	o = (opcode*)malloc(sizeof(opcode) * 256);
 	for (i = 0; i < count; i++) {
 		int offset = READ_LE_UINT16(r->data + 2 + i * 2);
 		int len = READ_LE_UINT16(r->data + offset) - 2;
 		o[i].type = READ_LE_UINT16(r->data + offset + 2);
 		o[i].number = i;
-		o[i].name = (char *)sci_malloc(len + 1);
+		o[i].name = (char *)malloc(len + 1);
 		memcpy(o[i].name, r->data + offset + 4, len);
 		o[i].name[len] = '\0';
 #ifdef VOCABULARY_DEBUG
@@ -372,7 +372,7 @@
 	for (i = count; i < 256; i++) {
 		o[i].type = 0;
 		o[i].number = i;
-		o[i].name = (char *)sci_malloc(strlen("undefined") + 1);
+		o[i].name = (char *)malloc(strlen("undefined") + 1);
 		strcpy(o[i].name, "undefined");
 	}
 	return o;

Modified: scummvm/trunk/engines/sci/scicore/vocabulary.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocabulary.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/scicore/vocabulary.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -458,7 +458,7 @@
 				// Look it up
 
 				if (lookup_result._class == -1) { // Not found?
-					*error = (char *)sci_calloc(wordlen + 1, 1);
+					*error = (char *)calloc(wordlen + 1, 1);
 					strncpy(*error, lastword, wordlen); // Set the offending word
 					retval.clear();
 					return false; // And return with error

Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -30,7 +30,6 @@
 #include "sci/sfx/iterator_internal.h"
 #include "sci/sfx/player.h"
 #include "sci/tools.h"
-#include "sci/sci_memory.h"
 
 #include "sound/audiostream.h"
 #include "sound/mixer.h"

Modified: scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -25,14 +25,13 @@
 
 #include "common/scummsys.h"
 #include "sci/sfx/sci_midi.h"
-#include "sci/sci_memory.h"
 #include "sci/sfx/seq/instrument-map.h"
 #include "sci/sfx/core.h"
 
 namespace Sci {
 
 sfx_instrument_map_t *sfx_instrument_map_new(int velocity_maps_nr) {
-	sfx_instrument_map_t *map = (sfx_instrument_map_t *)sci_malloc(sizeof(sfx_instrument_map_t));
+	sfx_instrument_map_t *map = (sfx_instrument_map_t *)malloc(sizeof(sfx_instrument_map_t));
 	int i;
 
 	map->initialisation_block_size = 0;
@@ -45,9 +44,9 @@
 		map->velocity_map = NULL; /* Yes, this complicates control flow needlessly, but it avoids some of the pointless
 					  ** warnings that certain memory tools seem to find appropriate. */
 	else {
-		map->velocity_map = (byte **)sci_malloc(sizeof(byte *) * velocity_maps_nr);
+		map->velocity_map = (byte **)malloc(sizeof(byte *) * velocity_maps_nr);
 		for (i = 0; i < velocity_maps_nr; ++i)
-			map->velocity_map[i] = (byte *)sci_malloc(SFX_VELOCITIES_NR);
+			map->velocity_map[i] = (byte *)malloc(SFX_VELOCITIES_NR);
 	}
 	for (i = 0; i < SFX_INSTRUMENTS_NR; ++i)
 		map->velocity_map_index[i] = SFX_NO_VELOCITY_MAP;
@@ -170,7 +169,7 @@
 			fprintf(stderr, "[instrument-map] Instrument larger than required by initialisation block:  %d of %d\n", (int) size, PATCH_MIN_SIZE);
 
 		if (map->initialisation_block_size != 0) {
-			map->initialisation_block = (byte *)sci_malloc(map->initialisation_block_size);
+			map->initialisation_block = (byte *)malloc(map->initialisation_block_size);
 			memcpy(map->initialisation_block, data + PATCH_INIT_DATA, map->initialisation_block_size);
 		}
 	}
@@ -480,9 +479,9 @@
 	if (map == NULL)
 		return writer;
 
-	retval = (decorated_midi_writer_t *)sci_malloc(sizeof(decorated_midi_writer_t));
+	retval = (decorated_midi_writer_t *)malloc(sizeof(decorated_midi_writer_t));
 	retval->writer = writer;
-	retval->name = (char *)sci_malloc(strlen(writer->name) + strlen(NAME_SUFFIX) + 1);
+	retval->name = (char *)malloc(strlen(writer->name) + strlen(NAME_SUFFIX) + 1);
 	strcpy(retval->name, writer->name);
 	strcat(retval->name, NAME_SUFFIX);
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -24,7 +24,6 @@
  */
 
 #include "sci/tools.h"
-#include "sci/sci_memory.h"
 #include "sci/sfx/softseq.h"
 
 #include "common/file.h"
@@ -374,7 +373,7 @@
 		return NULL;
 	}
 
-	instrument = (instrument_t *) sci_malloc(sizeof(instrument_t));
+	instrument = (instrument_t *) malloc(sizeof(instrument_t));
 
 	seg_size[0] = read_int16(header + 35) * 2;
 	seg_size[1] = read_int16(header + 41) * 2;
@@ -411,7 +410,7 @@
 	sciprintf("                Segment sizes: %i %i %i\n", seg_size[0], seg_size[1], seg_size[2]);
 	sciprintf("                Segment offsets: 0 %i %i\n", loop_offset, read_int32(header + 43));
 #endif
-	instrument->samples = (int8 *) sci_malloc(size + 1);
+	instrument->samples = (int8 *) malloc(size + 1);
 	if (file.read(instrument->samples, size) < (unsigned int)size) {
 		sciprintf("[sfx:seq:amiga] Error: failed to read instrument samples\n");
 		return NULL;
@@ -434,7 +433,7 @@
 		instrument->size = seg_size[0];
 		instrument->loop_size = seg_size[1];
 
-		instrument->loop = (int8*)sci_malloc(instrument->loop_size + 1);
+		instrument->loop = (int8*)malloc(instrument->loop_size + 1);
 		memcpy(instrument->loop, instrument->samples + loop_offset, instrument->loop_size);
 
 		instrument->samples[instrument->size] = instrument->loop[0];

Modified: scummvm/trunk/engines/sci/sfx/songlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/songlib.cpp	2009-05-12 23:28:49 UTC (rev 40513)
+++ scummvm/trunk/engines/sci/sfx/songlib.cpp	2009-05-12 23:30:10 UTC (rev 40514)
@@ -26,7 +26,6 @@
 #include "sci/tools.h"
 #include "sci/sfx/core.h"
 #include "sci/sfx/iterator.h"
-#include "sci/sci_memory.h"
 
 namespace Sci {
 
@@ -34,7 +33,7 @@
 
 song_t *song_new(song_handle_t handle, SongIterator *it, int priority) {
 	song_t *retval;
-	retval = (song_t*) sci_malloc(sizeof(song_t));
+	retval = (song_t*) malloc(sizeof(song_t));
 
 #ifdef SATISFY_PURIFY
 	memset(retval, 0, sizeof(song_t));


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