Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2003 15:30:09 -0700 (PDT)
From:      "Simon L. Nielsen" <simon@nitro.dk>
To:        freebsd-doc@FreeBSD.org
Subject:   Re: docs/32054: inconsistency between index.3 and rindex.3
Message-ID:  <200304302230.h3UMU92u068641@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: "Simon L. Nielsen" <simon@nitro.dk>
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
 <keramida@freebsd.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304302230.h3UMU92u068641>