From b13a7ef3de0a78d2f85742280ce2812d04cb636a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= Date: Fri, 2 Nov 2012 02:16:13 +0100 Subject: [PATCH] lib: add prototype module for unicode characters. --- src/CMakeLists.txt | 2 + src/unicode.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++ src/unicode.h | 36 +++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 src/unicode.c create mode 100644 src/unicode.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c380a28..84cedb1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,7 @@ set(SOURCES unittest.c utf8.c + unicode.c structures/single_linked_list.c structures/list.c structures/red_black_tree.c @@ -14,6 +15,7 @@ set(HEADER unix_colors.h unittest.h utf8.h + unicode.h structures/structures.h structures/array.h structures/stack.h diff --git a/src/unicode.c b/src/unicode.c new file mode 100644 index 0000000..1767949 --- /dev/null +++ b/src/unicode.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2012 Christoph Mueller + * + * Crystal is free software: you can redistribute it and/or modify + * it under the terms of the Lesser GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Crystal is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Lesser GNU General Public License for more details. + * + * You should have received a copy of the Lesser GNU General Public License + * along with this program. If not, see . + * + */ + +#include "unicode.h" + +int +cry_unicode_isblank(unicode ch) +{ + return 0; +} + +int +cry_unicode_isspace(unicode ch) +{ + return 0; +} + + +int +cry_unicode_isalpha(unicode ch) +{ + return 0; +} + + +int +cry_unicode_isalnum(unicode ch) +{ + return 0; +} + + +int +cry_unicode_isdigit(unicode ch) +{ + return 0; +} + + +int +cry_unicode_ishex(unicode ch) +{ + return 0; +} + + +int +cry_unicode_isoct(unicode ch) +{ + return 0; +} + + +int +cry_unicode_isprint(unicode ch) +{ + return 0; +} + + +int +cry_unicode_isgraph(unicode ch) +{ + return 0; +} + + +int +cry_unicode_ispunct(unicode ch) +{ + return 0; +} + + +int +cry_unicode_isctrl(unicode ch) +{ + return 0; +} + + diff --git a/src/unicode.h b/src/unicode.h new file mode 100644 index 0000000..d07bef9 --- /dev/null +++ b/src/unicode.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2012 Christoph Mueller + * + * Crystal is free software: you can redistribute it and/or modify + * it under the terms of the Lesser GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Crystal is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Lesser GNU General Public License for more details. + * + * You should have received a copy of the Lesser GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef CRYSTAL_UNICODE_H +#define CRYSTAL_UNICODE_H + +#include "standard.h" + +int cry_unicode_isblank(unicode ch); +int cry_unicode_isspace(unicode ch); +int cry_unicode_isalpha(unicode ch); +int cry_unicode_isalnum(unicode ch); +int cry_unicode_isdigit(unicode ch); +int cry_unicode_ishex(unicode ch); +int cry_unicode_isoct(unicode ch); +int cry_unicode_isprint(unicode ch); +int cry_unicode_isgraph(unicode ch); +int cry_unicode_ispunct(unicode ch); +int cry_unicode_isctrl(unicode ch); + +#endif // CRYSTAL_UNICODE_H -- GitLab