Implement a new caching system to make repeated runs much much faster.
This commit is contained in:
parent
4a008a82b0
commit
5e0e140b09
8 changed files with 252 additions and 44 deletions
28
helpers.c
Normal file
28
helpers.c
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
#ifdef EXPLAIN
|
||||
int explain = 0;
|
||||
#endif
|
||||
|
||||
#if defined(ERR) || defined(EXPLAIN)
|
||||
void
|
||||
l(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (fmt[0] && fmt[strlen(fmt) - 1] == ':') {
|
||||
fputc(' ', stderr);
|
||||
perror(NULL);
|
||||
} else {
|
||||
fputc('\n', stderr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue