All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wcstok.3: Fix type mismatch in the example
@ 2021-07-12 16:40 Jakub Wilk
  2021-08-10  6:42 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Wilk @ 2021-07-12 16:40 UTC (permalink / raw)
  To: Michael Kerrisk; +Cc: linux-man

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
---
 man3/wcstok.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man3/wcstok.3 b/man3/wcstok.3
index 401411d98..af642ca46 100644
--- a/man3/wcstok.3
+++ b/man3/wcstok.3
@@ -108,9 +108,9 @@ The following code loops over the tokens contained in a wide-character string.
 wchar_t *wcs = ...;
 wchar_t *token;
 wchar_t *state;
-for (token = wcstok(wcs, " \et\en", &state);
+for (token = wcstok(wcs, L" \et\en", &state);
     token != NULL;
-    token = wcstok(NULL, " \et\en", &state)) {
+    token = wcstok(NULL, L" \et\en", &state)) {
     ...
 }
 .EE
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wcstok.3: Fix type mismatch in the example
  2021-07-12 16:40 [PATCH] wcstok.3: Fix type mismatch in the example Jakub Wilk
@ 2021-08-10  6:42 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-08-10  6:42 UTC (permalink / raw)
  To: Jakub Wilk; +Cc: mtk.manpages, linux-man

Hello Jakub,

On 7/12/21 6:40 PM, Jakub Wilk wrote:
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>

Thanks. Patch applied.

Cheers,

Michael

> ---
>  man3/wcstok.3 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man3/wcstok.3 b/man3/wcstok.3
> index 401411d98..af642ca46 100644
> --- a/man3/wcstok.3
> +++ b/man3/wcstok.3
> @@ -108,9 +108,9 @@ The following code loops over the tokens contained in a wide-character string.
>  wchar_t *wcs = ...;
>  wchar_t *token;
>  wchar_t *state;
> -for (token = wcstok(wcs, " \et\en", &state);
> +for (token = wcstok(wcs, L" \et\en", &state);
>      token != NULL;
> -    token = wcstok(NULL, " \et\en", &state)) {
> +    token = wcstok(NULL, L" \et\en", &state)) {
>      ...
>  }
>  .EE
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-10  6:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 16:40 [PATCH] wcstok.3: Fix type mismatch in the example Jakub Wilk
2021-08-10  6:42 ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.