@@ -523,7 +523,7 @@ static char* number_to_hex_string(const double d)
523523}
524524
525525/* number of jiffies since program start (or reset) 1/60th in Commodore/Atari format */
526- static int elapsed_jiffies () {
526+ static int elapsed_jiffies (void ) {
527527 struct timeval current_time , elapsed_time , reset_delta ;
528528
529529 // get the delta between the original start time and the reset time (likely zero)
@@ -2167,8 +2167,10 @@ static void perform_statement(list_t *statement_entry)
21672167 if (statement -> parms .generic_parameter != NULL ) {
21682168 value_t message = evaluate_expression (statement -> parms .generic_parameter );
21692169 printf ("STOP: %s\n" , message .string );
2170+ } else {
2171+ printf ("STOPped at line: %d\n" , current_line ());
21702172 }
2171- exit (0 );
2173+ exit (EXIT_SUCCESS );
21722174 }
21732175 break ;
21742176
@@ -2227,7 +2229,7 @@ static void perform_statement(list_t *statement_entry)
22272229
22282230 default :
22292231 printf ("Unimplemented statement %d\n" , statement -> type );
2230- exit (0 );
2232+ exit (EXIT_FAILURE );
22312233 } //end switch
22322234 }
22332235}
@@ -2257,20 +2259,20 @@ static void print_symbol(void *key, void *value, void *unused)
22572259// return FALSE;
22582260//}
22592261/* used for VARLIST in those versions of BASIC that support it */
2260- static void print_variables () {
2262+ static void print_variables (void ) {
22612263 lst_foreach (interpreter_state .variable_values , print_symbol , NULL );
22622264 printf ("\n\n" );
22632265}
22642266/* used for CLEAR, NEW and similar instructions. */
2265- static void delete_variables () {
2267+ static void delete_variables (void ) {
22662268 lst_free_everything (interpreter_state .variable_values );
22672269 interpreter_state .variable_values = NULL ;
22682270}
2269- static void delete_functions () {
2271+ static void delete_functions (void ) {
22702272 lst_free_everything (interpreter_state .functions );
22712273 interpreter_state .functions = NULL ;
22722274}
2273- static void delete_lines () {
2275+ static void delete_lines (void ) {
22742276 for (int i = MAXLINE - 1 ; i >= 0 ; i -- ) {
22752277 if (interpreter_state .lines [i ] != NULL ) {
22762278 lst_free (interpreter_state .lines [i ]);
@@ -2279,7 +2281,7 @@ static void delete_lines() {
22792281}
22802282
22812283/* set up empty trees to store variables and user functions as we find them */
2282- void interpreter_setup ()
2284+ void interpreter_setup (void )
22832285{
22842286 interpreter_state .variable_values = NULL ;
22852287 interpreter_state .functions = NULL ;
0 commit comments