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:
kpowkitty 2025-06-26 16:19:06 -07:00 committed by Warner Losh
parent f4e7cb535b
commit 87c326e41e
2 changed files with 5 additions and 7 deletions

View file

@ -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)
{

View file

@ -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;