diff options
| author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2025-11-13 21:05:27 +0100 |
|---|---|---|
| committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2025-11-13 21:05:27 +0100 |
| commit | 938e0bfac75302b5056223ffee919d650fdb56be (patch) | |
| tree | e8253ac00368bc20b81e6a8d6f69d22b61b612f6 /src/core | |
| parent | cebc8cb4de260471f80bf8c1e72c14a8b7e251ee (diff) | |
Add _ macro to bin/main.c
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/init.c | 8 | ||||
| -rw-r--r-- | src/core/nls.h | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/core/init.c b/src/core/init.c index 04a7135..3fd07a1 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -34,6 +34,12 @@ default_fatal(void *aux, char *msg) } void +aplwc_boot(void) +{ + init_nls(); +} + +void aplwc_init_fns(APLWCFunctions *fns) { fns->alloc = default_alloc; @@ -45,8 +51,6 @@ aplwc_init_fns(APLWCFunctions *fns) APLWC * aplwc_init(APLWCFunctions *fns, void *aux) { - init_nls(); - size_t size = sizeof(APLWC) + (APLWC_ALIGNMENT - 1) + WS_START_SIZE + (WS_ALIGNMENT - 1); intptr_t base = (intptr_t)fns->alloc(aux, size); intptr_t aligned; diff --git a/src/core/nls.h b/src/core/nls.h index dfa640d..3709d6d 100644 --- a/src/core/nls.h +++ b/src/core/nls.h @@ -1,11 +1,12 @@ #ifndef NLS_H #define NLS_H +#include <config.h> + #if ENABLE_NLS -#include <config.h> #include <libintl.h> -#define _(S) gettext(S) +#define _(S) dgettext(PACKAGE, S) #define init_nls() \ do{ \ bindtextdomain(PACKAGE, LOCALEDIR); \ |