misc/openalbridge/wrappers.c
changeset 3364 e5403e2bf02c
parent 3362 8d3b4d19ce27
child 3487 b1d00f1950c8
--- a/misc/openalbridge/wrappers.c	Wed Apr 21 21:38:07 2010 +0000
+++ b/misc/openalbridge/wrappers.c	Thu Apr 22 17:43:12 2010 +0000
@@ -24,9 +24,11 @@
 void *Malloc (size_t nbytes) {
     void *aptr;
 
-    if ((aptr = malloc(nbytes)) == NULL)
-        err_dump("(%s) FATAL - not enough memory");
-
+    if ((aptr = malloc(nbytes)) == NULL) {
+        fprintf(stderr,"(Bridge Fatal Error) - not enough memory");
+        abort();
+    }
+    
     return aptr;
 }
 
@@ -34,8 +36,10 @@
 void *Realloc (void *aptr, size_t nbytes) {
     aptr = realloc(aptr, nbytes);
 
-    if (aptr == NULL)
-        err_dump("(%s) FATAL - not enough memory");
+    if (aptr == NULL) {
+        fprintf(stderr,"(Bridge Fatal Error) - not enough memory");
+        abort();
+    }
 
     return aptr;
 }
@@ -46,7 +50,7 @@
 
     fp = fopen(fname,mode);
     if (fp == NULL)
-        err_ret("(%s) ERROR - can't open file %s in mode '%s'", prog, fname, mode);
+        fprintf(stderr,"(Bridge Error) - can't open file %s in mode '%s'", fname, mode);
 
     return fp;
 }
@@ -97,7 +101,7 @@
         }
 
         if (AL_NO_ERROR != alGetError())
-            err_msg("(%s) WARN - Failed to set fade-out effect",prog);
+            fprintf(stderr,"(Bridge Warning) - Failed to set fade-out effect");
 
         // stop that sound and reset its volume
         alSourceStop (Sources[index]);
@@ -105,7 +109,7 @@
     }
 
     if (AL_NO_ERROR != alGetError())
-        err_msg("(%s) WARN - Failed to set fade effect",prog);
+        fprintf(stderr,"(Bridge Warning) - Failed to set fade effect");
 
 #ifndef _WIN32
     pthread_exit(NULL);