home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] what is the meaning of leading "_" in gcc function calls?

  • Subject: Re: [OCLUG-Tech] what is the meaning of leading "_" in gcc function calls?
  • From: Shawn H Corey <shawnhcorey [ at ] gmail [ dot ] com>
  • Date: Sun, 1 Oct 2017 18:10:50 -0400
On Sun, 1 Oct 2017 17:47:50 -0400 (EDT)
"Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca> wrote:

> 
>   currently digging through the git source code, and i'm seeing some
> function calls of the form:
> 
>   if (size < len)
>           die(_("too-short tree file"));
> 
>   i'm ashamed to admit, i'm not sure what the above represents -- the
> underscore embedded in that function call? what does it mean?
> 
> rday
> 

IIRC, it has something to done with gettext, a way of extracting text
from the source for translation. It puts the text in a separate file
which can be translated. Then the program can automatically load the
correct translation file for the user's locale.

https://www.gnu.org/software/gettext/ 

-- 
Don't stop where the ink does.

	Shawn H Corey