copy back some error messages from linux/

This commit is contained in:
Kartik K. Agaram 2021-11-09 07:30:44 -08:00
parent a459208291
commit d1808995b2
2 changed files with 3 additions and 3 deletions

View File

@ -136,10 +136,10 @@ fn to-grapheme in: code-point -> _/eax: grapheme {
break $to-grapheme:compute-length
}
# more than 4 bytes: unsupported
# TODO: print error message to stderr
compare c, 0x1fffff
{
break-if->
abort "unsupported code point"
return 0
}
}
@ -276,7 +276,7 @@ fn read-grapheme in: (addr stream byte) -> _/eax: grapheme {
num-trailers <- copy 3
break $read-grapheme:compute-length
}
# TODO: print error message
abort "utf-8 encodings larger than 4 bytes are not yet supported"
return 0
}
# prepend trailer bytes

View File

@ -199,7 +199,7 @@ fn read-grapheme in: (addr stream byte) -> _/eax: grapheme {
}
$read-grapheme:abort: {
# TODO: print to stderr
print-string-to-real-screen "utf-8 encodings larger than 4 bytes are not supported. First byte seen: "
print-string-to-real-screen "utf-8 encodings larger than 4 bytes are not yet supported. First byte seen: "
var n/eax: int <- copy c
print-int32-hex-to-real-screen n
print-string-to-real-screen "\n"