diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-06-27 16:34:41 +0200 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-06-28 14:21:26 +0200 |
commit | c6286510d5f8c1b7f82f9cdb9153f402a921a49e (patch) | |
tree | f136861fb519fd247cf3289d81dc4fb4fe2d9dff | |
parent | 4a1430ac3c60b5ff1c00bf98c004351c67c26c23 (diff) | |
download | seitan-c6286510d5f8c1b7f82f9cdb9153f402a921a49e.tar seitan-c6286510d5f8c1b7f82f9cdb9153f402a921a49e.tar.gz seitan-c6286510d5f8c1b7f82f9cdb9153f402a921a49e.tar.bz2 seitan-c6286510d5f8c1b7f82f9cdb9153f402a921a49e.tar.lz seitan-c6286510d5f8c1b7f82f9cdb9153f402a921a49e.tar.xz seitan-c6286510d5f8c1b7f82f9cdb9153f402a921a49e.tar.zst seitan-c6286510d5f8c1b7f82f9cdb9153f402a921a49e.zip |
common: move cmp_type_str in util
-rw-r--r-- | common/gluten.h | 3 | ||||
-rw-r--r-- | common/util.c | 4 | ||||
-rw-r--r-- | cooker/emit.c | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/common/gluten.h b/common/gluten.h index 5e1fb42..185927a 100644 --- a/common/gluten.h +++ b/common/gluten.h @@ -109,7 +109,6 @@ enum context_type { extern const char *context_type_name[CONTEXT_TYPE_MAX + 1]; extern const char *context_spec_type_name[CONTEXT_SPEC_TYPE_MAX + 1]; - /** * struct context_desc - Identification of one type of context information * @context: Type of context (namespace types, or working directory) @@ -199,7 +198,9 @@ enum op_cmp_type { CMP_GE, CMP_LT, CMP_LE, + CMP_MAX = CMP_LE, }; +extern const char *cmp_type_str[CMP_MAX + 1]; struct cmp_desc { enum op_cmp_type cmp; diff --git a/common/util.c b/common/util.c index f7fc288..21676b0 100644 --- a/common/util.c +++ b/common/util.c @@ -43,3 +43,7 @@ const char *context_spec_type_name[CONTEXT_SPEC_TYPE_MAX + 1] = { }; const char *bitwise_type_str[BITWISE_MAX + 1] = { "&", "|" }; + +const char *cmp_type_str[CMP_MAX + 1] = { + "EQ", "NE", "GT", "GE", "LT", "LE", +}; diff --git a/cooker/emit.c b/cooker/emit.c index 8dc3e82..ee52b17 100644 --- a/cooker/emit.c +++ b/cooker/emit.c @@ -27,10 +27,6 @@ static const char *type_str[] = { NULL }; -static const char *cmp_type_str[] = { - "EQ", "NE", "GT", "GE", "LT", "LE", NULL -}; - /** * emit_nr() - Emit OP_NR instruction: jump on syscall mismatch * @g: gluten context |