[Scummvm-cvs-logs] SF.net SVN: scummvm:[38716] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Feb 21 19:16:17 CET 2009


Revision: 38716
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38716&view=rev
Author:   thebluegr
Date:     2009-02-21 18:16:17 +0000 (Sat, 21 Feb 2009)

Log Message:
-----------
Turned back all fprintf/exit(1) bits into error()

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/gc.cpp
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/gfx/widgets.cpp
    scummvm/trunk/engines/sci/sfx/iterator.cpp
    scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
    scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp

Modified: scummvm/trunk/engines/sci/engine/gc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/gc.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/engine/gc.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -79,8 +79,7 @@
 	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];

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -727,9 +727,8 @@
 				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)));

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -1808,8 +1808,7 @@
 	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;

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -540,8 +540,7 @@
 	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) {

Modified: scummvm/trunk/engines/sci/gfx/widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/widgets.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/gfx/widgets.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -211,8 +211,7 @@
 		  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..."); \
 	  } \
   }
 

Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -1939,10 +1939,7 @@
                                  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 @@
 		}
 	}
 
-	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");
 }
 
 

Modified: scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -606,9 +606,8 @@
 			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);
 		}
 	}
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-21 18:13:03 UTC (rev 38715)
+++ scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-21 18:16:17 UTC (rev 38716)
@@ -473,13 +473,11 @@
 	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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list