remove erroneous printf and warnings

This commit is contained in:
Dagen Brock 2017-01-20 13:58:01 -06:00
parent aa240efdc8
commit 624aefbe08

View File

@ -163,7 +163,7 @@ int g_imagewriter_paper = 0;
int g_imagewriter_banner = 0; int g_imagewriter_banner = 0;
int g_config_iwm_vbl_count = 0; int g_config_iwm_vbl_count = 0;
const char g_gsplus_version_str[] = "0.12s"; // 12 socket debug const char g_gsplus_version_str[] = "0.13"; // the "KS" special version
int g_pause=0; // OG Added pause int g_pause=0; // OG Added pause
#define START_DCYCS (0.0) #define START_DCYCS (0.0)
@ -946,7 +946,6 @@ gsplusmain(int argc, char **argv)
sim65816_initglobals(); sim65816_initglobals();
moremem_init(); moremem_init();
printf("FOOOAAA\n" );
// initialize ss dir to default value (current path) // initialize ss dir to default value (current path)
strcpy(g_config_gsplus_screenshot_dir, "./"); strcpy(g_config_gsplus_screenshot_dir, "./");
@ -1065,7 +1064,7 @@ gsplusmain(int argc, char **argv)
} else if (!strcmp("-ssdir", argv[i])) { // screenshot directory passed } else if (!strcmp("-ssdir", argv[i])) { // screenshot directory passed
strcpy(g_config_gsplus_screenshot_dir, argv[i+1]); strcpy(g_config_gsplus_screenshot_dir, argv[i+1]);
struct stat path_stat; struct stat path_stat;
int ret = stat(g_config_gsplus_screenshot_dir, &path_stat); // (weakly) validate path stat(g_config_gsplus_screenshot_dir, &path_stat); // (weakly) validate path
if (!S_ISDIR(path_stat.st_mode)) { if (!S_ISDIR(path_stat.st_mode)) {
strcpy(g_config_gsplus_screenshot_dir, "./"); strcpy(g_config_gsplus_screenshot_dir, "./");
} }
@ -2731,23 +2730,6 @@ size_fail(int val, word32 v1, word32 v2)
halt_printf("Size failure, val: %08x, %08x %08x\n", val, v1, v2); halt_printf("Size failure, val: %08x, %08x %08x\n", val, v1, v2);
} }
int
fatal_printf(const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
if(g_fatal_log < 0) {
g_fatal_log = 0;
}
ret = gsplus_vprintf(fmt, ap);
va_end(ap);
return ret;
}
int int
gsplus_vprintf(const char *fmt, va_list ap) gsplus_vprintf(const char *fmt, va_list ap)
{ {
@ -2776,6 +2758,24 @@ gsplus_vprintf(const char *fmt, va_list ap)
return ret; return ret;
} }
int
fatal_printf(const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
if(g_fatal_log < 0) {
g_fatal_log = 0;
}
ret = gsplus_vprintf(fmt, ap);
va_end(ap);
return ret;
}
void void
must_write(int fd, char *bufptr, int len) must_write(int fd, char *bufptr, int len)
{ {