From 624aefbe0866e8e1a94e66d4df45993ce6e11e57 Mon Sep 17 00:00:00 2001 From: Dagen Brock Date: Fri, 20 Jan 2017 13:58:01 -0600 Subject: [PATCH] remove erroneous printf and warnings --- src/sim65816.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/sim65816.c b/src/sim65816.c index f68d32a..c42dca9 100644 --- a/src/sim65816.c +++ b/src/sim65816.c @@ -163,7 +163,7 @@ int g_imagewriter_paper = 0; int g_imagewriter_banner = 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 #define START_DCYCS (0.0) @@ -946,7 +946,6 @@ gsplusmain(int argc, char **argv) sim65816_initglobals(); moremem_init(); - printf("FOOOAAA\n" ); // initialize ss dir to default value (current path) strcpy(g_config_gsplus_screenshot_dir, "./"); @@ -1065,7 +1064,7 @@ gsplusmain(int argc, char **argv) } else if (!strcmp("-ssdir", argv[i])) { // screenshot directory passed strcpy(g_config_gsplus_screenshot_dir, argv[i+1]); 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)) { 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); } -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 gsplus_vprintf(const char *fmt, va_list ap) { @@ -2776,6 +2758,24 @@ gsplus_vprintf(const char *fmt, va_list ap) 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 must_write(int fd, char *bufptr, int len) {