public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/main] Cygwin: __wscollate_range_cmp: fix incorrect comment
Date: Tue, 28 Feb 2023 15:46:15 +0000 (GMT)	[thread overview]
Message-ID: <20230228154615.D974B3858D33@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6e75277b122c47ca63d9520780291cf4bc7251cf

commit 6e75277b122c47ca63d9520780291cf4bc7251cf
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Tue Feb 28 12:10:40 2023 +0100
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Tue Feb 28 12:24:29 2023 +0100

    Cygwin: __wscollate_range_cmp: fix incorrect comment
    
    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.
    
    Better explain why this function uses pointers to strings.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

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)
 
 /* Not so much BSD.  Used from glob.cc, fnmatch.c and regcomp.c.
 
-   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)

                 reply	other threads:[~2023-02-28 15:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230228154615.D974B3858D33@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).