terminfo: interpret shorts as signed integer and test if negative

db4
Jon Harper 2013-04-26 21:05:39 +03:00 committed by John Benediktsson
parent a902428f62
commit a6ab66d290
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ C: <terminfo-header> terminfo-header
boolean-bytes>> read [ 1 = ] { } map-as ;
: read-shorts ( n -- seq' )
2 * read 2 <groups> [ le> dup 65534 >= [ drop f ] when ] map ;
2 * read 2 <groups> [ signed-le> dup 0 < [ drop f ] when ] map ;
: align-even-bytes ( header -- )
[ names-bytes>> ] [ boolean-bytes>> ] bi + odd?