NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: standards/52343: wcsnrtombs missing man-page
The following reply was made to PR standards/52343; it has been noted by GNATS.
From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: standards/52343: wcsnrtombs missing man-page
Date: Sun, 27 Aug 2017 13:03:37 +0200
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--EveTDU2RTqsWo3DSaJX7mHXKJWcj9w4vK
Content-Type: multipart/mixed; boundary="G8knJt9mJ3a0gahvcmnVi2hS7kAKcWwMi";
protected-headers="v1"
From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Message-ID: <a6a142c9-7137-0069-5ecd-916ad3bc30ba%gmx.com@localhost>
Subject: Re: standards/52343: wcsnrtombs missing man-page
References: <pr-standards-52343%gnats.netbsd.org@localhost>
<20170626160318.F018C7A2B6%mollari.NetBSD.org@localhost>
<20170827101001.340197A2A6%mollari.NetBSD.org@localhost>
In-Reply-To: <20170827101001.340197A2A6%mollari.NetBSD.org@localhost>
--G8knJt9mJ3a0gahvcmnVi2hS7kAKcWwMi
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
On 27.08.2017 12:10, Abhinav Upadhyay wrote:
> The following reply was made to PR standards/52343; it has been noted b=
y GNATS.
>=20
> From: Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost>
> To: NetBSD GNATS <gnats-bugs%netbsd.org@localhost>
> Cc: standards-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,=20
> netbsd-bugs%netbsd.org@localhost, n54%gmx.com@localhost
> Subject: Re: standards/52343: wcsnrtombs missing man-page
> Date: Sun, 27 Aug 2017 15:36:24 +0530
>=20
> On Tue, Jun 27, 2017 at 6:25 PM, Christos Zoulas <christos%zoulas.com@localhost>=
wrote:
> > The following reply was made to PR standards/52343; it has been note=
d by GNATS.
> >
> > From: christos%zoulas.com@localhost (Christos Zoulas)
> > To: gnats-bugs%NetBSD.org@localhost, standards-manager%netbsd.org@localhost,
> > gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, n54%gmx.com@localhost
> > Cc:
> > Subject: Re: standards/52343: wcsnrtombs missing man-page
> > Date: Tue, 27 Jun 2017 08:53:02 -0400
> >
> > On Jun 27, 11:05am, er.abhinav.upadhyay%gmail.com@localhost (Abhinav Upadhyay=
) wrote:
> > -- Subject: Re: standards/52343: wcsnrtombs missing man-page
> >
> > | OpenBSD and FreeBSD have a man page for this. Can we take it fro=
m
> > | either of them?
> >
> > Yes, we usually take libc stuff from FreeBSD.
> >
> =20
> Does this look fine? Mostly based on the FreeBSD man page. (I will add=
> set entries for wcsnrtombs.3)
> =20
> FreeBSD man page also says that these functions may have EINVAL as a
> possible error but I am not sure if our implementation does that or
> not, so left that part as it is.
> =20
> Index: wcsrtombs.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: /cvsroot/src/lib/libc/locale/wcsrtombs.3,v
> retrieving revision 1.13
> diff -u -r1.13 wcsrtombs.3
> --- wcsrtombs.3 16 Dec 2010 17:42:27 -0000 1.13
> +++ wcsrtombs.3 27 Aug 2017 10:00:58 -0000
> @@ -24,12 +24,12 @@
> .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILI=
TY OF
> .\" SUCH DAMAGE.
> .\"
> -.Dd August 8, 2006
> +.Dd August 27, 2017
> .Dt WCSRTOMBS 3
> .Os
> .\" -----------------------------------------------------------------=
-----
> .Sh NAME
> -.Nm wcsrtombs
> +.Nm wcsrtombs, wcsnrtombs
> .Nd converts a wide-character string to a multibyte character string =
\
> (restartable)
> .\" -----------------------------------------------------------------=
-----
> @@ -41,11 +41,14 @@
> .Ft size_t
> .Fn wcsrtombs "char * restrict s" "const wchar_t ** restrict pwcs" \
> "size_t n" "mbstate_t * restrict ps"
> +.Ft size_t
> +.Fn wcsnrtombs "char * restrict s" "const wchar_t ** restrict pwcs" \=
> +"size_t in" "size_t n" "mbstat_t * restrict ps"
> .\" -----------------------------------------------------------------=
-----
> .Sh DESCRIPTION
> The
> .Fn wcsrtombs
> -converts the nul-terminated wide-character string indirectly pointed
> +function converts the nul-terminated wide-character string indirectly=
pointed
> to by
> .Fa pwcs
> to the corresponding multibyte character string,
> @@ -124,10 +127,22 @@
> .Fn wcsrtombs ,
> which is initialized at startup time of the program.
> .El
> +.Pp
> +The
> +.Fn wcsnrtombs
> +function behaves identically to
> +.Fn wcsrtombs ,
> +except that the conversion stops after reading at most
> +.Fa in
> +characters from the buffer pointed to by
> +.Fa pwcs .
> .\" -----------------------------------------------------------------=
-----
> .Sh RETURN VALUES
> +The
> .Fn wcsrtombs
> -returns:
> +and
> +.Fn wcsnrtombs
> +functions return:
> .Bl -tag -width 012345678901
> .It 0 or positive
> Number of bytes stored in the array pointed to by
> @@ -154,8 +169,11 @@
> .El
> .\" -----------------------------------------------------------------=
-----
> .Sh ERRORS
> +The
> .Fn wcsrtombs
> -may cause an error in the following case:
> +and
> +.Fn wcsnrtombs
> +functions may cause an error in the following case:
> .Bl -tag -width Er
> .It Bq Er EILSEQ
> .Fa pwcs
> @@ -174,3 +192,7 @@
> .St -ansiC .
> The restrict qualifier is added at
> .St -isoC-99 .
> +.Pp
> +The
> +.Fn wcsnrtombs
> +is an extension to the standard.
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html
> 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: /cvsroot/src/lib/libc/locale/Makefile.inc,v
> retrieving revision 1.64
> diff -u -r1.64 Makefile.inc
> --- Makefile.inc 18 Aug 2013 20:03:48 -0000 1.64
> +++ Makefile.inc 27 Aug 2017 10:00:58 -0000
> @@ -52,4 +52,6 @@
> MLINKS+=3Dwcstol.3 wcstoll.3 wcstol.3 wcstoimax.3 \
> wcstol.3 wcstoul.3 wcstol.3 wcstoull.3 wcstol.3 wcstoumax.3
> =20
> +MLINKS+=3Dwcsrtombs.3 wcsnrtombs.3
> +
> COPTS.wcsftime.c =3D -Wno-format-nonliteral
> =20
>=20
The rest looks fine, thanks!
--G8knJt9mJ3a0gahvcmnVi2hS7kAKcWwMi--
--EveTDU2RTqsWo3DSaJX7mHXKJWcj9w4vK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJZoqcXAAoJEEuzCOmwLnZs9hwP/0h+dqHDPUyo+IfCMrbjFIWX
30NbMEGr4SOcoOnoWr8nPiO1bCwrsyLiGQTPj+o2yuYeotnd14qdhnvBjLsOx8wn
y491QH0Dd2EUFaaEiARaONfPBiemkffvt0MV45Q3JNVymVywN3XGY0MYO7KZaIYf
O/6R/fnFBfM8B+9QQxPoNCKBln5UPXQac+8L4pFHqKIxFNKV9stpsbFj3lLnpMZ0
R3fKHZE44NQpmymydWX9ksyiHyS0JFuOuUPe3hGf4JKIwYDvTBWCyNw0CZqq9b3/
vslYmcr3ucmz72C8EGrA0RiEvpmsrFyHj6ALDGBBLSMLQtZq1BrYt10WkvoT7xiM
cv5zoYJUmWcSjORjMwM1noCOGdJMmVKYPTTGcpLqbXW2qDiDS1KX2DxbU9QR6wvO
tCtEe2v7TVotgC0cLJzqm+kCvNaiQuOFOwTyMfpeLICoO9LeGczFoow3iZi0NTvI
6bbQx2l8Sarq4ZAufP+pd+eC1iTJdTfjjx99KXuziOJySh1wBUA3+U79rWaSTnfO
dNPlgo5EmoxWbOewC5dCZuFF83DJFHpbkR8mYO3Bnt6ztgmo7+t05shuu+VW0vEV
QUOUV0cMsHmeXM8IhAf8aEyDv8IifomffsP1O/TD6E3vgRrjZYsWXEGJubLQzDpT
qiWafTm0k5QyFUHA/quM
=etDM
-----END PGP SIGNATURE-----
--EveTDU2RTqsWo3DSaJX7mHXKJWcj9w4vK--
Home |
Main Index |
Thread Index |
Old Index