Fix errors
parent
0c490161b4
commit
e20762e0cb
|
@ -6,7 +6,7 @@ strings io.styles vectors words system splitting math.parser
|
|||
tuples continuations continuations.private combinators
|
||||
generic.math io.streams.duplex classes compiler.units
|
||||
generic.standard vocabs threads threads.private init
|
||||
kernel.private libc ;
|
||||
kernel.private libc io.encodings ;
|
||||
IN: debugger
|
||||
|
||||
GENERIC: error. ( error -- )
|
||||
|
@ -282,6 +282,10 @@ M: thread error-in-thread ( error thread -- )
|
|||
] bind
|
||||
] if ;
|
||||
|
||||
M: encode-error summary drop "Character encoding error" ;
|
||||
|
||||
M: decode-error summary drop "Character decoding error" ;
|
||||
|
||||
<PRIVATE
|
||||
|
||||
: init-debugger ( -- )
|
||||
|
|
|
@ -18,13 +18,13 @@ TUPLE: utf16 ;
|
|||
over [ 8 shift bitor ] [ 2drop replacement-char ] if ;
|
||||
|
||||
: double-be ( stream byte -- stream char )
|
||||
over stream-read1 prepend-nums ;
|
||||
over stream-read1 swap append-nums ;
|
||||
|
||||
: quad-be ( stream byte -- stream char )
|
||||
double-be over stream-read1 [
|
||||
dup -2 shift BIN: 110111 number= [
|
||||
>r 2 shift r> BIN: 11 bitand bitor
|
||||
over stream-read1 prepend-nums HEX: 10000 +
|
||||
over stream-read1 swap append-nums HEX: 10000 +
|
||||
] [ 2drop dup stream-read1 drop replacement-char ] if
|
||||
] when* ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue