diff --git a/driver.h b/driver.h index 5209f8d3..c724ed99 100644 --- a/driver.h +++ b/driver.h @@ -7,10 +7,6 @@ #include "git.h" FILE *FCEUD_UTF8fopen(const char *fn, const char *mode); -#ifdef __cplusplus -extern "C" -#endif -FILE *FCEUI_UTF8fopen_C(const char *fn, const char *mode); //mbg 7/23/06 diff --git a/drivers/pc/Makefile.am.inc b/drivers/pc/Makefile.am.inc index 06f2b052..dee23586 100644 --- a/drivers/pc/Makefile.am.inc +++ b/drivers/pc/Makefile.am.inc @@ -1,5 +1,4 @@ -fceud_SOURCES = drivers/pc/input.cpp drivers/pc/main.cpp drivers/pc/sdl.cpp drivers/pc/sdl-joystick.cpp drivers/pc/sdl-sound.cpp drivers/pc/sdl-throttle.cpp drivers/pc/sdl-video.cpp -#fceud_SOURCES += drivers/pc/unix-netplay.cpp +fceud_SOURCES = drivers/pc/input.cpp drivers/pc/main.cpp drivers/pc/sdl.cpp drivers/pc/sdl-joystick.cpp drivers/pc/sdl-sound.cpp drivers/pc/sdl-throttle.cpp drivers/pc/sdl-video.cpp drivers/pc/unix-netplay.cpp if OPENGL TMP_OGL = drivers/pc/sdl-opengl.cpp diff --git a/drivers/pc/dface.h b/drivers/pc/dface.h index 9981bd08..d51374e4 100644 --- a/drivers/pc/dface.h +++ b/drivers/pc/dface.h @@ -1,6 +1,3 @@ -#ifdef __cplusplus -extern "C" { -#endif #include "../common/args.h" #include "../common/config.h" @@ -65,8 +62,5 @@ void Giggles(int); void DoFun(void); int FCEUD_NetworkConnect(void); -#ifdef __cplusplus -} -#endif diff --git a/drivers/pc/main.cpp b/drivers/pc/main.cpp index cc5a64ef..15b13b11 100644 --- a/drivers/pc/main.cpp +++ b/drivers/pc/main.cpp @@ -548,3 +548,14 @@ FILE *FCEUD_UTF8fopen(const char *fn, const char *mode) return(fopen(fn,mode)); } +static char s_linuxCompilerString[4] = "g++"; +char *FCEUD_GetCompilerString() { + return (char *)s_linuxCompilerString; +} + +void FCEUD_DebugBreakpoint() { + return; +} +void FCEUD_TraceInstruction() { + return; +} diff --git a/drivers/pc/main.h b/drivers/pc/main.h index 505eaf04..dd70f30f 100644 --- a/drivers/pc/main.h +++ b/drivers/pc/main.h @@ -18,10 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __cplusplus -extern "C" { -#endif - #include "../../driver.h" #include "../common/config.h" #include "../common/args.h" @@ -49,7 +45,3 @@ extern long soundbufsize; int CLImain(int argc, char *argv[]); -#ifdef __cplusplus -} -#endif - diff --git a/drivers/pc/unix-netplay.cpp b/drivers/pc/unix-netplay.cpp index 5bef56e2..d13228da 100644 --- a/drivers/pc/unix-netplay.cpp +++ b/drivers/pc/unix-netplay.cpp @@ -138,7 +138,7 @@ int FCEUD_NetworkConnect(void) uint32 sblen; sblen = 4 + 16 + 16 + 64 + 1 + (netplaynick?strlen(netplaynick):0); - sendbuf = malloc(sblen); + sendbuf = (uint8 *)malloc(sblen); memset(sendbuf, 0, sblen); en32(sendbuf, sblen - 4); @@ -150,7 +150,7 @@ int FCEUD_NetworkConnect(void) md5_starts(&md5); md5_update(&md5, CurGame->MD5, 16); - md5_update(&md5, netgamekey, strlen(netgamekey)); + md5_update(&md5, (uint8 *)netgamekey, strlen(netgamekey)); md5_finish(&md5, md5out); memcpy(sendbuf + 4, md5out, 16); } @@ -163,7 +163,7 @@ int FCEUD_NetworkConnect(void) uint8 md5out[16]; md5_starts(&md5); - md5_update(&md5, netpassword, strlen(netpassword)); + md5_update(&md5, (uint8 *)netpassword, strlen(netpassword)); md5_finish(&md5, md5out); memcpy(sendbuf + 4 + 16, md5out, 16); } @@ -201,7 +201,7 @@ int FCEUD_SendData(void *data, uint32 len) fgets(buf,1024,stdin); if((f=strrchr(buf,'\n'))) *f=0; - FCEUI_NetplayText(buf); + FCEUI_NetplayText((uint8 *)buf); } send(Socket, data, len ,0); return(1); @@ -275,9 +275,9 @@ void FCEUD_NetworkClose(void) void FCEUD_NetplayText(uint8 *text) { - char *tot = malloc(strlen(text) + 1); + char *tot = (char *)malloc(strlen((const char *)text) + 1); char *tmp; - strcpy(tot, text); + strcpy(tot, (const char *)text); tmp = tot; while(*tmp) diff --git a/input/Makefile.am.inc b/input/Makefile.am.inc index de6b3d3c..761ea208 100755 --- a/input/Makefile.am.inc +++ b/input/Makefile.am.inc @@ -1 +1 @@ -fceu_SOURCES += input/cursor.cpp input/zapper.cpp input/powerpad.cpp input/arkanoid.cpp input/shadow.cpp input/fkb.cpp input/fkb.h input/hypershot.cpp input/mahjong.cpp input/oekakids.cpp input/ftrainer.cpp input/quiz.cpp input/toprider.cpp input/bworld.cpp +fceu_SOURCES += input/cursor.cpp input/zapper.cpp input/powerpad.cpp input/arkanoid.cpp input/shadow.cpp input/fkb.cpp input/fkb.h input/hypershot.cpp input/mahjong.cpp input/oekakids.cpp input/ftrainer.cpp input/quiz.cpp input/toprider.cpp input/bworld.cpp input/suborkb.cpp