24 lines
402 B
C
24 lines
402 B
C
#include "common.h"
|
|
#include "tape.h"
|
|
#include <stdarg.h>
|
|
|
|
verbosity_t verbosity = VERBOSITY_NORMAL;
|
|
|
|
void printfv(verbosity_t level, const char* format, ...)
|
|
{
|
|
va_list args;
|
|
va_start(args, format);
|
|
|
|
if (verbosity >= level) {
|
|
vprintf(format, args);
|
|
}
|
|
|
|
va_end(args);
|
|
}
|
|
|
|
void iostats()
|
|
{
|
|
printfv(VERBOSITY_QUIET, "%u IO R: %u W: %u\n", reads + writes, reads, writes);
|
|
}
|
|
|