Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Emulators:Oldies
arnold
arnold-codecleanup.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File arnold-codecleanup.diff of Package arnold
--- src/cpc/audioevent.c +++ src/cpc/audioevent.c @@ -821,7 +821,7 @@ } } - pAudioPtr = (char *)AudioEvent_UpdateCycle(pAudioPtr); + pAudioPtr = (unsigned char *)AudioEvent_UpdateCycle((char *)pAudioPtr); NopCount.FixedPoint.L += NopsPerSampleScaled.FixedPoint.L; } --- src/cpc/debugger/debug.h +++ src/cpc/debugger/debug.h @@ -21,6 +21,7 @@ #define __DEBUG_HEADER_INCLUDED__ #include <stdio.h> +#include <stdint.h> #include "../cpcglob.h" typedef struct DEBUG_STRUCT @@ -30,7 +31,7 @@ int Level; } DEBUG_STRUCT; -typedef int DEBUG_HANDLE; +typedef intptr_t DEBUG_HANDLE; void Debug_Enable(DEBUG_HANDLE,int); --- src/cpc/debugger/gdebug.c +++ src/cpc/debugger/gdebug.c @@ -105,7 +105,7 @@ /*------------------------------------------*/ /* Z80 Dissassembler */ /* (smaller program because of less tables) */ -const unsigned char *RegA[]= +const char *RegA[]= { "B", "C", @@ -120,7 +120,7 @@ }; -const unsigned char *RegB[]= +const char *RegB[]= { "BC", "DE", @@ -128,7 +128,7 @@ "SP" }; -const unsigned char *RegC[]= +const char *RegC[]= { "BC", "DE", @@ -136,7 +136,7 @@ "AF" }; -const unsigned char *CB_ShiftMneumonics[]= +const char *CB_ShiftMneumonics[]= { "RLC", "RRC", @@ -148,14 +148,14 @@ "SRL" }; -const unsigned char *CB_BitOperationMneumonics[]= +const char *CB_BitOperationMneumonics[]= { "BIT", "RES", "SET" }; -const unsigned char *ArithmeticMneumonics[]= +const char *ArithmeticMneumonics[]= { "ADD", "ADC", @@ -167,7 +167,7 @@ "CP" }; -const unsigned char *ConditionCodes[]= +const char *ConditionCodes[]= { "NZ", "Z", @@ -179,7 +179,7 @@ "M" }; -const unsigned char *ShiftMneumonics[]= +const char *ShiftMneumonics[]= { "RLCA", "RRCA", @@ -187,7 +187,7 @@ "RRA" }; -const unsigned char *MiscMneumonics1[]= +const char *MiscMneumonics1[]= { "DAA", "CPL", @@ -195,7 +195,7 @@ "CCF" }; -const unsigned char *MiscMneumonics2[]= +const char *MiscMneumonics2[]= { "NOP", "EX AF, AF", @@ -203,7 +203,7 @@ "JR" }; -const unsigned char *MiscMneumonics3[]= +const char *MiscMneumonics3[]= { "RET", "EXX", @@ -211,7 +211,7 @@ "LD SP,HL" }; -const unsigned char *MiscMneumonics4[]= +const char *MiscMneumonics4[]= { "LD I,A", "LD R,A", @@ -223,7 +223,7 @@ "ED NOP" }; -const unsigned char *MiscMneumonics5[]= +const char *MiscMneumonics5[]= { "LDI", "LDD", @@ -231,7 +231,7 @@ "LDDR" }; -const unsigned char *MiscMneumonics6[]= +const char *MiscMneumonics6[]= { "CPI", "CPDR", @@ -239,7 +239,7 @@ "CPD" }; -const unsigned char *MiscMneumonics7[]= +const char *MiscMneumonics7[]= { "INI", "INIR", @@ -247,7 +247,7 @@ "INDR" }; -const unsigned char *MiscMneumonics8[]= +const char *MiscMneumonics8[]= { "OUTI", "OTIR", @@ -255,7 +255,7 @@ "OTDR" }; -const unsigned char *MiscMneumonics9[]= +const char *MiscMneumonics9[]= { "EX (SP),HL", "EX DE,HL", --- src/cpc/diskimage/dsk.c +++ src/cpc/diskimage/dsk.c @@ -66,7 +66,7 @@ { /* correct size image */ int i; - DSKTRACKHEADER *pTrack = (DSKTRACKHEADER *)((int)pHeader + sizeof(DSKHEADER)); + DSKTRACKHEADER *pTrack = (DSKTRACKHEADER *)((unsigned long)pHeader + sizeof(DSKHEADER)); for (i=0; i<TotalTracks; i++) { @@ -85,7 +85,7 @@ if (thisTrackSize>TrackSize) break; - pTrack = (DSKTRACKHEADER *)((int)pTrack + TrackSize); + pTrack = (DSKTRACKHEADER *)((unsigned long)pTrack + TrackSize); } if (i==TotalTracks) --- src/cpc/diskimage/extdsk.c +++ src/cpc/diskimage/extdsk.c @@ -92,7 +92,7 @@ thisTrackSize = 0; - pTrack = (EXTDSKTRACKHEADER *)((int)pHeader + CurrentSize + sizeof(EXTDSKTRACKHEADER)); + pTrack = (EXTDSKTRACKHEADER *)((unsigned long)pHeader + CurrentSize + sizeof(EXTDSKTRACKHEADER)); /* check track header text is present */ if (memcmp(pTrack->TrackHeader,"Track-Info",10)!=0) --- src/cpc/diskimage/iextdsk.c +++ src/cpc/diskimage/iextdsk.c @@ -573,7 +573,7 @@ DSKHEADER *pHeader = (DSKHEADER *)pDiskImage; int TrackSize; int TotalTracks; - DSKTRACKHEADER *pTrack = (DSKTRACKHEADER *)((int)pHeader + sizeof(DSKHEADER)); + DSKTRACKHEADER *pTrack = (DSKTRACKHEADER *)((unsigned long)pHeader + sizeof(DSKHEADER)); TrackSize = (pHeader->TrackSizeHigh<<8) | (pHeader->TrackSizeLow); TotalTracks = (pHeader->NumTracks * pHeader->NumSides); @@ -619,7 +619,7 @@ memcpy(pSectorData, Sector, SectorSize); } - pTrack = (DSKTRACKHEADER *)((int)pTrack + TrackSize); + pTrack = (DSKTRACKHEADER *)((long)pTrack + TrackSize); } } @@ -648,7 +648,7 @@ int i; EXTDSKHEADER *pHeader = (EXTDSKHEADER *)pDiskImage; int TotalTracks; - EXTDSKTRACKHEADER *pTrack = (EXTDSKTRACKHEADER *)((int)pHeader + sizeof(EXTDSKHEADER)); + EXTDSKTRACKHEADER *pTrack = (EXTDSKTRACKHEADER *)((unsigned long)pHeader + sizeof(EXTDSKHEADER)); TotalTracks = (pHeader->NumTracks * pHeader->NumSides); @@ -700,7 +700,7 @@ } - pTrack = (EXTDSKTRACKHEADER *)((int)pTrack + ((pHeader->TrackSizeTable[i] & 0x0ff)<<8)); + pTrack = (EXTDSKTRACKHEADER *)((long)pTrack + ((pHeader->TrackSizeTable[i] & 0x0ff)<<8)); } } } --- src/cpc/riff.c +++ src/cpc/riff.c @@ -51,13 +51,13 @@ /* return pointer to chunk data */ unsigned char *Riff_GetChunkDataPtr(RIFF_CHUNK *pChunk) { - return (unsigned char *)((int)pChunk + sizeof(RIFF_CHUNK)); + return (unsigned char *)((unsigned long)pChunk + sizeof(RIFF_CHUNK)); } /* get next chunk after chunk specified */ RIFF_CHUNK *Riff_GetNextChunk(RIFF_CHUNK *pChunk) { - return (RIFF_CHUNK *)((int)pChunk + Riff_GetChunkLength(pChunk) + sizeof(RIFF_CHUNK)); + return (RIFF_CHUNK *)((unsigned long)pChunk + Riff_GetChunkLength(pChunk) + sizeof(RIFF_CHUNK)); } @@ -68,7 +68,7 @@ { /* pointer to data to start searching from is pointer to data, +4 for the AMS! type. */ - RIFF_CHUNK *pChunk = (RIFF_CHUNK *)((int)Riff_GetChunkDataPtr(pHeader) + 4); + RIFF_CHUNK *pChunk = (RIFF_CHUNK *)((unsigned long)Riff_GetChunkDataPtr(pHeader) + 4); /* get length of RIFF chunk */ int ParentChunkLength = Riff_GetChunkLength(pHeader); @@ -86,7 +86,7 @@ /* next chunk */ pChunk = Riff_GetNextChunk(pChunk); } - while (((int)pChunk-(int)pHeader)<ParentChunkLength); + while (((long)pChunk-(long)pHeader)<ParentChunkLength); /* couldn't find named chunk */ return NULL; --- src/cpc/z80/z80.c +++ src/cpc/z80/z80.c @@ -28,7 +28,7 @@ INLINE static int Z80_FD_CB_ExecuteInstruction(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; Opcode = Z80_RD_OPCODE_BYTE(3); Opcode = Opcode & 0x0ff; switch (Opcode) @@ -1589,7 +1589,7 @@ INLINE static int Z80_FD_ExecuteInstruction(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; Opcode = Z80_RD_OPCODE_BYTE(1); Opcode = Opcode & 0x0ff; switch (Opcode) @@ -2555,7 +2555,7 @@ INLINE static int Z80_DD_CB_ExecuteInstruction(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; Opcode = Z80_RD_OPCODE_BYTE(3); Opcode = Opcode & 0x0ff; switch (Opcode) @@ -4116,7 +4116,7 @@ INLINE static int Z80_DD_ExecuteInstruction(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; Opcode = Z80_RD_OPCODE_BYTE(1); Opcode = Opcode & 0x0ff; switch (Opcode) @@ -5082,7 +5082,7 @@ INLINE static int Z80_ED_ExecuteInstruction(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; INC_REFRESH(2); Opcode = Z80_RD_OPCODE_BYTE(1); Opcode = Opcode & 0x0ff; @@ -5957,7 +5957,7 @@ INLINE static int Z80_CB_ExecuteInstruction(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; Opcode = Z80_RD_OPCODE_BYTE(1); Opcode = Opcode & 0x0ff; switch (Opcode) @@ -7518,7 +7518,7 @@ int Z80_ExecuteInstruction(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; Opcode = Z80_RD_OPCODE_BYTE(0); Opcode = Opcode & 0x0ff; switch (Opcode) @@ -10036,7 +10036,7 @@ int Z80_ExecuteIM0(void) { unsigned long Opcode; -unsigned long Cycles; +unsigned long Cycles = 0UL; Opcode = R.InterruptVectorBase; Opcode = Opcode & 0x0ff; switch (Opcode)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor