copy back some error messages from linux/
This commit is contained in:
parent
a459208291
commit
d1808995b2
|
@ -136,10 +136,10 @@ fn to-grapheme in: code-point -> _/eax: grapheme {
|
||||||
break $to-grapheme:compute-length
|
break $to-grapheme:compute-length
|
||||||
}
|
}
|
||||||
# more than 4 bytes: unsupported
|
# more than 4 bytes: unsupported
|
||||||
# TODO: print error message to stderr
|
|
||||||
compare c, 0x1fffff
|
compare c, 0x1fffff
|
||||||
{
|
{
|
||||||
break-if->
|
break-if->
|
||||||
|
abort "unsupported code point"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ fn read-grapheme in: (addr stream byte) -> _/eax: grapheme {
|
||||||
num-trailers <- copy 3
|
num-trailers <- copy 3
|
||||||
break $read-grapheme:compute-length
|
break $read-grapheme:compute-length
|
||||||
}
|
}
|
||||||
# TODO: print error message
|
abort "utf-8 encodings larger than 4 bytes are not yet supported"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
# prepend trailer bytes
|
# prepend trailer bytes
|
||||||
|
|
|
@ -199,7 +199,7 @@ fn read-grapheme in: (addr stream byte) -> _/eax: grapheme {
|
||||||
}
|
}
|
||||||
$read-grapheme:abort: {
|
$read-grapheme:abort: {
|
||||||
# TODO: print to stderr
|
# 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
|
var n/eax: int <- copy c
|
||||||
print-int32-hex-to-real-screen n
|
print-int32-hex-to-real-screen n
|
||||||
print-string-to-real-screen "\n"
|
print-string-to-real-screen "\n"
|
||||||
|
|
Loading…
Reference in New Issue