wcslen.c (86170) | wcslen.c (92986) |
---|---|
1/*- 2 * Copyright (c)1999 Citrus Project, 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c)1999 Citrus Project, 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp 27 */ 28 29#include <sys/cdefs.h> |
30#if 0 |
|
30#if defined(LIBC_SCCS) && !defined(lint) 31__RCSID("$NetBSD: wcslen.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); 32#endif /* LIBC_SCCS and not lint */ | 31#if defined(LIBC_SCCS) && !defined(lint) 32__RCSID("$NetBSD: wcslen.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); 33#endif /* LIBC_SCCS and not lint */ |
33__FBSDID("$FreeBSD: head/lib/libc/string/wcslen.c 86170 2001-11-07 19:55:16Z obrien $"); | 34#endif 35__FBSDID("$FreeBSD: head/lib/libc/string/wcslen.c 92986 2002-03-22 21:53:29Z obrien $"); |
34 35#include <assert.h> 36#include <wchar.h> 37 38size_t 39wcslen(s) 40 const wchar_t *s; 41{ 42 const wchar_t *p; 43 44 p = s; 45 while (*p) 46 p++; 47 48 return p - s; 49} | 36 37#include <assert.h> 38#include <wchar.h> 39 40size_t 41wcslen(s) 42 const wchar_t *s; 43{ 44 const wchar_t *p; 45 46 p = s; 47 while (*p) 48 p++; 49 50 return p - s; 51} |