summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2017-11-01 13:21:40 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-01-16 16:47:20 +0000
commitf5b346c9120b9a10119b81a375de66a167ced0b5 (patch)
tree81cb8bd627378465c091b1f6f5dc6f195bda92f6 /src
parentbd294425c8f0ac22103989ebbbdbcf9c84ecc789 (diff)
downloadcoreboot-f5b346c9120b9a10119b81a375de66a167ced0b5.tar.xz
string.h: Add isprint()
Change-Id: If179687f0a15cf5b16723ad18d8eb86a2d5fa48d Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/29479 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/string.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/string.h b/src/include/string.h
index fc96393c48..2f6b5f1b68 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -156,6 +156,11 @@ static inline int isspace(int c)
}
}
+static inline int isprint(int c)
+{
+ return c >= ' ' && c <= '~';
+}
+
static inline int isdigit(int c)
{
return (c >= '0' && c <= '9');