Deleted Added
full compact
wcscat.c (103724) wcscat.c (103999)
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

--- 18 unchanged lines hidden (view full) ---

27 */
28
29#include <sys/cdefs.h>
30#if 0
31#if defined(LIBC_SCCS) && !defined(lint)
32__RCSID("$NetBSD: wcscat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $");
33#endif /* LIBC_SCCS and not lint */
34#endif
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

--- 18 unchanged lines hidden (view full) ---

27 */
28
29#include <sys/cdefs.h>
30#if 0
31#if defined(LIBC_SCCS) && !defined(lint)
32__RCSID("$NetBSD: wcscat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $");
33#endif /* LIBC_SCCS and not lint */
34#endif
35__FBSDID("$FreeBSD: head/lib/libc/string/wcscat.c 103724 2002-09-21 00:29:23Z tjr $");
35__FBSDID("$FreeBSD: head/lib/libc/string/wcscat.c 103999 2002-09-26 09:28:55Z tjr $");
36
37#include <wchar.h>
38
39wchar_t *
40wcscat(s1, s2)
41 wchar_t * __restrict s1;
42 const wchar_t * __restrict s2;
43{
36
37#include <wchar.h>
38
39wchar_t *
40wcscat(s1, s2)
41 wchar_t * __restrict s1;
42 const wchar_t * __restrict s2;
43{
44 wchar_t *p;
45 wchar_t *q;
46 const wchar_t *r;
44 wchar_t *cp;
47
45
48 p = s1;
49 while (*p)
50 p++;
51 q = p;
52 r = s2;
53 while (*r)
54 *q++ = *r++;
55 *q = '\0';
56 return s1;
46 cp = s1;
47 while (*cp != L'\0')
48 cp++;
49 while ((*cp++ = *s2++) != L'\0')
50 ;
51
52 return (s1);
57}
53}