/* Displays sourcing error message to a user. */ static void show_sourcing_error(const char filename[], int line_num) { /* User choice is saved by prompt_error_msgf internally. */ (void)prompt_error_msgf("File Sourcing Error", "Error in %s at %d line", filename, line_num); }
/* Displays sourcing error message to a user. */ static void show_sourcing_error(const char filename[], int line_num) { curr_stats.save_msg = 1; /* User choice is saved by prompt_error_msgf internally. */ (void)prompt_error_msgf("File Sourcing Error", "Error in %s at line %d", filename, line_num); curr_stats.save_msg = 0; }
/* Displays sourcing error message to a user. */ static void show_sourcing_error(const char filename[], int line_num) { const char *const last_msg = ui_sb_last(); curr_stats.save_msg = 1; /* User choice is saved by prompt_error_msgf internally. */ if(is_null_or_empty(last_msg)) { (void)prompt_error_msgf("File Sourcing Error", "Error in %s at line %d", filename, line_num); } else { /* The space is needed because empty lines are automatically removed. */ (void)prompt_error_msgf("File Sourcing Error", "Error in %s at line %d:\n" " \n%s", filename, line_num, last_msg); } curr_stats.save_msg = 0; }