diff --git a/src/hp48_emulate.c b/src/hp48_emulate.c index deba07f..06dbb05 100644 --- a/src/hp48_emulate.c +++ b/src/hp48_emulate.c @@ -2439,9 +2439,9 @@ void emulate( void ) { schedule(); } while ( #if defined( WITH_DEBUGGER ) - !enter_debugger + !enter_debugger #else - 1 + 1 #endif - ); + ); } diff --git a/src/hp48_init.c b/src/hp48_init.c index 4cb5117..2aa7176 100644 --- a/src/hp48_init.c +++ b/src/hp48_init.c @@ -366,7 +366,7 @@ int read_mem_file( char* name, word_4* mem, int size ) { if ( NULL == ( fp = fopen( name, "r" ) ) ) { if ( verbose ) - fprintf( stderr, "ct open %s\n" ); + fprintf( stderr, "ct open %s\n", name ); return 0; } diff --git a/src/hp48_serial.c b/src/hp48_serial.c index c6dbc94..60f30c2 100644 --- a/src/hp48_serial.c +++ b/src/hp48_serial.c @@ -123,7 +123,7 @@ int serial_init( void ) { ir_fd = -1; if ( useSerial ) { - sprintf( tty_dev_name, serialLine ); + sprintf( tty_dev_name, "%s", serialLine ); if ( ( ir_fd = open( tty_dev_name, O_RDWR | O_NDELAY ) ) >= 0 ) { if ( verbose ) printf( "IR connection on %s\n", tty_dev_name ); diff --git a/src/hp48emu_actions.c b/src/hp48emu_actions.c index c9f3670..2bfaf97 100644 --- a/src/hp48emu_actions.c +++ b/src/hp48emu_actions.c @@ -9,7 +9,7 @@ #include "x48.h" #if defined( WITH_DEBUGGER ) -#include "x48_debugger.h" /* in_debugger, enter_debugger */ +#include "x48_debugger.h" /* in_debugger, enter_debugger */ #endif static int interrupt_called = 0; diff --git a/src/main.c b/src/main.c index 569db55..6cebb1d 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ #include "x48_resources.h" #if defined( WITH_DEBUGGER ) -#include "x48_debugger.h" /* enter_debugger, USER_INTERRUPT, exec_flags, emulate_debug, debug */ +#include "x48_debugger.h" /* enter_debugger, USER_INTERRUPT, exec_flags, emulate_debug, debug */ #endif #if defined( GUI_IS_X11 ) diff --git a/src/timer.c b/src/timer.c index deb6bcc..53243c0 100644 --- a/src/timer.c +++ b/src/timer.c @@ -322,7 +322,7 @@ t1_t2_ticks get_t1_t2( void ) { #else if ( adj_time_pending ) { #endif - /* + /* * We have been inside an interrupt for very long, maybe * or we are sleeping in the debugger. * Don't adjust the time, can't come from user, anyhow. @@ -349,7 +349,7 @@ t1_t2_ticks get_t1_t2( void ) { diff_time = saturn.timer2; adj_time = access_time - diff_time; - delta = abs( adj_time ); + delta = labs( adj_time ); if ( delta > 0x3c000 ) /* Half a minute */ { diff --git a/src/x48.c b/src/x48.c index 1afd59f..1985ab5 100644 --- a/src/x48.c +++ b/src/x48.c @@ -6390,12 +6390,12 @@ int get_ui_event( void ) { } } #if defined( WITH_DEBUGGER ) - else if ( xev.xbutton.button == Button3 ) { + else if ( xev.xbutton.button == Button3 ) { /* TODO Make cut from the screen work. */ get_stack(); } else { /* printf("In display %d\n", xev.xbutton.button); */ - } + } #endif } else { if ( xev.xbutton.button == Button1 || diff --git a/src/x48_debugger_rpl.c b/src/x48_debugger_rpl.c index 1f48e40..eb421ad 100644 --- a/src/x48_debugger_rpl.c +++ b/src/x48_debugger_rpl.c @@ -510,7 +510,7 @@ char* dec_string( word_20* addr, char* string ) { c = read_nibbles( *addr, 2 ); *addr += 2; if ( hp48_trans_tbl[ c ].trans ) { - sprintf( p, hp48_trans_tbl[ c ].trans ); + sprintf( p, "%s", hp48_trans_tbl[ c ].trans ); p += strlen( p ); } else *p++ = c; @@ -691,7 +691,7 @@ char* dec_library( word_20* addr, char* string ) { for ( i = 0; i < libidsize; i++ ) { c = read_nibbles( *addr + 2 * i + 7, 2 ); if ( hp48_trans_tbl[ c ].trans ) { - sprintf( p, hp48_trans_tbl[ c ].trans ); + sprintf( p, "%s", hp48_trans_tbl[ c ].trans ); p += strlen( p ); } else *p++ = c; @@ -798,7 +798,7 @@ char* dec_local_ident( word_20* addr, char* string ) { c = read_nibbles( *addr, 2 ); *addr += 2; if ( hp48_trans_tbl[ c ].trans ) { - sprintf( p, hp48_trans_tbl[ c ].trans ); + sprintf( p, "%s", hp48_trans_tbl[ c ].trans ); p += strlen( p ); } else *p++ = c; @@ -830,7 +830,7 @@ char* dec_global_ident( word_20* addr, char* string ) { c = read_nibbles( *addr, 2 ); *addr += 2; if ( hp48_trans_tbl[ c ].trans ) { - sprintf( p, hp48_trans_tbl[ c ].trans ); + sprintf( p, "%s", hp48_trans_tbl[ c ].trans ); p += strlen( p ); } else *p++ = c; @@ -979,7 +979,7 @@ char* xlib_name( int lib, int command, char* string ) { c = read_nibbles( name_addr, 2 ); name_addr += 2; if ( hp48_trans_tbl[ c ].trans ) { - sprintf( p, hp48_trans_tbl[ c ].trans ); + sprintf( p, "%s", hp48_trans_tbl[ c ].trans ); p += strlen( p ); } else *p++ = c; @@ -1117,7 +1117,7 @@ char* dec_char( word_20* addr, char* string ) { *p++ = '\''; if ( hp48_trans_tbl[ c ].trans ) { - sprintf( p, hp48_trans_tbl[ c ].trans ); + sprintf( p, "%s", hp48_trans_tbl[ c ].trans ); p += strlen( p ); } else *p++ = c;