diff --git a/morphisms/digit.morphism-base b/morphisms/digit.morphism-base index 54b9d9f..97d3bd9 100644 --- a/morphisms/digit.morphism-base +++ b/morphisms/digit.morphism-base @@ -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; ``` diff --git a/morphisms/length_prefix.morphism-base b/morphisms/length_prefix.morphism-base index f8b48aa..92cb803 100644 --- a/morphisms/length_prefix.morphism-base +++ b/morphisms/length_prefix.morphism-base @@ -1,4 +1,5 @@ ``` +#include <stdio.h> #include <array/length-prefix.h> ``` diff --git a/morphisms/unicode.morphism-base b/morphisms/unicode.morphism-base index 8805ace..db4b342 100644 --- a/morphisms/unicode.morphism-base +++ b/morphisms/unicode.morphism-base @@ -1,4 +1,5 @@ ``` +#include <stdio.h> ``` morph_string_as_ascii_to_utf8 ()