From owner-freebsd-doc@FreeBSD.ORG Wed Apr 30 15:30:10 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9875637B401 for ; Wed, 30 Apr 2003 15:30:10 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E35143F93 for ; Wed, 30 Apr 2003 15:30:10 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3UMU9Up068645 for ; Wed, 30 Apr 2003 15:30:09 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3UMU92u068641; Wed, 30 Apr 2003 15:30:09 -0700 (PDT) Date: Wed, 30 Apr 2003 15:30:09 -0700 (PDT) Message-Id: <200304302230.h3UMU92u068641@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: "Simon L. Nielsen" Subject: Re: docs/32054: inconsistency between index.3 and rindex.3 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Simon L. Nielsen" List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2003 22:30:11 -0000 The following reply was made to PR docs/32054; it has been noted by GNATS. From: "Simon L. Nielsen" To: freebsd-gnats-submit@FreeBSD.org, koich@cac.co.jp Cc: Subject: Re: docs/32054: inconsistency between index.3 and rindex.3 Date: Thu, 1 May 2003 00:27:05 +0200 --BFVE2HhgxTpCzM8t Content-Type: multipart/mixed; boundary="yr/DzoowOgTDcSCF" Content-Disposition: inline --yr/DzoowOgTDcSCF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello It seems very logical to merge the two man pages like suggested in the PR. I have a few minor changed to the patch that Giorgos Keramidas added to the PR : * No .Lp - there is no seperation between functions in other similar man pages and it renderes in the same way if it is removed. * Slight rewording of the rindex() description. * Fix a .Fn in the RETURN value section to actually reference rindex (appears to be a typo in the original patch). * Remove reference to rindex.3 in Makefile.inc Note if this patch is applied rindex.3 should be removed from the cvs tree. --=20 Simon L. Nielsen --yr/DzoowOgTDcSCF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="man-index.3-sln.patch" Content-Transfer-Encoding: quoted-printable Index: Makefile.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/lib/libc/string/Makefile.inc,v retrieving revision 1.32 diff -u -d -r1.32 Makefile.inc --- Makefile.inc 18 Nov 2002 09:50:56 -0000 1.32 +++ Makefile.inc 30 Apr 2003 22:15:48 -0000 @@ -26,12 +26,13 @@ .endif =20 MAN+=3D bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \ - memcmp.3 memcpy.3 memmove.3 memset.3 rindex.3 strcasecmp.3 strcat.3 \ + memcmp.3 memcpy.3 memmove.3 memset.3 strcasecmp.3 strcat.3 \ strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strdup.3 strerror.3 \ string.3 strlcpy.3 strlen.3 strmode.3 strpbrk.3 strrchr.3 strsep.3 \ strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 wcscoll.3 wcstok.3 \ wcswidth.3 wcsxfrm.3 wmemchr.3 =20 +MLINKS+=3Dindex.3 rindex.3 MLINKS+=3Dstrcasecmp.3 strncasecmp.3 MLINKS+=3Dstrcat.3 strncat.3 MLINKS+=3Dstrcmp.3 strncmp.3 Index: index.3 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/lib/libc/string/index.3,v retrieving revision 1.8 diff -u -d -r1.8 index.3 --- index.3 18 Dec 2002 13:33:03 -0000 1.8 +++ index.3 30 Apr 2003 22:02:38 -0000 @@ -46,6 +46,8 @@ .In strings.h .Ft char * .Fn index "const char *s" "int c" +.Ft char * +.Fn rindex "const char *s" "int c" .Sh DESCRIPTION The .Fn index @@ -56,18 +58,27 @@ .Vt char ) in the null-terminated string .Fa s . +The +.Fn rindex +function is identical to +.Fn index +except it 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 rindex +locate the terminating +.Ql \e0 . .Sh SEE ALSO .Xr memchr 3 , -.Xr rindex 3 , .Xr strchr 3 , .Xr strcspn 3 , .Xr strpbrk 3 , --yr/DzoowOgTDcSCF-- --BFVE2HhgxTpCzM8t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+sE248kocFXgPTRwRAj0BAJ0Ti9G8JJ7dVUEo3h0+70Rjed4LZgCdEGwD Vt6icoISZwXnXIg2lJ09bfA= =HaZM -----END PGP SIGNATURE----- --BFVE2HhgxTpCzM8t--