[prev in list] [next in list] [prev in thread] [next in thread]
List: openbox
Subject: [openbox] Patch: fix for setlocale problem
From: ben () orodu ! net (Ben Jansens)
Date: 2003-03-31 18:42:32
Message-ID: 20030331184232.GF10599 () orodu ! net
[Download RAW message or body]
On Mon, Mar 31, 2003 at 01:27:30PM +0200, Mike FABIAN wrote:
<snip>
> First it calls setlocale(LC_ALL, "") to make use of all locales
> specified by the environment variables, but doesn't use the return
> value.
>
> Then it just queries the value of LC_MESSAGES by calling
> setlocale(LC_MESSAGES, NULL) and makes a copy of the return value
> which is then modified to find the translation file to use. The return
> value of setlocale(LC_MESSAGES, "") doesn't have the problem
> demonstrated above for the return value of setlocale(LC_ALL,""), it
> looks like it can safely be parsed to find the language subdirectory
> where to find the openbox.cat file with the translated messages.
Thanks for the patch. One quick note is I believe it would be preferable to
use a std::string to make a copy of the value instead of strdup. strdup is
not a portable function.
Ben
--
I am damn unsatisfied to be killed in this way.
http://www.icculus.org/openbox/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20030331/c4d21d5b/attachment.pgp>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic