libc: refactor a couple of string routines

This is just a minor overhaul of several utility
functions, in part because it kept bothering me
and in part because i was bored.
This commit is contained in:
anna 2021-10-12 23:24:17 +02:00
parent afbb3743d5
commit 904584ccc0
Signed by: fef
GPG key ID: EC22E476DC2D3D84
15 changed files with 195 additions and 69 deletions

View file

@ -333,12 +333,12 @@ __pure char *strchrnul(const char *s, int c);
char *strsep(char **stringp, const char *delim);
#endif /* _GAY_SOURCE >= 202109L || __BSD_VISIBLE */
#ifndef __KERNEL__ /* we *really* don't want this anywhere in kernel code */
#ifndef _KERNEL /* we *really* don't want this anywhere in kernel code */
char *strtok(char *__restrict s, const char *__restrict tok);
# if _POSIX_C_SOURCE >= 199506L
char *strtok_r(char *s, const char *delim, char **last);
# endif /* _POSIX_C_SOURCE >= 199506L */
#endif /* not __KERNEL__ */
#endif /* not _KERNEL */
/*
* This file is part of GayBSD.