1
0
mirror of https://frontier.innolan.net/rainlance/amiga-ntimed.git synced 2026-01-13 00:28:52 +00:00

Fixed bug in tracefile and debug output

This commit is contained in:
llsth
2015-03-13 15:37:42 +01:00
parent f6aded0b37
commit 5f44879f10
2 changed files with 6 additions and 6 deletions

View File

@ -66,7 +66,7 @@ void Fail(struct ocx *, int err, const char *, ...) \
#define DebugHex(ocx, ptr, len) PutHex(ocx, OCX_DEBUG, ptr, len) #define DebugHex(ocx, ptr, len) PutHex(ocx, OCX_DEBUG, ptr, len)
void ArgTracefile(const char *fn); void ArgTracefile(const char *fn);
void MuteDebug(); void EnableDebug();
/* param.c -- Parameters **********************************************/ /* param.c -- Parameters **********************************************/

View File

@ -67,8 +67,8 @@
#include "ntimed.h" #include "ntimed.h"
static FILE *debugout; static FILE *debugfile = NULL;
static FILE *tracefile = (FILE*)-1; static FILE *tracefile = NULL;
static FILE * static FILE *
getdst(enum ocx_chan chan) getdst(enum ocx_chan chan)
@ -78,7 +78,7 @@ getdst(enum ocx_chan chan)
if (chan == OCX_TRACE) if (chan == OCX_TRACE)
return (tracefile); return (tracefile);
if (chan == OCX_DEBUG) if (chan == OCX_DEBUG)
return (debugout == (FILE*)-1 ? stdout : debugout); return (debugfile);
WRONG("Wrong ocx_chan"); WRONG("Wrong ocx_chan");
NEEDLESS_RETURN(NULL); NEEDLESS_RETURN(NULL);
} }
@ -128,9 +128,9 @@ ArgTracefile(const char *fn)
} }
void void
MuteDebug() EnableDebug()
{ {
debugout = NULL; debugfile = stdout;
} }
/********************************************************************** /**********************************************************************