aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/missing/ext_stdio.c
diff options
context:
space:
mode:
authorChris Apers2006-06-03 11:00:15 +0000
committerChris Apers2006-06-03 11:00:15 +0000
commit0d51dc4b228c6a48e81b5b9a16a9a25605864408 (patch)
tree1ed4cd35f9f62bf8d0cec46057395494626cf0d4 /backends/PalmOS/Src/missing/ext_stdio.c
parentca84620745a134b58fb0cb102be2f50c41ca45c8 (diff)
downloadscummvm-rg350-0d51dc4b228c6a48e81b5b9a16a9a25605864408.tar.gz
scummvm-rg350-0d51dc4b228c6a48e81b5b9a16a9a25605864408.tar.bz2
scummvm-rg350-0d51dc4b228c6a48e81b5b9a16a9a25605864408.zip
Don't reinvent the wheel, use MSL functions when available for better compatibility and smaller code size
svn-id: r22862
Diffstat (limited to 'backends/PalmOS/Src/missing/ext_stdio.c')
-rw-r--r--backends/PalmOS/Src/missing/ext_stdio.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/backends/PalmOS/Src/missing/ext_stdio.c b/backends/PalmOS/Src/missing/ext_stdio.c
index c973e64552..f7d37a9140 100644
--- a/backends/PalmOS/Src/missing/ext_stdio.c
+++ b/backends/PalmOS/Src/missing/ext_stdio.c
@@ -381,6 +381,9 @@ Int32 printf(const Char *format, ...) { // DONE
return numBytesWritten;
}
+/* needed with 68k mode only, already defined in ARM MSL */
+#ifdef PALMOS_68K
+
Int32 sprintf(Char* s, const Char* formatStr, ...) {
Int16 count;
va_list va;
@@ -571,12 +574,12 @@ Int32 vsprintf(Char* s, const Char* formatStr, _Palm_va_list argParam) {
mod++;
// prepare new format
-#if !defined(PALMOS_ARM)
+//#if !defined(PALMOS_ARM)
if (*mod == 'c') {
StrCopy(tmp, "`c`%c%c");
} else
-#endif
+//#endif
if (*mod == 'p') {
StrCopy(tmp, "%08lX"); // %x = %08X in palmos
@@ -635,11 +638,13 @@ 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(PALMOS_ARM)
+//#if !defined(PALMOS_ARM)
StrProcC_(result, 256);
-#endif
+//#endif
StrProcXO(result, 256, tmp);
StrCopy(s, result);
return StrLen(s);
}
+
+#endif