parent
8d12fec3eb
commit
089c17f401
|
@ -62,7 +62,7 @@ USE: sequences
|
||||||
: test-cont-responder ( - )
|
: test-cont-responder ( - )
|
||||||
#! Test the cont-responder responder by displaying a few pages in a row.
|
#! Test the cont-responder responder by displaying a few pages in a row.
|
||||||
"Page one" display-page
|
"Page one" display-page
|
||||||
"Hello " display-get-name-page cat2 display-page
|
"Hello " display-get-name-page append display-page
|
||||||
"Page three" display-page ;
|
"Page three" display-page ;
|
||||||
|
|
||||||
: test-cont-responder2 ( - )
|
: test-cont-responder2 ( - )
|
||||||
|
@ -92,7 +92,7 @@ USE: sequences
|
||||||
[
|
[
|
||||||
#! And we don't need the 'url' argument
|
#! And we don't need the 'url' argument
|
||||||
drop
|
drop
|
||||||
"Counter: " over unparse cat2 [
|
"Counter: " over unparse append [
|
||||||
dup <h2> unparse write </h2>
|
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
|
||||||
"--" 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
|
#! We don't need the 'url' argument
|
||||||
drop
|
drop
|
||||||
"Counter: " "counter" get unparse cat2 [
|
"Counter: " "counter" get unparse append [
|
||||||
<h2> "counter" get unparse write </h2>
|
<h2> "counter" get unparse write </h2>
|
||||||
"++" [ "counter" get 1 + "counter" set ] quot-href
|
"++" [ "counter" get 1 + "counter" set ] quot-href
|
||||||
"--" [ "counter" get 1 - "counter" set ] quot-href
|
"--" [ "counter" get 1 - "counter" set ] quot-href
|
||||||
|
|
|
@ -73,7 +73,9 @@ USE: sequences
|
||||||
: escape-quotes ( string -- string )
|
: escape-quotes ( string -- string )
|
||||||
#! Replace occurrences of single quotes with
|
#! Replace occurrences of single quotes with
|
||||||
#! backslash quote.
|
#! backslash quote.
|
||||||
[ dup [ [[ CHAR: ' "\\'" ]] [[ CHAR: " "\\\"" ]] ] assoc dup rot ? ] map ;
|
[
|
||||||
|
[ dup [ [[ CHAR: ' "\\'" ]] [[ CHAR: " "\\\"" ]] ] assoc [ , ] [ , ] ?ifte ] each
|
||||||
|
] make-string ;
|
||||||
|
|
||||||
: make-eval-javascript ( string -- string )
|
: make-eval-javascript ( string -- string )
|
||||||
#! Give a string return some javascript that when
|
#! Give a string return some javascript that when
|
||||||
|
|
|
@ -116,7 +116,7 @@ USE: http
|
||||||
: user-exists? ( db-path name password -- <todo> )
|
: user-exists? ( db-path name password -- <todo> )
|
||||||
#! Returns a <todo> if a user with the given name exists
|
#! Returns a <todo> if a user with the given name exists
|
||||||
#! otherwise returns false.
|
#! otherwise returns false.
|
||||||
-rot ".todo" cat3 dup exists? [
|
-rot ".todo" append3 dup exists? [
|
||||||
load-todo password-matches?
|
load-todo password-matches?
|
||||||
] [
|
] [
|
||||||
2drop f
|
2drop f
|
||||||
|
|
Loading…
Reference in New Issue