modern: update CHAR:

modern-harvey3
Doug Coleman 2018-12-30 16:29:46 -06:00
parent e1d48ba12f
commit 81d7e86494
2 changed files with 10 additions and 10 deletions

View File

@ -75,15 +75,15 @@ M: string make-slot-descriptions
dup printable? [ 1string ] [ dup printable? [ 1string ] [
dup 0xff <= [ dup 0xff <= [
H{ H{
{ CHAR: \a "\\a" } { char: \a "\\a" }
{ CHAR: \b "\\b" } { char: \b "\\b" }
{ CHAR: \e "\\e" } { char: \e "\\e" }
{ CHAR: \f "\\f" } { char: \f "\\f" }
{ CHAR: \n "\\n" } { char: \n "\\n" }
{ CHAR: \r "\\r" } { char: \r "\\r" }
{ CHAR: \t "\\t" } { char: \t "\\t" }
{ CHAR: \v "\\v" } { char: \v "\\v" }
{ CHAR: \0 "\\0" } { char: \0 "\\0" }
} ?at [ "\\x%02x" sprintf ] unless } ?at [ "\\x%02x" sprintf ] unless
] [ ] [
"\\u{%x}" sprintf "\\u{%x}" sprintf

View File

@ -25,7 +25,7 @@ PRIVATE>
hmac-bytes totp-value ; hmac-bytes totp-value ;
: digits ( n digits -- string ) : digits ( n digits -- string )
[ number>string ] dip [ CHAR: 0 pad-head ] keep tail* ; [ number>string ] dip [ char: 0 pad-head ] keep tail* ;
: totp ( key -- string ) : totp ( key -- string )
now timestamp>count swap totp-hash get totp* totp-digits get digits ; now timestamp>count swap totp-hash get totp* totp-digits get digits ;