From d96b8c7d12fc61ec609d6138627b9d6d18139a9a Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 28 Oct 2023 00:00:21 +0300 Subject: move to monorepo + Will probably have to make some changes to dir layout to make things make more sense --- triscv/src/common.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 triscv/src/common.c (limited to 'triscv/src/common.c') diff --git a/triscv/src/common.c b/triscv/src/common.c new file mode 100644 index 0000000..e73d76e --- /dev/null +++ b/triscv/src/common.c @@ -0,0 +1,13 @@ +#include + +static const char *err_strs[] = { + [OK] = "OK", + [ERR_FULL] = "full", + [ERR_EXISTS] = "exists", + [ERR_OOB] = "out of bounds" +}; + +const char *err_str(stat_t s) +{ + return err_strs[s]; +} -- cgit v1.3