summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-11 16:40:11 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-11 16:40:11 -0800
commitd12c0105578f3c9da60c859ae65604ae7353377a (patch)
tree9500c77f41ba049df04dbba19d611b3f0c68cbbb
parent77e77999ed725a6f9c9ac09df0a94833d7b11c34 (diff)
downloadtamarind-d12c0105578f3c9da60c859ae65604ae7353377a.tar.gz
tamarind-d12c0105578f3c9da60c859ae65604ae7353377a.tar.bz2
tamarind-d12c0105578f3c9da60c859ae65604ae7353377a.zip
Use single, stable lazy list over *stdin*.
-rwxr-xr-xmain.txr7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.txr b/main.txr
index 1e900ee..524efc4 100755
--- a/main.txr
+++ b/main.txr
@@ -1,4 +1,5 @@
#!/usr/local/bin/txr
+@(bind http-input @(get-lines *stdin*))
@(next :args)
@(load "config")
@(load "logging")
@@ -34,7 +35,7 @@ QUERY_STRING=logout
@ (login-form "Logged out; you may log in again.")
@ (or)
QUERY_STRING=update-aliases
-@ (next *stdin*)
+@ (next :list http-input)
@postdata
@ (cases)
@ (update-aliases cookie-userid postdata)
@@ -48,7 +49,7 @@ QUERY_STRING=edit=@{edit-alias}
@ (or)
QUERY_STRING=update-memo&@{edit-alias}
@ (cases)
-@ (next *stdin*)
+@ (next :list http-input)
memo=@{new-memo}&@(skip)
@ (update-memo cookie-userid edit-alias new-memo)
@ (or)
@@ -63,7 +64,7 @@ QUERY_STRING=@(skip)
@ (cases)
QUERY_STRING=auth
@ (cases)
-@ (next *stdin*)
+@ (next :list http-input)
userid=@userid&password=@password
@ (set password @(url-decode password))
@ (auth userid password)