at_wini also needs a pci_reserve() for the pci compatability device, if
[minix3.git] / lib / ansi / mbstowcs.c
blob2749cbace423e759982b110ac4ef1e00d03198ee
1 /*
2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
4 */
5 /* $Header$ */
7 #include <stdlib.h>
9 size_t
10 mbstowcs(register wchar_t *pwcs, register const char *s, size_t n)
12 register int i = n;
14 while (--i >= 0) {
15 if (!(*pwcs++ = *s++))
16 return n - i - 1;
18 return n - i;