19829d36aSTakuya SHIOZAKI /*-
2d915a14eSPedro F. Giffuni * SPDX-License-Identifier: BSD-2-Clause
3d915a14eSPedro F. Giffuni *
49829d36aSTakuya SHIOZAKI * Copyright (c)1999 Citrus Project,
59829d36aSTakuya SHIOZAKI * All rights reserved.
69829d36aSTakuya SHIOZAKI *
79829d36aSTakuya SHIOZAKI * Redistribution and use in source and binary forms, with or without
89829d36aSTakuya SHIOZAKI * modification, are permitted provided that the following conditions
99829d36aSTakuya SHIOZAKI * are met:
109829d36aSTakuya SHIOZAKI * 1. Redistributions of source code must retain the above copyright
119829d36aSTakuya SHIOZAKI * notice, this list of conditions and the following disclaimer.
129829d36aSTakuya SHIOZAKI * 2. Redistributions in binary form must reproduce the above copyright
139829d36aSTakuya SHIOZAKI * notice, this list of conditions and the following disclaimer in the
149829d36aSTakuya SHIOZAKI * documentation and/or other materials provided with the distribution.
159829d36aSTakuya SHIOZAKI *
169829d36aSTakuya SHIOZAKI * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
179829d36aSTakuya SHIOZAKI * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189829d36aSTakuya SHIOZAKI * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199829d36aSTakuya SHIOZAKI * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
209829d36aSTakuya SHIOZAKI * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219829d36aSTakuya SHIOZAKI * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229829d36aSTakuya SHIOZAKI * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239829d36aSTakuya SHIOZAKI * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249829d36aSTakuya SHIOZAKI * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259829d36aSTakuya SHIOZAKI * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269829d36aSTakuya SHIOZAKI * SUCH DAMAGE.
279829d36aSTakuya SHIOZAKI *
289829d36aSTakuya SHIOZAKI * citrus Id: wmemset.c,v 1.2 2000/12/20 14:08:31 itojun Exp
299829d36aSTakuya SHIOZAKI */
309829d36aSTakuya SHIOZAKI
319829d36aSTakuya SHIOZAKI #include <sys/cdefs.h>
32333fc21eSDavid E. O'Brien #if 0
339829d36aSTakuya SHIOZAKI #if defined(LIBC_SCCS) && !defined(lint)
349829d36aSTakuya SHIOZAKI __RCSID("$NetBSD: wmemset.c,v 1.1 2000/12/23 23:14:37 itojun Exp $");
359829d36aSTakuya SHIOZAKI #endif /* LIBC_SCCS and not lint */
36333fc21eSDavid E. O'Brien #endif
379829d36aSTakuya SHIOZAKI #include <wchar.h>
38*b53d7aa8SKyle Evans #include <ssp/ssp.h>
399829d36aSTakuya SHIOZAKI
409829d36aSTakuya SHIOZAKI wchar_t *
__ssp_real(wmemset)41*b53d7aa8SKyle Evans __ssp_real(wmemset)(wchar_t *s, wchar_t c, size_t n)
429829d36aSTakuya SHIOZAKI {
439829d36aSTakuya SHIOZAKI size_t i;
449829d36aSTakuya SHIOZAKI wchar_t *p;
459829d36aSTakuya SHIOZAKI
469829d36aSTakuya SHIOZAKI p = (wchar_t *)s;
479829d36aSTakuya SHIOZAKI for (i = 0; i < n; i++) {
489829d36aSTakuya SHIOZAKI *p = c;
499829d36aSTakuya SHIOZAKI p++;
509829d36aSTakuya SHIOZAKI }
519829d36aSTakuya SHIOZAKI return s;
529829d36aSTakuya SHIOZAKI }
53