Date: Thu, 11 Jul 2002 13:00:16 -0700 (PDT) From: Giorgos Keramidas <keramida@freebsd.org> To: freebsd-doc@FreeBSD.org Subject: Re: docs/32054: inconsistency between index.3 and rindex.3 Message-ID: <200207112000.g6BK0GdK098223@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/32054; it has been noted by GNATS. From: Giorgos Keramidas <keramida@freebsd.org> To: Suzuki Koichi <koich@cac.co.jp>, Dima Dorfman <dd@freebsd.org> Cc: bug-followup@freebsd.org Subject: Re: docs/32054: inconsistency between index.3 and rindex.3 Date: Thu, 11 Jul 2002 21:46:49 +0300 On 2001-11-16 19:41 +0000, SUZUKI Koichi wrote: > I found some inconsistency between index.3 and rindex.3. On 2001-11-18 00:36 +0000, Dima Dorfman wrote: > Is there a reason both of these shouldn't be described in one file? > I know some people complained about man pages being overcrowded, but > this seems pretty natural to me. On 2001-11-17 23:30 +0000, SUZUKI Koichi wrote: > I agree with you. > I think these shoud be described together. > > I made a patch to index.3 rev.1.6. > How about this one. > You know, I'm not native. > Please correct if you feel strange. How about this patch to src/lib/libc/string/ to make a link from rindex.3 -> index.3, merge the text of rindex.3 and index.3 and then `cvs remove' of rindex.3? %%% Index: Makefile.inc =================================================================== RCS file: /home/ncvs/src/lib/libc/string/Makefile.inc,v retrieving revision 1.26 diff -u -r1.26 Makefile.inc --- Makefile.inc 27 Nov 2001 07:57:31 -0000 1.26 +++ Makefile.inc 11 Jul 2002 18:34:04 -0000 @@ -30,6 +30,7 @@ string.3 strlcpy.3 strlen.3 strmode.3 strpbrk.3 strrchr.3 strsep.3 \ strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 wmemchr.3 +MLINKS+=index.3 rindex.3 MLINKS+=strcasecmp.3 strncasecmp.3 MLINKS+=strcat.3 strncat.3 MLINKS+=strcmp.3 strncmp.3 Index: index.3 =================================================================== RCS file: /home/ncvs/src/lib/libc/string/index.3,v retrieving revision 1.6 diff -u -r1.6 index.3 --- index.3 1 Oct 2001 16:09:00 -0000 1.6 +++ index.3 11 Jul 2002 18:45:47 -0000 @@ -46,6 +46,9 @@ .In string.h .Ft char * .Fn index "const char *s" "int c" +.Lp +.Ft char * +.Fn rindex "const char *s" "int c" .Sh DESCRIPTION The .Fn index @@ -56,18 +59,25 @@ .Em char ) in the null-terminated string .Fa s . +The +.Fn rindex +function locates the last character matching +.Fa c . .Sh RETURN VALUES A pointer to the character is returned if it is found; otherwise .Dv NULL is returned. If .Fa c -is '\e0', +is +.Ql \e0 , .Fn index -locates the terminating '\e0'. +and +.Fn +locate the terminating +.Ql \e0 . .Sh SEE ALSO .Xr memchr 3 , -.Xr rindex 3 , .Xr strchr 3 , .Xr strcspn 3 , .Xr strpbrk 3 , %%% To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207112000.g6BK0GdK098223>