00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
#include <stdincl.h>
00024
#include <stdarg.h>
00025
00026
#include "DotCursor.h"
00027
#include "MainWindow.h"
00028
#include "client.h"
00029
00030 int pprintf(
char *format, ...)
00031 {
00032 va_list vl;
00033
int n;
00034
char slask[500];
00035 iotm::Mutex mutex;
00036
00037 va_start(vl, format);
00038
#ifdef WIN32
00039
n = vsprintf(slask, format, vl);
00040
#else
00041
n = vsnprintf(slask, 500, format, vl);
00042
#endif
00043
va_end(vl);
00044
00045
DEB(
00046 printf(
"### %s", slask);
00047 fflush(stdout);)
00048
00049
while (slask[strlen(slask) - 1] == 13 || slask[strlen(slask) - 1] == 10)
00050 slask[strlen(slask) - 1] = 0;
00051
appl -> GetWindow() -> AddLine( slask );
00052
00053
return n;
00054 }
00055