diff --git a/unmaintained/size-of/size-of.factor b/unmaintained/size-of/size-of.factor deleted file mode 100644 index 8157ba7dcf..0000000000 --- a/unmaintained/size-of/size-of.factor +++ /dev/null @@ -1,39 +0,0 @@ - -USING: kernel namespaces sequences - io io.files io.launcher io.encodings.ascii - bake builder.util - accessors vars - math.parser ; - -IN: size-of - -! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -VAR: headers - -: include-headers ( -- seq ) - headers> [ `{ "#include <" , ">" } to-string ] map ; - -: size-of-c-program ( type -- lines ) - `{ - "#include " - include-headers - { "main() { printf( \"%i\" , sizeof( " , " ) ) ; }" } - } - to-strings ; - -! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -: c-file ( -- path ) "size-of.c" temp-file ; - -: exe ( -- path ) "size-of" temp-file ; - -! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -: size-of ( type -- n ) - size-of-c-program c-file ascii set-file-lines - - { "gcc" c-file "-o" exe } to-strings - [ "Error compiling generated C program" print ] run-or-bail - - exe ascii contents string>number ; \ No newline at end of file