Various structure related cleanups.
This commit is contained in:
@ -31,8 +31,9 @@ variable last-struct
|
|||||||
: struct ( "name" ) 1 0 typer latestxt >body last-struct !
|
: struct ( "name" ) 1 0 typer latestxt >body last-struct !
|
||||||
1 last-align ! ;
|
1 last-align ! ;
|
||||||
: align-by ( a n -- a ) 1- dup >r + r> invert and ;
|
: align-by ( a n -- a ) 1- dup >r + r> invert and ;
|
||||||
|
: max! ( n a -- ) swap over @ max swap ! ;
|
||||||
: struct-align ( n -- )
|
: struct-align ( n -- )
|
||||||
dup last-struct @ cell+ @ max last-struct @ cell+ !
|
dup last-struct @ cell+ max!
|
||||||
last-struct @ @ swap align-by last-struct @ ! ;
|
last-struct @ @ swap align-by last-struct @ ! ;
|
||||||
: field ( n "name" )
|
: field ( n "name" )
|
||||||
last-align @ struct-align
|
last-align @ struct-align
|
||||||
|
|||||||
@ -55,9 +55,9 @@ z" XFillRectangle" 7 xlib XFillRectangle ( a n n n n n n -- void )
|
|||||||
|
|
||||||
32 cells constant xevent-size
|
32 cells constant xevent-size
|
||||||
|
|
||||||
: win ( n "name" ) long ;
|
: win long ;
|
||||||
: time ( n "name" ) long ;
|
: time long ;
|
||||||
: bool ( n "name" ) i32 ;
|
: bool i32 ;
|
||||||
|
|
||||||
vocabulary xany also xany definitions
|
vocabulary xany also xany definitions
|
||||||
struct XAnyEvent
|
struct XAnyEvent
|
||||||
|
|||||||
@ -134,7 +134,7 @@ struct PAINTSTRUCT
|
|||||||
RECT field ->rcPaint
|
RECT field ->rcPaint
|
||||||
i32 field ->fRestore
|
i32 field ->fRestore
|
||||||
i32 field ->fIncUpdate
|
i32 field ->fIncUpdate
|
||||||
32 field ->rgbReserved ( 32 bytes )
|
32 i8 * field ->rgbReserved
|
||||||
|
|
||||||
z" FillRect" 3 User32 FillRect
|
z" FillRect" 3 User32 FillRect
|
||||||
z" PostQuitMessage" 1 User32 PostQuitMessage
|
z" PostQuitMessage" 1 User32 PostQuitMessage
|
||||||
|
|||||||
Reference in New Issue
Block a user