aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorChris Apers2006-02-11 18:28:02 +0000
committerChris Apers2006-02-11 18:28:02 +0000
commit5638fae43908228bf5388ab60e8e76c48d6dea4e (patch)
treec0e31428d631b4fc57436b54d90ca59d5a63d068 /backends
parent9b1d8dc1149ba344e88da06f70f945ee35562e23 (diff)
downloadscummvm-rg350-5638fae43908228bf5388ab60e8e76c48d6dea4e.tar.gz
scummvm-rg350-5638fae43908228bf5388ab60e8e76c48d6dea4e.tar.bz2
scummvm-rg350-5638fae43908228bf5388ab60e8e76c48d6dea4e.zip
- Added NVFS support
- Fixed volRefNum default value - Get rid of MemGluePtrNew when possible - Fixed vsprintf in ARM mode svn-id: r20562
Diffstat (limited to 'backends')
-rw-r--r--backends/PalmOS/Src/missing/_stdio.cpp12
-rw-r--r--backends/PalmOS/Src/missing/stdio.h1
2 files changed, 8 insertions, 5 deletions
diff --git a/backends/PalmOS/Src/missing/_stdio.cpp b/backends/PalmOS/Src/missing/_stdio.cpp
index 61bda02ae1..127689524d 100644
--- a/backends/PalmOS/Src/missing/_stdio.cpp
+++ b/backends/PalmOS/Src/missing/_stdio.cpp
@@ -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 @@ FILE gStdioOutput = {0,0,0,0,0,0};
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 @@ FILE *fopen(const Char *filename, const Char *type) { // DONE
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 @@ FILE *fopen(const Char *filename, const Char *type) { // DONE
//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 @@ Int32 vsprintf(Char* s, const Char* formatStr, _Palm_va_list argParam) {
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 @@ Int32 vsprintf(Char* s, const Char* formatStr, _Palm_va_list argParam) {
// 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);
diff --git a/backends/PalmOS/Src/missing/stdio.h b/backends/PalmOS/Src/missing/stdio.h
index 2f98ac6e7b..ca77f1d022 100644
--- a/backends/PalmOS/Src/missing/stdio.h
+++ b/backends/PalmOS/Src/missing/stdio.h
@@ -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