From 831037df4276913183d43351adcc4c0754aaa3c7 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Thu, 16 Apr 2020 21:45:58 -0300 Subject: [PATCH] Added cmc_flags_to_str --- src/cor/core.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cor/core.h b/src/cor/core.h index f70d675..03d7980 100644 --- a/src/cor/core.h +++ b/src/cor/core.h @@ -90,4 +90,13 @@ static struct int ERROR; // Generic error, usually caused by algorithm error } cmc_flags = { 0, 1, 2, 3, 4, 5, 6, 7 }; +/** + * cmc_flags_to_str + * + * Maps the error codes to their character representation. + */ +const char *cmc_flags_to_str[8] = { "OK", "ALLOC", "EMPTY", + "NOT_FOUND", "INVALID", "RANGE", + "DUPLICATE", "ERROR" }; + #endif /* CMC_CORE_H */