includes & errors in morphisms

This commit is contained in:
Michael Sippel 2025-03-15 19:19:20 +01:00
parent 90eb43475b
commit 2d92bce91b
Signed by: senvas
GPG key ID: F96CF119C34B64A6
3 changed files with 11 additions and 2 deletions

View file

@ -1,4 +1,5 @@
```
#include <stdio.h>
```
morph_digit_as_char_to_uint8 (Radix:)
@ -17,6 +18,7 @@ morph_digit_as_char_to_uint8 (Radix:)
if( *dst < Radix ) {
return 0;
} else {
fprintf(stderr, "digit %u is out of range for radix %u\n", *dst, Radix);
return -1;
}
```
@ -37,6 +39,7 @@ morph_digit_as_char_to_uint64 (Radix:)
if( *dst < Radix ) {
return 0;
} else {
fprintf(stderr, "digit %u is out of range for radix %u\n", *dst, Radix);
return -1;
}
```
@ -49,8 +52,10 @@ morph_digit_as_uint8_to_char (Radix:_16)
*dst = *src + '0';
else if( *dst < 16 )
*dst = *src - 0xa + 'a';
else
else {
fprintf(stderr, "digit %u is out of rage for char\n", *dst);
return -1;
}
return 0;
```
@ -63,8 +68,10 @@ morph_digit_as_uint64_to_char (Radix:_16)
*dst = *src + '0';
else if( *dst < 16 )
*dst = *src - 0xa + 'a';
else
else {
fprintf(stderr, "digit %u is out of rage for char\n", *dst);
return -1;
}
return 0;
```

View file

@ -1,4 +1,5 @@
```
#include <stdio.h>
#include <array/length-prefix.h>
```

View file

@ -1,4 +1,5 @@
```
#include <stdio.h>
```
morph_string_as_ascii_to_utf8 ()