Implement a new caching system to make repeated runs much much faster.

This commit is contained in:
Squibid 2025-11-14 04:02:16 -05:00
parent 4a008a82b0
commit 5e0e140b09
Signed by: squibid
GPG key ID: BECE5684D3C4005D
8 changed files with 252 additions and 44 deletions

28
helpers.c Normal file
View 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