X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fioncore.c;fp=ioncore%2Fioncore.c;h=0675d0a83c6b8bcfdfd5daa58443ecc972eadd12;hp=33eb3e37d229e8856cc51b7989ffa1230abc950a;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=29aae1975d46f66b97a2b873f1875eded8c6fbc3 diff --git a/ioncore/ioncore.c b/ioncore/ioncore.c index 33eb3e3..0675d0a 100644 --- a/ioncore/ioncore.c +++ b/ioncore/ioncore.c @@ -1,7 +1,7 @@ /* * ion/ioncore/ioncore.c * - * Copyright (c) Tuomo Valkonen 1999-2008. + * Copyright (c) Tuomo Valkonen 1999-2009. * * See the included file LICENSE for details. */ @@ -74,7 +74,7 @@ WGlobal ioncore_g; static const char *progname="ion"; static const char ioncore_copy[]= - "Ion " ION_VERSION ", copyright (c) Tuomo Valkonen 1999-2008."; + "Ion " ION_VERSION ", copyright (c) Tuomo Valkonen 1999-2009."; static const char ioncore_license[]=DUMMY_TR( "This software is licensed under the GNU Lesser General Public License\n" @@ -105,9 +105,15 @@ void ioncore_warn_nolog(const char *str, ...) va_list args; va_start(args, str); - fprintf(stderr, "%s: ", libtu_progname()); - vfprintf(stderr, str, args); - fprintf(stderr, "\n"); + + if(ioncore_g.opmode==IONCORE_OPMODE_INIT){ + fprintf(stderr, "%s: ", libtu_progname()); + vfprintf(stderr, str, args); + fprintf(stderr, "\n"); + }else{ + warn_v(str, args); + } + va_end(args); } @@ -189,7 +195,7 @@ static bool check_encoding() } if(mbtowc(NULL, NULL, 0)!=0){ - warn("Statefull encodings are unsupported."); + warn(TR("Statefull encodings are unsupported.")); return FALSE; } @@ -199,11 +205,11 @@ static bool check_encoding() return TRUE; integr_err: - warn("Cannot verify locale encoding setting integrity " - "(LC_CTYPE=%s, nl_langinfo(CODESET)=%s). " - "The LC_CTYPE environment variable should be of the form " - "language_REGION.encoding (e.g. en_GB.UTF-8), and encoding " - "should match the nl_langinfo value above.", ctype, langi); + warn(TR("Cannot verify locale encoding setting integrity " + "(LC_CTYPE=%s, nl_langinfo(CODESET)=%s). " + "The LC_CTYPE environment variable should be of the form " + "language_REGION.encoding (e.g. en_GB.UTF-8), and encoding " + "should match the nl_langinfo value above."), ctype, langi); return FALSE; }