Re: gettext usage in libraries



Gediminas Paulauskas <menesis delfi lt> writes: 
> The problem is, that both things need to be called only once. So, add
> them to library initialize function (do they have one, how do I find
> them?), or, make the library use custom
> 
> char* libfoo_gettext (char* str) {
> 	static int initialized = FALSE;
> 	if (!initialized) {
> 		bind......
> 
> What is recomended, best way to do such things?

I think it depends on the library; if a lib already has an init
function, that's the obvious place to do this stuff, if it doesn't,
then something like libfoo_gettext makes sense.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]