[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src/missing _stdio.cpp,1.13,1.14 _stdlib.cpp,1.10,1.11 _string.cpp,1.7,1.8 _time.cpp,1.6,1.7 _unistd.cpp,1.6,1.7 memory.h,1.3,1.4 stdio.h,1.7,1.8 unistd.h,1.5,1.6

Eugene Sandulenko sev at users.sourceforge.net
Sat Jul 30 14:15:04 CEST 2005


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

Modified Files:
	_stdio.cpp _stdlib.cpp _string.cpp _time.cpp _unistd.cpp 
	memory.h stdio.h unistd.h 
Log Message:
Remove trailing whitespaces.


Index: _stdio.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/_stdio.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- _stdio.cpp	13 Apr 2005 18:36:54 -0000	1.13
+++ _stdio.cpp	30 Jul 2005 21:10:49 -0000	1.14
@@ -31,12 +31,12 @@
 
 void StdioInit(UInt16 volRefNum, const Char *output, LedProc ledProc) {
 	gStdioVolRefNum = volRefNum;
-	
+
 	if (ledProc)
 		gStdioLedProc = ledProc;
 	else
 		gStdioLedProc = dummy;
-		
+
 	VFSFileDelete(gStdioVolRefNum, output);
 	VFSFileCreate(gStdioVolRefNum, output);
 	VFSFileOpen  (gStdioVolRefNum, output,vfsModeWrite, &gStdioOutput);
@@ -48,7 +48,7 @@
 
 UInt16 fclose(FileRef *stream) {
 	Err error = VFSFileClose(*stream);
-	
+
 	if (error == errNone)
 		MemPtrFree(stream);
 
@@ -89,7 +89,7 @@
 	UInt32 numBytesRead;
 	Err e;
 	Char c;
-	
+
 	e = VFSFileRead(*stream, 1, &c, &numBytesRead);
 	return (int)(!e ? c : EOF);
 }
@@ -102,14 +102,14 @@
 	if (error == errNone || error == vfsErrFileEOF) {
 		UInt32 reset = 0;
 		Char *endLine = StrChr(s, '\n');
-		
+
 		if (endLine >= s) {
 			reset = (endLine - s);
 			s[reset] = 0;
 			reset = numBytesRead - (reset + 1);
 			VFSFileSeek(*stream, vfsOriginCurrent, -reset);
 		}
-	
+
 		return s;
 	}
 #ifdef _DEBUG_STDIO
@@ -143,7 +143,7 @@
 	Err err;
 	UInt16 openMode;
 	FileRef *fileRefP = (FileRef *)MemPtrNew(sizeof(FileRef *));
-	
+
 	if (StrCompare(type,"r")==0)
 		openMode = vfsModeRead;
 	else if (StrCompare(type,"rb")==0)
@@ -280,7 +280,7 @@
 	e = VFSFileTell(*stream,&filePos);
 	if (e != errNone)
 		return e;
-	
+
 	return filePos;
 }
 
@@ -323,7 +323,7 @@
 	va_start(va, formatStr);
 	count = vsprintf(s, formatStr, va);
 	va_end(va);
-	
+
 	return count;
 }
 
@@ -335,7 +335,7 @@
 	va_start(va, formatStr);
 	count = vsprintf(s, formatStr, va);
 	va_end(va);
-	
+
 	return count;
 }
 
@@ -354,11 +354,11 @@
 	Char o;
 	Int16 c, n = 0;
 	Int32 div, mod;
