As this is C project, rename all source file to .c

This commit is contained in:
Godzil
2021-04-05 00:18:55 +01:00
parent 864fda651d
commit d45822951f
14 changed files with 9 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
set(SOURCES audio.cpp emulate.cpp gpu.cpp io.cpp log.cpp memory.cpp rom.cpp ws.cpp)
set(SOURCES audio.c emulate.c gpu.c io.c log.c memory.c rom.c ws.c)
set(HEADERS audio.h emulate.h gpu.h ieeprom.h initialIo.h io.h log.h memory.h rom.h ws.h)
add_library(wswan ${SOURCES} ${HEADERS})

View File

@@ -471,8 +471,8 @@ unsigned int ws_audio_mrand(unsigned int Degree)
{0,0,0},
};
static POLYNOMIAL *pTbl=TblMask;
static int ShiftReg=pTbl->InputBit-1;
static POLYNOMIAL *pTbl = TblMask;
static int ShiftReg = 1;
int XorReg=0;
int Masked;

View File

@@ -28,6 +28,7 @@
#include "gpu.h"
#include "audio.h"
#include "memory.h"
#include <stdbool.h>
//#define IO_DUMP

View File

@@ -28,6 +28,7 @@
#include "gpu.h"
#include "audio.h"
#include "memory.h"
#include <stdbool.h>
////////////////////////////////////////////////////////////////////////////////
//

View File

@@ -1,4 +1,4 @@
set(SOURCES nec.cpp)
set(SOURCES nec.c)
set(HEADERS nec.h necea.h necinstr.h necintrf.h necmodrm.h)
add_library(nec_v30 ${SOURCES} ${HEADERS})

View File

@@ -425,11 +425,9 @@ int ws_saveState(char *statepath)
{
uint16_t crc=memory_getRomCrc();
uint32_t value;
char *newPath;
char newPath[1024];
fprintf(log_get(),"saving %s\n",statepath);
newPath=new char[1024];
if (strlen(statepath)<4)
{
sprintf(newPath,"%s.wss",statepath);
@@ -461,7 +459,6 @@ int ws_saveState(char *statepath)
}
int fp=open(newPath, O_RDWR|O_CREAT, 0644);
delete newPath;
if (fp==-1)
{