--- np2/x11/main.c 2008/04/03 13:52:49 1.31 +++ np2/x11/main.c 2011/01/15 16:10:12 1.34 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.31 2008/04/03 13:52:49 monaka Exp $ */ +/* $Id: main.c,v 1.34 2011/01/15 16:10:12 monaka Exp $ */ /* * Copyright (c) 2003 NONAKA Kimihiro @@ -29,6 +29,7 @@ #include #include +#include #include #if defined(USE_SDLAUDIO) || defined(USE_SDLMIXER) @@ -86,8 +87,6 @@ static void sighandler(int signo) { - UNUSED(signo); - toolkit_widget_quit(); } @@ -131,6 +130,11 @@ main(int argc, char *argv[]) progname = argv[0]; + setlocale(LC_ALL, ""); + bindtextdomain(np2appname, NP2LOCALEDIR); + bind_textdomain_codeset(np2appname, "UTF-8"); + textdomain(np2appname); + toolkit_initialize(); toolkit_arginit(&argc, &argv); @@ -171,7 +175,7 @@ main(int argc, char *argv[]) char *env = getenv("HOME"); if (env) { /* base dir */ - snprintf(modulefile, sizeof(modulefile), + g_snprintf(modulefile, sizeof(modulefile), "%s/.%s", env, np2appname); if (stat(modulefile, &sb) < 0) { if (mkdir(modulefile, 0700) < 0) {