aboutsummaryrefslogtreecommitdiff
path: root/definitions.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-09-27 20:36:10 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-09-27 20:36:10 -0700
commit911827fac3a53734c9a4a99c1b8ec2a689bc59d8 (patch)
tree5ac9e27f065b66ad613fbcac21c95f8b64706310 /definitions.h
parenta96284615b27226f4d34de8dfa7235f0c14ac1d4 (diff)
Removed definitions as a separate type and instead encode that value in
the patterns themselves. This simplifies memory management a lot and speeds up performance.
Diffstat (limited to 'definitions.h')
-rw-r--r--definitions.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/definitions.h b/definitions.h
deleted file mode 100644
index 34e4344..0000000
--- a/definitions.h
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// definitions.h - Header file defining pattern rules
-//
-#ifndef DEFINITIONS__H
-#define DEFINITIONS__H
-
-#include "pattern.h"
-
-//
-// Pattern matching rule definition(s)
-//
-typedef struct def_s {
- size_t id;
- size_t namelen;
- const char *name;
- pat_t *pat;
- struct def_s *next;
-} def_t;
-
-__attribute__((nonnull(3,4), returns_nonnull))
-def_t *with_def(def_t *defs, size_t namelen, const char *name, pat_t *pat);
-__attribute__((pure, nonnull(3)))
-def_t *lookup(def_t *defs, size_t namelen, const char *name);
-__attribute__((nonnull(1)))
-def_t *free_defs(def_t *defs, def_t *stop);
-
-#endif
-// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0