mirror of
https://frontier.innolan.net/rainlance/amiga-ntimed.git
synced 2026-01-12 22:48:22 +00:00
Fixed bug in tracefile and debug output
This commit is contained in:
2
ntimed.h
2
ntimed.h
@ -66,7 +66,7 @@ void Fail(struct ocx *, int err, const char *, ...) \
|
||||
#define DebugHex(ocx, ptr, len) PutHex(ocx, OCX_DEBUG, ptr, len)
|
||||
|
||||
void ArgTracefile(const char *fn);
|
||||
void MuteDebug();
|
||||
void EnableDebug();
|
||||
|
||||
/* param.c -- Parameters **********************************************/
|
||||
|
||||
|
||||
10
ocx_stdio.c
10
ocx_stdio.c
@ -67,8 +67,8 @@
|
||||
|
||||
#include "ntimed.h"
|
||||
|
||||
static FILE *debugout;
|
||||
static FILE *tracefile = (FILE*)-1;
|
||||
static FILE *debugfile = NULL;
|
||||
static FILE *tracefile = NULL;
|
||||
|
||||
static FILE *
|
||||
getdst(enum ocx_chan chan)
|
||||
@ -78,7 +78,7 @@ getdst(enum ocx_chan chan)
|
||||
if (chan == OCX_TRACE)
|
||||
return (tracefile);
|
||||
if (chan == OCX_DEBUG)
|
||||
return (debugout == (FILE*)-1 ? stdout : debugout);
|
||||
return (debugfile);
|
||||
WRONG("Wrong ocx_chan");
|
||||
NEEDLESS_RETURN(NULL);
|
||||
}
|
||||
@ -128,9 +128,9 @@ ArgTracefile(const char *fn)
|
||||
}
|
||||
|
||||
void
|
||||
MuteDebug()
|
||||
EnableDebug()
|
||||
{
|
||||
debugout = NULL;
|
||||
debugfile = stdout;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
||||
Reference in New Issue
Block a user