]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libcpu: consistently use _(Str) instead of gettext(Str)
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 16 Dec 2020 08:00:00 +0000 (08:00 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 16 Dec 2020 10:01:52 +0000 (10:01 +0000)
eu-config.h defines _(Str) to dgettext ("elfutils", Str) instead of
a simple gettext (Str) for a reason: the library might be indirectly
used by clients that called bindtextdomain with a domain different
from "elfutils".

The change was made automatically using the following command:
$ git grep -l '\<gettext *(' libcpu |xargs sed -i 's/\<gettext *(/_(/g'

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
libcpu/ChangeLog
libcpu/i386_lex.l
libcpu/i386_parse.y

index 000105bf9ebfd35ef738031618d9986fd6444617..781c8f4146d6347e8d589be9112ce0f56d8aa367 100644 (file)
@@ -1,3 +1,8 @@
+2020-12-16  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * i386_lex.l (invalid_char): Replace gettext(...) with _(...).
+       * i386_parse.y (yyerror): Likewise.
+
 2020-12-12  Dmitry V. Levin  <ldv@altlinux.org>
 
        * bpf_disasm.c (bswap_bpf_insn): Fix spelling typo in comment.
index a4705aa99d5502748633efda3507b27ab1d11b14..b6ec0f87035b86950f6aa8c14fdf789cbf775d27 100644 (file)
@@ -119,8 +119,8 @@ static void
 invalid_char (int ch)
 {
   error (0, 0, (isascii (ch)
-               ? gettext ("invalid character '%c' at line %d; ignored")
-               : gettext ("invalid character '\\%o' at line %d; ignored")),
+               ? _("invalid character '%c' at line %d; ignored")
+               : _("invalid character '\\%o' at line %d; ignored")),
         ch, yylineno);
 }
 
index 90c7bd93449d9720573c06a5ab3c6da5151aabd1..9a92c2e0d7ce21d2f2e2583c77c708cd16cc53cd 100644 (file)
@@ -551,8 +551,8 @@ argcomp:      kBITFIELD
 static void
 yyerror (const char *s)
 {
-  error (0, 0, gettext ("while reading i386 CPU description: %s at line %d"),
-         gettext (s), i386_lineno);
+  error (0, 0, _("while reading i386 CPU description: %s at line %d"),
+         _(s), i386_lineno);
 }