Re: [PATCH] manual: document wcwidth and wcswidth [BZ #33740]
"Andreas K. Huettel" <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Organization | Gentoo Linux |
| Message-ID | <[email protected]> |
Am Mittwoch, 15. Juli 2026, 00:30:28 Japanische Normalzeit schrieb Nikola Arlotti: > This patch documents functions wcwidth and wcswidth, solving bug > #33740. CC'ing Arjun so he can add it to his stats for the next > glibc contribution workshop ;) Pure documentation enhancement. Can still go in the release once it has a RB. > > Signed-off-by: Nikola Arlotti <[email protected]> > > --- > manual/ctype.texi | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/manual/ctype.texi b/manual/ctype.texi > index d09249c6cf..0eeb3f77de 100644 > --- a/manual/ctype.texi > +++ b/manual/ctype.texi > @@ -380,6 +380,30 @@ by a successful call to @code{wctype}. > This function is declared in @file{wctype.h}. > @end deftypefun > > +@deftypefun int wcwidth (wchar_t @var{wc}) > +@standards{POSIX, wchar.h} > +@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}} > +This function returns the number of collumns needed to represent > +the wide character @var{wc}. If @var{wc} is a printable wide character, > +the value is 0 or higher. If @var{wc} is a null-wide character (L'\0'), > +the value is 0. Otherwise, this function returns -1. > + > +@pindex wchar.h > +This function is declared in @file{wchar.h}. > +@end deftypefun > + > +@deftypefun int wcswidth (const wchar_t @var{*s}, size_t @var{n}) > +@standards{POSIX, wchar.h} > +@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}} > +This function returns the number of collumns needed to represent > +the wide character string pointed to by @var{*s}, but at most > +@var{n} wide characters. If a nonprintable wide character occurs > +among these characters, this function returns -1. > + > +@pindex wchar.h > +This function is declared in @file{wchar.h}. > +@end deftypefun > + > To make it easier to use the commonly-used classification functions, > they are defined in the C library. There is no need to use > @code{wctype} if the property string is one of the known character > -- PD Dr. Andreas K. Hüttel [email protected] Gentoo Linux developer (council, comrel, toolchain, base-system, perl, libreoffice) https://wiki.gentoo.org/wiki/User:Dilfridge
signature.asc
(application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmpXcG4bFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJENwrFiFe1UEq7F4P/iE98xtYg+1iIJf01SkC pCz+vTjyxNIQ51sY6B1pc95t/oagFKEIy1DQAB2ln2vr6HHrqF0+4cOGBM1FXBTQ rZVC0J+NUHy8BnrHXzexjtaf7reT3CGKTaCzPR4eBk/iDng+p3vwwKqpuAVMfvEW RFay7Mb1/+4zC571toXsOWaStiG7ptA8MzdUVhbZGyIzZuf0Mlax76Vlm/WDyb6g 1el7ky1LToJR6DpSmA5K/J6tMTnJy8fkIsrGK2qOC7dUY+8aGzuVFct7YbUcALjI HODM6k9RGRwxVYwOWAKC2ZNagcGc36/JDJBXSMuX2UZ4JEPgl3jyV86cXe0Z0eNW a7lS4X+PHblv1pQzQ6EIBOpEEDLgLjYzL3iKPS6W8pHDh+GDhmQvJanWcShXXSJw mEMVogtOQ0FR97ax00Gy7pIIvso913AtHZvJMDdVd8AQnVItHs7H6s9U4nNHIHsB 6qJDOeKc1gDRN7Pc44yQzHAif4p6b6DqvZDbczRtGL+65HW4cdjbKSHGKyjbvXLb 8MVTci2xTBQDeIIaAAIP+tdtT4cQJjl/vEupCjlPikV+Bnygw2XwOLz05A4brNw9 qs8PsLmIQmWo+NQUdJ0iqPkAUiQRMBeDRf9ZczFor/JkVzIC5n3VHOecqhQB4QZU l3Ixc/ZF8+eb+Qg72rmYUqq5 =tjms -----END PGP SIGNATURE-----