From patchwork Wed Nov 2 17:17:02 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: 59799 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 F18873856DE7 for ; Wed, 2 Nov 2022 17:17:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F18873856DE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667409455; bh=Xno3yWuOWK9/ojREtlOGMqfLfZhdJkmWcnVLdy92LOA=; 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=wGCscr6Wg04JyCcZy9+ZUOcubI65yL1sOKjy/yXDAzUx5yTwmBua3pxCDK0xhVyvn WCJAGPFQXI3ibydeqOruCuFmPb8ML/sEfIZcOBgUpf2++hzOHOA3K7Tc6C+lCWZVtf Dd1cIyGN3r5iMuO83YUsnmTD5bDFDYMubgJpieSc= 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 726E2385AE75 for ; Wed, 2 Nov 2022 17:17:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 726E2385AE75 Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 375724E56; Wed, 2 Nov 2022 18:17:03 +0100 (CET) Date: Wed, 2 Nov 2022 18:17:02 +0100 To: libc-alpha@sourceware.org Subject: [PATCH v6 1/2] iconvdata/tst-table-charmap.sh: remove handling of old, borrowed format Message-ID: <28e75030de6c069b8f4fa9092c3a54d8e02bda47.1667409408.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=-8.0 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, PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC, SPF_HELO_NONE, SPF_PASS, TXREP 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 Reviewed-by: Florian Weimer --- new in v4: nothing new in v5: nothing new in v6: clean rebase 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,