mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:28:11 +00:00
LibC: Enough compat work to make binutils-2.32 build and run.
This commit is contained in:
parent
d7753c7c8d
commit
a7a456002e
14 changed files with 110 additions and 45 deletions
|
@ -1,28 +1,3 @@
|
|||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
int ispunct(int c)
|
||||
{
|
||||
const char* punctuation_characters = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
|
||||
return !!strchr(punctuation_characters, c);
|
||||
}
|
||||
|
||||
int isprint(int c)
|
||||
{
|
||||
return c >= 0x20 && c != 0x7f;
|
||||
}
|
||||
|
||||
int isalnum(int c)
|
||||
{
|
||||
return isalpha(c) || isdigit(c);
|
||||
}
|
||||
|
||||
int isalpha(int c)
|
||||
{
|
||||
return isupper(c) || islower(c);
|
||||
}
|
||||
|
||||
int iscntrl(int c)
|
||||
{
|
||||
return (c >= 0 && c <= 0x1f) || c == 0x7f;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue