[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

src/error.d: dynamic initializations



Hi,

I've a question about ERROR.D. I've seen that the previous scheme of
initialization of the error messages inside a static array has been
abandoned in favor of a dynamic one since the introduction of GETTEXT.
I'm wondering why.  Dynamic initializations (init_errormsg_table())
cause startup time.  I'm reading the gettext documentation at
<http://www.delorie.com/gnu/docs/gettext/gettext_17.html#SEC17> and
understand that it should be possible to initialize these messages in
a static array just as before.  There's an example which looks like
it perfectly matches what's needed in CLISP:

  static const char *messages[] = {
    gettext_noop ("some very meaningful message"),
    gettext_noop ("and another one")
  };
string
  = index > 1 ? gettext ("a default message") : gettext (messages[index]);

Is it just not possible?

	Jo"rg Ho"hle.
Joerg.Hoehle@gmd.de			hoehle@zeus.gmd.de
http://zeus.gmd.de/~hoehle/amiga.html