From 4038b212e42b238cfbec5b86a4327c5e52d522c5 Mon Sep 17 00:00:00 2001 From: midipix Date: Jun 30 2024 20:52:54 +0000 Subject: internals: nolibc: added toks_isblank(). --- diff --git a/src/internal/toksvc_nolibc_impl.c b/src/internal/toksvc_nolibc_impl.c index 7c810bf..95bac1c 100644 --- a/src/internal/toksvc_nolibc_impl.c +++ b/src/internal/toksvc_nolibc_impl.c @@ -61,6 +61,11 @@ char * toks_strrchr(const char * ch, int c) return 0; } +int toks_isblank(int c) +{ + return ((c == 0x20) || (c == 0x09)); +} + #ifdef TOKS_EXPORT int __stdcall toksvc_entry_point(void * hinstance, uint32_t reason, void * reserved) { diff --git a/src/internal/toksvc_nolibc_impl.h b/src/internal/toksvc_nolibc_impl.h index 599fe6b..40cfd50 100644 --- a/src/internal/toksvc_nolibc_impl.h +++ b/src/internal/toksvc_nolibc_impl.h @@ -17,6 +17,8 @@ #define strchr toks_strchr #define strrchr toks_strrchr +#define isblank toks_isblank + #define calloc toks_calloc #define free toks_free @@ -36,6 +38,8 @@ int toks_strncmp(const char * a, const char * b, size_t n); char * toks_strchr(const char * ch, int c); char * toks_strrchr(const char * ch, int c); +int toks_isblank(int c); + void * toks_calloc(size_t n, size_t size); void toks_free(void *);