]> gitweb.factorcode.org Git - factor.git/commitdiff
Get eval-responder working again and fix up for the rename of 'cat' to
authorChris Double <chris.double@double.co.nz>
Wed, 18 May 2005 22:37:42 +0000 (22:37 +0000)
committerChris Double <chris.double@double.co.nz>
Wed, 18 May 2005 22:37:42 +0000 (22:37 +0000)
'append'.

contrib/cont-responder/cont-examples.factor
contrib/cont-responder/eval-responder.factor
contrib/cont-responder/todo.factor

index 76d0a721e449f491cba52fa158a66e28d7deffd3..5ca77a1e76baf32cbd20650d1b7f4682d1df6892 100644 (file)
@@ -62,7 +62,7 @@ USE: sequences
 : test-cont-responder ( - )
   #! Test the cont-responder responder by displaying a few pages in a row.
   "Page one" display-page 
-  "Hello " display-get-name-page cat2 display-page
+  "Hello " display-get-name-page append display-page
   "Page three" display-page ;
 
 : test-cont-responder2 ( - )
@@ -92,7 +92,7 @@ USE: sequences
   [ 
     #! And we don't need the 'url' argument
     drop         
-    "Counter: " over unparse cat2 [ 
+    "Counter: " over unparse append [ 
       dup <h2> unparse write </h2>
       "++" over unit [ f ] swap append [ 1 + counter-example ] append quot-href
       "--" over unit [ f ] swap append [ 1 - counter-example ] append quot-href
@@ -108,7 +108,7 @@ USE: sequences
   [ 
     #! We don't need the 'url' argument
     drop   
-    "Counter: " "counter" get unparse cat2 [ 
+    "Counter: " "counter" get unparse append [ 
       <h2> "counter" get unparse write </h2>
       "++" [ "counter" get 1 + "counter" set ] quot-href
       "--" [ "counter" get 1 - "counter" set ] quot-href
index d7ad3827ea752a3d65272fe6f8de503d6b561583..4442a236999a6abcb168a43e2e12a3b25ff65a64 100644 (file)
@@ -73,7 +73,9 @@ USE: sequences
 : escape-quotes ( string -- string )
   #! Replace occurrences of single quotes with
   #! backslash quote.
-  [ dup [ [[ CHAR: ' "\\'" ]] [[ CHAR: " "\\\"" ]] ] assoc dup rot ? ] map ;
+  [
+    [ dup [ [[ CHAR: ' "\\'" ]] [[ CHAR: " "\\\"" ]] ] assoc [ , ] [ , ] ?ifte ] each
+  ] make-string ;
  
 : make-eval-javascript ( string -- string )
   #! Give a string return some javascript that when
index 797bd4693375cf48173febb637455eb2a3bdf0c6..8c8a77a97d2121668419ea291c800bd88efecee2 100644 (file)
@@ -116,7 +116,7 @@ USE: http
 : user-exists? ( db-path name password -- <todo> )
   #! Returns a <todo> if a user with the given name exists
   #! otherwise returns false.
-  -rot ".todo" cat3 dup exists? [ 
+  -rot ".todo" append3 dup exists? [ 
     load-todo password-matches?
   ] [
     2drop f