summaryrefslogtreecommitdiffhomepage
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-06-30 21:26:06 +0000
committermidipix <writeonce@midipix.org>2024-06-30 21:26:06 +0000
commit0496f2b456eedce5c2c6503931374523aabe7018 (patch)
treeed35e032a61c5bf14f566ed37f4cdacae0c999ca /src/internal
parent2e8e2a1be2e7655275fc06dce1fae570cbe599b5 (diff)
downloadptycon-0496f2b456eedce5c2c6503931374523aabe7018.tar.bz2
ptycon-0496f2b456eedce5c2c6503931374523aabe7018.tar.xz
internals: nolibc: added ptyc_isblank().
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/ptycon_nolibc_impl.c5
-rw-r--r--src/internal/ptycon_nolibc_impl.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/internal/ptycon_nolibc_impl.c b/src/internal/ptycon_nolibc_impl.c
index 2319505..c489b98 100644
--- a/src/internal/ptycon_nolibc_impl.c
+++ b/src/internal/ptycon_nolibc_impl.c
@@ -61,6 +61,11 @@ char * ptyc_strrchr(const char * ch, int c)
return 0;
}
+int ptyc_isblank(int c)
+{
+ return ((c == 0x20) || (c == 0x09));
+}
+
#ifdef PTYC_EXPORT
int __stdcall ptycon_entry_point(void * hinstance, uint32_t reason, void * reserved)
{
diff --git a/src/internal/ptycon_nolibc_impl.h b/src/internal/ptycon_nolibc_impl.h
index 0c58141..c9caf13 100644
--- a/src/internal/ptycon_nolibc_impl.h
+++ b/src/internal/ptycon_nolibc_impl.h
@@ -16,6 +16,8 @@
#define strchr ptyc_strchr
#define strrchr ptyc_strrchr
+#define isblank ptyc_isblank
+
#define calloc ptyc_calloc
#define free ptyc_free
@@ -35,6 +37,8 @@ int ptyc_strncmp(const char * a, const char * b, size_t n);
char * ptyc_strchr(const char * ch, int c);
char * ptyc_strrchr(const char * ch, int c);
+int ptyc_isblank(int c);
+
void * ptyc_calloc(size_t n, size_t size);
void ptyc_free(void *);