diff options
-rw-r--r-- | changelog.md | 9 | ||||
-rw-r--r-- | include/u8c/dbg.h | 4 | ||||
-rw-r--r-- | include/u8c/dbgprint.h | 3 | ||||
-rw-r--r-- | include/u8c/unimax.h | 3 | ||||
-rw-r--r-- | include/u8c/ver.h | 5 | ||||
-rw-r--r-- | src/u8c/end.c | 6 | ||||
-rw-r--r-- | src/u8c/init.c | 3 | ||||
-rw-r--r-- | src/u8c/u32sz.c | 3 | ||||
-rw-r--r-- | u8c.svg | 31 | ||||
-rw-r--r-- | u8c_boxes.svg | 23 | ||||
-rw-r--r-- | u8c_braille.svg (renamed from u8c_old.svg) | 0 | ||||
-rw-r--r-- | vgcore.115718 | bin | 0 -> 6635520 bytes |
12 files changed, 57 insertions, 33 deletions
diff --git a/changelog.md b/changelog.md index d8fb6a4..afec45a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +# 17 + +* Create new logo. +* Update headers. +* Invert status values. + # 16 * Add function for concatenating UTF-32 strings; `u8c_u32cat`. @@ -11,7 +17,7 @@ * Add more format types. * Fix incorrect unabbreviated names in headers. * Add another function from `ctypes.h`; `u8c_isxdigit`. -* Use `char32_t` (from `stdbool.h`) instead of `uint_least32_t` in UTF-32. +* Use `char32_t` (from `uchar.h`) instead of `uint_least32_t` in UTF-32. * Use `unsigned char` instead of `uint_least8_t` in UTF-8. * Move all data into `u8c_dat` (of type `struct u8c_dattyp`). * Add function for setting the format (base and endian) of `u8c_fmt` and company; `u8c_setfmt`. @@ -21,6 +27,7 @@ * Add macro for maximum valid Unicode codepoint; `u8c_unimax`. * Remove `txttolit`. * Add function for deallocating UTF-8 strings; `u8c_u8free`. +* Turn both `u8c_dbg` and `u8c_thrdsafe` into type `bool` from `uint_least8_t`. # 15 diff --git a/include/u8c/dbg.h b/include/u8c/dbg.h index e389195..e517a79 100644 --- a/include/u8c/dbg.h +++ b/include/u8c/dbg.h @@ -14,8 +14,8 @@ If not, see <https://www.gnu.org/licenses/>. */ /* Debug */ -# if !defined(u8c_sym_debug) -# define u8c_sym_debug +# if !defined(u8c_sym_dbg) +# define u8c_sym_dbg # include <stdbool.h> extern bool const u8c_dbg; # endif diff --git a/include/u8c/dbgprint.h b/include/u8c/dbgprint.h index 2f974d2..8c5ea31 100644 --- a/include/u8c/dbgprint.h +++ b/include/u8c/dbgprint.h @@ -14,7 +14,8 @@ If not, see <https://www.gnu.org/licenses/>. */ /* Debug print */ -# if !defined(u8c_dbgprint) +# if !defined(u8c_sym_dbgprint) +# define u8c_sym_dbgprint # if defined(NDEBUG) # define u8c_dbgprint(...) ((void)0x0) # else diff --git a/include/u8c/unimax.h b/include/u8c/unimax.h index 10c8be6..5baa4de 100644 --- a/include/u8c/unimax.h +++ b/include/u8c/unimax.h @@ -14,7 +14,8 @@ If not, see <https://www.gnu.org/licenses/>. */ /* Unicode maximum */ -# if !defined(u8c_unimax) +# if !defined(u8c_sym_unimax) +# define u8c_sym_unimax # include <stdint.h> # include <uchar.h> # define u8c_unimax ((char32_t)UINT32_C(0x10FFFF)) diff --git a/include/u8c/ver.h b/include/u8c/ver.h index 054052d..3f16ae6 100644 --- a/include/u8c/ver.h +++ b/include/u8c/ver.h @@ -14,7 +14,8 @@ If not, see <https://www.gnu.org/licenses/>. */ /* Version */ -# if !defined(u8c_ver) +# if !defined(u8c_sym_ver) +# define u8c_sym_ver # include <stdint.h> -# define u8c_ver (UINT64_C(0x12)) +# define u8c_ver (UINT64_C(0x13)) # endif diff --git a/src/u8c/end.c b/src/u8c/end.c index 633ced7..adfd8d6 100644 --- a/src/u8c/end.c +++ b/src/u8c/end.c @@ -24,11 +24,11 @@ # include <threads.h> # endif bool u8c_end(void) { - if(u8c_dat.stat) { + if(!u8c_dat.stat) { return false; } # if defined(u8c_bethrdsafe) - /* Destroy mutexes */ + /* Destroy mutexes: */ mtx_destroy(&u8c_dat.errlock); mtx_destroy(&u8c_dat.fmtlock); # endif @@ -38,6 +38,6 @@ bool u8c_end(void) { u8c_dat.fmtbase = UINT8_C(0xC); u8c_dat.fmtendian = UINT8_C(0x0); /* Set status: */ - u8c_dat.stat = UINT8_C(0x1); + u8c_dat.stat = UINT8_C(0x0); return false; } diff --git a/src/u8c/init.c b/src/u8c/init.c index 3c15a1d..f625bce 100644 --- a/src/u8c/init.c +++ b/src/u8c/init.c @@ -24,6 +24,7 @@ # include <threads.h> # endif bool u8c_init(void) { + /* Initialise mutexes: */ # if defined(u8c_bethrdsafe) if(mtx_init(&u8c_dat.errlock,mtx_plain) == thrd_error) { return true; @@ -36,6 +37,6 @@ bool u8c_init(void) { u8c_dat.err = NULL; u8c_seterr((uint_least32_t[]){UINT32_C(0x0),}); /* Set status: */ - u8c_dat.stat = UINT8_C(0x0); + u8c_dat.stat = UINT8_C(0x1); return false; } diff --git a/src/u8c/u32sz.c b/src/u8c/u32sz.c index 9dc2108..3320ae2 100644 --- a/src/u8c/u32sz.c +++ b/src/u8c/u32sz.c @@ -16,6 +16,7 @@ # include <assert.h> # include <stdbool.h> # include <stddef.h> +# include <stdint.h> # include <u8c/SIZE_C.h> # include <u8c/u32fndchr.h> # include <u8c/u32sz.h> @@ -23,7 +24,7 @@ bool u8c_u32sz(size_t * const _sz,char32_t const * const _in) { assert(_sz != NULL); size_t sz = SIZE_C(0x0); - if(u8c_u32fndchr(&sz,_in,U'\0')) { + if(u8c_u32fndchr(&sz,_in,UINT8_C(0x0))) { return true; } *_sz = sz; @@ -1,23 +1,12 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg height="96" version="1.1" width="256" xmlns="http://www.w3.org/2000/svg"> - <!-- Box #0 --> - <rect fill="#444747" height="64" rx="8" ry="8" width="64" x="24" y="24" /> - <rect fill="#E13DA9" height="64" rx="8" ry="8" width="64" x="16" y="16" /> - <rect fill="#F8F8F1" height="32" width="32" x="32" y="24" /> - <circle fill="#F8F8F1" cx="48" cy="56" r="16"/> - <rect fill="#E13DA9" height="36" width="16" x="40" y="20" /> - <circle fill="#E13DA9" cx="48" cy="56" r="8"/> - <!-- Box #1 --> - <rect fill="#444747" height="64" rx="8" ry="8" width="64" x="104" y="24" /> - <rect fill="#A9E13D" height="64" rx="8" ry="8" width="64" x="96" y="16" /> - <circle fill="#F8F8F1" cx="128" cy="56" r="16"/> - <circle fill="#A9E13D" cx="128" cy="56" r="8"/> - <circle fill="#F8F8F1" cx="128" cy="40" r="16"/> - <circle fill="#A9E13D" cx="128" cy="40" r="8"/> - <!-- Box #2 --> - <rect fill="#444747" height="64" rx="8" ry="8" width="64" x="184" y="24" /> - <rect fill="#3DA9E1" height="64" rx="8" ry="8" width="64" x="176" y="16" /> - <circle fill="#F8F8F1" cx="208" cy="48" r="24"/> - <circle fill="#3DA9E1" cx="208" cy="48" r="16"/> - <polygon fill="#3DA9E1" points="208,48 236,20 236,76" /> +<svg height="384" version="1.1" width="384" xmlns="http://www.w3.org/2000/svg"> + <rect fill="#444747" height="384" width="384" /> + <circle fill="#00000000" cx="192" cy="192" r="168" stroke="#A9E13D" stroke-width="16" /> + <circle fill="#F8F8F1" cx="192" cy="192" r="144"/> + <circle fill="#444747" cx="192" cy="240" r="96"/> + <circle fill="#F8F8F1" cx="192" cy="240" r="48"/> + <circle fill="#00000000" cx="192" cy="240" r="72" stroke="#A9E13D" stroke-width="16" /> + <circle fill="#444747" cx="192" cy="144" r="96"/> + <circle fill="#F8F8F1" cx="192" cy="144" r="48"/> + <circle fill="#00000000" cx="192" cy="144" r="72" stroke="#A9E13D" stroke-width="16" /> </svg> diff --git a/u8c_boxes.svg b/u8c_boxes.svg new file mode 100644 index 0000000..d6bad80 --- /dev/null +++ b/u8c_boxes.svg @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg height="96" version="1.1" width="256" xmlns="http://www.w3.org/2000/svg"> + <!-- Box #0 --> + <rect fill="#444747" height="64" rx="8" ry="8" width="64" x="24" y="24" /> + <rect fill="#E13DA9" height="64" rx="8" ry="8" width="64" x="16" y="16" /> + <rect fill="#F8F8F1" height="32" width="32" x="32" y="24" /> + <circle fill="#F8F8F1" cx="48" cy="56" r="16"/> + <rect fill="#E13DA9" height="36" width="16" x="40" y="20" /> + <circle fill="#E13DA9" cx="48" cy="56" r="8"/> + <!-- Box #1 --> + <rect fill="#444747" height="64" rx="8" ry="8" width="64" x="104" y="24" /> + <rect fill="#A9E13D" height="64" rx="8" ry="8" width="64" x="96" y="16" /> + <circle fill="#F8F8F1" cx="128" cy="56" r="16"/> + <circle fill="#A9E13D" cx="128" cy="56" r="8"/> + <circle fill="#F8F8F1" cx="128" cy="40" r="16"/> + <circle fill="#A9E13D" cx="128" cy="40" r="8"/> + <!-- Box #2 --> + <rect fill="#444747" height="64" rx="8" ry="8" width="64" x="184" y="24" /> + <rect fill="#3DA9E1" height="64" rx="8" ry="8" width="64" x="176" y="16" /> + <circle fill="#F8F8F1" cx="208" cy="48" r="24"/> + <circle fill="#3DA9E1" cx="208" cy="48" r="16"/> + <polygon fill="#3DA9E1" points="208,48 236,20 236,76" /> +</svg> diff --git a/u8c_old.svg b/u8c_braille.svg index b885474..b885474 100644 --- a/u8c_old.svg +++ b/u8c_braille.svg diff --git a/vgcore.115718 b/vgcore.115718 Binary files differnew file mode 100644 index 0000000..f9f55fe --- /dev/null +++ b/vgcore.115718 |