[ginseng-cvs] CVS ginseng/examples

wchunye wchunye at common-lisp.net
Wed Aug 11 12:02:36 UTC 2010


Update of /project/ginseng/cvsroot/ginseng/examples
In directory cl-net:/tmp/cvs-serv8814/examples

Modified Files:
	app-inc-counter.lisp hello-world.lisp 
Log Message:
support env-var.


--- /project/ginseng/cvsroot/ginseng/examples/app-inc-counter.lisp	2010/08/09 12:27:25	1.1
+++ /project/ginseng/cvsroot/ginseng/examples/app-inc-counter.lisp	2010/08/11 12:02:36	1.2
@@ -1,6 +1,6 @@
 (in-package :ginseng-examples)
 (defun http-inc-counter(&optional (next-action nil))
-  (invoke-next-action next-action #'(lambda () (inc-counter-main 0))))
+  (invoke-next-action next-action :main  #'(lambda () (inc-counter-main 0))))
 (defun inc-counter-main (counter)
   (yaclml:with-yaclml-output-to-string
     (<:html 
@@ -16,7 +16,7 @@
       ))))
 
 (defun http-counter(&optional (next-action nil))
-  (invoke-next-action next-action #'(lambda () (counter-main 0))))
+  (invoke-next-action next-action :main #'(lambda () (counter-main 0))))
 (defun counter-main (counter)
   (yaclml:with-yaclml-output-to-string
     (<:html 
@@ -33,7 +33,7 @@
 
 
 (defun http-add-two-numbers (&optional (next-action nil))
-  (invoke-next-action next-action #'(lambda () (add-two-numbers-main))))
+  (invoke-next-action next-action :main #'(lambda () (add-two-numbers-main))))
 (defun add-two-numbers-main ()
   (yaclml:with-yaclml-output-to-string
     (<:html 
--- /project/ginseng/cvsroot/ginseng/examples/hello-world.lisp	2010/08/09 12:27:25	1.1
+++ /project/ginseng/cvsroot/ginseng/examples/hello-world.lisp	2010/08/11 12:02:36	1.2
@@ -14,15 +14,22 @@
 ;; ginseng::*ginseng-prefix* to change the prefix.
 
 (defun http-hello-world(&rest args)
+  (declare (ignore args))
   (with-yaclml-output-to-string
     (<:html
      (<:head
       (<:title "Hello World"))
      (<:body 
-      (<:h1 "Hello World")
+      (<:h1 "Hello World")))))
+(defun http-show-args(&rest args)
+  (with-yaclml-output-to-string
+    (<:html
+     (<:head
+      (<:title "Your input arguments"))
+     (<:body 
+      (<:h1 "Your input arguments:")
       (<:p      
-       "input arguments are:"
        (<:ol 
         (dolist (arg args)
           (<:li (<:as-html arg)))
-        ))))))
+        ))))))
\ No newline at end of file





More information about the ginseng-cvs mailing list