[LCP]printf format question.

Matteo Ianeselli ianezz at sodalia.it
Mon Jul 16 16:16:04 UTC 2001


Pare che David Filion, in un momento di ispirazione, abbia scritto:

 > printf (_("Try `%s --help' for more information.\n"),  program_name);

This is almost surely a GNU source using GNU GetText() for i18n.

`_' is a legal name for a symbol (variable, function, etc.), and it is
common practice to use that with GetText. 

Basically, `_()' is a function returning the localized version of a
string, according to a message catalog chosen via the LANG environment
variable. 

There is a special exception in GNU coding standards allowing such an
unusual function call.
-- 
UNIX diapers by Pannolini USPTO 2039887  http://www.uspto.gov
Matteo Ianeselli      ianezz AT sodalia.it  (+39) 0461 316452
Visita il LinuxTrent:            http://www.linuxtrent.it



More information about the linuxCprogramming mailing list