From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 37DDC3858403 for ; Mon, 21 Mar 2022 14:07:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37DDC3858403 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4KMbzY4Txfz9sV3; Mon, 21 Mar 2022 15:07:37 +0100 (CET) Date: Mon, 21 Mar 2022 15:07:32 +0100 From: Max Gautier To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v5 2/4] iconv: Better mapping to RFC for UTF-7 Message-ID: Mail-Followup-To: Max Gautier , Adhemerval Zanella , libc-alpha@sourceware.org References: <87blcw9ptq.fsf@oldenburg.str.redhat.com> <20211209093152.313872-1-mg@max.gautier.name> <20211209093152.313872-3-mg@max.gautier.name> <56099b45-e0de-17ac-7cbb-de7d4cec27dc@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 21 Mar 2022 14:07:40 -0000 On Mon, Mar 21, 2022 at 08:59:27AM -0300, Adhemerval Zanella wrote: > > > On 21/03/2022 08:53, Adhemerval Zanella wrote: > > > > > > On 20/03/2022 13:41, Max Gautier via Libc-alpha wrote: > >> - Direct use of characters instead of arcane arrays > >> - isxbase64 is not the Modified BASE64 alphabet, but the characters who > >> needs to trigger an explicit shift back to US-ASCII. Make that clearer > >> > >> Signed-off-by: Max Gautier > > > > > > LGTM, thanks. > > > > Reviewed-by: Adhemerval Zanellla > > > >> --- > >> iconvdata/utf-7.c | 64 ++++++++++++++++++++++++----------------------- > >> 1 file changed, 33 insertions(+), 31 deletions(-) > >> > >> diff --git a/iconvdata/utf-7.c b/iconvdata/utf-7.c > >> index 9ba0974959..15f3669ac8 100644 > >> --- a/iconvdata/utf-7.c > >> +++ b/iconvdata/utf-7.c > >> @@ -30,20 +30,27 @@ > >> > >> > >> > >> +static bool > >> +between (uint32_t const ch, > >> + uint32_t const lower_bound, uint32_t const upper_bound) > >> +{ > >> + return (ch >= lower_bound && ch <= upper_bound); > >> +} > >> + > >> /* The set of "direct characters": > >> A-Z a-z 0-9 ' ( ) , - . / : ? space tab lf cr > >> */ > >> > >> -static const unsigned char direct_tab[128 / 8] = > >> - { > >> - 0x00, 0x26, 0x00, 0x00, 0x81, 0xf3, 0xff, 0x87, > >> - 0xfe, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x07 > >> - }; > >> - > >> -static int > >> -isdirect (uint32_t ch) > >> +static bool > >> +isdirect (uint32_t ch, enum variant var) > >> { > > In fact I am seeing this failure: > > utf-7.c:45:29: error: ‘enum variant’ declared inside parameter list will not be visible outside of this definition o > r declaration [-Werror] > 45 | isdirect (uint32_t ch, enum variant var) > | ^~~~~~~ > > Since 'enum variant' in only defined on next patch. Usually the best > practice is keep each patch consistent, so could you move the definition > on this patch? > > Or I can fix it for you before installing, it is up to you. > I think I mixed up my patches while integrating the corrections and style fixes you mentionned, sorry. No problem for me I you fix it before applying. Thanks ! -- Max Gautier