changeset 1568:8a4fbe599b05

sexypsf: clean up symbol namespace
author William Pitcock <nenolod@atheme.org>
date Sun, 02 Sep 2007 21:55:07 -0500
parents 8c705c0bafcd
children 25ea2127eefa
files src/sexypsf/PsxCounters.c src/sexypsf/PsxCounters.h src/sexypsf/PsxMem.c src/sexypsf/PsxMem.h src/sexypsf/R3000A.c src/sexypsf/R3000A.h
diffstat 6 files changed, 25 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/sexypsf/PsxCounters.c	Mon Sep 03 01:02:31 2007 +0200
+++ b/src/sexypsf/PsxCounters.c	Sun Sep 02 21:55:07 2007 -0500
@@ -20,6 +20,10 @@
 
 #include "PsxCommon.h"
 
+psxCounter psxCounters[5];
+
+u32 psxNextCounter, psxNextsCounter;
+
 static int cnts = 4;
 static u32 last=0;
 
--- a/src/sexypsf/PsxCounters.h	Mon Sep 03 01:02:31 2007 +0200
+++ b/src/sexypsf/PsxCounters.h	Sun Sep 02 21:55:07 2007 -0500
@@ -24,9 +24,9 @@
 	u32 sCycle, Cycle, rate, interrupt;
 } psxCounter;
 
-psxCounter psxCounters[5];
+extern psxCounter psxCounters[5];
 
-u32 psxNextCounter, psxNextsCounter;
+extern u32 psxNextCounter, psxNextsCounter;
 
 void psxRcntInit();
 void psxRcntUpdate();
--- a/src/sexypsf/PsxMem.c	Mon Sep 03 01:02:31 2007 +0200
+++ b/src/sexypsf/PsxMem.c	Sun Sep 02 21:55:07 2007 -0500
@@ -21,6 +21,15 @@
 
 #include "PsxCommon.h"
 
+char *psxM;
+  
+char *psxP;
+char *psxR;
+   
+char *psxH;
+
+char **psxMemLUT;
+
 void LoadPSXMem(u32 address, s32 length, unsigned char *data)
 {
  //printf("%08x %08x\n",address,length);
--- a/src/sexypsf/PsxMem.h	Mon Sep 03 01:02:31 2007 +0200
+++ b/src/sexypsf/PsxMem.h	Sun Sep 02 21:55:07 2007 -0500
@@ -49,21 +49,21 @@
 static INLINE s16 BFLIP16S(s16 x)
 { return (s16)BFLIP16((u16)x); }
 
-char *psxM;
+extern char *psxM;
 #define psxMu32(mem)	(*(u32*)&psxM[(mem) & 0x1fffff])
 
-char *psxP;
-char *psxR;
+extern char *psxP;
+extern char *psxR;
 #define psxRu32(mem)	(*(u32*)&psxR[(mem) & 0x7ffff])
 
-char *psxH;
+extern char *psxH;
 
 #define psxHu8(mem)	(*(u8*) &psxH[(mem) & 0xffff])
 
 #define psxHu16(mem)   	(*(u16*)&psxH[(mem) & 0xffff])
 #define psxHu32(mem)   	(*(u32*)&psxH[(mem) & 0xffff])
 
-char **psxMemLUT;
+extern char **psxMemLUT;
 
 #define PSXM(mem)		(psxMemLUT[(mem) >> 16] == 0 ? NULL : (void*)(psxMemLUT[(mem) >> 16] + ((mem) & 0xffff)))
 
--- a/src/sexypsf/R3000A.c	Mon Sep 03 01:02:31 2007 +0200
+++ b/src/sexypsf/R3000A.c	Sun Sep 02 21:55:07 2007 -0500
@@ -22,6 +22,9 @@
 
 #include "PsxCommon.h"
 
+psxRegisters psxRegs;
+R3000Acpu *psxCpu;
+
 int psxInit() {
 
 	psxCpu = &psxInt;
--- a/src/sexypsf/R3000A.h	Mon Sep 03 01:02:31 2007 +0200
+++ b/src/sexypsf/R3000A.h	Sun Sep 02 21:55:07 2007 -0500
@@ -32,7 +32,7 @@
 	void (*Shutdown)();
 } R3000Acpu;
 
-R3000Acpu *psxCpu;
+extern R3000Acpu *psxCpu;
 extern R3000Acpu psxInt;
 
 typedef union {
@@ -68,7 +68,7 @@
 	u32 interrupt;
 } psxRegisters;
 
-psxRegisters psxRegs;
+extern psxRegisters psxRegs;
 
 #define _i32(x) (s32)x
 #define _u32(x) (u32)x