Skip to content

Commit

Permalink
* upped the test coverage significantly
Browse files Browse the repository at this point in the history
* **BREAKING CHANGE** the mulle_utf_add_bytes_function_t typedef is no longer a function pointer, to keep it more inline with other library callback typedefs
moved stdlib like code from mulle-utf8.[hc] to new file mulle-utf8-string.c
* **BREAKING CHANGE** changed the parameter order of _strcnpy functions, because progress demands it
* **BREAKING CHANGE** renamed mulle_unicode_is_privatecharacterplane to mulle_utf_is_privatecharacterplane (but MulleObjCUnicodeFoundation resupplies it as a static inline function)
* **BREAKING CHANGE** uses now `size_t` for char (byte) lengths and unsigned int for anything else
  • Loading branch information
mulle-nat committed Jan 12, 2024
1 parent daad65e commit ebf15cb
Show file tree
Hide file tree
Showing 107 changed files with 3,407 additions and 755 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ dox/BUILD.md
wilted/
mulle-template-composer-*
mulle-markdown-preview-*.html
coverage*.html
*.gcda
*.gcno
cola/wilted/
2 changes: 1 addition & 1 deletion .mulle/etc/env/environment-user-nat.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .mulle/etc/match/match.d/86-header--project-only-headers

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .mulle/share/env/environment-extension.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .mulle/share/env/motd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .mulle/share/match/match.d/86-header--project-only-headers

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-c/c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-c/c-demo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-sde/c-cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-sde/c-demo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ contains some limited `<string.h>` like functionality for UTF16 and UTF32.
It is the backbone of **NSString**.



| Release Version | Release Notes
|-------------------------------------------------------|--------------
| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/mulle-c/mulle-utf.svg?branch=release) [![Build Status](https://github.com/mulle-c/mulle-utf/workflows/CI/badge.svg?branch=release)](//github.com/mulle-c/mulle-utf/actions)| [RELEASENOTES](RELEASENOTES.md) |
| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/mulle-c/mulle-utf.svg?branch=release) [![Build Status](https://github.com/mulle-c/mulle-utf/workflows/CI/badge.svg?branch=release)](//github.com/mulle-c/mulle-utf/actions) ![Coverage](https://img.shields.io/badge/coverage-75%25%C2%A0-yellow) | [RELEASENOTES](RELEASENOTES.md) |


## API
Expand All @@ -23,6 +24,8 @@ It is the backbone of **NSString**.
| [information](dox/API_INFORMATION.md) | Analyze and classify string encodings |
| [string](dox/API_STRING.md) | Primitive UTF16 and UTF32 string handling |

`size_t` is used for byte-sized (really `char`-sized) lengths. UTF16 and
UTF32 use `unsigned int`.



Expand Down Expand Up @@ -96,7 +99,7 @@ cmake --install build --config Release

## Author

[Nat!](https://mulle-kybernetik.com/weblog) for Mulle kybernetiK
[Nat!](https://mulle-kybernetik.com/weblog) for Mulle kybernetiK



12 changes: 12 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 4.0.0

* upped the test coverage significantly
* **BREAKING CHANGE** the `mulle_utf_add_bytes_function_t` typedef is no longer a function pointer, to keep it more inline with other library callback typedefs
* **BREAKING CHANGE** changed the parameter order of `_strcnpy` functions, because progress demands it
* **BREAKING CHANGE** renamed `mulle_unicode_is_privatecharacterplane` to `mulle_utf_is_privatecharacterplane` (but MulleObjCUnicodeFoundation resupplies it as a static inline function)
* **BREAKING CHANGE** uses now ``size_t`` for char (byte) lengths and unsigned int for anything else
* `mulle_utf8_t` is no more, it is now just char
* improve `mulle_utf32_as_utf8` conversion, add some `mulle_utf8data` introspection
* improve buffer conversion by not calling addbytes for each character


### 3.1.3

* remove package.json as it conflicts with clib.json
Expand Down
2 changes: 2 additions & 0 deletions clib.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
"src/mulle-utf32-string.h",
"src/mulle-utf32.c",
"src/mulle-utf32.h",
"src/mulle-utf8-string.c",
"src/mulle-utf8-string.h",
"src/mulle-utf8.c",
"src/mulle-utf8.h",
"src/reflect/_mulle-utf-include-private.h",
Expand Down
36 changes: 18 additions & 18 deletions cmake/reflect/_Dependencies.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cmake/reflect/_Headers.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cmake/reflect/_Sources.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions cmake/share/Environment.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cmake/share/Headers.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions cola/api.md.bud
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
| [conversion](dox/API_CONVERSION.md) | Character and string conversions |
| [information](dox/API_INFORMATION.md) | Analyze and classify string encodings |
| [string](dox/API_STRING.md) | Primitive UTF16 and UTF32 string handling |

`size_t` is used for byte-sized (really `char`-sized) lengths. UTF16 and
UTF32 use `unsigned int`.
5 changes: 5 additions & 0 deletions cola/properties.plist
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
config =
{
showButtons = YES;
showCoverage = YES;
};
project =
{
description="🔤 UTF8-16-32 analysis and manipulation library";
Expand Down
4 changes: 2 additions & 2 deletions src/mulle-ascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ mulle_utf32_t *_mulle_ascii_convert_to_utf32( char *src,
void mulle_ascii_bufferconvert_to_utf16( char *src,
size_t len,
void *buffer,
mulle_utf_add_bytes_function_t addbytes)
mulle_utf_add_bytes_function_t *addbytes)
{
char *sentinel;
char _c;
Expand Down Expand Up @@ -118,7 +118,7 @@ void mulle_ascii_bufferconvert_to_utf16( char *src,
void mulle_ascii_bufferconvert_to_utf32( char *src,
size_t len,
void *buffer,
mulle_utf_add_bytes_function_t addbytes)
mulle_utf_add_bytes_function_t *addbytes)
{
char *sentinel;
char _c;
Expand Down
4 changes: 2 additions & 2 deletions src/mulle-ascii.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ MULLE__UTF_GLOBAL
void mulle_ascii_bufferconvert_to_utf16( char *src,
size_t len,
void *buffer,
mulle_utf_add_bytes_function_t addbytes);
mulle_utf_add_bytes_function_t *addbytes);

MULLE__UTF_GLOBAL
void mulle_ascii_bufferconvert_to_utf32( char *src,
size_t len,
void *buffer,
mulle_utf_add_bytes_function_t addbytes);
mulle_utf_add_bytes_function_t *addbytes);

#endif
Loading

0 comments on commit ebf15cb

Please sign in to comment.