Good news: only one test failing. Bad news: it's nlambda.

This commit is contained in:
Simon Brooke 2018-12-28 21:21:11 +00:00
parent e52ccce0eb
commit 96dad29f91
8 changed files with 80 additions and 90 deletions

View file

@ -42,6 +42,21 @@ void debug_print( wchar_t *message, int level ) {
#endif
}
/**
* print a line feed to stderr, if `verbosity` matches `level`.
* `verbosity is a set of flags, see debug_print.h; so you can
* turn debugging on for only one part of the system.
*/
void debug_println( int level ) {
#ifdef DEBUG
if ( level & verbosity ) {
fwide( stderr, 1 );
fputws( L"\n", stderr );
}
#endif
}
/**
* `wprintf` adapted for the debug logging system. Print to stderr only
* `verbosity` matches `level`. All other arguments as for `wprintf`.