From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by sourceware.org (Postfix) with ESMTP id 072D33870848 for ; Wed, 16 Dec 2020 09:54:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 072D33870848 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ldv@altlinux.org Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 849D772C8B5 for ; Wed, 16 Dec 2020 12:54:26 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 79FD77CC819; Wed, 16 Dec 2020 12:54:26 +0300 (MSK) Date: Wed, 16 Dec 2020 12:54:26 +0300 From: "Dmitry V. Levin" To: elfutils-devel@sourceware.org Subject: [PATCH 3/4] libcpu: consistently use _(Str) instead of gettext(Str) Message-ID: <20201216095426.GC26456@altlinux.org> References: <20201216014759.GA21292@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201216014759.GA21292@altlinux.org> X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2020 09:54:28 -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 '\ --- libcpu/ChangeLog | 5 +++++ libcpu/i386_lex.l | 4 ++-- libcpu/i386_parse.y | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index 000105bf..781c8f41 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -1,3 +1,8 @@ +2020-12-16 Dmitry V. Levin + + * i386_lex.l (invalid_char): Replace gettext(...) with _(...). + * i386_parse.y (yyerror): Likewise. + 2020-12-12 Dmitry V. Levin * bpf_disasm.c (bswap_bpf_insn): Fix spelling typo in comment. diff --git a/libcpu/i386_lex.l b/libcpu/i386_lex.l index a4705aa9..b6ec0f87 100644 --- a/libcpu/i386_lex.l +++ b/libcpu/i386_lex.l @@ -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); } diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y index 90c7bd93..9a92c2e0 100644 --- a/libcpu/i386_parse.y +++ b/libcpu/i386_parse.y @@ -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); } -- ldv