From: Eduardo Cavazos Date: Mon, 22 Dec 2008 21:50:14 +0000 (-0600) Subject: Use easy-help in 'size-of' X-Git-Tag: 0.94~1877^2~285^2~4 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=beff592f764fd8c5e20ff8835d9733aba7d1f469 Use easy-help in 'size-of' --- diff --git a/extra/size-of/size-of.factor b/extra/size-of/size-of.factor index d40ea6f8ba..06a7067636 100644 --- a/extra/size-of/size-of.factor +++ b/extra/size-of/size-of.factor @@ -1,19 +1,39 @@ USING: io io.encodings.ascii io.files io.files.temp io.launcher - locals math.parser sequences sequences.deep ; + locals math.parser sequences sequences.deep + help.syntax + easy-help ; IN: size-of -! Use 'size-of' to find out the size in bytes of a C type. -! -! The 'headers' argument is a list of header files to use. You may -! pass 'f' to only use 'stdio.h'. -! -! Examples: -! -! f "int" size-of . -! -! { "X11/Xlib.h" } "XAnyEvent" size-of . +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +DEFER: size-of + +HELP: size-of + +Description: + + Use 'size-of' to find out the size in bytes of a C type. + + The 'headers' argument is a list of header files to use. You may + pass 'f' to only use 'stdio.h'. .. + +Example: + + ! Find the size of 'int' + + f "int" size-of . .. + +Example: + + ! Find the size of the 'XAnyEvent' struct from Xlib.h + + { "X11/Xlib.h" } "XAnyEvent" size-of . .. + +; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :: size-of ( HEADERS TYPE -- n )