* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
@ 2011-08-30 19:36 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2011-08-31 9:04 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2011-08-30 19:36 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org
--- Comment #1 from Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> 2011-08-30 19:36:38 ---
Send us a patch ;)
Documentation/SubmittingPatches has some guidelines.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
2011-08-30 19:36 ` [Bug 42042] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2011-08-31 9:04 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2011-08-31 9:05 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2011-08-31 9:04 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
--- Comment #2 from James Hunt <jamesodhunt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2011-08-31 09:04:06 ---
Created an attachment (id=70952)
--> (https://bugzilla.kernel.org/attachment.cgi?id=70952)
update to strchr.3 and memchr.3
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
2011-08-30 19:36 ` [Bug 42042] " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2011-08-31 9:04 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2011-08-31 9:05 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2011-08-31 9:15 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2011-08-31 9:05 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
--- Comment #3 from James Hunt <jamesodhunt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2011-08-31 09:05:48 ---
Created an attachment (id=70962)
--> (https://bugzilla.kernel.org/attachment.cgi?id=70962)
test program showing behaviour of strchr, strrchr, memchr, strchrnul, and
strstr.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
` (2 preceding siblings ...)
2011-08-31 9:05 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2011-08-31 9:15 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2011-09-01 8:04 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2011-08-31 9:15 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
--- Comment #4 from James Hunt <jamesodhunt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2011-08-31 09:15:31 ---
Test program run on:
- Ubuntu Natty (11.04) system with libc6 version 2.13-0ubuntu13 (egcs).
- Fedora 15 system with glibc version 2.13.90-9.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
` (3 preceding siblings ...)
2011-08-31 9:15 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2011-09-01 8:04 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-04-23 20:32 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2011-09-01 8:04 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
--- Comment #5 from James Hunt <jamesodhunt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2011-09-01 08:04:46 ---
The BSD folk already have this behaviour documented in their man pages:
http://www.freebsd.org/cgi/man.cgi?query=strchr&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&arch=default&format=html
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
` (4 preceding siblings ...)
2011-09-01 8:04 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2012-04-23 20:32 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-04-23 20:36 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-04-23 20:32 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
--- Comment #6 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-04-23 20:32:31 ---
James,
Thanks for the detailed report, and sorry I've been slow to respond.
For strchr(3), I applied a variation of what you proposed:
--- a/man3/strchr.3
+++ b/man3/strchr.3
@@ -28,7 +28,7 @@
.\" 2006-05-19, Justin Pryzby <pryzbyj-4haIdLZGnXT/8jPEf8fH3w@public.gmane.org>
.\" Document strchrnul(3).
.\"
-.TH STRCHR 3 2010-09-20 "GNU" "Linux Programmer's Manual"
+.TH STRCHR 3 2012-04-24 "GNU" "Linux Programmer's Manual"
.SH NAME
strchr, strrchr, strchrnul \- locate character in string
.SH SYNOPSIS
@@ -72,6 +72,11 @@ and
.BR strrchr ()
functions return a pointer to
the matched character or NULL if the character is not found.
+The terminating null byte is considered part of the string,
+so that if
+.I c
+is specified as \(aq\\0\(aq,
+these functions return a pointer to the terminator.
The
.BR strchrnul ()
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
` (5 preceding siblings ...)
2012-04-23 20:32 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2012-04-23 20:36 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-04-23 20:46 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-04-23 20:36 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
--- Comment #7 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-04-23 20:36:56 ---
James,
Regarding memchr(), I'm not sure a change is warranted. memchr() is defined in
terms of 'bytes' and 'memory areas', rather than strings, so I'd have said it
would take an obtuse reading to consider that '\0' is interpreted specially
(whereas, as you say, one could be left doubtful about what strchr() does when
c is '\0').
I'd guess that this is also why POSIX and the FreeBSD man page make no
statement on this pont.
So, I'm inclined not to make a change.
Thanks,
Michael
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
` (6 preceding siblings ...)
2012-04-23 20:36 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2012-04-23 20:46 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-04-23 21:19 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-04-23 21:19 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-04-23 20:46 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
--- Comment #8 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-04-23 20:46:33 ---
One further note about memchr(3) though. It does talk about the argument c as a
*character*, and rawmemchr() also talks about strings, which clouds the issue
somewhat. I'll do some rewrites there to refer rather to "bytes" and "memory
areas".
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
` (7 preceding siblings ...)
2012-04-23 20:46 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2012-04-23 21:19 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2012-04-23 21:19 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-04-23 21:19 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
--- Comment #9 from Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-04-23 21:19:03 ---
James, all changes are pushed to kernel.org git now.
I'll close this now. Please reopen if you thing there's more to be said about
memchr().
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread* [Bug 42042] strchr(3) and memchr(3) should explain behaviour when character 'c' is '\0'.
[not found] ` <bug-42042-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
` (8 preceding siblings ...)
2012-04-23 21:19 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
@ 2012-04-23 21:19 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r @ 2012-04-23 21:19 UTC (permalink / raw)
To: linux-man-u79uwXL29TY76Z2rM5mHXA
https://bugzilla.kernel.org/show_bug.cgi?id=42042
Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |CODE_FIX
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
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] 11+ messages in thread