From patchwork Tue Sep 6 18:10:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 57439 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 201773853553 for ; Tue, 6 Sep 2022 18:10:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 201773853553 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662487851; bh=BMossguwNLXbKjvOwgHpd4KbuV7BzAGg/gU7mP30aoU=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=pSAObxeyPbbGG56dQbzdzC94V5yWvsb31HUTZhqIPUOlW002B6Vl58lsfqTRG+t8i viI5ZbjOlwAm0+l268hiFAz62DLnoTeZ/B2AgEm6PUmlt7ZwDGGjy215i+bBf63awd +sRVZWv1sJgqpFNmtLAZsnbBYLI4mEuooeKlqnA0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by sourceware.org (Postfix) with ESMTP id AE6273853553 for ; Tue, 6 Sep 2022 18:10:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE6273853553 Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 9119A9C8; Tue, 6 Sep 2022 20:10:29 +0200 (CEST) Date: Tue, 6 Sep 2022 20:10:28 +0200 To: libc-alpha@sourceware.org Subject: [PATCH v3 1/2] iconvdata/tst-table-charmap.sh: remove handling of old, borrowed format Message-ID: <4f9ff9b04235a8654b866a97dc9adc819ed7e393.1662487816.git.nabijaczleweli@nabijaczleweli.xyz> References: <20220906180657.eo53xia2yqqiv4ri@tarta.nabijaczleweli.xyz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220906180657.eo53xia2yqqiv4ri@tarta.nabijaczleweli.xyz> User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, GIT_PATCH_0, KAM_INFOUSMEBIZ, PDS_OTHER_BAD_TLD, RDNS_DYNAMIC, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?b?0L3QsNCxIHZpYSBMaWJjLWFscGhh?= From: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= Reply-To: =?utf-8?b?0L3QsNCx?= Cc: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" This "Old POSIX/DKUUG borrowed format" handling is original to the file and doesn't seem to have ever been used, i.e. id/t-t-c doesn't seem to have ever been called with argv[1] == POSIX Upcoming is a POSIX charmap, which would inadvertently trigger this: clear the way Signed-off-by: Ahelenia ZiemiaƄska --- iconvdata/gb18030.c | 2 +- iconvdata/tst-table-charmap.sh | 11 +---------- iconvdata/tst-table.sh | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/iconvdata/gb18030.c b/iconvdata/gb18030.c index ab9373cd12..bb93b55361 100644 --- a/iconvdata/gb18030.c +++ b/iconvdata/gb18030.c @@ -32,7 +32,7 @@ /* The tables in this file are generated from the charmap. In a first step, the charmap is converted to a simple table format: - ./tst-table-charmap.sh GB18030 < ../localedata/charmaps/GB18030 \ + ./tst-table-charmap.sh < ../localedata/charmaps/GB18030 \ > GB18030.table */ diff --git a/iconvdata/tst-table-charmap.sh b/iconvdata/tst-table-charmap.sh index 0e5369aa38..36959a02dd 100755 --- a/iconvdata/tst-table-charmap.sh +++ b/iconvdata/tst-table-charmap.sh @@ -22,13 +22,4 @@ LC_ALL=C export LC_ALL -case "$1" in - POSIX ) - # Old POSIX/DKUUG borrowed format - grep '^<.*>.*/x[0-9A-Fa-f]*[ ]*.*$' | grep -v 'not a real character' | sed -e 's,^<.*>[ ]*\([/x0-9A-Fa-f]*\)[ ]*.*$,\1 0x\2,' | tr abcdef ABCDEF | sed -e 's,/x\([0-9A-F][0-9A-F]\),\1,g' | sed -e 's,^,0x,' | sort | uniq | grep -v '^0x00 0x\([1-9A-F]...\|.[1-9A-F]..\|..[1-9A-F].\|...[1-9A-F]\)' - ;; - *) - # New Unicode based format - sed -e 's,^%IRREVERSIBLE%,,' | grep '^[ ]*/x' | grep -v 'not a real character' | sed -e 's,[ ]*\([/x0-9A-Fa-f]*\).*$,\2 0x\1,' -e 's,[ ]*\([/x0-9A-Fa-f]*\).*$,\2 0x\1,' | tr abcdef ABCDEF | sed -e 's,/x\([0-9A-F][0-9A-F]\),\1,g' | sed -e 's,^,0x,' | sort | uniq | grep -v '^0x00 0x\([1-9A-F]...\|.[1-9A-F]..\|..[1-9A-F].\|...[1-9A-F]\)' - ;; -esac +sed -e 's,^%IRREVERSIBLE%,,' | grep '^[ ]*/x' | grep -v 'not a real character' | sed -e 's,[ ]*\([/x0-9A-Fa-f]*\).*$,\2 0x\1,' -e 's,[ ]*\([/x0-9A-Fa-f]*\).*$,\2 0x\1,' | tr abcdef ABCDEF | sed -e 's,/x\([0-9A-F][0-9A-F]\),\1,g' | sed -e 's,^,0x,' | sort | uniq | grep -v '^0x00 0x\([1-9A-F]...\|.[1-9A-F]..\|..[1-9A-F].\|...[1-9A-F]\)' diff --git a/iconvdata/tst-table.sh b/iconvdata/tst-table.sh index f63ab1d8ee..36005c5448 100755 --- a/iconvdata/tst-table.sh +++ b/iconvdata/tst-table.sh @@ -33,7 +33,7 @@ export LC_ALL set -e # Get the charmap. -./tst-table-charmap.sh ${charmap:-$charset} \ +./tst-table-charmap.sh \ < ../localedata/charmaps/${charmap:-$charset} \ > ${objpfx}tst-${charset}.charmap.table # When the charset is GB18030, truncate this table because for this encoding,