aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-15 18:58:44 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-15 18:58:44 -0800
commit5d1ffd61440a9563d10e921538cbfdc4e21bbd09 (patch)
treead3ee614591935ed0c6be150b140575863e8c947
parent6d0ba0c074908896b4172164168a8a49afd0adb8 (diff)
allocated_op -> allocated_pat
-rw-r--r--compiler.c2
-rw-r--r--file_loader.c2
-rw-r--r--file_loader.h4
-rw-r--r--types.h6
4 files changed, 7 insertions, 7 deletions
diff --git a/compiler.c b/compiler.c
index 21705d6..0a60a91 100644
--- a/compiler.c
+++ b/compiler.c
@@ -29,7 +29,7 @@ static pat_t *new_range(file_t *f, const char *start, const char *end, ssize_t m
//
pat_t *new_pat(file_t *f, const char *start, enum pattype_e type)
{
- allocated_op_t *tracker = new(allocated_op_t);
+ allocated_pat_t *tracker = new(allocated_pat_t);
tracker->next = f->ops;
f->ops = tracker;
tracker->op.type = type;
diff --git a/file_loader.c b/file_loader.c
index 9a07ced..f54a4d2 100644
--- a/file_loader.c
+++ b/file_loader.c
@@ -151,7 +151,7 @@ void destroy_file(file_t **f)
}
}
- for (allocated_op_t *next; (*f)->ops; (*f)->ops = next) {
+ for (allocated_pat_t *next; (*f)->ops; (*f)->ops = next) {
next = (*f)->ops->next;
destroy_pat(&(*f)->ops->op);
xfree(&(*f)->ops);
diff --git a/file_loader.h b/file_loader.h
index cfe8701..1e76357 100644
--- a/file_loader.h
+++ b/file_loader.h
@@ -6,14 +6,14 @@
#include <stdio.h>
-struct allocated_op_s; // declared in types.h
+struct allocated_pat_s; // declared in types.h
typedef struct file_s {
struct file_s *next;
const char *filename;
char *contents, **lines, *end;
size_t nlines;
- struct allocated_op_s *ops;
+ struct allocated_pat_s *ops;
unsigned int mmapped:1;
} file_t;
diff --git a/types.h b/types.h
index 071c688..5e99922 100644
--- a/types.h
+++ b/types.h
@@ -109,10 +109,10 @@ typedef struct def_s {
// Structure used for tracking allocated ops, which must be freed when the file
// is freed.
//
-typedef struct allocated_op_s {
- struct allocated_op_s *next;
+typedef struct allocated_pat_s {
+ struct allocated_pat_s *next;
pat_t op;
-} allocated_op_t;
+} allocated_pat_t;
#endif
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1