]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/boxes/boxes.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / boxes / boxes.factor
index 22b28b8434f82bcd735c27aea2311ceb0cdba5eb..25f2b963b414cba8cbcb345b628ddf844ad15609 100644 (file)
@@ -1,35 +1,35 @@
-! Copyright (C) 2008, 2010 Slava Pestov.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: kernel accessors ;\r
-IN: boxes\r
-\r
-TUPLE: box value occupied ;\r
-\r
-: <box> ( -- box ) box new ;\r
-\r
-ERROR: box-full box ;\r
-\r
-: >box ( value box -- )\r
-    dup occupied>>\r
-    [ box-full ] [ t >>occupied value<< ] if ; inline\r
-\r
-ERROR: box-empty box ;\r
-\r
-: check-box ( box -- box )\r
-    dup occupied>> [ box-empty ] unless ; inline\r
-\r
-<PRIVATE\r
-\r
-: box-unsafe> ( box -- value )\r
-    [ f ] change-value f >>occupied drop ; inline\r
-\r
-PRIVATE>\r
-\r
-: box> ( box -- value )\r
-    check-box box-unsafe> ; inline\r
-\r
-: ?box ( box -- value/f ? )\r
-    dup occupied>> [ box-unsafe> t ] [ drop f f ] if ; inline\r
-\r
-: if-box? ( box quot -- )\r
-    [ ?box ] dip [ drop ] if ; inline\r
+! Copyright (C) 2008, 2010 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel accessors ;
+IN: boxes
+
+TUPLE: box value occupied ;
+
+: <box> ( -- box ) box new ;
+
+ERROR: box-full box ;
+
+: >box ( value box -- )
+    dup occupied>>
+    [ box-full ] [ t >>occupied value<< ] if ; inline
+
+ERROR: box-empty box ;
+
+: check-box ( box -- box )
+    dup occupied>> [ box-empty ] unless ; inline
+
+<PRIVATE
+
+: box-unsafe> ( box -- value )
+    [ f ] change-value f >>occupied drop ; inline
+
+PRIVATE>
+
+: box> ( box -- value )
+    check-box box-unsafe> ; inline
+
+: ?box ( box -- value/f ? )
+    dup occupied>> [ box-unsafe> t ] [ drop f f ] if ; inline
+
+: if-box? ( box quot -- )
+    [ ?box ] dip [ drop ] if ; inline