Go to the source code of this file.
Function Documentation
DLLSYM BOOL8 pause_continue |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
Definition at line 86 of file tprintf.cpp.
{
va_list args;
char msg[1000];
va_start(args, format);
vsprintf(msg, format, args);
va_end(args);
#ifdef GRAPHICS_DISABLED
return true;
#else
#ifdef __UNIX__
printf ("%s\n", msg);
printf ("Type \"c\" to cancel, anything else to continue: ");
char c = getchar ();
return (c != 'c');
#endif
#ifdef _WIN32
str +=
STRING (msg) +
STRING (
"\nUse OK to continue, CANCEL to stop pausing");
return::MessageBox (
NULL, msg,
"IMGAPP",
MB_APPLMODAL | MB_OKCANCEL) == IDOK;
#endif
#endif
}
TESS_API void tprintf |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
Definition at line 41 of file tprintf.cpp.
{
va_list args;
static FILE *debugfp =
NULL;
va_start(args, format);
#ifdef _WIN32
offset += _vsnprintf (msg + offset,
MAX_MSG_LEN - offset, format, args);
if (strcmp(
debug_file.string(),
"/dev/null") == 0)
#else
offset += vsprintf (msg + offset, format, args);
#endif
va_end(args);
fclose(debugfp);
}
fprintf(debugfp, "%s", msg);
else
fprintf(stderr, "%s", msg);
}
Variable Documentation
"File to send tprintf output to"
Definition at line 38 of file tprintf.cpp.
DLLSYM bool debug_window_on = 1 |
"Send tprintf to window unless file set"