[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src/missing stdlib.h,1.8,1.9 string.h,1.8,1.9 time.h,1.5,1.6 unistd.h,1.6,1.7

Chris Apers chrilith at users.sourceforge.net
Sat Sep 3 10:15:32 CEST 2005


Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6719

Modified Files:
	stdlib.h string.h time.h unistd.h 
Log Message:
More ARM stuffs

Index: stdlib.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/stdlib.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- stdlib.h	1 Jan 2005 16:08:45 -0000	1.8
+++ stdlib.h	3 Sep 2005 17:14:41 -0000	1.9
@@ -1,53 +1,64 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001  Ludvig Strigeus
- * Copyright (C) 2001-2005 The ScummVM project
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef STDLIB_H
-#define STDLIB_H
-
-#include <PalmOS.h>
-#include "MemGlue.h"
-
-extern ErrJumpBuf stdlib_errJumpBuf;
-
-#define DO_EXIT( code ) \
-	if (ErrSetJump(stdlib_errJumpBuf) == 0) { code }
-	
-#define atoi				StrAToI
-#define atol				StrAToI
-#define abs(a)				((a) < 0 ? -(a) : (a))
-//#define abs					fabs
-#define	malloc(a)			MemGluePtrNew(a)
-//#define free				MemPtrFree
-//#define strtol(a,b,c)		StrAToI(a)
-#define qsort(a,b,c,d)		SysQSort((a), (b), (c), (CmpFuncPtr)(&d), 0);
-#define rand()				SysRandom(0)
-#define abort()
-#define strtoul(a,b,c)		((unsigned long)strtol(a,b,c))
-
-void	*bsearch	(const void *key, const void *base, UInt32 nmemb, UInt32 size, int (*compar)(const void *, const void *));
-MemPtr	 calloc		(UInt32 nelem, UInt32 elsize);
-void	 exit		(Int16 status);
-Err		 free		(MemPtr memP);
-MemPtr	 realloc	(MemPtr oldP, UInt32 size);
-long	 strtol		(const char *s, char **endptr, int base);
-
-#endif
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001  Ludvig Strigeus
+ * Copyright (C) 2001-2005 The ScummVM project
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef STDLIB_H
+#define STDLIB_H
+
+#include "palmversion.h"
+
+#ifdef PALMOS_68K
+#include "MemGlue.h"
+#endif
+
+#if defined(COMPILE_ZODIAC) && defined(PALMOS_ARM)
+#define MemGluePtrNew	MemPtrNew
+#endif
+
+extern ErrJumpBuf stdlib_errJumpBuf;
+
+#define DO_EXIT( code ) \
+	if (ErrSetJump(stdlib_errJumpBuf) == 0) { code }
+	
+#define atoi				StrAToI
+#define atol				StrAToI
+#define abs(a)				((a) < 0 ? -(a) : (a))
+#define	malloc(a)			MemGluePtrNew(a)
+
+#ifdef PALMOS_68K
+#define qsort(a,b,c,d)		SysQSort((a), (b), (c), (CmpFuncPtr)(&d), 0);
+#else
+typedef  int 	(*_compare_function)(const void*, const void*);
+extern "C" void qsort(void * table_base, size_t num_members, size_t member_size, _compare_function compare_members);
+#endif
+
+#define rand()				SysRandom(0)
+#define abort()
+#define strtoul(a,b,c)		((unsigned long)strtol(a,b,c))
+
+void	*bsearch	(const void *key, const void *base, UInt32 nmemb, UInt32 size, int (*compar)(const void *, const void *));
+MemPtr	 calloc		(UInt32 nelem, UInt32 elsize);
+void	 exit		(Int16 status);
+Err		 free		(MemPtr memP);
+MemPtr	 realloc	(MemPtr oldP, UInt32 size);
+long	 strtol		(const char *s, char **endptr, int base);
+
+#endif

Index: string.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/string.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- string.h	1 Jan 2005 16:08:45 -0000	1.8
+++ string.h	3 Sep 2005 17:14:41 -0000	1.9
@@ -19,8 +19,10 @@
  * $Header$
  *
  */
+#ifndef STRING_H
+#define STRING_H
 
-#include <PalmOS.h>
+#include "palmversion.h"
 
 #define memcmp			MemCmp
 #define memcpy			MemMove
@@ -38,6 +40,7 @@
 #define strncmp			StrNCompare
 #define strstr			StrStr
 
+
 void 	*memchr		(const void *s, int c, UInt32 n);
 Char 	*strtok		(Char *str, const Char *sep);
 Char 	*strrchr	(const Char *s, int c);
@@ -45,4 +48,6 @@
 Char 	*strpbrk	(const Char *s1, const Char *s2);
 UInt32	 strspn		(const char *s1, const char *s2);
 
-#define StrTok			strtok
\ No newline at end of file
+#define StrTok			strtok
+
+#endif

Index: time.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/time.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- time.h	1 Jan 2005 16:08:45 -0000	1.5
+++ time.h	3 Sep 2005 17:14:41 -0000	1.6
@@ -23,7 +23,7 @@
 #define __TIME_H__
 
 
-#include <PalmOS.h>
+#include "palmversion.h"
 
 typedef UInt32 time_t;
 

Index: unistd.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/unistd.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- unistd.h	30 Jul 2005 21:10:50 -0000	1.6
+++ unistd.h	3 Sep 2005 17:14:41 -0000	1.7
@@ -23,10 +23,10 @@
 #ifndef __UNISTD_H__
 #define __UNISTD_H__
 
-#include <PalmOS.h>
+#include "palmversion.h"
 
 extern const Char *gUnistdCWD;
 
-Char *getcwd(Char *buf, UInt32 size);
+Char *getcwd(Char *buf, UInt32 size); 
 
-#endif
\ No newline at end of file
+#endif





More information about the Scummvm-git-logs mailing list