[GRASS-dev] po-strings f=?iso-8859-1?B?/A==?=r r.mapcalc
Glynn Clements
glynn at gclements.plus.com
Fri Jul 20 05:19:19 PDT 2012
Maris Nartiss wrote:
> You can't use function to initialize a array (string) in C (Glynn can
> correct me, if I'm wrong).
Correct.
You can't use a function call to initialize static variables (i.e.
global variables or "static" local variables) or any array (whether
static or automatic).
I was thinking about it from the xgettext side (i.e. whether xgettext
recognises concatenated string literals split over multiple lines)
rather than from the C side, so I completely overlooked that issue.
>From the C side, using:
const char *help_text = _("...");
inside main() would work. That may be preferable to putting a large
string literal inside the fputs() call.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list