kern/lib/c/include/wchar.h
fef 0f9e9f91a6
libc: port FreeBSD string library routines
Oh my fucking god this was by far the most awful
and boring and tedious day in my entire life.

Also, dear FreeBSD people: please don't sue me.
I tried really hard to comply with all the
copyright stuff, but it is absolutely possible i
made a mistake.  Just DM me and i'll do everything
in my power to fix it, even if that means
releasing entire portions of GayBSD under the BSD
license.  I don't care, i just want stuff to work.

(i'm including this message to use it as possible
evidence in case i get sued to show my good will)
2021-10-10 05:41:16 +02:00

77 lines
2.4 KiB
C

/* See the end of this file for copyright and license terms. */
/*
* i'm *really* tired right now and i don't see a real reason to write fucking
* documentation for these because they are completely POSIX conforming anyway,
* so i'll just defer that to later(TM).
*/
#pragma once
#include <arch/limits.h>
#include <gay/types.h>
wchar_t *wcpcpy(wchar_t *__restrict to, const wchar_t *__restrict from);
wchar_t *wcpncpy(wchar_t *__restrict dst, const wchar_t *__restrict src, usize n);
wchar_t *wcscat(wchar_t *__restrict s1, const wchar_t *__restrict s2);
wchar_t *wcschr(const wchar_t *s, wchar_t c);
int wcscmp(const wchar_t *s1, const wchar_t *s2);
wchar_t *wcscpy(wchar_t *__restrict s1, const wchar_t *__restrict s2);
usize wcscspn(const wchar_t *s, const wchar_t *set);
wchar_t *wcsdup(const wchar_t *s);
usize wcslcat(wchar_t *dst, const wchar_t *src, usize siz);
usize wcslcpy(wchar_t *dst, const wchar_t *src, usize siz);
usize wcslen(const wchar_t *s);
wchar_t *wcsncat(wchar_t *__restrict s1, const wchar_t *__restrict s2, usize n);
int wcsncmp(const wchar_t *s1, const wchar_t *s2, usize n);
wchar_t *wcsncpy(wchar_t *__restrict dst, const wchar_t *__restrict src, usize n);
usize wcsnlen(const wchar_t *s, usize maxlen);
wchar_t *wcspbrk(const wchar_t *s, const wchar_t *set);
wchar_t *wcsrchr(const wchar_t *s, wchar_t c);
usize wcsspn(const wchar_t *s, const wchar_t *set);
wchar_t *wcsstr(const wchar_t *__restrict s, const wchar_t *__restrict find);
wchar_t *wcstok(wchar_t *__restrict s, const wchar_t *__restrict delim, wchar_t **__restrict last);
wchar_t *wmemchr(const wchar_t *s, wchar_t c, usize n);
int wmemcmp(const wchar_t *s1, const wchar_t *s2, usize n);
wchar_t *wmemcpy(wchar_t *__restrict d, const wchar_t *__restrict s, usize n);
wchar_t *wmemmove(wchar_t *d, const wchar_t *s, usize n);
wchar_t *wmemset(wchar_t *s, wchar_t c, usize n);
/*
* This file is part of GayBSD.
* Copyright (c) 2021 fef <owo@fef.moe>.
*
* GayBSD is nonviolent software: you may only use, redistribute, and/or
* modify it under the terms of the Cooperative Nonviolent Public License
* (CNPL) as found in the LICENSE file in the source code root directory
* or at <https://git.pixie.town/thufie/npl-builder>; either version 7
* of the license, or (at your option) any later version.
*
* GayBSD comes with ABSOLUTELY NO WARRANTY, to the extent
* permitted by applicable law. See the CNPL for details.
*/