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:
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)
|
#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 **********************************************/
|
||||||
|
|
||||||
|
|||||||
10
ocx_stdio.c
10
ocx_stdio.c
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user