Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   kamil
Date:           Sat Oct 15 14:22:00 UTC 2016

Modified Files:
        src/distrib/sets/lists/comp: mi
        src/include: wchar.h
        src/lib/libc/string: Makefile.inc wmemchr.3
Added Files:
        src/lib/libc/string: wcsnlen.c

Log Message:
Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.

This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);

Update STANDARDS section of wmemchr(3) describing wide-character functions.


To generate a diff of this commit:
cvs rdiff -u -r1.2066 -r1.2067 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.41 -r1.42 src/include/wchar.h
cvs rdiff -u -r1.81 -r1.82 src/lib/libc/string/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/string/wcsnlen.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/string/wmemchr.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index