diff options
| author | Filippos Karapetis | 2009-02-21 18:16:17 +0000 | 
|---|---|---|
| committer | Filippos Karapetis | 2009-02-21 18:16:17 +0000 | 
| commit | 426def4f44a2997163632058cd4b6b21a61e533c (patch) | |
| tree | ae0c3a8ff261e4a99394e6b1072ece490b6fdb0e | |
| parent | 11b2ddfc5450fda4638dd264f576e48d17d85b12 (diff) | |
| download | scummvm-rg350-426def4f44a2997163632058cd4b6b21a61e533c.tar.gz scummvm-rg350-426def4f44a2997163632058cd4b6b21a61e533c.tar.bz2 scummvm-rg350-426def4f44a2997163632058cd4b6b21a61e533c.zip | |
Turned back all fprintf/exit(1) bits into error()
svn-id: r38716
| -rw-r--r-- | engines/sci/engine/gc.cpp | 3 | ||||
| -rw-r--r-- | engines/sci/engine/kernel.cpp | 3 | ||||
| -rw-r--r-- | engines/sci/engine/seg_manager.cpp | 3 | ||||
| -rw-r--r-- | engines/sci/engine/vm.cpp | 3 | ||||
| -rw-r--r-- | engines/sci/gfx/widgets.cpp | 3 | ||||
| -rw-r--r-- | engines/sci/sfx/iterator.cpp | 10 | ||||
| -rw-r--r-- | engines/sci/sfx/mixer/soft.cpp | 3 | ||||
| -rw-r--r-- | engines/sci/sfx/softseq/opl2.cpp | 6 | 
8 files changed, 10 insertions, 24 deletions
| diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index ff59f37328..5cca5bd34e 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -79,8 +79,7 @@ static reg_t worklist_pop(worklist_t **wlp) {  	reg_t retval;  	if (!wl || !wl->used) { -		fprintf(stderr, "Attempt to pop from empty worklist"); -		exit(1); +		error("Attempt to pop from empty worklist");  	}  	retval = wl->entries[--wl->used]; diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index d39355bff5..ef730824bd 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -727,9 +727,8 @@ void kernel_compile_signature(const char **s) {  				break;  			default: { -				sciprintf("INTERNAL ERROR when compiling kernel function signature '%s': (%02x) not understood (aka" +				error("INTERNAL ERROR when compiling kernel function signature '%s': (%02x) not understood (aka"  				          " '%c')\n", *s, c, c); -				exit(1);  			}  			}  		} while (*src && (*src == KSIG_SPEC_ALLOW_INV || *src == KSIG_SPEC_ELLIPSIS || (c < 'a' && c != KSIG_SPEC_ANY))); diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 2cbda7724f..ab29fd4aa8 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -1808,8 +1808,7 @@ seg_interface_t *get_seg_interface(SegManager *self, seg_id_t segid) {  	memcpy(retval, seg_interfaces[mobj->type - 1], sizeof(seg_interface_t));  	if (mobj->type != retval->type_id) { -		fprintf(stderr, "Improper segment interface for %d", mobj->type); -		exit(1); +		error(stderr, "Improper segment interface for %d", mobj->type);  	}  	retval->segmgr = self; diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 21dabcc756..55febf4ca7 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -540,8 +540,7 @@ void vm_handle_fatal_error(EngineState *s, int line, const char *file) {  	if (jump_initialized)  		longjmp(vm_error_address, 0);  #endif -	fprintf(stderr, "Could not recover, exitting...\n"); -	exit(1); +	error(stderr, "Could not recover, exitting...\n");  }  static inline script_t *script_locate_by_segment(EngineState *s, seg_id_t seg) { diff --git a/engines/sci/gfx/widgets.cpp b/engines/sci/gfx/widgets.cpp index 6162ba6530..e3a662ff17 100644 --- a/engines/sci/gfx/widgets.cpp +++ b/engines/sci/gfx/widgets.cpp @@ -211,8 +211,7 @@ static void _gfxw_unallocate_widget(gfx_state_t *state, gfxw_widget_t *widget) {  		  GFXERROR("Error occured while drawing widget!\n"); \  		  return 1; \  	  } else if (retval == GFX_FATAL) { \ -		  GFXERROR("Fatal error occured while drawing widget!\nGraphics state invalid; aborting program..."); \ -		  exit(1); \ +		  error("Fatal error occured while drawing widget!\nGraphics state invalid; aborting program..."); \  	  } \    } diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp index 8305aed37b..5c6c3cb474 100644 --- a/engines/sci/sfx/iterator.cpp +++ b/engines/sci/sfx/iterator.cpp @@ -1939,10 +1939,7 @@ void song_iterator_add_death_listener(song_iterator_t *it,                                   void *client,                                   void (*notify)(void *self, void *notifier)) {  	if (it->death_listeners_nr >= SONGIT_MAX_LISTENERS) { -		fprintf(stderr, "FATAL: Too many death listeners for song" -		        " iterator\n"); -		BREAKPOINT(); -		exit(1); +		error("FATAL: Too many death listeners for song iterator");  	}  	it->death_listeners[it->death_listeners_nr].notify = notify; @@ -1967,10 +1964,7 @@ void song_iterator_remove_death_listener(song_iterator_t *it,  		}  	} -	fprintf(stderr, "FATAL: Could not remove death listener from " -	        "song iterator\n"); -	BREAKPOINT(); -	exit(1); +	error("FATAL: Could not remove death listener from song iterator\n");  } diff --git a/engines/sci/sfx/mixer/soft.cpp b/engines/sci/sfx/mixer/soft.cpp index 6e70be6eea..09d3f79ee1 100644 --- a/engines/sci/sfx/mixer/soft.cpp +++ b/engines/sci/sfx/mixer/soft.cpp @@ -606,9 +606,8 @@ static void mix_compute_input_linear(sfx_pcm_mixer_t *self, int add_result,  			return;  		default: -			fprintf(stderr, "[soft-mixer] Fatal: Invalid mode returned by PCM feed %s-%d's get_timestamp(): %d\n", +			error("[soft-mixer] Fatal: Invalid mode returned by PCM feed %s-%d's get_timestamp(): %d\n",  			        f->debug_name, f->debug_nr, newmode); -			exit(1);  		}  	} diff --git a/engines/sci/sfx/softseq/opl2.cpp b/engines/sci/sfx/softseq/opl2.cpp index 627659abd4..2986917b7a 100644 --- a/engines/sci/sfx/softseq/opl2.cpp +++ b/engines/sci/sfx/softseq/opl2.cpp @@ -473,13 +473,11 @@ static void opl2_poll(sfx_softseq_t *self, byte *dest, int count) {  	gint16 *ptr = buffer;  	if (!ready) { -		fprintf(stderr, "synth_mixer(): !ready \n"); -		exit(1); +		error("synth_mixer(): !ready \n");  	}  	if (!buffer) { -		fprintf(stderr, "synth_mixer(): !buffer \n"); -		exit(1); +		error("synth_mixer(): !buffer \n");  	}  #if 0 | 
