Fix warnings and remove SAM

This commit is contained in:
simon.kagstrom 2010-02-08 18:24:00 +00:00
parent c5b7b8e539
commit 51aa03ce04
2 changed files with 17 additions and 10 deletions

View File

@ -32,7 +32,7 @@ LDFLAGS ?= $(GCOV) `sdl-config --libs` -lSDL_ttf -lSDL_image
CPP_SRCS=Src/C64_SC.cpp Src/main.cpp Src/Display.cpp Src/Prefs.cpp Src/SID.cpp \
Src/REU.cpp Src/IEC.cpp Src/1541fs.cpp Src/1541d64.cpp Src/1541t64.cpp \
Src/1541job.cpp Src/SAM.cpp Src/CPUC64_SC.cpp Src/VIC_SC.cpp \
Src/1541job.cpp Src/CPUC64_SC.cpp Src/VIC_SC.cpp \
Src/CIA_SC.cpp Src/CPU1541_SC.cpp Src/CPU_common.cpp Src/Network.cpp \
Src/gui/menu_messages.cpp Src/gui/dialogue_box.cpp Src/gui/widget.cpp \
Src/gui/game_info.cpp Src/gui/status_bar.cpp Src/gui/gui.cpp Src/gui/listener.cpp \

View File

@ -93,6 +93,8 @@ Drive *IEC::create_drive(const char *path)
// print error?
}
}
return NULL;
}
IEC::IEC(C64Display *display) : the_display(display)
@ -880,7 +882,7 @@ void Drive::unsupp_cmd(void)
uint8 ascii2petscii(char c)
{
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))
return c ^ 0x20;
return c;
}
@ -892,7 +894,7 @@ void ascii2petscii(uint8 *dest, const char *src, int n)
char petscii2ascii(uint8 c)
{
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))
return c ^ 0x20;
if ((c >= 0xc1) && (c <= 0xda))
return c ^ 0x80;
@ -911,6 +913,9 @@ void petscii2ascii(char *dest, const uint8 *src, int n)
bool IsMountableFile(const char *path, int &type)
{
size_t n;
bool out = true;
// Read header and determine file size
uint8 header[64];
memset(header, 0, sizeof(header));
@ -920,17 +925,19 @@ bool IsMountableFile(const char *path, int &type)
fseek(f, 0, SEEK_END);
long size = ftell(f);
fseek(f, 0, SEEK_SET);
fread(header, 1, sizeof(header), f);
n = fread(header, 1, sizeof(header), f);
if (n != 1)
out = false;
fclose(f);
if (IsImageFile(path, header, size)) {
if (IsImageFile(path, header, size))
type = FILE_IMAGE;
return true;
} else if (IsArchFile(path, header, size)) {
else if (IsArchFile(path, header, size))
type = FILE_ARCH;
return true;
} else
return false;
else
out = false;
return out;
}