From: Roger L. <rl...@wh...> - 2007-05-26 18:20:40
|
Robert L Krawitz <rl...@al...> writes: > From: Roger Leigh <rl...@wh...> > Date: Sat, 26 May 2007 17:51:15 +0100 > > > The other question is whether we should be doing the setlocale() in > > stp_init at all. If the caller changed the locale, presumably there > > were reasons for doing so. > > Reading through the gettext docs, I think this is correct. It does > recommend that libraries only call bindtextdomain, and do not call > setlocale. > > In this case, all of the setlocale calls can be dropped. ENABLE_NLS > is the correct define here, rather than anything locale-related. > > So stp_init() will look like this: > > int > stp_init(void) > { [...] > #ifdef ENABLE_NLS > bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); > #endif [...] Yes, that looks fine. Every program calling stp_init will now need to call setlocale(LC_ALL, "") for itself. Regards, Roger =2D-=20 .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail. |