[Scummvm-cvs-logs] CVS: scummvm/common engine.cpp,1.4,1.5
Pawe? Ko?odziejski
aquadran at users.sourceforge.net
Wed Sep 18 03:57:02 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common engine.cpp,1.3,1.4 engine.h,1.3,1.4 system.h,1.3,1.4 timer.cpp,1.3,1.4 timer.h,1.3,1.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,1.24,1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory usw-pr-cvs1:/tmp/cvs-serv25807/common
Modified Files:
engine.cpp
Log Message:
moved warning, debug, checkheap to engine
Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/engine.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- engine.cpp 18 Sep 2002 10:22:35 -0000 1.4
+++ engine.cpp 18 Sep 2002 10:56:23 -0000 1.5
@@ -103,3 +103,51 @@
return engine;
}
+
+void CDECL warning(const char *s, ...)
+{
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsprintf(buf, s, va);
+ va_end(va);
+
+ fprintf(stderr, "WARNING: %s!\n", buf);
+#if defined( USE_WINDBG )
+ sprintf(&buf[strlen(buf)], "\n");
+ OutputDebugString(buf);
+#endif
+}
+
+uint16 _debugLevel = 1;
+
+void CDECL debug(int level, const char *s, ...)
+{
+ char buf[1024];
+ va_list va;
+
+ if (level > _debugLevel)
+ return;
+
+ va_start(va, s);
+ vsprintf(buf, s, va);
+ va_end(va);
+ printf("%s\n", buf);
+
+#if defined( USE_WINDBG )
+ sprintf(&buf[strlen(buf)], "\n");
+ OutputDebugString(buf);
+#endif
+
+ fflush(stdout);
+}
+
+void checkHeap()
+{
+#if defined(WIN32)
+ if (_heapchk() != _HEAPOK) {
+ error("Heap is invalid!");
+ }
+#endif
+}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common engine.cpp,1.3,1.4 engine.h,1.3,1.4 system.h,1.3,1.4 timer.cpp,1.3,1.4 timer.h,1.3,1.4
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,1.24,1.25
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list