 : >BOOLEAN ( ? -- TRUE/FALSE ) ffi:TRUE ffi:FALSE ? ; inline
 
 : curses-pointer-error ( ptr/f -- ptr )
-    dup [ curses-failed ] unless ; inline
+    [ curses-failed ] unless* ; inline
 : curses-error ( n -- ) ffi:ERR = [ curses-failed ] when ;
 
 PRIVATE>

SYMBOL: n-registered-colors

MEMO: register-color ( fg bg -- n )
    [ n-registered-colors get ] 2dip ffi:init_pair curses-error
    n-registered-colors [ get ] [ inc ] bi ;

: init-colors ( -- )
    ffi:has_colors [


: fill-in-type ( mouse-event substate -- )
    {
        { BUTTON1_RELEASED       [ +released+ ] }
        { BUTTON1_PRESSED        [ +pressed+ ] }
        { BUTTON1_CLICKED        [ +clicked+ ] }
        { BUTTON1_DOUBLE_CLICKED [ +double+ ] }
        { BUTTON1_TRIPLE_CLICKED [ +triple+ ] }
    } case >>type drop ; inline

: fill-in-bstate ( mouse-event bstate -- )
    2dup {
