[Scummvm-cvs-logs] SF.net SVN: scummvm: [20562] scummvm/trunk/backends/PalmOS/Src/missing
chrilith at users.sourceforge.net
chrilith at users.sourceforge.net
Sat Feb 11 10:29:05 CET 2006
Revision: 20562
Author: chrilith
Date: 2006-02-11 10:28:02 -0800 (Sat, 11 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20562&view=rev
Log Message:
-----------
- Added NVFS support
- Fixed volRefNum default value
- Get rid of MemGluePtrNew when possible
- Fixed vsprintf in ARM mode
Modified Paths:
--------------
scummvm/trunk/backends/PalmOS/Src/missing/_stdio.cpp
scummvm/trunk/backends/PalmOS/Src/missing/stdio.h
Modified: scummvm/trunk/backends/PalmOS/Src/missing/_stdio.cpp
===================================================================
--- scummvm/trunk/backends/PalmOS/Src/missing/_stdio.cpp 2006-02-11 18:24:42 UTC (rev 20561)
+++ scummvm/trunk/backends/PalmOS/Src/missing/_stdio.cpp 2006-02-11 18:28:02 UTC (rev 20562)
@@ -1,6 +1,7 @@
/* ScummVM - Scumm Interpreter
* Copyright (C) 2001 Ludvig Strigeus
* Copyright (C) 2001-2006 The ScummVM project
+ * Copyright (C) 2002-2006 Chris Apers - PalmOS Backend
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -23,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <PmPalmOSNVFS.h>
#define CACHE_SIZE 1024
enum {
@@ -35,7 +37,7 @@
static void dummy(Boolean) {};
static LedProc gStdioLedProc = dummy;
-static UInt16 gStdioVolRefNum = sysInvalidRefNum;
+static UInt16 gStdioVolRefNum = vfsInvalidVolRef;
static UInt32 gCacheSize = CACHE_SIZE;
// TODO : implement "errno"
@@ -160,7 +162,7 @@
if (cache) {
fileP->cacheSize = gCacheSize;
- if (gCacheSize) fileP->cache = (UInt8 *)MemGluePtrNew(gCacheSize);
+ if (gCacheSize) fileP->cache = (UInt8 *)malloc(gCacheSize); // was MemGluePtrNew
if (!fileP->cache) fileP->cacheSize = 0;
}
@@ -171,7 +173,7 @@
//if err (not found ?) parse each avalaible card for the specified file
if (err) {
UInt16 volRefNum;
- UInt32 volIterator = vfsIteratorStart;
+ UInt32 volIterator = vfsIteratorStart|vfsIncludePrivateVolumes;
while (volIterator != vfsIteratorStop) {
err = VFSVolumeEnumerate(&volRefNum, &volIterator);
@@ -569,7 +571,7 @@
mod++;
// prepare new format
-#if !defined(COMPILE_ZODIAC) || defined(PALMOS_68K)
+#if !defined(PALMOS_ARM)
if (*mod == 'c') {
StrCopy(tmp, "`c`%c%c");
@@ -633,7 +635,7 @@
// Copy result in a temp buffer to process last formats
StrVPrintF(result, format, argParam);
-#if !defined(COMPILE_ZODIAC) || defined(PALMOS_68K)
+#if !defined(PALMOS_ARM)
StrProcC_(result, 256);
#endif
StrProcXO(result, 256, tmp);
Modified: scummvm/trunk/backends/PalmOS/Src/missing/stdio.h
===================================================================
--- scummvm/trunk/backends/PalmOS/Src/missing/stdio.h 2006-02-11 18:24:42 UTC (rev 20561)
+++ scummvm/trunk/backends/PalmOS/Src/missing/stdio.h 2006-02-11 18:28:02 UTC (rev 20562)
@@ -1,6 +1,7 @@
/* ScummVM - Scumm Interpreter
* Copyright (C) 2001 Ludvig Strigeus
* Copyright (C) 2001-2006 The ScummVM project
+ * Copyright (C) 2002-2006 Chris Apers - PalmOS Backend
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
More information about the Scummvm-git-logs
mailing list