mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-25 09:29:48 +00:00
Silence clang warnings
This commit is contained in:
parent
a9d094c112
commit
cecc78e824
@ -134,7 +134,6 @@ static char zlibmenu[ZLIB_SUBMENU_H][ZLIB_SUBMENU_W+1] =
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void c_eject_6(int drive) {
|
void c_eject_6(int drive) {
|
||||||
int ch = -1;
|
|
||||||
|
|
||||||
if (disk6.disk[drive].compressed)
|
if (disk6.disk[drive].compressed)
|
||||||
{
|
{
|
||||||
@ -146,7 +145,7 @@ void c_eject_6(int drive) {
|
|||||||
#ifdef INTERFACE_CLASSIC
|
#ifdef INTERFACE_CLASSIC
|
||||||
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
||||||
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
||||||
while ((ch = c_mygetch(1)) == -1) {
|
while ((int ch = c_mygetch(1)) == -1) {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -174,7 +173,6 @@ void c_eject_6(int drive) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
int c_new_diskette_6(int drive, const char * const raw_file_name, int force) {
|
int c_new_diskette_6(int drive, const char * const raw_file_name, int force) {
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
int ch = -1;
|
|
||||||
|
|
||||||
/* uncompress the gziped disk */
|
/* uncompress the gziped disk */
|
||||||
char *file_name = strdup(raw_file_name);
|
char *file_name = strdup(raw_file_name);
|
||||||
@ -194,7 +192,7 @@ int c_new_diskette_6(int drive, const char * const raw_file_name, int force) {
|
|||||||
#ifdef INTERFACE_CLASSIC
|
#ifdef INTERFACE_CLASSIC
|
||||||
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
snprintf(&zlibmenu[4][2], 37, "%s", err);
|
||||||
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H);
|
||||||
while ((ch = c_mygetch(1)) == -1) {
|
while ((int ch = c_mygetch(1)) == -1) {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
134
src/meta/debug.l
134
src/meta/debug.l
@ -113,8 +113,8 @@ ADDRS [0-9a-fA-F]+
|
|||||||
do_ascii = 1;
|
do_ascii = 1;
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
dump_mem(arg1, arg2, 0, do_ascii, -1);
|
dump_mem(arg1, arg2, 0, do_ascii, -1);
|
||||||
return MEM;
|
return MEM;
|
||||||
}
|
}
|
||||||
@ -127,11 +127,11 @@ ADDRS [0-9a-fA-F]+
|
|||||||
do_ascii = 1;
|
do_ascii = 1;
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
dump_mem(arg1, arg2, 0, do_ascii, arg3);
|
dump_mem(arg1, arg2, 0, do_ascii, arg3);
|
||||||
return MEM;
|
return MEM;
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
do_ascii = 1;
|
do_ascii = 1;
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
dump_mem(arg1, 256, 0, do_ascii, -1);
|
dump_mem(arg1, 256, 0, do_ascii, -1);
|
||||||
return MEM;
|
return MEM;
|
||||||
}
|
}
|
||||||
@ -157,10 +157,10 @@ ADDRS [0-9a-fA-F]+
|
|||||||
do_ascii = 1;
|
do_ascii = 1;
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
dump_mem(arg1, 256, 0, do_ascii, arg3);
|
dump_mem(arg1, 256, 0, do_ascii, arg3);
|
||||||
return MEM;
|
return MEM;
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (*debugtext != '+') ++debugtext;
|
while (*debugtext != '+') ++debugtext;
|
||||||
++debugtext;
|
++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
dump_mem(cpu65_current.pc, arg1, 0, do_ascii, -1);
|
dump_mem(cpu65_current.pc, arg1, 0, do_ascii, -1);
|
||||||
return MEM;
|
return MEM;
|
||||||
}
|
}
|
||||||
@ -199,9 +199,9 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
|
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
dump_mem(arg1, arg2, lc, do_ascii, -1);
|
dump_mem(arg1, arg2, lc, do_ascii, -1);
|
||||||
return MEM;
|
return MEM;
|
||||||
@ -216,14 +216,14 @@ ADDRS [0-9a-fA-F]+
|
|||||||
do_ascii = 1;
|
do_ascii = 1;
|
||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
|
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
dump_mem(arg1, arg2, lc, do_ascii, arg3);
|
dump_mem(arg1, arg2, lc, do_ascii, arg3);
|
||||||
return MEM;
|
return MEM;
|
||||||
@ -239,8 +239,8 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
|
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
dump_mem(arg1, 256, lc, do_ascii, -1);
|
dump_mem(arg1, 256, lc, do_ascii, -1);
|
||||||
return MEM;
|
return MEM;
|
||||||
@ -255,13 +255,13 @@ ADDRS [0-9a-fA-F]+
|
|||||||
do_ascii = 1;
|
do_ascii = 1;
|
||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
|
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
dump_mem(arg1, 256, lc, do_ascii, arg3);
|
dump_mem(arg1, 256, lc, do_ascii, arg3);
|
||||||
return MEM;
|
return MEM;
|
||||||
@ -271,8 +271,8 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* disassemble at <addrs> <len> */
|
/* disassemble at <addrs> <len> */
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
disasm(arg1, arg2, 0, -1);
|
disasm(arg1, arg2, 0, -1);
|
||||||
return DIS;
|
return DIS;
|
||||||
@ -282,11 +282,11 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* disassemble at /<bank>/<addrs> <len> */
|
/* disassemble at /<bank>/<addrs> <len> */
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
disasm(arg1, arg2, 0, arg3);
|
disasm(arg1, arg2, 0, arg3);
|
||||||
return DIS;
|
return DIS;
|
||||||
@ -296,7 +296,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* disassemble at <addrs> */
|
/* disassemble at <addrs> */
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = 256;
|
arg2 = 256;
|
||||||
if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc;
|
if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc;
|
||||||
|
|
||||||
@ -308,10 +308,10 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* disassemble at /<bank>/<addrs> */
|
/* disassemble at /<bank>/<addrs> */
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = 256;
|
arg2 = 256;
|
||||||
if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc;
|
if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc;
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (*debugtext != '+') ++debugtext;
|
while (*debugtext != '+') ++debugtext;
|
||||||
++debugtext;
|
++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
disasm(cpu65_current.pc, arg1, 0, -1);
|
disasm(cpu65_current.pc, arg1, 0, -1);
|
||||||
return DIS;
|
return DIS;
|
||||||
}
|
}
|
||||||
@ -342,9 +342,9 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
|
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
disasm(arg1, arg2, lc, -1);
|
disasm(arg1, arg2, lc, -1);
|
||||||
return DIS;
|
return DIS;
|
||||||
@ -356,15 +356,15 @@ ADDRS [0-9a-fA-F]+
|
|||||||
|
|
||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
|
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
arg2 = strtol(debugtext, &debugtext, 16);
|
arg2 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
disasm(arg1, arg2, lc, arg3);
|
disasm(arg1, arg2, lc, arg3);
|
||||||
return DIS;
|
return DIS;
|
||||||
@ -377,8 +377,8 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
|
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
disasm(arg1, 256, lc, -1);
|
disasm(arg1, 256, lc, -1);
|
||||||
return DIS;
|
return DIS;
|
||||||
@ -390,14 +390,14 @@ ADDRS [0-9a-fA-F]+
|
|||||||
|
|
||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
|
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
disasm(arg1, 256, lc, arg3);
|
disasm(arg1, 256, lc, arg3);
|
||||||
return DIS;
|
return DIS;
|
||||||
@ -411,7 +411,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
|
|
||||||
{BOS}{ADDRS}{WS}*\:{WS}*{HEX}+{EOS} {
|
{BOS}{ADDRS}{WS}*\:{WS}*{HEX}+{EOS} {
|
||||||
/* set memory <addr> : <hex string> */
|
/* set memory <addr> : <hex string> */
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
while (*debugtext != ':') ++debugtext; ++debugtext;
|
while (*debugtext != ':') ++debugtext; ++debugtext;
|
||||||
while (isspace(*debugtext)) ++debugtext;
|
while (isspace(*debugtext)) ++debugtext;
|
||||||
@ -424,11 +424,11 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* set LC memory <addr> lc1|lc2 : <hex string> */
|
/* set LC memory <addr> lc1|lc2 : <hex string> */
|
||||||
int lc;
|
int lc;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; while (isspace(*debugtext)) ++debugtext;
|
++debugtext; while (isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
set_lc_mem(arg1, lc, debugtext);
|
set_lc_mem(arg1, lc, debugtext);
|
||||||
@ -445,7 +445,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (isspace(*debugtext)) ++debugtext;
|
while (isspace(*debugtext)) ++debugtext;
|
||||||
ptr = debugtext;
|
ptr = debugtext;
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
int len = MIN(debugtext-ptr, DEBUG_BUFSZ-1);
|
int len = MIN((int)(debugtext-ptr), DEBUG_BUFSZ-1);
|
||||||
|
|
||||||
/* filename */
|
/* filename */
|
||||||
strncpy(buf, ptr, len);
|
strncpy(buf, ptr, len);
|
||||||
@ -454,11 +454,11 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* get bank info */
|
/* get bank info */
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext;
|
++debugtext;
|
||||||
int bank = strtol(debugtext, &debugtext, 10);
|
int bank = (int)strtol(debugtext, &debugtext, 10);
|
||||||
|
|
||||||
/* extract addrs */
|
/* extract addrs */
|
||||||
++debugtext;
|
++debugtext;
|
||||||
arg1 = strtol(debugtext, (char**)NULL, 16);
|
arg1 = (int)strtol(debugtext, (char**)NULL, 16);
|
||||||
|
|
||||||
fp = fopen(buf, "r");
|
fp = fopen(buf, "r");
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
@ -491,7 +491,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
|
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, (char**)NULL, 16);
|
arg1 = (int)strtol(debugtext, (char**)NULL, 16);
|
||||||
if ((arg1 < 1) || (arg1 > 255)) arg1 = 255;
|
if ((arg1 < 1) || (arg1 > 255)) arg1 = 255;
|
||||||
|
|
||||||
stepping_struct_t s = {
|
stepping_struct_t s = {
|
||||||
@ -563,7 +563,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
/* DANGEROUS! */
|
/* DANGEROUS! */
|
||||||
cpu65_current.pc = strtol(debugtext, (char**)NULL, 16);
|
cpu65_current.pc = (int)strtol(debugtext, (char**)NULL, 16);
|
||||||
|
|
||||||
stepping_struct_t s = {
|
stepping_struct_t s = {
|
||||||
.step_type = GOING
|
.step_type = GOING
|
||||||
@ -592,7 +592,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* set watchpoint */
|
/* set watchpoint */
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, (char**)NULL, 16);
|
arg1 = (int)strtol(debugtext, (char**)NULL, 16);
|
||||||
if ((arg1 < 0) || (arg1 > 65535)) {
|
if ((arg1 < 0) || (arg1 > 65535)) {
|
||||||
sprintf(second_buf[num_buffer_lines++], "invalid address");
|
sprintf(second_buf[num_buffer_lines++], "invalid address");
|
||||||
return WATCH;
|
return WATCH;
|
||||||
@ -613,7 +613,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* set breakpoint */
|
/* set breakpoint */
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, (char**)NULL, 16);
|
arg1 = (int)strtol(debugtext, (char**)NULL, 16);
|
||||||
if ((arg1 < 0) || (arg1 > 65535)) {
|
if ((arg1 < 0) || (arg1 > 65535)) {
|
||||||
sprintf(second_buf[num_buffer_lines++], "invalid address");
|
sprintf(second_buf[num_buffer_lines++], "invalid address");
|
||||||
return BREAK;
|
return BREAK;
|
||||||
@ -628,7 +628,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (!(*debugtext == 'p')) ++debugtext;
|
while (!(*debugtext == 'p')) ++debugtext;
|
||||||
++debugtext;
|
++debugtext;
|
||||||
|
|
||||||
arg1 = strtol(debugtext, (char**)NULL, 16);
|
arg1 = (int)strtol(debugtext, (char**)NULL, 16);
|
||||||
if ((arg1 < 0) || (arg1 > 0xFF)) {
|
if ((arg1 < 0) || (arg1 > 0xFF)) {
|
||||||
sprintf(second_buf[num_buffer_lines++], "invalid opcode");
|
sprintf(second_buf[num_buffer_lines++], "invalid opcode");
|
||||||
return BREAK;
|
return BREAK;
|
||||||
@ -657,7 +657,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
while (*debugtext) {
|
while (*debugtext) {
|
||||||
arg1 = strtol(debugtext, &debugtext, 10);
|
arg1 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) {
|
if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) {
|
||||||
sprintf(second_buf[num_buffer_lines++], "invalid watchpoint");
|
sprintf(second_buf[num_buffer_lines++], "invalid watchpoint");
|
||||||
return IGNORE;
|
return IGNORE;
|
||||||
@ -681,7 +681,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
while (*debugtext) {
|
while (*debugtext) {
|
||||||
arg1 = strtol(debugtext, &debugtext, 10);
|
arg1 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) {
|
if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) {
|
||||||
sprintf(second_buf[num_buffer_lines++], "invalid breakpoint");
|
sprintf(second_buf[num_buffer_lines++], "invalid breakpoint");
|
||||||
return CLEAR;
|
return CLEAR;
|
||||||
@ -698,7 +698,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
++debugtext;
|
++debugtext;
|
||||||
|
|
||||||
while (*debugtext) {
|
while (*debugtext) {
|
||||||
arg1 = strtol(debugtext, &debugtext, 16);
|
arg1 = (int)strtol(debugtext, &debugtext, 16);
|
||||||
if ((arg1 < 0) || (arg1 > 255)) {
|
if ((arg1 < 0) || (arg1 > 255)) {
|
||||||
sprintf(second_buf[num_buffer_lines++], "invalid opcode");
|
sprintf(second_buf[num_buffer_lines++], "invalid opcode");
|
||||||
return CLEAR;
|
return CLEAR;
|
||||||
@ -742,7 +742,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* search memory<bank> for <bytes> */
|
/* search memory<bank> for <bytes> */
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
while (isspace(*debugtext)) ++debugtext;
|
while (isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
@ -757,7 +757,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
|
|
||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
|
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
while (isspace(*debugtext)) ++debugtext;
|
while (isspace(*debugtext)) ++debugtext;
|
||||||
@ -773,11 +773,11 @@ ADDRS [0-9a-fA-F]+
|
|||||||
|
|
||||||
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
||||||
if (tolower(*debugtext) == 'c') ++debugtext;
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
||||||
lc = strtol(debugtext, &debugtext, 10);
|
lc = (int)strtol(debugtext, &debugtext, 10);
|
||||||
|
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
arg3 = strtol(debugtext, &debugtext, 10);
|
arg3 = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext; /* after / */
|
++debugtext; /* after / */
|
||||||
while (isspace(*debugtext)) ++debugtext;
|
while (isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
@ -794,7 +794,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
while (isspace(*debugtext)) ++debugtext;
|
while (isspace(*debugtext)) ++debugtext;
|
||||||
|
|
||||||
strncpy(buf, debugtext, DEBUG_BUFSZ-2);
|
strncpy(buf, debugtext, DEBUG_BUFSZ-2);
|
||||||
int len = strlen(buf);
|
int len = (int)strlen(buf);
|
||||||
buf[len] = '\r';
|
buf[len] = '\r';
|
||||||
buf[len+1] = '\0';
|
buf[len+1] = '\0';
|
||||||
|
|
||||||
@ -826,7 +826,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
LOG("Typing...");
|
LOG("Typing...");
|
||||||
int ch = -1;
|
int ch = -1;
|
||||||
while (fgets(buf, DEBUG_BUFSZ, fp)) {
|
while (fgets(buf, DEBUG_BUFSZ, fp)) {
|
||||||
LOG(buf);
|
LOG("%s", buf);
|
||||||
|
|
||||||
stepping_struct_t s = {
|
stepping_struct_t s = {
|
||||||
.step_type = LOADING,
|
.step_type = LOADING,
|
||||||
@ -896,20 +896,20 @@ ADDRS [0-9a-fA-F]+
|
|||||||
/* copy file name */
|
/* copy file name */
|
||||||
ptr = debugtext;
|
ptr = debugtext;
|
||||||
while (!isspace(*debugtext)) ++debugtext;
|
while (!isspace(*debugtext)) ++debugtext;
|
||||||
int len = MIN(debugtext - ptr, DEBUG_BUFSZ-1);
|
int len = MIN((int)(debugtext-ptr), DEBUG_BUFSZ-1);
|
||||||
strncpy(buf, ptr, len);
|
strncpy(buf, ptr, len);
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
|
|
||||||
/* get bank info */
|
/* get bank info */
|
||||||
while (*debugtext != '/') ++debugtext;
|
while (*debugtext != '/') ++debugtext;
|
||||||
++debugtext;
|
++debugtext;
|
||||||
int bank = strtol(debugtext, &debugtext, 10);
|
int bank = (int)strtol(debugtext, &debugtext, 10);
|
||||||
++debugtext;
|
++debugtext;
|
||||||
|
|
||||||
/* extract addrs and len */
|
/* extract addrs and len */
|
||||||
unsigned int addrs = strtol(debugtext, &debugtext, 16);
|
unsigned int addrs = (int)strtol(debugtext, &debugtext, 16);
|
||||||
while (isspace(*debugtext)) ++debugtext;
|
while (isspace(*debugtext)) ++debugtext;
|
||||||
len = strtol(debugtext, &debugtext, 16);
|
len = (int)strtol(debugtext, &debugtext, 16);
|
||||||
|
|
||||||
if (addrs+len > 0x10000) {
|
if (addrs+len > 0x10000) {
|
||||||
sprintf(second_buf[num_buffer_lines++], "buffer length overflow");
|
sprintf(second_buf[num_buffer_lines++], "buffer length overflow");
|
||||||
@ -924,7 +924,7 @@ ADDRS [0-9a-fA-F]+
|
|||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
int written = fwrite(apple_ii_64k[bank]+addrs, 1, len, fp);
|
size_t written = fwrite(apple_ii_64k[bank]+addrs, 1, len, fp);
|
||||||
len -= written;
|
len -= written;
|
||||||
addrs += written;
|
addrs += written;
|
||||||
} while(len);
|
} while(len);
|
||||||
|
@ -42,6 +42,7 @@ int arg1, arg2, arg3; /* command arguments */
|
|||||||
int breakpoints[MAX_BRKPTS]; /* memory breakpoints */
|
int breakpoints[MAX_BRKPTS]; /* memory breakpoints */
|
||||||
int watchpoints[MAX_BRKPTS]; /* memory watchpoints */
|
int watchpoints[MAX_BRKPTS]; /* memory watchpoints */
|
||||||
|
|
||||||
|
#ifdef INTERFACE_CLASSIC
|
||||||
/* debugger globals */
|
/* debugger globals */
|
||||||
//1. 5. 10. 15. 20. 25. 30. 35. 40. 45. 50. 55. 60. 65. 70. 75. 80.",
|
//1. 5. 10. 15. 20. 25. 30. 35. 40. 45. 50. 55. 60. 65. 70. 75. 80.",
|
||||||
static char screen[SCREEN_Y][SCREEN_X] =
|
static char screen[SCREEN_Y][SCREEN_X] =
|
||||||
@ -71,6 +72,7 @@ static char screen[SCREEN_Y][SCREEN_X] =
|
|||||||
"||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" };
|
"||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" };
|
||||||
|
|
||||||
static char command_buf[BUF_Y][BUF_X]; /* command line prompt */
|
static char command_buf[BUF_Y][BUF_X]; /* command line prompt */
|
||||||
|
#endif
|
||||||
char lexbuf[BUF_X+2]; /* comman line to be flex'ed */
|
char lexbuf[BUF_X+2]; /* comman line to be flex'ed */
|
||||||
|
|
||||||
uint8_t current_opcode;
|
uint8_t current_opcode;
|
||||||
@ -455,7 +457,7 @@ void set_lc_mem(int addrs, int lcbank, char *hexstr) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
void bload(FILE *f, char *name, int bank, int addrs) {
|
void bload(FILE *f, char *name, int bank, int addrs) {
|
||||||
uint8_t *hexstr = NULL;
|
uint8_t *hexstr = NULL;
|
||||||
int len = -1;
|
size_t len = -1;
|
||||||
uint8_t data;
|
uint8_t data;
|
||||||
|
|
||||||
if ((addrs < 0) || (addrs > 0xffff))
|
if ((addrs < 0) || (addrs > 0xffff))
|
||||||
@ -995,7 +997,9 @@ void show_misc_info() {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
void show_disk_info() {
|
void show_disk_info() {
|
||||||
static char tmp[32];
|
static char tmp[32];
|
||||||
int i = num_buffer_lines, len = 0, off = 19;
|
int i = num_buffer_lines;
|
||||||
|
size_t len = 0;
|
||||||
|
int off = 19;
|
||||||
|
|
||||||
/* generic information */
|
/* generic information */
|
||||||
sprintf(second_buf[i++], "drive %s", (disk6.drive) ? "B" : "A");
|
sprintf(second_buf[i++], "drive %s", (disk6.drive) ? "B" : "A");
|
||||||
@ -1126,7 +1130,7 @@ static int begin_cpu_stepping() {
|
|||||||
g_bFullSpeed = true;
|
g_bFullSpeed = true;
|
||||||
|
|
||||||
unsigned int idx = 0;
|
unsigned int idx = 0;
|
||||||
unsigned int textlen = 0;
|
size_t textlen = 0;
|
||||||
if (stepping_struct.step_text) {
|
if (stepping_struct.step_text) {
|
||||||
textlen = strlen(stepping_struct.step_text);
|
textlen = strlen(stepping_struct.step_text);
|
||||||
}
|
}
|
||||||
|
13
src/prefs.c
13
src/prefs.c
@ -75,14 +75,6 @@ static const struct match_table prefs_table[] =
|
|||||||
{ 0, PRM_NONE }
|
{ 0, PRM_NONE }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct match_table modes_table[] =
|
|
||||||
{
|
|
||||||
{ "][+", II_MODE },
|
|
||||||
{ "][+ undocumented", IIU_MODE },
|
|
||||||
{ "//e", IIE_MODE },
|
|
||||||
{ 0, IIE_MODE }
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct match_table color_table[] =
|
static const struct match_table color_table[] =
|
||||||
{
|
{
|
||||||
{ "black/white", COLOR_NONE },
|
{ "black/white", COLOR_NONE },
|
||||||
@ -379,7 +371,7 @@ bool save_settings(void)
|
|||||||
|
|
||||||
#define ERROR_SUBMENU_H 9
|
#define ERROR_SUBMENU_H 9
|
||||||
#define ERROR_SUBMENU_W 40
|
#define ERROR_SUBMENU_W 40
|
||||||
int ch = -1;
|
#ifdef INTERFACE_CLASSIC
|
||||||
char submenu[ERROR_SUBMENU_H][ERROR_SUBMENU_W+1] =
|
char submenu[ERROR_SUBMENU_H][ERROR_SUBMENU_W+1] =
|
||||||
//1. 5. 10. 15. 20. 25. 30. 35. 40.
|
//1. 5. 10. 15. 20. 25. 30. 35. 40.
|
||||||
{ "||||||||||||||||||||||||||||||||||||||||",
|
{ "||||||||||||||||||||||||||||||||||||||||",
|
||||||
@ -391,6 +383,7 @@ bool save_settings(void)
|
|||||||
"| |",
|
"| |",
|
||||||
"| |",
|
"| |",
|
||||||
"||||||||||||||||||||||||||||||||||||||||" };
|
"||||||||||||||||||||||||||||||||||||||||" };
|
||||||
|
#endif
|
||||||
|
|
||||||
config_file = fopen(config_filename, "w");
|
config_file = fopen(config_filename, "w");
|
||||||
if (config_file == NULL)
|
if (config_file == NULL)
|
||||||
@ -398,7 +391,7 @@ bool save_settings(void)
|
|||||||
PREFS_ERRPRINT();
|
PREFS_ERRPRINT();
|
||||||
#ifdef INTERFACE_CLASSIC
|
#ifdef INTERFACE_CLASSIC
|
||||||
c_interface_print_submenu_centered(submenu[0], ERROR_SUBMENU_W, ERROR_SUBMENU_H);
|
c_interface_print_submenu_centered(submenu[0], ERROR_SUBMENU_W, ERROR_SUBMENU_H);
|
||||||
while ((ch = c_mygetch(1)) == -1)
|
while ((int ch = c_mygetch(1)) == -1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -252,9 +252,9 @@ void cpu_thread(void *dummyptr) {
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
dbg_cycles_executed += cpu65_cycle_count;
|
dbg_cycles_executed += cpu65_cycle_count;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef AUDIO_ENABLED
|
||||||
unsigned int uExecutedCycles = cpu65_cycle_count;
|
unsigned int uExecutedCycles = cpu65_cycle_count;
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLED
|
|
||||||
MB_UpdateCycles(uExecutedCycles); // Update 6522s (NB. Do this before updating g_nCumulativeCycles below)
|
MB_UpdateCycles(uExecutedCycles); // Update 6522s (NB. Do this before updating g_nCumulativeCycles below)
|
||||||
|
|
||||||
// N.B.: IO calls that depend on accurate timing will update g_nCyclesExecuted
|
// N.B.: IO calls that depend on accurate timing will update g_nCyclesExecuted
|
||||||
|
@ -92,7 +92,7 @@ const char *def(const char* const src, const int expected_bytecount)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (buflen > 0) {
|
if (buflen > 0) {
|
||||||
int written = gzwrite(gzdest, buf, buflen);
|
size_t written = gzwrite(gzdest, buf, buflen);
|
||||||
if (written < buflen) {
|
if (written < buflen) {
|
||||||
ERRLOG("OOPS gzwrite ...");
|
ERRLOG("OOPS gzwrite ...");
|
||||||
break;
|
break;
|
||||||
@ -158,7 +158,7 @@ const char *inf(const char* const src, int *rawcount)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int len = strlen(src);
|
size_t len = strlen(src);
|
||||||
char dst[PATH_MAX];
|
char dst[PATH_MAX];
|
||||||
snprintf(dst, PATH_MAX-1, "%s", src);
|
snprintf(dst, PATH_MAX-1, "%s", src);
|
||||||
if (! ( (dst[len-3] == '.') && (dst[len-2] == 'g') && (dst[len-1] == 'z') ) ) {
|
if (! ( (dst[len-3] == '.') && (dst[len-2] == 'g') && (dst[len-1] == 'z') ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user