From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id D974B3858D33; Tue, 28 Feb 2023 15:46:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D974B3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677599175; bh=7BVAKWV5DusPrca3PGQ7EJqvJiW8Y7Xd055MazByV20=; h=From:To:Subject:Date:From; b=IU2vzLXceQEIh3t11OLx/c2qNRu9C8J7anq+/mWgqyLnqudLRq/7Hw5VQgBDPG3zH QPH7v+9oqOvVTkpbwk6JEVJaw9f3/baC3kzoyBo+j3SKdtyCXzwId3sS4U0XrxXzBU x6kqaDYA/0w4HG6owVHUeUpz4LPM9Z8HM1ZGfngI= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: __wscollate_range_cmp: fix incorrect comment X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: c8397ae8171f00dcfb071130e6ea2b64aea17ded X-Git-Newrev: 6e75277b122c47ca63d9520780291cf4bc7251cf Message-Id: <20230228154615.D974B3858D33@sourceware.org> Date: Tue, 28 Feb 2023 15:46:15 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D6e75277b122= c47ca63d9520780291cf4bc7251cf commit 6e75277b122c47ca63d9520780291cf4bc7251cf Author: Corinna Vinschen AuthorDate: Tue Feb 28 12:10:40 2023 +0100 Commit: Corinna Vinschen CommitDate: Tue Feb 28 12:24:29 2023 +0100 Cygwin: __wscollate_range_cmp: fix incorrect comment =20 The comment that the first arg must be the pattern was added during development, before it turned out that __wscollate_range_cmp can be implemented in an order independent way. =20 Better explain why this function uses pointers to strings. =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/nlsfuncs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/nlsfuncs.cc b/winsup/cygwin/nlsfuncs.cc index dd0fc8dc5f4f..04d7072e7987 100644 --- a/winsup/cygwin/nlsfuncs.cc +++ b/winsup/cygwin/nlsfuncs.cc @@ -1212,8 +1212,8 @@ __wcollate_range_cmp (wint_t c1, wint_t c2) =20 /* Not so much BSD. Used from glob.cc, fnmatch.c and regcomp.c. =20 - First arg is always from pattern space, second arg is the tested string. - len is the length of the pattern in the first arg. */ + The args are pointers to wint_t strings. This allows to compare + against collating symbols. */ extern "C" int __wscollate_range_cmp (wint_t *c1, wint_t *c2, size_t c1len, size_t c2len)