-	
+
 	do {
 		div = i / b;
 		mod = i % b;
-		
+
 		s[n++]	= *(conv + mod);
 		i		= div;
 
@@ -384,7 +384,7 @@
 static void StrProcC_(Char *ioStr, UInt16 maxLen) {
 	Char *found;
 	Int16 length;
-	
+
 	while (found = StrStr(ioStr, "`c`")) {
 		if (found[3] == 0) { 						// if next char is NULL
 			length = maxLen - (found - ioStr + 2);
@@ -398,10 +398,10 @@
 	Char *found, *last, mod, fill;
 	Int16 len, count, next;
 	Int32 val;
-		
+
 	while (found = StrChr(ioStr, '`')) {
 		last = StrChr(found + 1, '`');
-		
+
 		if (!last)
 			return;
 
@@ -417,7 +417,7 @@
 		// x and X always 8char on palmos ... o set to 8char (not supported on palmos)
 		while (found[next] == '0' || found[next] == ' ')	// WARNING : reduce size only (TODO ?)
 			next++;
-		
+
 		// convert to base 8
 		if (mod == 'o') {
 			StrNCopy(tmp, found + next, 8 - next);
@@ -434,7 +434,7 @@
 
 		if ((8 - next) > count)
 			count = 8 - next;
-			
+
 		if (count == 0)
 			count = 1;
 
@@ -455,12 +455,12 @@
 
 Int32 vsprintf(Char* s, const Char* formatStr, _Palm_va_list argParam) {
 	Char format[256], result[256], tmp[32];
-	
+
 	Char *found, *mod, *num;
 	UInt32 next;
 	Boolean zero;
 	Int16 count, len;
-	
+
 	MemSet(format, sizeof(format), 'x');
 	MemSet(result, sizeof(result), 'y');
 	MemSet(tmp, sizeof(tmp), 'z');
@@ -470,7 +470,7 @@
 
 	while (found = StrChr(format + next, '%')) {
 		mod = found + 1;
-		
+
 		if (*mod == '%') {			// just a % ?
 			mod++;
 
@@ -479,7 +479,7 @@
 				*mod == '-' ||
 				*mod == ' '	)		// skip
 				mod++;
-			
+
 			if (*mod == '0' ||
 				*mod == '.' ) {
 				*mod++ = '0';
@@ -487,12 +487,12 @@
 			} else {
 				zero = false;
 			}
-			
+
 			num = mod;
 			while (	*mod >= '0' &&
 					*mod <= '9'	)	// search format char
 				mod++;
-			
+
 			// get the numeric value
 			if (num < mod) {
 				StrNCopy(tmp, num, mod - num);
@@ -514,19 +514,19 @@
 
 			} else {
 				len = 0;
-	
+
 				switch (*mod) {
 					case 'x':
 					case 'X':
 					case 'o':
 						tmp[0] = '`';
 						tmp[1] = (zero) ? '0' : ' ';
-						tmp[2] = *mod;	
+						tmp[2] = *mod;
 						StrIToA(tmp + 3, count);
 						len += StrLen(tmp);
 						tmp[len++] = '`';
 						tmp[len] = 0;
-						
+
 						if (*mod == 'o') {	// set as base 10 num and convert later
 							*mod = 'd';
 							count = 8;		// force 8char
@@ -534,7 +534,7 @@
 
 						break;
 				}
-					
+
 				StrNCopy(tmp + len, found, (num - found));
 				len += (num - found);
 
@@ -542,12 +542,12 @@
 					StrIToA(tmp + len, count);
 					len += StrLen(tmp + len);
 				}
-				
+
 				if (*mod == 'd' ||
 					*mod == 'i' ||
 					*mod == 'x' ||
 					*mod == 'X' ||
-					*mod == 'u' 
+					*mod == 'u'
 					) {
 					tmp[len++] = 'l';
 				}
@@ -561,15 +561,15 @@
 			StrNCopy(found, tmp, StrLen(tmp));
 			mod = found + StrLen(tmp);
 		}
-		
+
 		next = (mod - format);
 	}
-	
+
 	// Copy result in a temp buffer to process last formats
 	StrVPrintF(result, format, argParam);
 	StrProcC_(result, 256);
 	StrProcXO(result, 256, tmp);
 	StrCopy(s, result);
-	
+
 	return StrLen(s);
 }

Index: _stdlib.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/_stdlib.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- _stdlib.cpp	1 Jan 2005 16:08:45 -0000	1.10
+++ _stdlib.cpp	30 Jul 2005 21:10:50 -0000	1.11
@@ -24,21 +24,21 @@
 
 void *bsearch(const void *key, const void *base, UInt32 nmemb, UInt32 size, int (*compar)(const void *, const void *)) {
 	Int32 position;
-	
+
 	if (SysBinarySearch(base, nmemb, size, (SearchFuncPtr)compar, key, 0, &position, true))
 		return (void *)((UInt32)base + size * position);
-	
+
 	return NULL;
 }
 
 long strtol(const char *s, char **endptr, int base) {
 	// WARNING : only base = 10 supported
 	long val = StrAToI(s);
-	
+
 	if (endptr) {
 		Char str[maxStrIToALen];
 		StrIToA(str, val);
-		
+
 		if (StrNCompare(s, str, StrLen(str)) == 0)
 			*endptr = (char *)s + StrLen(str);
 	}
@@ -65,18 +65,18 @@
 }
 
 MemPtr realloc(MemPtr oldP, UInt32 size) {
-	
+
 	if (oldP != NULL)
 		if (MemPtrResize(oldP,size) == 0)
 			return oldP;
 
 	MemPtr	newP = MemPtrNew(size);
-	
+
 	if (oldP!=NULL)
 	{
 		MemMove(newP,oldP,MemPtrSize(oldP));
 		MemPtrFree(oldP);
-	}	
+	}
 	return newP;
 }
 

Index: _string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/_string.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- _string.cpp	1 Jan 2005 16:08:45 -0000	1.7
+++ _string.cpp	30 Jul 2005 21:10:50 -0000	1.8
@@ -27,14 +27,14 @@
 	for(chr = 0; chr < n;chr++,((UInt8 *)s)++)
 		if ( *((UInt8 *)s) == c)
 			return (void *)s;
-	
+
 	return NULL;
 }
 
 UInt32 strspn(const char *s1, const char *s2) {
 	UInt32 chr = 0;
 
-	while (	chr < strlen(s1) && 
+	while (	chr < strlen(s1) &&
 			strchr(s2, s1[chr]) )
 		chr++;
 
@@ -88,13 +88,13 @@
 Char *strpbrk(const Char *s1, const Char *s2) {
 	Char *found;
 	UInt32 n;
-	
+
 	for (n=0; n <= StrLen(s2); n++) {
 		found = StrChr(s1, s2[n]);
 		if (found)
 			return found;
 	}
-	
+
 	return NULL;
 }
 
@@ -107,7 +107,7 @@
 			return (Char *)(s+chr);
 
 	return NULL;
-} 
+}
 
 Char *strdup(const Char *s1) {
 	Char* buf = (Char *)MemPtrNew(StrLen(s1)+1);

Index: _time.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/_time.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- _time.cpp	1 Jan 2005 16:08:45 -0000	1.6
+++ _time.cpp	30 Jul 2005 21:10:50 -0000	1.7
@@ -29,10 +29,10 @@
 	DateTimeType Epoch = {1, 0, 0, 1, 1, 1970, 0};	// form 1/1/1904 12AM to 1/1/1970 12AM
 
 	secs -= TimDateTimeToSeconds (&Epoch);
-	
+
 	if (tloc)
 		*tloc = secs;
-	
+
 	return (secs);
 }
 
@@ -47,7 +47,7 @@
 	secs += TimDateTimeToSeconds(&Epoch);
 
 	TimSecondsToDateTime (secs, &dt);
-	
+
 	tmDate.tm_sec	= dt.second;
 	tmDate.tm_min	= dt.minute;
 	tmDate.tm_hour	= dt.hour;
@@ -55,6 +55,6 @@
 	tmDate.tm_mon	= dt.month - 1;
 	tmDate.tm_year	= dt.year - 1900;
 	tmDate.tm_wday	= dt.weekDay;
-	
+
 	return &tmDate;
 }

Index: _unistd.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/_unistd.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- _unistd.cpp	1 Jan 2005 16:08:45 -0000	1.6
+++ _unistd.cpp	30 Jul 2005 21:10:50 -0000	1.7
@@ -27,7 +27,7 @@
 // currently used only to retreive savepath
 Char *getcwd(Char *buf, UInt32 size) {
 	Char *copy = buf;
-	
+
 	if (gUnistdCWD) {
 		if (!copy)
 			copy = (Char *)MemPtrNew(StrLen(gUnistdCWD)); // this may never occured

Index: memory.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/memory.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- memory.h	1 Jan 2005 16:08:45 -0000	1.3
+++ memory.h	30 Jul 2005 21:10:50 -0000	1.4
@@ -19,5 +19,5 @@
  * $Header$
  *
  */
- 
+
  #include "string.h"
\ No newline at end of file

Index: stdio.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/stdio.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- stdio.h	1 Jan 2005 16:08:45 -0000	1.7
+++ stdio.h	30 Jul 2005 21:10:50 -0000	1.8
@@ -43,8 +43,8 @@
 #define vsnprintf(a,b,c,d)	vsprintf(a,c,d)
 #define getc(a)				fgetc(a)
 
-#define	SEEK_SET			vfsOriginBeginning 
-#define	SEEK_CUR			vfsOriginCurrent  
+#define	SEEK_SET			vfsOriginBeginning
+#define	SEEK_CUR			vfsOriginCurrent
 #define	SEEK_END			vfsOriginEnd
 
 UInt16		fclose	(FileRef *stream);

Index: unistd.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/missing/unistd.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- unistd.h	1 Jan 2005 16:08:45 -0000	1.5
+++ unistd.h	30 Jul 2005 21:10:50 -0000	1.6
@@ -27,6 +27,6 @@
 
 extern const Char *gUnistdCWD;
 
-Char *getcwd(Char *buf, UInt32 size); 
+Char *getcwd(Char *buf, UInt32 size);
 
 #endif
\ No newline at end of file





More information about the Scummvm-git-logs mailing list