Get eval-responder working again and fix up for the rename of 'cat' to

'append'.
cvs
Chris Double 2005-05-18 22:37:42 +00:00
parent 8d12fec3eb
commit 089c17f401
3 changed files with 7 additions and 5 deletions

View 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

View 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

View 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