summaryrefslogtreecommitdiffstats
path: root/uisimulator/win32/panic-win32.c
diff options
context:
space:
mode:
authorFelix Arends <edx@rockbox.org>2002-05-01 09:34:55 +0000
committerFelix Arends <edx@rockbox.org>2002-05-01 09:34:55 +0000
commit53a7dd242c21003a38e2d51a205dd926ead84d57 (patch)
tree3884d8cc39887cef1d0b453c13c960449f3f1494 /uisimulator/win32/panic-win32.c
parent9469b0458f76b4d8e7fc2bfe7c7c22c6b0fbb652 (diff)
downloadrockbox-53a7dd242c21003a38e2d51a205dd926ead84d57.tar.gz
rockbox-53a7dd242c21003a38e2d51a205dd926ead84d57.zip
added debug and panic support for the simulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@357 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/win32/panic-win32.c')
-rw-r--r--uisimulator/win32/panic-win32.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/uisimulator/win32/panic-win32.c b/uisimulator/win32/panic-win32.c
new file mode 100644
index 0000000000..c4592d5906
--- /dev/null
+++ b/uisimulator/win32/panic-win32.c
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2002 by Felix Arends
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include <windows.h>
+#include "debug.h"
+
+char panic_buf[128];
+
+// panic
+// whatever it says ;)
+void panic( char *message )
+{
+ debug( message );
+ PostQuitMessage (-1);
+}
+
+
+// panicf
+// formatted panic
+void panicf( char *fmt, ...)
+{
+ va_list ap;
+ va_start( ap, fmt );
+ wsprintf( panic_buf, fmt, ap );
+ va_end( ap );
+ panic( panic_buf );
+} \ No newline at end of file