Mercurial > hg > toybox
diff main.c @ 712:a950dd960593
Cleanup i18n support (#ifdefectomy, move global init to process launch). Teach make.sh to emit "#define FLAG_x 0" for options inside disabled USE macros so we can unconditionally refer to them.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 26 Nov 2012 14:14:29 -0600 |
parents | cfdaead45479 |
children | 6a558bf5de65 |
line wrap: on
line diff
--- a/main.c Sun Nov 25 19:23:10 2012 -0600 +++ b/main.c Mon Nov 26 14:14:29 2012 -0600 @@ -101,9 +101,6 @@ which = toy_find(argv[0]); if (!which) return; toy_init(which, argv); -#ifdef CFG_TOYBOX_I18N - setlocale(LC_ALL, ""); -#endif toys.which->toy_main(); exit(toys.exitval); } @@ -145,6 +142,8 @@ int main(int argc, char *argv[]) { + if (CFG_TOYBOX_I18N) setlocale(LC_ALL, ""); + // Artificial scope to eat less stack for things we call { char *name;