mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
LibC: Remove some functions we had two of
This commit is contained in:
parent
cbdd65e4d9
commit
4d997308c2
2 changed files with 0 additions and 34 deletions
|
@ -93,35 +93,6 @@ int strncmp(const char* s1, const char* s2, size_t n)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int strcasecmp(const char* s1, const char* s2)
|
|
||||||
{
|
|
||||||
int c1, c2;
|
|
||||||
for (;;) {
|
|
||||||
c1 = tolower(*s1++);
|
|
||||||
c2 = tolower(*s2++);
|
|
||||||
if (c1 == 0 || c1 != c2) {
|
|
||||||
return c1 - c2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int strncasecmp(const char* s1, const char* s2, size_t n)
|
|
||||||
{
|
|
||||||
if (n == 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (n-- != 0 && tolower(*s1) == tolower(*s2)) {
|
|
||||||
if (n == 0 || *s1 == '\0' || *s2 == '\0') {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
s1++;
|
|
||||||
s2++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return tolower(*s1) - tolower(*s2);
|
|
||||||
}
|
|
||||||
|
|
||||||
int memcmp(const void* v1, const void* v2, size_t n)
|
int memcmp(const void* v1, const void* v2, size_t n)
|
||||||
{
|
{
|
||||||
auto* s1 = (const uint8_t*)v1;
|
auto* s1 = (const uint8_t*)v1;
|
||||||
|
|
|
@ -225,11 +225,6 @@ pid_t waitpid(pid_t waitee, int* wstatus, int options)
|
||||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
pid_t wait(int* wstatus)
|
|
||||||
{
|
|
||||||
return waitpid(-1, wstatus, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int lstat(const char* path, struct stat* statbuf)
|
int lstat(const char* path, struct stat* statbuf)
|
||||||
{
|
{
|
||||||
int rc = syscall(SC_lstat, path, statbuf);
|
int rc = syscall(SC_lstat, path, statbuf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue