changeset 1357:e01ae62fcac5

Forgot to check in main() part of TOYFLAG_LOCALE change.
author Rob Landley <rob@landley.net>
date Sat, 21 Jun 2014 13:03:42 -0500
parents fee58d039b72
children 310165c2f451
files main.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Wed Jun 11 22:44:48 2014 -0500
+++ b/main.c	Sat Jun 21 13:03:42 2014 -0500
@@ -66,6 +66,8 @@
   toys.which = which;
   toys.argv = argv;
 
+  if (CFG_TOYBOX_I18N && (which->flags & TOYFLAG_LOCALE)) setlocale(LC_ALL, "");
+
   if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) {
     if (toys.which == toy_list && toys.argv[2])
       if (!(toys.which = toy_find(toys.argv[2]))) return;
@@ -166,8 +168,6 @@
 
 int main(int argc, char *argv[])
 {
-  if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "");
-
   if (CFG_TOYBOX) {
     // Trim path off of command name
     *argv = basename(*argv);