Kai-Uwe Behrmann wrote:
> Am 21.09.07, 23:38 -0700 schrieb Michael Sweet:
> 
>> Kai-Uwe Behrmann wrote:
>>> ...
>>> Is it proper to say creating the _() entries in the above static 
>>> Fl_Menu_Item array is invalid?
>> No, what you need to do is point _() to a function that does the
>> setlocale() the first time around, and then returns the gettext()
>> value.
> 
> How to get the environment at this stage? At least the executeable 
> path for a relocated initialisation would be desireable. Currently I parse 
> from argv[0] in main().
> 
> But my major concern is, whether doing something before reaching main() is 
> at all relyable.

It is completely reliable and works the same as static/global
initializers.

On Linux you can get the path to the program from the
/proc/PID/exe file.  Other platforms have similar interfaces
and/or access to argc and argv from globals.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to