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 0xff <= [
H{
{ CHAR: \a "\\a" }
{ CHAR: \b "\\b" }
{ CHAR: \e "\\e" }
{ CHAR: \f "\\f" }
{ CHAR: \n "\\n" }
{ CHAR: \r "\\r" }
{ CHAR: \t "\\t" }
{ CHAR: \v "\\v" }
{ CHAR: \0 "\\0" }
{ char: \a "\\a" }
{ char: \b "\\b" }
{ char: \e "\\e" }
{ char: \f "\\f" }
{ char: \n "\\n" }
{ char: \r "\\r" }
{ char: \t "\\t" }
{ char: \v "\\v" }
{ char: \0 "\\0" }
} ?at [ "\\x%02x" sprintf ] unless
] [
"\\u{%x}" sprintf

View File

@ -25,7 +25,7 @@ PRIVATE>
hmac-bytes totp-value ;
: 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 )
now timestamp>count swap totp-hash get totp* totp-digits get digits ;