]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix conflict
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 23 Feb 2009 02:02:13 +0000 (20:02 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 23 Feb 2009 02:02:13 +0000 (20:02 -0600)
13 files changed:
1  2 
basis/cocoa/enumeration/enumeration.factor
basis/colors/colors.factor
basis/core-foundation/run-loop/run-loop.factor
basis/help/topics/topics.factor
basis/math/functions/functions.factor
basis/stack-checker/transforms/transforms.factor
core/assocs/assocs.factor
core/checksums/crc32/crc32.factor
core/io/encodings/encodings.factor
core/words/words.factor
extra/iokit/hid/hid.factor
extra/iokit/iokit.factor
extra/opengl/demo-support/demo-support.factor

index 004d52ef09316abcfe6d8d01f77751e4fadce8e1,919e8f86c5ff097b23faaecfad22abfc8daade58..1f9430e443e1f4f522005cdfdb58912b4dd39a67
@@@ -5,14 -5,15 +5,14 @@@ sequences vectors fry libc destructor
  specialized-arrays.direct.alien ;
  IN: cocoa.enumeration
  
- : NS-EACH-BUFFER-SIZE 16 ; inline
+ CONSTANT: NS-EACH-BUFFER-SIZE 16
  
  : with-enumeration-buffers ( quot -- )
 -    [
 -        [
 -            "NSFastEnumerationState" malloc-object &free
 -            NS-EACH-BUFFER-SIZE "id" heap-size * malloc-object &free
 -            NS-EACH-BUFFER-SIZE
 -        ] dip call
 +    '[
 +        "NSFastEnumerationState" malloc-object &free
 +        NS-EACH-BUFFER-SIZE "id" malloc-array &free
 +        NS-EACH-BUFFER-SIZE
 +        @
      ] with-destructors ; inline
  
  :: (NSFastEnumeration-each) ( object quot: ( elt -- ) state stackbuf count -- )
index bb91aeeba361fd2e8844a410542e4ffb6d285b5e,9c55b1f29a20ce1eedda1f542d6ef3f31e0d089c..0cd743fa5fd8a1e57a7f6cf8f76c6d361af69f6e
@@@ -1,26 -1,33 +1,30 @@@
 -! Copyright (C) 2003, 2008 Slava Pestov.
 +! Copyright (C) 2003, 2009 Slava Pestov.
  ! Copyright (C) 2008 Eduardo Cavazos.
  ! See http://factorcode.org/license.txt for BSD license.
 -USING: kernel accessors ;
 +USING: kernel accessors combinators math ;
  IN: colors
  
  TUPLE: color ;
  
- TUPLE: rgba < color { red read-only } { green read-only } { blue read-only } { alpha read-only } ;
 -TUPLE: rgba < color red green blue alpha ;
++TUPLE: rgba < color
++{ red read-only }
++{ green read-only }
++{ blue read-only }
++{ alpha read-only } ;
  
  C: <rgba> rgba
  
 -GENERIC: >rgba ( object -- rgba )
 +GENERIC: >rgba ( color -- rgba )
  
  M: rgba >rgba ( rgba -- rgba ) ;
  
 -M: color red>>   ( color -- red   ) >rgba red>>   ;
 +M: color red>> ( color -- red ) >rgba red>> ;
  M: color green>> ( color -- green ) >rgba green>> ;
 -M: color blue>>  ( color -- blue  ) >rgba blue>>  ;
 -
 -CONSTANT: black        T{ rgba f 0.0   0.0   0.0   1.0  }
 -CONSTANT: blue         T{ rgba f 0.0   0.0   1.0   1.0  }
 -CONSTANT: cyan         T{ rgba f 0     0.941 0.941 1    }
 -CONSTANT: gray         T{ rgba f 0.6   0.6   0.6   1.0  }
 -CONSTANT: green        T{ rgba f 0.0   1.0   0.0   1.0  }
 -CONSTANT: light-gray   T{ rgba f 0.95  0.95  0.95  0.95 }
 -CONSTANT: light-purple T{ rgba f 0.8   0.8   1.0   1.0  }
 -CONSTANT: magenta      T{ rgba f 0.941 0     0.941 1    }
 -CONSTANT: orange       T{ rgba f 0.941 0.627 0     1    }
 -CONSTANT: purple       T{ rgba f 0.627 0     0.941 1    }
 -CONSTANT: red          T{ rgba f 1.0   0.0   0.0   1.0  }
 -CONSTANT: white        T{ rgba f 1.0   1.0   1.0   1.0  }
 -CONSTANT: yellow       T{ rgba f 1.0   1.0   0.0   1.0  }
 +M: color blue>> ( color -- blue ) >rgba blue>> ;
 +
 +: >rgba-components ( object -- r g b a )
 +    >rgba { [ red>> ] [ green>> ] [ blue>> ] [ alpha>> ] } cleave ; inline
 +
 +: opaque? ( color -- ? ) alpha>> 1 number= ;
 +
 +CONSTANT: transparent T{ rgba f 0.0 0.0 0.0 0.0 }
index 3f4f2684676d2351c4dd8648542bc92924e0c060,8bdce2ec3794356dc8f30d660db470667b4cb2f7..a63a3ea6747af3ca3be40ab72fb4b2c5fa61c3c8
@@@ -7,10 -7,10 +7,10 @@@ core-foundation.file-descriptors core-f
  core-foundation.time ;
  IN: core-foundation.run-loop
  
- : kCFRunLoopRunFinished 1 ; inline
- : kCFRunLoopRunStopped 2 ; inline
- : kCFRunLoopRunTimedOut 3 ; inline
- : kCFRunLoopRunHandledSource 4 ; inline
+ CONSTANT: kCFRunLoopRunFinished 1
+ CONSTANT: kCFRunLoopRunStopped 2
+ CONSTANT: kCFRunLoopRunTimedOut 3
+ CONSTANT: kCFRunLoopRunHandledSource 4
  
  TYPEDEF: void* CFRunLoopRef
  TYPEDEF: void* CFRunLoopSourceRef
@@@ -56,17 -56,25 +56,17 @@@ FUNCTION: void CFRunLoopRemoveTimer 
  
  : CFRunLoopDefaultMode ( -- alien )
      #! Ugly, but we don't have static NSStrings
 -    \ CFRunLoopDefaultMode get-global dup expired? [
 -        drop
 +    \ CFRunLoopDefaultMode [
          "kCFRunLoopDefaultMode" <CFString>
 -        dup \ CFRunLoopDefaultMode set-global
 -    ] when ;
 +    ] initialize-alien ;
  
  TUPLE: run-loop fds sources timers ;
  
  : <run-loop> ( -- run-loop )
      V{ } clone V{ } clone V{ } clone \ run-loop boa ;
  
 -SYMBOL: expiry-check
 -
  : run-loop ( -- run-loop )
 -    \ run-loop get-global not expiry-check get expired? or
 -    [
 -        31337 <alien> expiry-check set-global
 -        <run-loop> dup \ run-loop set-global
 -    ] [ \ run-loop get-global ] if ;
 +    \ run-loop [ <run-loop> ] initialize-alien ;
  
  : add-source-to-run-loop ( source -- )
      [ run-loop sources>> push ]
index 459d7f9f2706bf06addc09b3a604f70d59e8d9e1,9fba09913dc808e5798125bf532d830d6f6f2ad0..864b030126947b5f1d1b41441da555169c194359
@@@ -1,4 -1,4 +1,4 @@@
 -! Copyright (C) 2005, 2007 Slava Pestov.
 +! Copyright (C) 2005, 2008 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.x
  USING: accessors arrays definitions generic assocs
  io kernel namespaces make prettyprint prettyprint.sections
@@@ -15,14 -15,13 +15,14 @@@ GENERIC: >link ( obj -- obj 
  M: link >link ;
  M: vocab-spec >link ;
  M: object >link link boa ;
 +M: f >link drop \ f >link ;
  
  PREDICATE: word-link < link name>> word? ;
  
  M: link summary
      [
          "Link: " %
 -        name>> dup word? [ summary ] [ unparse ] if %
 +        name>> dup word? [ summary ] [ unparse-short ] if %
      ] "" make ;
  
  ! Help articles
@@@ -55,7 -54,7 +55,7 @@@ M: no-article summar
      drop "Help article does not exist" ;
  
  : article ( name -- article )
-     dup articles get at* [ nip ] [ drop no-article ] if ;
+     articles get ?at [ no-article ] unless ;
  
  M: object article-name article article-name ;
  M: object article-title article article-title ;
@@@ -74,4 -73,4 +74,4 @@@ M: f article-name drop \ f article-nam
  M: f article-title drop \ f article-title ;
  M: f article-content drop \ f article-content ;
  M: f article-parent drop \ f article-parent ;
 -M: f set-article-parent drop \ f set-article-parent ;
 +M: f set-article-parent drop \ f set-article-parent ;
index 20c31aa2bd300efd1be45b84ec6a782eaefca445,7e2ac0884ca9edae5a042c7507544aa4df370e40..65c13f29fc36f273dbd7457659904f60c8267123
@@@ -1,6 -1,6 +1,6 @@@
  ! Copyright (C) 2004, 2008 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.
- USING: math kernel math.constants math.private
+ USING: math kernel math.constants math.private math.bits
  math.libm combinators math.order sequences ;
  IN: math.functions
  
@@@ -26,16 -26,6 +26,6 @@@ GENERIC: sqrt ( x -- y ) foldabl
  M: real sqrt
      >float dup 0.0 < [ neg fsqrt 0.0 swap rect> ] [ fsqrt ] if ;
  
- : each-bit ( n quot: ( ? -- ) -- )
-     over [ 0 = ] [ -1 = ] bi or [
-         2drop
-     ] [
-         2dup { [ odd? ] [ call ] [ 2/ ] [ each-bit ] } spread
-     ] if ; inline recursive
- : map-bits ( n quot: ( ? -- obj ) -- seq )
-     accumulator [ each-bit ] dip ; inline
  : factor-2s ( n -- r s )
      #! factor an integer into 2^r * s
      dup 0 = [ 1 ] [
  GENERIC# ^n 1 ( z w -- z^w )
  
  : (^n) ( z w -- z^w )
-     1 swap [ [ dupd * ] when [ sq ] dip ] each-bit nip ; inline
+     make-bits 1 [ [ dupd * ] when [ sq ] dip ] reduce nip ; inline
  
  M: integer ^n
      [ factor-2s ] dip [ (^n) ] keep rot * shift ;
  
  M: ratio ^n
 -    [ >fraction ] dip tuck [ ^n ] 2bi@ / ;
 +    [ >fraction ] dip [ ^n ] curry bi@ / ;
  
  M: float ^n
      (^n) ;
@@@ -94,9 -84,9 +84,9 @@@ PRIVATE
      dup zero? [ drop 0./0. ] [ 0 < 1./0. 0 ? ] if ; inline
  
  : (^mod) ( n x y -- z )
-     1 swap [
+     make-bits 1 [
          [ dupd * pick mod ] when [ sq over mod ] dip
-     ] each-bit 2nip ; inline
+     ] reduce 2nip ; inline
  
  : (gcd) ( b a x y -- a d )
      over zero? [
index e72916913351dbb4bad264a25ea8dfc6f14df88c,afb7e0843ca9cd733580a4d0b7377e6bf6652ab5..791e0e65c113d51317e31c560f2271217775c835
@@@ -4,8 -4,8 +4,8 @@@ USING: fry accessors arrays kernel word
  namespaces make quotations assocs combinators classes.tuple
  classes.tuple.private effects summary hashtables classes generic
  sets definitions generic.standard slots.private continuations locals
 -stack-checker.backend stack-checker.state stack-checker.visitor
 -stack-checker.errors stack-checker.values
 +generalizations stack-checker.backend stack-checker.state
 +stack-checker.visitor stack-checker.errors stack-checker.values
  stack-checker.recursive-state ;
  IN: stack-checker.transforms
  
  ] 1 define-transform
  
  ! Membership testing
- : bit-member-n 256 ; inline
+ CONSTANT: bit-member-n 256
  
  : bit-member? ( seq -- ? )
      #! Can we use a fast byte array test here?
  \ memq? [
      dup sequence? [ memq-quot ] [ drop f ] if
  ] 1 define-transform
 +
 +! Shuffling
 +: nths-quot ( indices -- quot )
 +    [ [ '[ _ swap nth ] ] map ] [ length ] bi
 +    '[ _ cleave _ narray ] ;
 +
 +\ shuffle [
 +    shuffle-mapping nths-quot
 +] 1 define-transform
index 73f787e00962263ac55eb4249425e013dfa9fef8,fdaa02e6c42cd4e8815cdc3181271f0de49f63d3..c4deddae3949d97fa1104782cfba7d4e25fe1cde
@@@ -19,6 -19,9 +19,9 @@@ GENERIC: >alist ( assoc -- newassoc 
  
  M: assoc assoc-like drop ;
  
+ : ?at ( key assoc -- value/key ? )
+     dupd at* [ [ nip ] [ drop ] if ] keep ; inline
  <PRIVATE
  
  : (assoc-each) ( assoc quot -- seq quot' )
@@@ -36,7 -39,7 +39,7 @@@
      [ first = ] with find swap ; inline
  
  : substituter ( assoc -- quot )
-     [ dupd at* [ nip ] [ drop ] if ] curry ; inline
+     [ ?at drop ] curry ; inline
  
  : with-assoc ( assoc quot: ( value key -- assoc ) -- quot: ( key value -- ) )
      curry [ swap ] prepose ; inline
@@@ -68,7 -71,7 +71,7 @@@ PRIVATE
  
  : assoc-partition ( assoc quot -- true-assoc false-assoc )
      [ (assoc-each) partition ] [ drop ] 2bi
 -    tuck [ assoc-like ] 2bi@ ; inline
 +    [ assoc-like ] curry bi@ ; inline
  
  : assoc-any? ( assoc quot -- ? )
      assoc-find 2nip ; inline
@@@ -80,7 -83,7 +83,7 @@@
      at* drop ; inline
  
  : at-default ( key assoc -- value/key )
-     2dup at* [ 2nip ] [ 2drop ] if ; inline
+     ?at drop ; inline
  
  M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
      [ dup assoc-size ] dip new-assoc
index 43f7a2b89e27fc5ea86c73c7514205dcf4aa0b57,7ea2964411370fa1c321115ba3effcdafce3ad9b..47da144d4dd6e5a3035805597c109dbf2692cc8a
@@@ -1,13 -1,13 +1,13 @@@
  ! Copyright (C) 2006 Doug Coleman
  ! See http://factorcode.org/license.txt for BSD license.
  USING: kernel math sequences sequences.private namespaces
 -words io io.binary io.files io.streams.string quotations
 +words io io.binary io.files quotations
  definitions checksums ;
  IN: checksums.crc32
  
- : crc32-polynomial HEX: edb88320 ; inline
+ CONSTANT: crc32-polynomial HEX: edb88320
  
- : crc32-table V{ } ; inline
+ CONSTANT: crc32-table V{ }
  
  256 [
      8 [
index 4385bab9d6579628ee9f12fc2663a3e624d25cd0,e8735afa6aac8feb4c102d8b78f328e0c3b7e278..d8ad1274f219bd909355d6663df407ac2d83bf43
@@@ -14,7 -14,7 +14,7 @@@ GENERIC: encode-char ( char stream enco
  
  GENERIC: <decoder> ( stream encoding -- newstream )
  
- : replacement-char HEX: fffd ; inline
+ CONSTANT: replacement-char HEX: fffd
  
  TUPLE: decoder stream code cr ;
  
@@@ -61,8 -61,9 +61,8 @@@ M: decoder stream-read
  : (read) ( n quot -- n string )
      over 0 <string> [
          [
 -            slip over
 -            [ swapd set-nth-unsafe f ] [ 3drop t ] if
 -        ] 2curry find-integer
 +            over [ swapd set-nth-unsafe f ] [ 3drop t ] if
 +        ] curry compose find-integer
      ] keep ; inline
  
  : finish-read ( n string -- string/f )
@@@ -73,8 -74,7 +73,8 @@@
      } cond ; inline
  
  M: decoder stream-read
 -    tuck >decoder< [ decode-char ] 2curry (read) finish-read fix-read ;
 +    [ nip ] [ >decoder< [ decode-char ] 2curry (read) finish-read ] 2bi
 +    fix-read ;
  
  M: decoder stream-read-partial stream-read ;
  
diff --combined core/words/words.factor
index c177ca96d9086fc618c3a2b7095d674b00e40e1b,4a3c1b2d52d482ac8b81dfaa55cb253c73fea5c0..33aa9e18d2a66900c54676c5ab429fc4f1bc2ce6
@@@ -109,9 -109,10 +109,9 @@@ compiled-generic-crossref [ H{ } clone 
  
  : compiled-xref ( word dependencies generic-dependencies -- )
      [ [ drop crossref? ] { } assoc-filter-as f like ] bi@
 -    [ over ] dip
      [ "compiled-uses" compiled-crossref (compiled-xref) ]
      [ "compiled-generic-uses" compiled-generic-crossref (compiled-xref) ]
 -    2bi* ;
 +    bi-curry* bi ;
  
  : (compiled-unxref) ( word word-prop variable -- )
      [ [ [ dupd word-prop ] dip get remove-vertex* ] 2curry ]
  
  SYMBOL: visited
  
- : reset-on-redefine { "inferred-effect" "cannot-infer" } ; inline
+ CONSTANT: reset-on-redefine { "inferred-effect" "cannot-infer" }
  
  : (redefined) ( word -- )
      dup visited get key? [ drop ] [
index ba3ca21fcbf633fcfe72544657833928c42ffc7e,cd9eea140937d3112b9ab39c0450178ad39544aa..63f91ffc78d236c7bafd187a74c0da23a1dd0dbd
  USING: iokit alien alien.syntax alien.c-types kernel
 -system core-foundation ;
 +system core-foundation core-foundation.data
 +core-foundation.dictionaries ;
  IN: iokit.hid
  
- : kIOHIDDeviceKey "IOHIDDevice" ; inline
- : kIOHIDTransportKey                  "Transport" ; inline
- : kIOHIDVendorIDKey                   "VendorID" ; inline
- : kIOHIDVendorIDSourceKey             "VendorIDSource" ; inline
- : kIOHIDProductIDKey                  "ProductID" ; inline
- : kIOHIDVersionNumberKey              "VersionNumber" ; inline
- : kIOHIDManufacturerKey               "Manufacturer" ; inline
- : kIOHIDProductKey                    "Product" ; inline
- : kIOHIDSerialNumberKey               "SerialNumber" ; inline
- : kIOHIDCountryCodeKey                "CountryCode" ; inline
- : kIOHIDLocationIDKey                 "LocationID" ; inline
- : kIOHIDDeviceUsageKey                "DeviceUsage" ; inline
- : kIOHIDDeviceUsagePageKey            "DeviceUsagePage" ; inline
- : kIOHIDDeviceUsagePairsKey           "DeviceUsagePairs" ; inline
- : kIOHIDPrimaryUsageKey               "PrimaryUsage" ; inline
- : kIOHIDPrimaryUsagePageKey           "PrimaryUsagePage" ; inline
- : kIOHIDMaxInputReportSizeKey         "MaxInputReportSize" ; inline
- : kIOHIDMaxOutputReportSizeKey       "MaxOutputReportSize" ; inline
- : kIOHIDMaxFeatureReportSizeKey       "MaxFeatureReportSize" ; inline
- : kIOHIDReportIntervalKey             "ReportInterval" ; inline
- : kIOHIDElementKey                    "Elements" ; inline
- : kIOHIDElementCookieKey                      "ElementCookie" ; inline
- : kIOHIDElementTypeKey                        "Type" ; inline
- : kIOHIDElementCollectionTypeKey              "CollectionType" ; inline
- : kIOHIDElementUsageKey                       "Usage" ; inline
- : kIOHIDElementUsagePageKey                   "UsagePage" ; inline
- : kIOHIDElementMinKey                         "Min" ; inline
- : kIOHIDElementMaxKey                         "Max" ; inline
- : kIOHIDElementScaledMinKey                   "ScaledMin" ; inline
- : kIOHIDElementScaledMaxKey                   "ScaledMax" ; inline
- : kIOHIDElementSizeKey                        "Size" ; inline
- : kIOHIDElementReportSizeKey                  "ReportSize" ; inline
- : kIOHIDElementReportCountKey                 "ReportCount" ; inline
- : kIOHIDElementReportIDKey                    "ReportID" ; inline
- : kIOHIDElementIsArrayKey                     "IsArray" ; inline
- : kIOHIDElementIsRelativeKey                  "IsRelative" ; inline
- : kIOHIDElementIsWrappingKey                  "IsWrapping" ; inline
- : kIOHIDElementIsNonLinearKey                 "IsNonLinear" ; inline
- : kIOHIDElementHasPreferredStateKey           "HasPreferredState" ; inline
- : kIOHIDElementHasNullStateKey                "HasNullState" ; inline
- : kIOHIDElementFlagsKey                       "Flags" ; inline
- : kIOHIDElementUnitKey                        "Unit" ; inline
- : kIOHIDElementUnitExponentKey                "UnitExponent" ; inline
- : kIOHIDElementNameKey                        "Name" ; inline
- : kIOHIDElementValueLocationKey               "ValueLocation" ; inline
- : kIOHIDElementDuplicateIndexKey              "DuplicateIndex" ; inline
- : kIOHIDElementParentCollectionKey            "ParentCollection" ; inline
+ CONSTANT: kIOHIDDeviceKey "IOHIDDevice"
+ CONSTANT: kIOHIDTransportKey                  "Transport"
+ CONSTANT: kIOHIDVendorIDKey                   "VendorID"
+ CONSTANT: kIOHIDVendorIDSourceKey             "VendorIDSource"
+ CONSTANT: kIOHIDProductIDKey                  "ProductID"
+ CONSTANT: kIOHIDVersionNumberKey              "VersionNumber"
+ CONSTANT: kIOHIDManufacturerKey               "Manufacturer"
+ CONSTANT: kIOHIDProductKey                    "Product"
+ CONSTANT: kIOHIDSerialNumberKey               "SerialNumber"
+ CONSTANT: kIOHIDCountryCodeKey                "CountryCode"
+ CONSTANT: kIOHIDLocationIDKey                 "LocationID"
+ CONSTANT: kIOHIDDeviceUsageKey                "DeviceUsage"
+ CONSTANT: kIOHIDDeviceUsagePageKey            "DeviceUsagePage"
+ CONSTANT: kIOHIDDeviceUsagePairsKey           "DeviceUsagePairs"
+ CONSTANT: kIOHIDPrimaryUsageKey               "PrimaryUsage"
+ CONSTANT: kIOHIDPrimaryUsagePageKey           "PrimaryUsagePage"
+ CONSTANT: kIOHIDMaxInputReportSizeKey         "MaxInputReportSize"
+ CONSTANT: kIOHIDMaxOutputReportSizeKey       "MaxOutputReportSize"
+ CONSTANT: kIOHIDMaxFeatureReportSizeKey       "MaxFeatureReportSize"
+ CONSTANT: kIOHIDReportIntervalKey             "ReportInterval"
+ CONSTANT: kIOHIDElementKey                    "Elements"
+ CONSTANT: kIOHIDElementCookieKey                      "ElementCookie"
+ CONSTANT: kIOHIDElementTypeKey                        "Type"
+ CONSTANT: kIOHIDElementCollectionTypeKey              "CollectionType"
+ CONSTANT: kIOHIDElementUsageKey                       "Usage"
+ CONSTANT: kIOHIDElementUsagePageKey                   "UsagePage"
+ CONSTANT: kIOHIDElementMinKey                         "Min"
+ CONSTANT: kIOHIDElementMaxKey                         "Max"
+ CONSTANT: kIOHIDElementScaledMinKey                   "ScaledMin"
+ CONSTANT: kIOHIDElementScaledMaxKey                   "ScaledMax"
+ CONSTANT: kIOHIDElementSizeKey                        "Size"
+ CONSTANT: kIOHIDElementReportSizeKey                  "ReportSize"
+ CONSTANT: kIOHIDElementReportCountKey                 "ReportCount"
+ CONSTANT: kIOHIDElementReportIDKey                    "ReportID"
+ CONSTANT: kIOHIDElementIsArrayKey                     "IsArray"
+ CONSTANT: kIOHIDElementIsRelativeKey                  "IsRelative"
+ CONSTANT: kIOHIDElementIsWrappingKey                  "IsWrapping"
+ CONSTANT: kIOHIDElementIsNonLinearKey                 "IsNonLinear"
+ CONSTANT: kIOHIDElementHasPreferredStateKey           "HasPreferredState"
+ CONSTANT: kIOHIDElementHasNullStateKey                "HasNullState"
+ CONSTANT: kIOHIDElementFlagsKey                       "Flags"
+ CONSTANT: kIOHIDElementUnitKey                        "Unit"
+ CONSTANT: kIOHIDElementUnitExponentKey                "UnitExponent"
+ CONSTANT: kIOHIDElementNameKey                        "Name"
+ CONSTANT: kIOHIDElementValueLocationKey               "ValueLocation"
+ CONSTANT: kIOHIDElementDuplicateIndexKey              "DuplicateIndex"
+ CONSTANT: kIOHIDElementParentCollectionKey            "ParentCollection"
  
  : kIOHIDElementVendorSpecificKey ( -- str )
      cpu ppc? "VendorSpecifc" "VendorSpecific" ? ; inline
  
- : kIOHIDElementCookieMinKey           "ElementCookieMin" ; inline
- : kIOHIDElementCookieMaxKey           "ElementCookieMax" ; inline
- : kIOHIDElementUsageMinKey            "UsageMin" ; inline
- : kIOHIDElementUsageMaxKey            "UsageMax" ; inline
- : kIOHIDElementCalibrationMinKey              "CalibrationMin" ; inline
- : kIOHIDElementCalibrationMaxKey              "CalibrationMax" ; inline
- : kIOHIDElementCalibrationSaturationMinKey    "CalibrationSaturationMin" ; inline
- : kIOHIDElementCalibrationSaturationMaxKey    "CalibrationSaturationMax" ; inline
- : kIOHIDElementCalibrationDeadZoneMinKey      "CalibrationDeadZoneMin" ; inline
- : kIOHIDElementCalibrationDeadZoneMaxKey      "CalibrationDeadZoneMax" ; inline
- : kIOHIDElementCalibrationGranularityKey      "CalibrationGranularity" ; inline
- : kIOHIDElementTypeInput_Misc        1 ; inline
- : kIOHIDElementTypeInput_Button      2 ; inline
- : kIOHIDElementTypeInput_Axis        3 ; inline
- : kIOHIDElementTypeInput_ScanCodes   4 ; inline
- : kIOHIDElementTypeOutput            129 ; inline
- : kIOHIDElementTypeFeature           257 ; inline
- : kIOHIDElementTypeCollection        513 ; inline
- : kIOHIDElementCollectionTypePhysical     HEX: 00 ; inline
- : kIOHIDElementCollectionTypeApplication    HEX: 01 ; inline
- : kIOHIDElementCollectionTypeLogical        HEX: 02 ; inline
- : kIOHIDElementCollectionTypeReport         HEX: 03 ; inline
- : kIOHIDElementCollectionTypeNamedArray     HEX: 04 ; inline
- : kIOHIDElementCollectionTypeUsageSwitch    HEX: 05 ; inline
- : kIOHIDElementCollectionTypeUsageModifier  HEX: 06 ; inline
- : kIOHIDReportTypeInput    0 ; inline
- : kIOHIDReportTypeOutput   1 ; inline
- : kIOHIDReportTypeFeature  2 ; inline
- : kIOHIDReportTypeCount    3 ; inline
- : kIOHIDOptionsTypeNone        HEX: 00 ; inline
- : kIOHIDOptionsTypeSeizeDevice HEX: 01 ; inline
- : kIOHIDQueueOptionsTypeNone    HEX: 00 ; inline
- : kIOHIDQueueOptionsTypeEnqueueAll HEX: 01 ; inline
- : kIOHIDElementFlagsConstantMask        HEX: 0001 ; inline
- : kIOHIDElementFlagsVariableMask        HEX: 0002 ; inline
- : kIOHIDElementFlagsRelativeMask        HEX: 0004 ; inline
- : kIOHIDElementFlagsWrapMask            HEX: 0008 ; inline
- : kIOHIDElementFlagsNonLinearMask       HEX: 0010 ; inline
- : kIOHIDElementFlagsNoPreferredMask     HEX: 0020 ; inline
- : kIOHIDElementFlagsNullStateMask       HEX: 0040 ; inline
- : kIOHIDElementFlagsVolativeMask        HEX: 0080 ; inline
- : kIOHIDElementFlagsBufferedByteMask    HEX: 0100 ; inline
- : kIOHIDValueScaleTypeCalibrated 0 ; inline
- : kIOHIDValueScaleTypePhysical   1 ; inline
- : kIOHIDTransactionDirectionTypeInput  0 ; inline
- : kIOHIDTransactionDirectionTypeOutput 1 ; inline
- : kIOHIDTransactionOptionDefaultOutputValue 1 ; inline
+ CONSTANT: kIOHIDElementCookieMinKey           "ElementCookieMin"
+ CONSTANT: kIOHIDElementCookieMaxKey           "ElementCookieMax"
+ CONSTANT: kIOHIDElementUsageMinKey            "UsageMin"
+ CONSTANT: kIOHIDElementUsageMaxKey            "UsageMax"
+ CONSTANT: kIOHIDElementCalibrationMinKey              "CalibrationMin"
+ CONSTANT: kIOHIDElementCalibrationMaxKey              "CalibrationMax"
+ CONSTANT: kIOHIDElementCalibrationSaturationMinKey    "CalibrationSaturationMin"
+ CONSTANT: kIOHIDElementCalibrationSaturationMaxKey    "CalibrationSaturationMax"
+ CONSTANT: kIOHIDElementCalibrationDeadZoneMinKey      "CalibrationDeadZoneMin"
+ CONSTANT: kIOHIDElementCalibrationDeadZoneMaxKey      "CalibrationDeadZoneMax"
+ CONSTANT: kIOHIDElementCalibrationGranularityKey      "CalibrationGranularity"
+ CONSTANT: kIOHIDElementTypeInput_Misc        1
+ CONSTANT: kIOHIDElementTypeInput_Button      2
+ CONSTANT: kIOHIDElementTypeInput_Axis        3
+ CONSTANT: kIOHIDElementTypeInput_ScanCodes   4
+ CONSTANT: kIOHIDElementTypeOutput            129
+ CONSTANT: kIOHIDElementTypeFeature           257
+ CONSTANT: kIOHIDElementTypeCollection        513
+ CONSTANT: kIOHIDElementCollectionTypePhysical     HEX: 00
+ CONSTANT: kIOHIDElementCollectionTypeApplication    HEX: 01
+ CONSTANT: kIOHIDElementCollectionTypeLogical        HEX: 02
+ CONSTANT: kIOHIDElementCollectionTypeReport         HEX: 03
+ CONSTANT: kIOHIDElementCollectionTypeNamedArray     HEX: 04
+ CONSTANT: kIOHIDElementCollectionTypeUsageSwitch    HEX: 05
+ CONSTANT: kIOHIDElementCollectionTypeUsageModifier  HEX: 06
+ CONSTANT: kIOHIDReportTypeInput    0
+ CONSTANT: kIOHIDReportTypeOutput   1
+ CONSTANT: kIOHIDReportTypeFeature  2
+ CONSTANT: kIOHIDReportTypeCount    3
+ CONSTANT: kIOHIDOptionsTypeNone        HEX: 00
+ CONSTANT: kIOHIDOptionsTypeSeizeDevice HEX: 01
+ CONSTANT: kIOHIDQueueOptionsTypeNone    HEX: 00
+ CONSTANT: kIOHIDQueueOptionsTypeEnqueueAll HEX: 01
+ CONSTANT: kIOHIDElementFlagsConstantMask        HEX: 0001
+ CONSTANT: kIOHIDElementFlagsVariableMask        HEX: 0002
+ CONSTANT: kIOHIDElementFlagsRelativeMask        HEX: 0004
+ CONSTANT: kIOHIDElementFlagsWrapMask            HEX: 0008
+ CONSTANT: kIOHIDElementFlagsNonLinearMask       HEX: 0010
+ CONSTANT: kIOHIDElementFlagsNoPreferredMask     HEX: 0020
+ CONSTANT: kIOHIDElementFlagsNullStateMask       HEX: 0040
+ CONSTANT: kIOHIDElementFlagsVolativeMask        HEX: 0080
+ CONSTANT: kIOHIDElementFlagsBufferedByteMask    HEX: 0100
+ CONSTANT: kIOHIDValueScaleTypeCalibrated 0
+ CONSTANT: kIOHIDValueScaleTypePhysical   1
+ CONSTANT: kIOHIDTransactionDirectionTypeInput  0
+ CONSTANT: kIOHIDTransactionDirectionTypeOutput 1
+ CONSTANT: kIOHIDTransactionOptionDefaultOutputValue 1
  
  TYPEDEF: ptrdiff_t IOHIDElementCookie
  TYPEDEF: int IOHIDElementType
diff --combined extra/iokit/iokit.factor
index cfc1b04506c19a64dd6b04db1c7f2c4bb027ffe8,3fb14e8ec5197d3dd7eb18c7610d1443c2f6c6c9..f5ede8f8ec439fcf9c9d81f67b1243c30478bb6f
@@@ -1,6 -1,6 +1,6 @@@
  USING: alien.syntax alien.c-types core-foundation
 -core-foundation.bundles system combinators kernel sequences
 -debugger io accessors ;
 +core-foundation.bundles core-foundation.dictionaries system
 +combinators kernel sequences debugger io accessors ;
  IN: iokit
  
  <<
@@@ -9,95 -9,95 +9,95 @@@
      when
  >>
  
- : kIOKitBuildVersionKey   "IOKitBuildVersion" ; inline
- : kIOKitDiagnosticsKey   "IOKitDiagnostics" ; inline
+ CONSTANT: kIOKitBuildVersionKey   "IOKitBuildVersion"
+ CONSTANT: kIOKitDiagnosticsKey   "IOKitDiagnostics"
   
- : kIORegistryPlanesKey   "IORegistryPlanes" ; inline
- : kIOCatalogueKey    "IOCatalogue" ; inline
+ CONSTANT: kIORegistryPlanesKey   "IORegistryPlanes"
+ CONSTANT: kIOCatalogueKey    "IOCatalogue"
  
- : kIOServicePlane    "IOService" ; inline
- : kIOPowerPlane    "IOPower" ; inline
- : kIODeviceTreePlane   "IODeviceTree" ; inline
- : kIOAudioPlane    "IOAudio" ; inline
- : kIOFireWirePlane   "IOFireWire" ; inline
- : kIOUSBPlane    "IOUSB" ; inline
+ CONSTANT: kIOServicePlane    "IOService"
+ CONSTANT: kIOPowerPlane    "IOPower"
+ CONSTANT: kIODeviceTreePlane   "IODeviceTree"
+ CONSTANT: kIOAudioPlane    "IOAudio"
+ CONSTANT: kIOFireWirePlane   "IOFireWire"
+ CONSTANT: kIOUSBPlane    "IOUSB"
  
- : kIOServiceClass    "IOService" ; inline
+ CONSTANT: kIOServiceClass    "IOService"
  
- : kIOResourcesClass   "IOResources" ; inline
+ CONSTANT: kIOResourcesClass   "IOResources"
  
- : kIOClassKey    "IOClass" ; inline
- : kIOProbeScoreKey   "IOProbeScore" ; inline
- : kIOKitDebugKey    "IOKitDebug" ; inline
+ CONSTANT: kIOClassKey    "IOClass"
+ CONSTANT: kIOProbeScoreKey   "IOProbeScore"
+ CONSTANT: kIOKitDebugKey    "IOKitDebug"
  
- : kIOProviderClassKey   "IOProviderClass" ; inline
- : kIONameMatchKey    "IONameMatch" ; inline
- : kIOPropertyMatchKey   "IOPropertyMatch" ; inline
- : kIOPathMatchKey    "IOPathMatch" ; inline
- : kIOLocationMatchKey   "IOLocationMatch" ; inline
- : kIOParentMatchKey   "IOParentMatch" ; inline
- : kIOResourceMatchKey   "IOResourceMatch" ; inline
- : kIOMatchedServiceCountKey  "IOMatchedServiceCountMatch" ; inline
+ CONSTANT: kIOProviderClassKey   "IOProviderClass"
+ CONSTANT: kIONameMatchKey    "IONameMatch"
+ CONSTANT: kIOPropertyMatchKey   "IOPropertyMatch"
+ CONSTANT: kIOPathMatchKey    "IOPathMatch"
+ CONSTANT: kIOLocationMatchKey   "IOLocationMatch"
+ CONSTANT: kIOParentMatchKey   "IOParentMatch"
+ CONSTANT: kIOResourceMatchKey   "IOResourceMatch"
+ CONSTANT: kIOMatchedServiceCountKey  "IOMatchedServiceCountMatch"
  
- : kIONameMatchedKey   "IONameMatched" ; inline
+ CONSTANT: kIONameMatchedKey   "IONameMatched"
  
- : kIOMatchCategoryKey   "IOMatchCategory" ; inline
- : kIODefaultMatchCategoryKey  "IODefaultMatchCategory" ; inline
+ CONSTANT: kIOMatchCategoryKey   "IOMatchCategory"
+ CONSTANT: kIODefaultMatchCategoryKey  "IODefaultMatchCategory"
  
- : kIOUserClientClassKey   "IOUserClientClass" ; inline
+ CONSTANT: kIOUserClientClassKey   "IOUserClientClass"
  
- : kIOUserClientCrossEndianKey   "IOUserClientCrossEndian" ; inline
- : kIOUserClientCrossEndianCompatibleKey  "IOUserClientCrossEndianCompatible" ; inline
- : kIOUserClientSharedInstanceKey   "IOUserClientSharedInstance" ; inline
+ CONSTANT: kIOUserClientCrossEndianKey   "IOUserClientCrossEndian"
+ CONSTANT: kIOUserClientCrossEndianCompatibleKey  "IOUserClientCrossEndianCompatible"
+ CONSTANT: kIOUserClientSharedInstanceKey   "IOUserClientSharedInstance"
  
- : kIOPublishNotification   "IOServicePublish" ; inline
- : kIOFirstPublishNotification  "IOServiceFirstPublish" ; inline
- : kIOMatchedNotification   "IOServiceMatched" ; inline
- : kIOFirstMatchNotification  "IOServiceFirstMatch" ; inline
- : kIOTerminatedNotification  "IOServiceTerminate" ; inline
+ CONSTANT: kIOPublishNotification   "IOServicePublish"
+ CONSTANT: kIOFirstPublishNotification  "IOServiceFirstPublish"
+ CONSTANT: kIOMatchedNotification   "IOServiceMatched"
+ CONSTANT: kIOFirstMatchNotification  "IOServiceFirstMatch"
+ CONSTANT: kIOTerminatedNotification  "IOServiceTerminate"
  
- : kIOGeneralInterest   "IOGeneralInterest" ; inline
- : kIOBusyInterest    "IOBusyInterest" ; inline
- : kIOAppPowerStateInterest  "IOAppPowerStateInterest" ; inline
- : kIOPriorityPowerStateInterest  "IOPriorityPowerStateInterest" ; inline
+ CONSTANT: kIOGeneralInterest   "IOGeneralInterest"
+ CONSTANT: kIOBusyInterest    "IOBusyInterest"
+ CONSTANT: kIOAppPowerStateInterest  "IOAppPowerStateInterest"
+ CONSTANT: kIOPriorityPowerStateInterest  "IOPriorityPowerStateInterest"
  
- : kIOPlatformDeviceMessageKey "IOPlatformDeviceMessage" ; inline
+ CONSTANT: kIOPlatformDeviceMessageKey "IOPlatformDeviceMessage"
  
- : kIOCFPlugInTypesKey   "IOCFPlugInTypes" ; inline
+ CONSTANT: kIOCFPlugInTypesKey   "IOCFPlugInTypes"
  
- : kIOCommandPoolSizeKey         "IOCommandPoolSize" ; inline
+ CONSTANT: kIOCommandPoolSizeKey         "IOCommandPoolSize"
  
- : kIOMaximumBlockCountReadKey "IOMaximumBlockCountRead" ; inline
- : kIOMaximumBlockCountWriteKey "IOMaximumBlockCountWrite" ; inline
- : kIOMaximumByteCountReadKey "IOMaximumByteCountRead" ; inline
- : kIOMaximumByteCountWriteKey "IOMaximumByteCountWrite" ; inline
- : kIOMaximumSegmentCountReadKey "IOMaximumSegmentCountRead" ; inline
- : kIOMaximumSegmentCountWriteKey "IOMaximumSegmentCountWrite" ; inline
- : kIOMaximumSegmentByteCountReadKey "IOMaximumSegmentByteCountRead" ; inline
- : kIOMaximumSegmentByteCountWriteKey "IOMaximumSegmentByteCountWrite" ; inline
- : kIOMinimumSegmentAlignmentByteCountKey "IOMinimumSegmentAlignmentByteCount" ; inline
- : kIOMaximumSegmentAddressableBitCountKey "IOMaximumSegmentAddressableBitCount" ; inline
+ CONSTANT: kIOMaximumBlockCountReadKey "IOMaximumBlockCountRead"
+ CONSTANT: kIOMaximumBlockCountWriteKey "IOMaximumBlockCountWrite"
+ CONSTANT: kIOMaximumByteCountReadKey "IOMaximumByteCountRead"
+ CONSTANT: kIOMaximumByteCountWriteKey "IOMaximumByteCountWrite"
+ CONSTANT: kIOMaximumSegmentCountReadKey "IOMaximumSegmentCountRead"
+ CONSTANT: kIOMaximumSegmentCountWriteKey "IOMaximumSegmentCountWrite"
+ CONSTANT: kIOMaximumSegmentByteCountReadKey "IOMaximumSegmentByteCountRead"
+ CONSTANT: kIOMaximumSegmentByteCountWriteKey "IOMaximumSegmentByteCountWrite"
+ CONSTANT: kIOMinimumSegmentAlignmentByteCountKey "IOMinimumSegmentAlignmentByteCount"
+ CONSTANT: kIOMaximumSegmentAddressableBitCountKey "IOMaximumSegmentAddressableBitCount"
  
- : kIOIconKey "IOIcon" ; inline
- : kIOBundleResourceFileKey "IOBundleResourceFile" ; inline
+ CONSTANT: kIOIconKey "IOIcon"
+ CONSTANT: kIOBundleResourceFileKey "IOBundleResourceFile"
  
- : kIOBusBadgeKey "IOBusBadge" ; inline
- : kIODeviceIconKey "IODeviceIcon" ; inline
+ CONSTANT: kIOBusBadgeKey "IOBusBadge"
+ CONSTANT: kIODeviceIconKey "IODeviceIcon"
  
- : kIOPlatformSerialNumberKey  "IOPlatformSerialNumber"  ; inline
+ CONSTANT: kIOPlatformSerialNumberKey  "IOPlatformSerialNumber" 
  
- : kIOPlatformUUIDKey  "IOPlatformUUID"  ; inline
+ CONSTANT: kIOPlatformUUIDKey  "IOPlatformUUID" 
  
- : kIONVRAMDeletePropertyKey  "IONVRAM-DELETE-PROPERTY" ; inline
- : kIODTNVRAMPanicInfoKey   "aapl,panic-info" ; inline
+ CONSTANT: kIONVRAMDeletePropertyKey  "IONVRAM-DELETE-PROPERTY"
+ CONSTANT: kIODTNVRAMPanicInfoKey   "aapl,panic-info"
  
- : kIOBootDeviceKey "IOBootDevice"   ; inline
- : kIOBootDevicePathKey "IOBootDevicePath"  ; inline
- : kIOBootDeviceSizeKey "IOBootDeviceSize"  ; inline
+ CONSTANT: kIOBootDeviceKey "IOBootDevice"  
+ CONSTANT: kIOBootDevicePathKey "IOBootDevicePath" 
+ CONSTANT: kIOBootDeviceSizeKey "IOBootDeviceSize" 
  
- : kOSBuildVersionKey   "OS Build Version" ; inline
+ CONSTANT: kOSBuildVersionKey   "OS Build Version"
  
- : kNilOptions 0 ; inline
+ CONSTANT: kNilOptions 0
  
  TYPEDEF: uint mach_port_t
  TYPEDEF: int kern_return_t
@@@ -112,8 -112,8 +112,8 @@@ TYPEDEF: kern_return_t IORetur
  
  TYPEDEF: uint IOOptionBits
  
- : MACH_PORT_NULL 0 ; inline
- : KERN_SUCCESS 0 ; inline
+ CONSTANT: MACH_PORT_NULL 0
+ CONSTANT: KERN_SUCCESS 0
  
  FUNCTION: IOReturn IOMasterPort ( mach_port_t bootstrap, mach_port_t* master ) ;
  
index 0f8529b3d70b489f96aee6020e29da1e5c909de7,9f05482b30f75f161d279ccc9ec023a8f8987799..845c39ab75c4aaa2449816463c6362728f2969ed
@@@ -4,15 -4,15 +4,15 @@@ ui.render accessors combinators 
  IN: opengl.demo-support
  
  : FOV ( -- x ) 2.0 sqrt 1+ ; inline
- : MOUSE-MOTION-SCALE 0.5 ; inline
- : KEY-ROTATE-STEP 10.0 ; inline
+ CONSTANT: MOUSE-MOTION-SCALE 0.5
+ CONSTANT: KEY-ROTATE-STEP 10.0
  
  SYMBOL: last-drag-loc
  
  TUPLE: demo-gadget < gadget yaw pitch distance ;
  
  : new-demo-gadget ( yaw pitch distance class -- gadget )
 -    new-gadget
 +    new
          swap >>distance
          swap >>pitch
          swap >>yaw ;