From d336b079d4a1d39118f36826bae4096aa6352624 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 22 Aug 2009 19:02:40 -0500 Subject: [PATCH] iokit: don't depend on debugger, reduces terrain demo size by a bit --- basis/iokit/iokit.factor | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/basis/iokit/iokit.factor b/basis/iokit/iokit.factor index f7ea81c0c2..529db6bf78 100755 --- a/basis/iokit/iokit.factor +++ b/basis/iokit/iokit.factor @@ -1,6 +1,6 @@ USING: alien.syntax alien.c-types core-foundation core-foundation.bundles core-foundation.dictionaries system -combinators kernel sequences debugger io accessors ; +combinators kernel sequences io accessors ; IN: iokit << @@ -136,11 +136,9 @@ FUNCTION: IOReturn IORegistryEntryCreateCFProperties ( io_registry_entry_t entry FUNCTION: char* mach_error_string ( IOReturn error ) ; -TUPLE: mach-error error-code ; -C: mach-error - -M: mach-error error. - "IOKit call failed: " print error-code>> mach_error_string print ; +TUPLE: mach-error error-code error-string ; +: ( code -- error ) + dup mach_error_string \ mach-error boa ; : mach-error ( return -- ) dup KERN_SUCCESS = [ drop ] [ throw ] if ;