]> gitweb.factorcode.org Git - factor.git/commitdiff
I/O fixes
authorslava <slava@factorcode.org>
Thu, 27 Apr 2006 07:20:02 +0000 (07:20 +0000)
committerslava <slava@factorcode.org>
Thu, 27 Apr 2006 07:20:02 +0000 (07:20 +0000)
TODO.FACTOR.txt
contrib/httpd/cont-responder.factor
library/unix/io.factor

index f3862f64906c65a38c20b7bad18a74e839cc7e2c..269f36bf873dc589fe90d95785437c90fc92e49a 100644 (file)
@@ -2,6 +2,8 @@ should fix in 0.82:
 
 - constant branch folding
 - getenv, setenv, fast-slot stuff
+- more flexible fixnum intrinsics
+- compile if-intrinsic even if there is no #if there
 - 3 >n fep
 - amd64 %box-struct
 - get factor running on mac intel
index d16486e7cdeae192d1ef342736b3199761575fe2..908a20b7b7ab25c88fa6c6a2474f1bdcf01b3e7a 100644 (file)
@@ -136,17 +136,6 @@ TUPLE: resume value stdio ;
       </body>
     </html> flush  ;
 
-: (expired-page-handler) ( alist -- )
-  #! Display a page has expired message.
-  #! TODO: Need to handle this better to enable
-  #!       returning back to root continuation.
-    drop
-    <html>                
-      <body> 
-       <p> "This page has expired." write  </p> 
-      </body>
-    </html> flush  ;
-
 : expired-page-handler ( alist -- )
   [ (expired-page-handler) ] show-final ;
 
index eb68bc3956d6610fe16d140eb03d699a9ddab7fb..f1eeb6fa7a95d230c3820b0a9514e02616f8f117 100644 (file)
@@ -66,7 +66,7 @@ C: port ( handle buffer -- port )
     80 <sbuf> over set-port-sbuf ;
 
 : touch-port ( port -- )
-    dup port-timeout dup 0 =
+    dup port-timeout dup zero?
     [ 2drop ] [ millis + swap set-port-cutoff ] if ;
 
 M: port set-timeout ( timeout port -- )
@@ -115,11 +115,8 @@ GENERIC: task-container ( task -- vector )
     queue-empty? [ remove-io-task ] [ drop ] if r> ;
 
 : handle-fd ( task -- )
-    dup do-io-task [
-        dup io-task-port touch-port pop-callback continue
-    ] [
-        drop
-    ] if ;
+    dup io-task-port touch-port dup do-io-task
+    [ pop-callback continue ] [ drop ] if ;
 
 : timeout? ( port -- ? )
     port-cutoff dup zero? not swap millis < and ;
@@ -145,7 +142,7 @@ GENERIC: task-container ( task -- vector )
     f ;
 
 : io-multiplex ( timeout -- )
-    >r FD_SETSIZE init-fdsets r> make-timeval select ( io-error ) drop
+    >r FD_SETSIZE init-fdsets r> make-timeval select io-error
     read-fdset get read-tasks get handle-fdset
     write-fdset get write-tasks get handle-fdset ;