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: wcichr: add wint_t replacement for wcschr Date: Wed, 1 Mar 2023 09:55:31 +0000 (GMT) [thread overview] Message-ID: <20230301095531.95B6E3858426@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9870f1d1ffe36f77328c001fdf402c94f56c25ce commit 9870f1d1ffe36f77328c001fdf402c94f56c25ce Author: Corinna Vinschen <corinna@vinschen.de> AuthorDate: Wed Mar 1 10:36:55 2023 +0100 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Wed Mar 1 10:54:52 2023 +0100 Cygwin: wcichr: add wint_t replacement for wcschr Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/local_includes/wchar.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/winsup/cygwin/local_includes/wchar.h b/winsup/cygwin/local_includes/wchar.h index 125e49ece15c..d1b63859177e 100644 --- a/winsup/cygwin/local_includes/wchar.h +++ b/winsup/cygwin/local_includes/wchar.h @@ -72,6 +72,19 @@ wcilen (const wint_t *wcs) return ret; } +/* like wcschr, just for wint_t */ +static inline wint_t * +wcichr (const wint_t *str, wint_t chr) +{ + do + { + if (*str == chr) + return (wint_t *) str; + } + while (*str++); + return NULL; +} + /* like wcscmp, just for wint_t */ static inline int wcicmp (const wint_t *s1, const wint_t *s2)
reply other threads:[~2023-03-01 9:55 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=20230301095531.95B6E3858426@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: linkBe 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).