r112 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Sep 26 12:13:14 EDT 2005


Author: tma
Date: 2005-09-26 12:13:14 -0400 (Mon, 26 Sep 2005)
New Revision: 112

Modified:
   trunk/code/qcommon/vm.c
   trunk/code/qcommon/vm_interpreted.c
   trunk/code/qcommon/vm_local.h
   trunk/code/qcommon/vm_x86.c
Log:
* Fixed some long/int warnings, hopefully this doesn't disrupt the MSVC and/or 64bit builds


Modified: trunk/code/qcommon/vm.c
===================================================================
--- trunk/code/qcommon/vm.c	2005-09-26 16:08:38 UTC (rev 111)
+++ trunk/code/qcommon/vm.c	2005-09-26 16:13:14 UTC (rev 112)
@@ -722,7 +722,7 @@
 #endif
 	} else {
 		struct {
-			int callnum;
+			long callnum;
 			int args[16];
 		} a;
 		va_list ap;
@@ -852,7 +852,7 @@
 		f = fopen("syscalls.log", "w" );
 	}
 	callnum++;
-	fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, args - (int *)currentVM->dataBase,
+	fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, (long)( args - (int *)currentVM->dataBase ),
 		args[0], args[1], args[2], args[3], args[4] );
 }
 

Modified: trunk/code/qcommon/vm_interpreted.c
===================================================================
--- trunk/code/qcommon/vm_interpreted.c	2005-09-26 16:08:38 UTC (rev 111)
+++ trunk/code/qcommon/vm_interpreted.c	2005-09-26 16:13:14 UTC (rev 112)
@@ -310,7 +310,7 @@
 
 #define	DEBUGSTR va("%s%i", VM_Indent(vm), opStack-stack )
 
-int	VM_CallInterpreted( vm_t *vm, int *args ) {
+int	VM_CallInterpreted( vm_t *vm, long *args ) {
 	int		stack[MAX_STACK];
 	int		*opStack;
 	int		programCounter;

Modified: trunk/code/qcommon/vm_local.h
===================================================================
--- trunk/code/qcommon/vm_local.h	2005-09-26 16:08:38 UTC (rev 111)
+++ trunk/code/qcommon/vm_local.h	2005-09-26 16:13:14 UTC (rev 112)
@@ -168,10 +168,10 @@
 extern	int		vm_debugLevel;
 
 void VM_Compile( vm_t *vm, vmHeader_t *header );
-int	VM_CallCompiled( vm_t *vm, int *args );
+int	VM_CallCompiled( vm_t *vm, long *args );
 
 void VM_PrepareInterpreter( vm_t *vm, vmHeader_t *header );
-int	VM_CallInterpreted( vm_t *vm, int *args );
+int	VM_CallInterpreted( vm_t *vm, long *args );
 
 vmSymbol_t *VM_ValueToFunctionSymbol( vm_t *vm, int value );
 int VM_SymbolToValue( vm_t *vm, const char *symbol );

Modified: trunk/code/qcommon/vm_x86.c
===================================================================
--- trunk/code/qcommon/vm_x86.c	2005-09-26 16:08:38 UTC (rev 111)
+++ trunk/code/qcommon/vm_x86.c	2005-09-26 16:13:14 UTC (rev 112)
@@ -81,7 +81,7 @@
 
 void doAsmCall( void );
 static	int		asmCallPtr = (int)doAsmCall;
-#endif // !_WIN32
+#endif
 
 
 static	int		callMask = 0; // bk001213 - init
@@ -192,13 +192,13 @@
 	currentVM->programStack = callProgramStack - 4;
 	*(int *)((byte *)currentVM->dataBase + callProgramStack + 4) = callSyscallNum;
 	//VM_LogSyscalls((int *)((byte *)currentVM->dataBase + callProgramStack + 4) );
-	*(callOpStack2+1) = currentVM->systemCall( (int *)((byte *)currentVM->dataBase + callProgramStack + 4) );
+	*(callOpStack2+1) = currentVM->systemCall( (long *)((byte *)currentVM->dataBase + callProgramStack + 4) );
 
  	currentVM = savedVM;
 }
 
 // Note the C space function AsmCall is never actually called, and is in fact
-// arbitarily named (though this is not true for the MSC version).  When a vm
+// arbitrarily named (though this is not true for the MSC version).  When a vm
 // makes a system call, control jumps straight to the doAsmCall label.
 void AsmCall( void ) {
 	asm( CMANG(doAsmCall) ":				\n\t" \
@@ -1101,7 +1101,7 @@
 ==============
 */
 #ifndef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
-int	VM_CallCompiled( vm_t *vm, int *args ) {
+int	VM_CallCompiled( vm_t *vm, long *args ) {
 	int		stack[1024];
 	int		programCounter;
 	int		programStack;




More information about the quake3-commits mailing list