panic() cleanup.
[minix.git] / lib / libc / ansi / wcstombs.c
blob97e5f8fa69dcf82f21037497659c0c35eb6b587d
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>
8 #include <locale.h>
10 size_t
11 wcstombs(register char *s, register const wchar_t *pwcs, size_t n)
13 register int i = n;
15 while (--i >= 0) {
16 if (!(*s++ = *pwcs++))
17 break;
19 return n - i - 1;