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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user