From 5d1ffd61440a9563d10e921538cbfdc4e21bbd09 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 15 Jan 2021 18:58:44 -0800 Subject: allocated_op -> allocated_pat --- compiler.c | 2 +- file_loader.c | 2 +- file_loader.h | 4 ++-- types.h | 6 +++--- 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 -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 -- cgit v1.2.3