linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mbsrtowcs, mbsnrtowcs: wfix
@ 2011-10-15  1:16 David Prévot
       [not found] ` <1318641386-24095-1-git-send-email-taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: David Prévot @ 2011-10-15  1:16 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, David Prévot


Signed-off-by: David Prévot <taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
---
 man3/mbsnrtowcs.3 |    2 +-
 man3/mbsrtowcs.3  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/man3/mbsnrtowcs.3 b/man3/mbsnrtowcs.3
index bbd1d71..9a7a5bf 100644
--- a/man3/mbsnrtowcs.3
+++ b/man3/mbsnrtowcs.3
@@ -80,7 +80,7 @@ next multibyte sequence to be converted, and the number of wide characters
 written to \fIdest\fP is returned.
 .IP 3.
 The multibyte string has been completely converted, including the
-terminating null wide character (\(aq\\0\(aq)
+terminating wide character (\(aq\\0\(aq)
 (which has the side effect of bringing back \fI*ps\fP to the
 initial state).
 In this case \fI*src\fP is set to NULL, and the number of wide
diff --git a/man3/mbsrtowcs.3 b/man3/mbsrtowcs.3
index fcf47ca..fc8c802 100644
--- a/man3/mbsrtowcs.3
+++ b/man3/mbsrtowcs.3
@@ -51,7 +51,7 @@ multibyte sequence to be converted,
 and the number of wide characters written to \fIdest\fP is returned.
 .IP 3.
 The multibyte string has been completely converted, including the
-terminating null wide character (\(aq\\0\(aq), which has the side
+terminating null character (\(aq\\0\(aq), which has the side
 effect of bringing back \fI*ps\fP to the
 initial state.
 In this case \fI*src\fP is set to NULL, and the number of wide
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mbsrtowcs, mbsnrtowcs: wfix
       [not found] ` <1318641386-24095-1-git-send-email-taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
@ 2011-10-15  1:23   ` David Prévot
  2011-10-16  6:09   ` Michael Kerrisk
  1 sibling, 0 replies; 4+ messages in thread
From: David Prévot @ 2011-10-15  1:23 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Michael,

The title of the previous patch should have been:

	mbsrtowcs.3, mbsnrtowcs.3: wfix

sorry about that.

Cheers

David

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOmOCCAAoJELgqIXr9/gnyfK8P/1zbpzpHYcdAAYLrrRvvgAXx
V5d2Vg6AWzZscwT2kUZ37rGZ41lNgs0n8mlSdcmJYvExBMEozAuZOSMxCSQLCeEp
dDQZj7WYS1XU+JnTV88h9ZhAtQ1rooH7atwYCaFu3tXR0AxUV3PtBuQWdI+1SACD
c6PCyoiInH7IVm3dLxk6q1t2Jd0Jx//+UxzvQjb9OiT/KPt0Y2Tv2+QPirSVKUfW
RPsL+U7OZwGcgPg2Dqu4J/NnP+s+7Ytka1gG8DCojFRbuDFLUbq1ezWnJCQ0m991
69epUembQ91A31O1maInfRKV6DFiEt5b6uEBZBjQgSmLDxFMgXTPUnOJGVCBSrZS
tuKkopEbITfK4pTYVArxcTLbwNZt8oVXjYR9JnREPT8grccQSZZzdXMhrLjD9o4s
TiFL0IghhO2tXj3R/0Y48k4/387uvevrUZl2nfEbJx8kVUeC8eM8ru2M0fEjIlqZ
U6uJVT24TkUzPt8SWnjyi69+f5eqjtYiHUL2UQNWs/AltkFz1X6HS8yA8YVScB7k
kZBe7ANatVnMpVD9NrG2iAd6EphYIjhq2jOd9Xrv6vDtSxsc5uGeEAkjAp4Q44Wu
PZYKyQ9mOpZ2X9ZAMZ9XD4QJxd6e+acJondozt6DGL85UJkB7uoWbJQcmjxEiLYD
D2CS18xv9jC5gxwiJ16R
=yjpG
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mbsrtowcs, mbsnrtowcs: wfix
       [not found] ` <1318641386-24095-1-git-send-email-taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
  2011-10-15  1:23   ` David Prévot
