diff options
author | EuAndreh <eu@euandre.org> | 2024-04-16 08:54:12 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-04-16 08:54:12 -0300 |
commit | a0e3a36ac49eecf4d529c53efdb994a49bc61084 (patch) | |
tree | 46384da40eba443ccbfa959d1a961c38fbfb3969 | |
parent | src/pindaiba.h: Add definition of NULL_TERMINATOR (diff) | |
download | pindaiba-a0e3a36ac49eecf4d529c53efdb994a49bc61084.tar.gz pindaiba-a0e3a36ac49eecf4d529c53efdb994a49bc61084.tar.xz |
src/i18n.h: Change "_()" from a macro to a function
-rw-r--r-- | src/i18n.c | 7 | ||||
-rw-r--r-- | src/i18n.h | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -2,6 +2,8 @@ #include <stdio.h> +#include "catalog.h" + #include "i18n.h" @@ -47,3 +49,8 @@ MSGS[] = { [MSG_ERR_VECTOR_OUT_OF_BOUNDS]= "idx (%ld) is beyond bounds (%ld)\n", NULL }; + +const char * +_(const int msg_id) { + return s(MSGS, msg_id); +} @@ -42,4 +42,5 @@ enum MSGCATALOG_ID { extern const char *const MSGS[]; -#define _(msg_id) s(MSGS, msg_id) +const char * +_(const int msg_id); |