add some more messy debug output
This commit is contained in:
parent
acdaa67696
commit
f83c604ad0
|
@ -13,6 +13,9 @@
|
|||
#include "forward.h"
|
||||
#include "fileio.h"
|
||||
#include "tidy.h"
|
||||
#if !defined(NDEBUG) && defined(_MSC_VER)
|
||||
#include "sprtf.h"
|
||||
#endif
|
||||
|
||||
typedef struct _fp_input_source
|
||||
{
|
||||
|
@ -82,6 +85,9 @@ void TIDY_CALL TY_(filesink_putByte)( void* sinkData, byte bv )
|
|||
{
|
||||
FILE* fout = (FILE*) sinkData;
|
||||
fputc( bv, fout );
|
||||
#if !defined(NDEBUG) && defined(_MSC_VER)
|
||||
SPRTF("%c",bv);
|
||||
#endif
|
||||
}
|
||||
|
||||
void TY_(initFileSink)( TidyOutputSink* outp, FILE* fp )
|
||||
|
|
|
@ -1164,15 +1164,21 @@ void tidy_out( TidyDocImpl* doc, ctmbstr msg, ... )
|
|||
{
|
||||
ctmbstr cp;
|
||||
enum { sizeBuf=2048 };
|
||||
char *buf = TidyDocAlloc(doc,sizeBuf);
|
||||
char *buf = (char *)TidyDocAlloc(doc,sizeBuf);
|
||||
|
||||
va_list args;
|
||||
va_start( args, msg );
|
||||
TY_(tmbvsnprintf)(buf, sizeBuf, msg, args);
|
||||
va_end( args );
|
||||
|
||||
#if !defined(NDEBUG) && defined(_MSC_VER)
|
||||
add_std_out(0);
|
||||
#endif
|
||||
for ( cp=buf; *cp; ++cp )
|
||||
TY_(WriteChar)( *cp, doc->errout );
|
||||
#if !defined(NDEBUG) && defined(_MSC_VER)
|
||||
add_std_out(1);
|
||||
#endif
|
||||
TidyDocFree(doc, buf);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue