mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
libsa: isprint()
libsa is missing isprint(). Adding it with the other isfoo() functions. Remove a stray copy from fdt too. Signed-off-by: Kayla Powell (AKA Kat) <kpowkitty@FreeBSD.org> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1740
This commit is contained in:
parent
f4e7cb535b
commit
87c326e41e
2 changed files with 5 additions and 7 deletions
|
|
@ -1240,13 +1240,6 @@ fdt_cmd_ls(int argc, char *argv[])
|
|||
return (CMD_OK);
|
||||
}
|
||||
|
||||
static __inline int
|
||||
isprint(int c)
|
||||
{
|
||||
|
||||
return (c >= ' ' && c <= 0x7e);
|
||||
}
|
||||
|
||||
static int
|
||||
fdt_isprint(const void *data, int len, int *count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -275,6 +275,11 @@ static __inline int ispunct(int c)
|
|||
(c >= '[' && c <= '`') || (c >= '{' && c <= '~');
|
||||
}
|
||||
|
||||
static __inline int isprint(int c)
|
||||
{
|
||||
return (c >= ' ') && (c <= '~');
|
||||
}
|
||||
|
||||
static __inline int toupper(int c)
|
||||
{
|
||||
return islower(c) ? c - 'a' + 'A' : c;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue