]> Kevux Git Server - fll/commit
Bugfix: Codepoint to Binary is not working.
authorKevin Day <thekevinday@gmail.com>
Fri, 10 Dec 2021 01:17:43 +0000 (19:17 -0600)
committerKevin Day <thekevinday@gmail.com>
Fri, 10 Dec 2021 01:17:43 +0000 (19:17 -0600)
commitd50c449769f3819d98b9c7966974b8aac26376f2
tree6b3d767f690f158324576f118f9469201496daa1
parentda9472cba5bf32df6cbbb32858a4d6946286b409
Bugfix: Codepoint to Binary is not working.

The wrong variable is being processed.
The codepoint (which is the Unicode representation, such as U+8C78 the codepoint is for the character '豸') is being width checked.
The binary character is what should be getting the width check.

A second situation where the codepoint is not being printed at all is with the files.
It seems that I forgot to finish writing this code (another problem caused by my original accidental commit of this project).

While investigating this I saw some opportunity for some cleanup.
- Move the width detection into a separate function utf8_process_text_width().
- Use character.string[0] instead of *character.string.
- Rename 'character' to 'current' to make more semantic sense (At the time I wasn't sure what to call it and 'text' was already unavailable).
- The 'text' in private-utf8_codepoint.c is now initialized in a simpler way.
level_3/utf8/c/private-utf8.c
level_3/utf8/c/private-utf8.h
level_3/utf8/c/private-utf8_binary.c
level_3/utf8/c/private-utf8_codepoint.c