From 90c3c13a02e501d3bea839dceb00f09c89bfb5fe Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 21 Sep 2021 18:45:43 -0700 Subject: Moving cache logic into match, cleaner next_match() API, and slightly less tightly coupled UTF8 API --- files.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'files.h') diff --git a/files.h b/files.h index 840412b..b51b9c7 100644 --- a/files.h +++ b/files.h @@ -6,14 +6,11 @@ #include "types.h" -#include #include #include #define file_err(f, ...) do { fprint_line(stderr, f, __VA_ARGS__); exit(EXIT_FAILURE); } while(false) -#define MAX_CACHE_SIZE (1<<14) - typedef struct file_s { struct file_s *next; const char *filename; @@ -43,14 +40,6 @@ __attribute__((pure, nonnull)) const char *get_line(file_t *f, size_t line_number); __attribute__((nonnull(1,2,3), format(printf,5,6))) void fprint_line(FILE *dest, file_t *f, const char *start, const char *end, const char *fmt, ...); -__attribute__((nonnull(1,3,4,5))) -bool cache_get(file_t *f, def_t *defs, const char *str, pat_t *pat, match_t **result); -__attribute__((nonnull(1,3,4))) -void cache_save(file_t *f, def_t *defs, const char *str, pat_t *pat, match_t *m); -__attribute__((nonnull)) -void cache_prune(file_t *f, const char *start, const char *end); -__attribute__((nonnull)) -void cache_destroy(file_t *f); #endif // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3