[{"id":1795025,"web_url":"http://patchwork.ozlabs.org/comment/1795025/","msgid":"<CAKCAbMhwMtsfDG3vofgG=ZpRojYJxjvjBrnkEZ3RQEjq8=tGJA@mail.gmail.com>","list_archive_url":null,"date":"2017-10-27T16:37:05","subject":"Re: [RFC][PATCH v9 4/6] Abbreviated alternative month names (%Ob)\n\talso added (bug 10871).","submitter":{"id":65878,"url":"http://patchwork.ozlabs.org/api/people/65878/","name":"Zack Weinberg","email":"zackw@panix.com"},"content":"On Tue, Sep 19, 2017 at 6:43 AM, Rafal Luzynski\n<digitalfreak@lingonborough.com> wrote:\n> All the previous changes (except the backward compatibility) also\n> repeated to support abbreviated alternative month names.\n> In most languages which have declension and need nominative/genitive\n> month names the abbreviated forms for both cases are the same.\n> An example where they do differ is May in Russian: this name is\n> too short to be abbreviated so even the abbreviated form feature\n> the declension suffixes.\n\nAgain, I'm reviewing this on the assumption that the feature has\nconsensus, and I'm asking Joseph to check for conformance problems.\n\n>         [BZ #10871]\n>         * locale/C-time.c: Add abbreviated alternative month names, define\n>         them as the same as abbreviated month names explicitly.\n>         * locale/categories.def: ab_alt_mon and wide-ab_alt_mon added.\n>         * locale/langinfo.h: _NL_[W]ABALTMON_1 .. _NL_[W]ABALTMON_12\n>         defined.\n>         * locale/programs/ld-time.c: Abbreviated alternative month names\n>         support added, they are a copy of abmon if not provided\n>         explicitly.\n>         * locale/programs/locfile-kw.gperf: ab_alt_mon defined.\n>         * locale/programs/locfile-token.h: tok_ab_alt_mon defined.\n>         * time/strftime_l.c: %Ob (%Oh) format for abbreviated\n>         alternative month names added.\n>         * time/strptime_l.c: Abbreviated alternative month names also\n>         recognized.\n\nSame concerns re the ChangeLog as I expressed for the earlier patch.\n\n> --- a/time/strptime_l.c\n> +++ b/time/strptime_l.c\n> @@ -126,6 +126,8 @@ extern const struct __locale_data _nl_C_LC_TIME\n> attribute_hidden;\n>  # define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string)\n>  # define alt_month_name \\\n>    (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ALTMON_1)].string)\n> +# define ab_alt_month_name \\\n> +  (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (_NL_ABALTMON_1)].string)\n>  # define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string)\n>  # define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string)\n>  # define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string)\n> @@ -417,6 +419,18 @@ __strptime_internal (const char *rp, const char *fmt,\n> struct tm *tmp,\n>                         decided_longest = loc;\n>                     }\n>                   trp = rp;\n> +                 if (match_string (_NL_CURRENT (LC_TIME, _NL_ABALTMON_1 + cnt),\n> +                                   trp)\n> +                     && trp > rp_longest)\n> +                   {\n> +                     rp_longest = trp;\n> +                     cnt_longest = cnt;\n> +                     if (s.decided == not\n> +                         && strcmp (_NL_CURRENT (LC_TIME, _NL_ABALTMON_1 + cnt),\n> +                                    alt_month_name[cnt]))\n> +                       decided_longest = loc;\n> +                   }\n> +                 trp = rp;\n>  #endif\n>                   if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), trp)\n>                       && trp > rp_longest)\n> @@ -447,6 +461,8 @@ __strptime_internal (const char *rp, const char *fmt, struct\n> tm *tmp,\n>  #ifdef _LIBC\n>                       || ((trp = rp, match_string (alt_month_name[cnt], trp))\n>                           && trp > rp_longest)\n> +                     || ((trp = rp, match_string (ab_alt_month_name[cnt], trp))\n> +                         && trp > rp_longest)\n>  #endif\n>                       || ((trp = rp, match_string (ab_month_name[cnt], trp))\n>                           && trp > rp_longest)))\n\nThis appears to make the order-of-checks inconsistency, that I\nremarked on in the previous patch, even worse.  Please make sure the\nchecks are done in a consistent order in both places.\n\nOtherwise looks good to me.\n\nzw","headers":{"Return-Path":"<libc-alpha-return-86485-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-86485-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"W40V3K1N\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yNqKV624gz9t4c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 28 Oct 2017 03:37:18 +1100 (AEDT)","(qmail 109009 invoked by alias); 27 Oct 2017 16:37:10 -0000","(qmail 108474 invoked by uid 89); 27 Oct 2017 16:37:10 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc:content-type; q=dns; s=default; b=ceNE\n\tQ5NdqriBenyrm0JazzY+A8giBQO+Jq8wD8xNCNQTu9mEGxHIfnJo/Q3ZeJuqNL07\n\tZTYFW3vhw+IhkMnvLZ4DPotDMfpOAV19qVUbOB9Jh4QtZNs1plvUbbqmjX8QQosW\n\te4OzgbPgq0j8V/VyrcJVVq7hHaFJmqTvAggO2nM=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc:content-type; s=default; bh=osuBYwpm/7\n\t+0Osn7LeiNOlct3zI=; b=W40V3K1NG6selbK+UEwsIcMN2HyrhNn9ZjefFAFpbI\n\t7t1TPGGDinoozN7UhWXJh6aoBia0Zn4CA+exELnh1+6npD5r+8AVHWMhys41aGHV\n\tNs0EuTbIiX8UI+tmjE6Ud4mmINa1TyD/MP2JzvkiFbmKBmSacgiLt7wFSOuQVoBq\n\tY=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-10.5 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_2, GIT_PATCH_3, RCVD_IN_SORBS_SPAM, RP_MATCHES_RCVD,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=russian, Russian,\n\tHx-languages-length:3286, month","X-HELO":"mailbackend.panix.com","X-Gm-Message-State":"AMCzsaXq+lKIsYEUWj7O8v00XHbdaM56Yi0ld/EU6yezE0lrlWJ7obs7\n\tKJDo2Uz446ERXIOvCBSzXNcfk1x/+Vto9zsA9lg=","X-Google-Smtp-Source":"ABhQp+T23Bq70Q8lLptyt0O4zLhYBOJFfo4MXh8NFAfqEHml4o9Gv9cBlMO6XOUIQmzwgQz9FXRlb2Y9IMtBdi8cMi8=","X-Received":"by 10.202.196.194 with SMTP id u185mr492047oif.259.1509122226451;\n\tFri, 27 Oct 2017 09:37:06 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<604461725.1094943.1505817835815@poczta.nazwa.pl>","References":"<604461725.1094943.1505817835815@poczta.nazwa.pl>","From":"Zack Weinberg <zackw@panix.com>","Date":"Fri, 27 Oct 2017 12:37:05 -0400","X-Gmail-Original-Message-ID":"<CAKCAbMhwMtsfDG3vofgG=ZpRojYJxjvjBrnkEZ3RQEjq8=tGJA@mail.gmail.com>","Message-ID":"<CAKCAbMhwMtsfDG3vofgG=ZpRojYJxjvjBrnkEZ3RQEjq8=tGJA@mail.gmail.com>","Subject":"Re: [RFC][PATCH v9 4/6] Abbreviated alternative month names (%Ob)\n\talso added (bug 10871).","To":"Rafal Luzynski <digitalfreak@lingonborough.com>","Cc":"GNU C Library <libc-alpha@sourceware.org>,\n\tJoseph Myers <joseph@codesourcery.com>","Content-Type":"text/plain; charset=\"UTF-8\""}}]