diff options
author | Filippos Karapetis | 2009-07-06 10:39:22 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-07-06 10:39:22 +0000 |
commit | 522b161becfc702350d84cf431b716b1330286db (patch) | |
tree | 9ba220b8c1b8eeb247c6b2d35d8bc5bf1943a234 /engines/sci/tools.cpp | |
parent | 3ce15cb9b7c77560cd0f2b67e4407b9889ea0f9b (diff) | |
download | scummvm-rg350-522b161becfc702350d84cf431b716b1330286db.tar.gz scummvm-rg350-522b161becfc702350d84cf431b716b1330286db.tar.bz2 scummvm-rg350-522b161becfc702350d84cf431b716b1330286db.zip |
Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
svn-id: r42167
Diffstat (limited to 'engines/sci/tools.cpp')
-rw-r--r-- | engines/sci/tools.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/engines/sci/tools.cpp b/engines/sci/tools.cpp index d0e11aca09..b35c6ce7b6 100644 --- a/engines/sci/tools.cpp +++ b/engines/sci/tools.cpp @@ -45,35 +45,4 @@ int sci_ffs(int bits) { return retval; } -bool g_redirect_sciprintf_to_gui = false; - -void sciprintf(const char *fmt, ...) { - va_list argp; - - assert(fmt); - - // First determine how big a buffer we need - va_start(argp, fmt); - int bufsize = vsnprintf(0, 0, fmt, argp); - assert(bufsize >= 0); - va_end(argp); - - // Allocate buffer for the full printed string - char *buf = (char *)malloc(bufsize + 1); - assert(buf); - - // Print everything according to fmt into buf - va_start(argp, fmt); // reset argp - int bufsize2 = vsnprintf(buf, bufsize + 1, fmt, argp); - assert(bufsize == bufsize2); - va_end(argp); - - // Display the result suitably - if (g_redirect_sciprintf_to_gui) - ((SciEngine *)g_engine)->getSciDebugger()->DebugPrintf("%s", buf); - printf("%s", buf); - - free(buf); -} - } // End of namespace Sci |