@ 2011-10-16  6:09   ` Michael Kerrisk
       [not found]     ` <CAKgNAkhee9nOi0p5B+XHRrd6hW6W4CxogO-dYLh3KhNA-7hDGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Kerrisk @ 2011-10-16  6:09 UTC (permalink / raw)
  To: David Prévot; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi David,

On Sat, Oct 15, 2011 at 3:16 AM, David Prévot <taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org> wrote:
>
> Signed-off-by: David Prévot <taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
> ---
>  man3/mbsnrtowcs.3 |    2 +-
>  man3/mbsrtowcs.3  |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/man3/mbsnrtowcs.3 b/man3/mbsnrtowcs.3
> index bbd1d71..9a7a5bf 100644
> --- a/man3/mbsnrtowcs.3
> +++ b/man3/mbsnrtowcs.3
> @@ -80,7 +80,7 @@ next multibyte sequence to be converted, and the number of wide characters
>  written to \fIdest\fP is returned.
>  .IP 3.
>  The multibyte string has been completely converted, including the
> -terminating null wide character (\(aq\\0\(aq)
> +terminating wide character (\(aq\\0\(aq)
>  (which has the side effect of bringing back \fI*ps\fP to the
>  initial state).
>  In this case \fI*src\fP is set to NULL, and the number of wide
> diff --git a/man3/mbsrtowcs.3 b/man3/mbsrtowcs.3
> index fcf47ca..fc8c802 100644
> --- a/man3/mbsrtowcs.3
> +++ b/man3/mbsrtowcs.3
> @@ -51,7 +51,7 @@ multibyte sequence to be converted,
>  and the number of wide characters written to \fIdest\fP is returned.
>  .IP 3.
>  The multibyte string has been completely converted, including the
> -terminating null wide character (\(aq\\0\(aq), which has the side
> +terminating null character (\(aq\\0\(aq), which has the side
>  effect of bringing back \fI*ps\fP to the
>  initial state.
>  In this case \fI*src\fP is set to NULL, and the number of wide

This is one patch where I need some helpful explanation ;-).

Your changes above seem inconsistent. In the first case, you remove
"null", and in the second, you remove "wide". I suspect the first case
is a mistake, and you meant in both cases to change "null wide" to
"null", right?

But, more generally, I think you are saying that there were some
pieces of my older e9c23bc636426366d659809bc99cd84661e86464 that
incorrectly changed "[terminating] null character" to "[terminating]
null wide character", right?

If that's the case, I suspect that there more than just those two
errors. I suspect that the first of my changes to mbstowcs.3 below was
also incorrect. Can you confirm?

Cheers,

Michael

PS See also 3c81e148a228550b4ce3d20a9c68ce0eb91cef07, which I just
pushed (to github). Do you agree with that change?


--- a/man3/mbstowcs.3
+++ b/man3/mbstowcs.3
@@ -42,9 +42,9 @@ case the number of wide characters written to \fIdest\fP is re
turned, but the
 shift state at this point is lost.
 .IP 3.
 The multibyte string has been completely converted, including the
-terminating \(aq\\0\(aq.
+terminating null wide character (\(aq\\0\(aq).
 In this case the number of wide characters written to
-\fIdest\fP, excluding the terminating L\(aq\\0\(aq character, is returned.
+\fIdest\fP, excluding the terminating null wide character, is returned.
 .PP
 The programmer must ensure that there is room for at least \fIn\fP wide
 characters at \fIdest\fP.


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mbsrtowcs, mbsnrtowcs: wfix
       [not found]     ` <CAKgNAkhee9nOi0p5B+XHRrd6hW6W4CxogO-dYLh3KhNA-7hDGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-10-16 13:15       ` David Prévot
  0 siblings, 0 replies; 4+ messages in thread
From: David Prévot @ 2011-10-16 13:15 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Michael,

Le 16/10/2011 02:09, Michael Kerrisk a écrit :

> and you meant in both cases to change "null wide" to
> "null", right?

Sure, sorry about that.

> But, more generally, I think you are saying that there were some
> pieces of my older e9c23bc636426366d659809bc99cd84661e86464 that
> incorrectly changed "[terminating] null character" to "[terminating]
> null wide character", right?

I didn't checked them all (yet), but your example bellow seems to concur
with that assumption.

> I suspect that the first of my changes to mbstowcs.3 below was
> also incorrect. Can you confirm?

>  The multibyte string has been completely converted, including the
> -terminating \(aq\\0\(aq.
> +terminating null wide character (\(aq\\0\(aq).

The change is indeed wrong, since \(aq\\0\(aq (i.e. '\0') is the
terminating null byte (or character, but I think you tried to
consistently use “byte” in your last changes), which is different from
L\(aq\\0\(aq (i.e. L'\0'), the terminating null wide character.

> PS See also 3c81e148a228550b4ce3d20a9c68ce0eb91cef07, which I just
> pushed (to github). Do you agree with that change?

Given the context (wide → multibyte), I agree that the “terminating
null” in the destination string should be the terminating null byte
('\0'), but I didn't check the source code, or didn't test it either
(just came across the previous inconsistencies while updating the French
translations of these pages).

Regards

David

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOmtj+AAoJELgqIXr9/gny9P4QAKWp9R22ZaSzHEPycEgcsqSw
/H+BwFGpCgEX+Z0AWm2NSX4gc+5XPiX/gJQpOkFzMlRJ17no6KfLEaxSxV8cHKzJ
8NnYa6eK5KMbCg4QBicNi6BKiiLj35QY1h3h70HX/pmcbr0gmbEexuqj/dwnwBPB
1WPwpZ3fcNzCYRDZzEkzXOfXhoFlGC+XfOOC5Uwn56TEXx03gGFeJsCTRW9V7lzX
0VL9n8E3FLGJSW8Am/EQ8hGzwGbiuzXaJntkwNj3b5kaof/wc7iwo82xwgX3Nc+K
l6+d+NuK1hbY8Cvu81B0jOtv6MTdPR14x5lo0YtM/onLHKs5a4Rt149/sH0zlGQO
uAEh+FEv59D0qvJkkeZsXpWjehqs1YJDv82bRcfz5H4ZIVUzJTnKhBQnI4MjX2m9
gTNg1eiC7+Jt0qge5L7PRwVGuxiCI1MG5tGeogiGdv/GCEIqJ6OFwQjeFjk3Iz1m
pTvm0AcLyNz/w70rGQ8vfIsPscuIy1tY0t00vioIDaHv6kAdCuYVytU33OHK5jWQ
xdXMwWGdwWH1nYjhYU5gwoFsQUQpgmHugwTgXsEIgvgvopGp9OhHLd+kcDUw7Uyn
3HVBdDG522B4TwstBTdpyMMhlOgRAGvBHsfYVrvtIecHm/JgxLwoPr2KLyC1n9MD
/iuRZR2+K6YdTAfen3vi
=B/Qv
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2011-10-16 13:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15  1:16 [PATCH] mbsrtowcs, mbsnrtowcs: wfix David Prévot
     [not found] ` <1318641386-24095-1-git-send-email-taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2011-10-15  1:23   ` David Prévot
2011-10-16  6:09   ` Michael Kerrisk
     [not found]     ` <CAKgNAkhee9nOi0p5B+XHRrd6hW6W4CxogO-dYLh3KhNA-7hDGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-16 13:15       ` David Prévot

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 NNTP newsgroup(s).