12 static FILE *fout=NULL;
13 static char fname[128];
14 static int file_cnt=0; /* count number of open files */
16 void puts_dbg(const char *data)
20 fdbg=fopen("dbg.log","a+");
27 /* Can't easily get the message back to gdb... write to a log instead. */
28 void fputs_dbg (const char *data, FILE * fakestream)
34 //CIOLogView_output (s);
35 if (fakestream==stdout || fakestream==stderr || fakestream==NULL)
39 for (file_cnt=0; file_cnt<20; file_cnt++)
41 sprintf(fname,"dbg%d.log",file_cnt);
42 if ((fout=fopen(fname),"r")!=NULL)
47 fout=fopen(fname,"w");
53 fprintf(fakestream,data);
58 void printf_dbg(const char* format,...)
62 va_start (args, format);
63 vsprintf (buf, format, args);