2007-09-10 01:09:26

by James C. Georgas

[permalink] [raw]
Subject: unfamiliar notation

I just came across a notation that I haven't seen before. It's in
scripts/mconf.c:

str_append(&help, _(menu_get_help(menu)));

What's the deal with the underscore and the parentheses surrounding the
call to menu_get_help?

James
/\V


2007-09-10 01:20:27

by Bernd Eckenfels

[permalink] [raw]
Subject: Re: unfamiliar notation

In article <[email protected]> you wrote:
> What's the deal with the underscore and the parentheses surrounding the
> call to menu_get_help?

it is a macro from gettext, used to translate the string. Usually this
should only be used on string constants.

Gruss
Bernd

2007-09-10 01:45:27

by Sam Ravnborg

[permalink] [raw]
Subject: Re: unfamiliar notation

On Mon, Sep 10, 2007 at 03:20:15AM +0200, Bernd Eckenfels wrote:
> In article <[email protected]> you wrote:
> > What's the deal with the underscore and the parentheses surrounding the
> > call to menu_get_help?
>
> it is a macro from gettext, used to translate the string. Usually this
> should only be used on string constants.
Correct.
And only in kconfig since this is the only piece of code supporting gettext in the kernel.

Sam

2007-09-11 02:00:55

by Oleg Verych

[permalink] [raw]
Subject: Re: unfamiliar notation

* Sun, 09 Sep 2007 21:09:01 -0400
* Organization: Georgas Software Solutions
>
> I just came across a notation that I haven't seen before. It's in
> scripts/mconf.c:
>
> str_append(&help, _(menu_get_help(menu)));
>
> What's the deal with the underscore and the parentheses surrounding the
> call to menu_get_help?
>
> James

James, text file called ABOUT-NLS is shipped in many open source
programs for more that ten years.

After that, you are asking such dumb questions in LKML? How reliable are
you skills and experience in userspace development to start with, huh?

> /\V

Rhetoric question, don't send anything back to list, please.
--
-o--=O`C
#oo'L O
<___=E M