includes & errors in morphisms
This commit is contained in:
parent
90eb43475b
commit
2d92bce91b
3 changed files with 11 additions and 2 deletions
|
@ -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;
|
||||
```
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
```
|
||||
#include <stdio.h>
|
||||
#include <array/length-prefix.h>
|
||||
```
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
```
|
||||
#include <stdio.h>
|
||||
```
|
||||
|
||||
morph_string_as_ascii_to_utf8 ()
|
||||
|
|
Loading…
Add table
Reference in a new issue