Re: [OCLUG-Tech] what is the meaning of leading "_" in gcc function calls?
It's GNU gettext, which is used to localize applications. The _() macro is used to loads a localize string. https://www.gnu.org/software/gettext/manual/index.html J-F On Sun, Oct 1, 2017 at 5:47 PM, Robert P. J. Daywrote: > > 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 > > -- > > > Robert P. J. Day Ottawa, Ontario, CANADA > http://crashcourse.ca > > Twitter: http://twitter.com/rpjday > LinkedIn: http://ca.linkedin.com/in/rpjday > > ___ > Linux mailing list > Linux@lists.oclug.on.ca > http://oclug.on.ca/mailman/listinfo/linux > -- Jean-François Bilodeau Senior technical trainer / System developer 819-712-1020 www.chronogears.com ___ Linux mailing list Linux@lists.oclug.on.ca http://oclug.on.ca/mailman/listinfo/linux
Re: [OCLUG-Tech] what is the meaning of leading "_" in gcc function calls?
On Sun, 1 Oct 2017 17:47:50 -0400 (EDT) "Robert P. J. Day"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 ___ Linux mailing list Linux@lists.oclug.on.ca http://oclug.on.ca/mailman/listinfo/linux
[OCLUG-Tech] what is the meaning of leading "_" in gcc function calls?
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 -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Linux mailing list Linux@lists.oclug.on.ca http://oclug.on.ca/mailman/listinfo/linux