From c6286510d5f8c1b7f82f9cdb9153f402a921a49e Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Tue, 27 Jun 2023 16:34:41 +0200 Subject: common: move cmp_type_str in util --- common/gluten.h | 3 ++- common/util.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'common') 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", +}; -- cgit v1.2.3