#include <stdio.h>
#include <stdarg.h>
#include "ccutil.h"
#include "params.h"
#include "strngs.h"
#include "tprintf.h"
Go to the source code of this file.
◆ EXTERN
◆ MAX_MSG_LEN
#define MAX_MSG_LEN 65536 |
◆ tprintf_internal()
DLLSYM void tprintf_internal |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
Definition at line 39 of file tprintf.cpp.
44 static FILE *debugfp = NULL;
49 va_start(args, format);
52 offset += _vsnprintf(msg + offset,
MAX_MSG_LEN - offset, format, args);
53 if (strcmp(
debug_file.string(),
"/dev/null") == 0)
56 offset += vsnprintf(msg + offset,
MAX_MSG_LEN - offset, format, args);
60 if (debugfp == NULL && strlen(
debug_file.string()) > 0) {
62 }
else if (debugfp != NULL && strlen(
debug_file.string()) == 0) {
67 fprintf(debugfp,
"%s", msg);
69 fprintf(stderr,
"%s", msg);
◆ debug_file
"File to send tprintf output to"
Definition at line 36 of file tprintf.cpp.