From aventimiglia at common-lisp.net Mon Nov 10 15:32:16 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Mon, 10 Nov 2003 10:32:16 -0500 Subject: [clhp-cvs] CVS update: clhp/config/lisp-init.lisp Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv18547/config Added Files: lisp-init.lisp Log Message: Startup file for cmucl Date: Mon Nov 10 10:32:16 2003 Author: aventimiglia From aventimiglia at common-lisp.net Mon Nov 10 15:33:29 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Mon, 10 Nov 2003 10:33:29 -0500 Subject: [clhp-cvs] CVS update: clhp/config/lisp-init.lisp Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv18751/config Modified Files: lisp-init.lisp Log Message: Commented out example code for Debian Date: Mon Nov 10 10:33:29 2003 Author: aventimiglia Index: clhp/config/lisp-init.lisp diff -u clhp/config/lisp-init.lisp:1.1 clhp/config/lisp-init.lisp:1.2 --- clhp/config/lisp-init.lisp:1.1 Mon Nov 10 10:32:16 2003 +++ clhp/config/lisp-init.lisp Mon Nov 10 10:33:29 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: lisp-init.lisp,v 1.1 2003/11/10 15:32:16 aventimiglia Exp $") + "$Id: lisp-init.lisp,v 1.2 2003/11/10 15:33:29 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -24,5 +24,5 @@ ;; Any code required at startup time for cmucl should be added here. ;; For example, On a Debian system you may need this to load ASDF -(eval-when (:load-toplevel :compile-toplevel) - (load "/usr/share/common-lisp/source/asdf/asdf.lisp")) +;(eval-when (:load-toplevel :compile-toplevel) +; (load "/usr/share/common-lisp/source/asdf/asdf.lisp")) From aventimiglia at common-lisp.net Mon Nov 10 15:37:05 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Mon, 10 Nov 2003 10:37:05 -0500 Subject: [clhp-cvs] CVS update: clhp/config/lispc.lisp clhp/config/build-core.lisp Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv20475/config Modified Files: lispc.lisp build-core.lisp Log Message: Addedd loading of lisp-init Date: Mon Nov 10 10:37:04 2003 Author: aventimiglia Index: clhp/config/lispc.lisp diff -u clhp/config/lispc.lisp:1.3 clhp/config/lispc.lisp:1.4 --- clhp/config/lispc.lisp:1.3 Wed Oct 15 08:50:52 2003 +++ clhp/config/lispc.lisp Mon Nov 10 10:37:04 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: lispc.lisp,v 1.3 2003/10/15 12:50:52 aventimiglia Exp $") + "$Id: lispc.lisp,v 1.4 2003/11/10 15:37:04 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -20,6 +20,8 @@ ;; ;; email: aventimiglia at common-lisp.net ;; HomePage: http://common-lisp.net/project/clhp/ +(eval-when (:load-toplevel :compile-toplevel) + (load "lisp-init")) ;; This isn't really necessary, but it creates an exit code if there ;; is a compile-time error, making make aware of the problem, and not Index: clhp/config/build-core.lisp diff -u clhp/config/build-core.lisp:1.4 clhp/config/build-core.lisp:1.5 --- clhp/config/build-core.lisp:1.4 Fri Oct 17 08:58:03 2003 +++ clhp/config/build-core.lisp Mon Nov 10 10:37:04 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: build-core.lisp,v 1.4 2003/10/17 12:58:03 aventimiglia Exp $") + "$Id: build-core.lisp,v 1.5 2003/11/10 15:37:04 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -32,6 +32,9 @@ ;; This is a somewhat modified version of the config.lisp program distributed ;; with cmucl. config.lisp could have been used, but this is automatic and ;; not subject to change + +(eval-when (:load-toplevel :compile-toplevel) + (load "lisp-init")) (in-package "USER") From aventimiglia at common-lisp.net Mon Nov 10 15:39:05 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Mon, 10 Nov 2003 10:39:05 -0500 Subject: [clhp-cvs] CVS update: clhp/config/lispc.lisp clhp/config/build-core.lisp Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv21815/config Modified Files: lispc.lisp build-core.lisp Log Message: Fixed path to lisp-init.lisp Date: Mon Nov 10 10:39:04 2003 Author: aventimiglia Index: clhp/config/lispc.lisp diff -u clhp/config/lispc.lisp:1.4 clhp/config/lispc.lisp:1.5 --- clhp/config/lispc.lisp:1.4 Mon Nov 10 10:37:04 2003 +++ clhp/config/lispc.lisp Mon Nov 10 10:39:04 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: lispc.lisp,v 1.4 2003/11/10 15:37:04 aventimiglia Exp $") + "$Id: lispc.lisp,v 1.5 2003/11/10 15:39:04 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -21,7 +21,7 @@ ;; email: aventimiglia at common-lisp.net ;; HomePage: http://common-lisp.net/project/clhp/ (eval-when (:load-toplevel :compile-toplevel) - (load "lisp-init")) + (load "config/lisp-init")) ;; This isn't really necessary, but it creates an exit code if there ;; is a compile-time error, making make aware of the problem, and not Index: clhp/config/build-core.lisp diff -u clhp/config/build-core.lisp:1.5 clhp/config/build-core.lisp:1.6 --- clhp/config/build-core.lisp:1.5 Mon Nov 10 10:37:04 2003 +++ clhp/config/build-core.lisp Mon Nov 10 10:39:04 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: build-core.lisp,v 1.5 2003/11/10 15:37:04 aventimiglia Exp $") + "$Id: build-core.lisp,v 1.6 2003/11/10 15:39:04 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -34,7 +34,7 @@ ;; not subject to change (eval-when (:load-toplevel :compile-toplevel) - (load "lisp-init")) + (load "config/lisp-init")) (in-package "USER") From aventimiglia at common-lisp.net Mon Nov 10 19:21:25 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Mon, 10 Nov 2003 14:21:25 -0500 Subject: [clhp-cvs] CVS update: clhp/config/lispc.lisp Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv20465/config Modified Files: lispc.lisp Log Message: Only loads lisp-init at compile-time Date: Mon Nov 10 14:21:25 2003 Author: aventimiglia Index: clhp/config/lispc.lisp diff -u clhp/config/lispc.lisp:1.5 clhp/config/lispc.lisp:1.6 --- clhp/config/lispc.lisp:1.5 Mon Nov 10 10:39:04 2003 +++ clhp/config/lispc.lisp Mon Nov 10 14:21:25 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: lispc.lisp,v 1.5 2003/11/10 15:39:04 aventimiglia Exp $") + "$Id: lispc.lisp,v 1.6 2003/11/10 19:21:25 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -20,7 +20,7 @@ ;; ;; email: aventimiglia at common-lisp.net ;; HomePage: http://common-lisp.net/project/clhp/ -(eval-when (:load-toplevel :compile-toplevel) +(eval-when (:compile-toplevel) (load "config/lisp-init")) ;; This isn't really necessary, but it creates an exit code if there From aventimiglia at common-lisp.net Wed Nov 12 01:31:27 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Tue, 11 Nov 2003 20:31:27 -0500 Subject: [clhp-cvs] CVS update: clhp/mod_clhp.c Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv1425 Modified Files: mod_clhp.c Log Message: Getting nowhere slowly Date: Tue Nov 11 20:31:26 2003 Author: aventimiglia Index: clhp/mod_clhp.c diff -u clhp/mod_clhp.c:1.1 clhp/mod_clhp.c:1.2 --- clhp/mod_clhp.c:1.1 Wed Oct 29 16:34:44 2003 +++ clhp/mod_clhp.c Tue Nov 11 20:31:25 2003 @@ -1,4 +1,4 @@ -/* $Id: mod_clhp.c,v 1.1 2003/10/29 21:34:44 aventimiglia Exp $ +/* $Id: mod_clhp.c,v 1.2 2003/11/12 01:31:25 aventimiglia Exp $ CLHP the Common Lisp Hypertext Preprocessor (C) 2003 Anthony J Ventimiglia @@ -29,8 +29,6 @@ #include "util_script.h" #include -#define DEBUG_CLHP 1 - #ifndef HUGE_STRING_LEN #define HUGE_STRING_LEN 65000 #endif @@ -47,23 +45,12 @@ child->req->subprocess_env ); int child_pid; -#ifdef DEBUG_CLHP - FILE *dbg = ap_pfopen ( child->req->pool, "/tmp/clhp.debug", "w" ); - int i; -#endif + child->req->args = ap_pstrdup ( child->req->pool, + "-noinit -quiet -core /usr/lib/cmucl/clhp.core" ); -#ifdef DEBUG_CLHP - fprintf ( dbg, "run_lisp: env:\n" ); - for ( i = 0; env[i]; ++i ) - fprintf ( dbg, "\t'%s'\n", env[i] ); - fprintf ( dbg, "\nargs:\t\"%s\"\n", child->req->args ); - ap_pfclose ( child->req->pool, dbg ); -#endif - - child->req->args = "-noinit -quiet -core /usr/lib/cmucl/clhp.core"; ap_cleanup_for_exec (); child_pid = ap_call_exec ( child->req, pinfo, "/usr/bin/lisp", env, 1 ); - + return (0); } @@ -96,7 +83,16 @@ ap_hard_timeout ( "Hard Timeout", req ); + // Debugging output + ap_rputs ( "-----------------\n", child.req ); + ap_rprintf ( child.req, "ARGS: %s\n-------------\n", child.req->args ); + + + send_to_lisp ( lisp_out, "(mapcar #'print ext:*command-line-strings*)"); + send_to_lisp ( lisp_out, "(progn (loop for f from 1 to 50 do (format t \"-\")) (terpri))" ); send_to_lisp ( lisp_out, "(mapcar #'print ext:*environment-list*)" ); + + close_lisp ( lisp_out ); ap_bclose ( lisp_out ); From aventimiglia at common-lisp.net Wed Nov 12 20:44:38 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 15:44:38 -0500 Subject: [clhp-cvs] CVS update: clhp/mod_clhp.c Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv7108 Modified Files: mod_clhp.c Log Message: Got the module working !!! it needs refining, but it works !!!! Now it's time to cook. Date: Wed Nov 12 15:44:38 2003 Author: aventimiglia Index: clhp/mod_clhp.c diff -u clhp/mod_clhp.c:1.2 clhp/mod_clhp.c:1.3 --- clhp/mod_clhp.c:1.2 Tue Nov 11 20:31:25 2003 +++ clhp/mod_clhp.c Wed Nov 12 15:44:38 2003 @@ -1,4 +1,4 @@ -/* $Id: mod_clhp.c,v 1.2 2003/11/12 01:31:25 aventimiglia Exp $ +/* $Id: mod_clhp.c,v 1.3 2003/11/12 20:44:38 aventimiglia Exp $ CLHP the Common Lisp Hypertext Preprocessor (C) 2003 Anthony J Ventimiglia @@ -33,6 +33,14 @@ #define HUGE_STRING_LEN 65000 #endif +// AP_CALL_EXEC does not properly pass it's arguments +#define BROKEN_AP_CALL_EXEC 1 + +#define LISP_COMMAND "/usr/bin/lisp" +#define LISP_OPTIONS "-noinit -nositeinit -quiet -batch" +#define LISP_CORE "-core /usr/lib/cmucl/clhp.core" +#define LISP_EVAL "-eval '(clhp:parse (cdr (assoc :script_filename ext:*environment-list*)))(quit)'" + typedef struct _child { request_rec *req; } child_stuff; @@ -45,24 +53,25 @@ child->req->subprocess_env ); int child_pid; - child->req->args = ap_pstrdup ( child->req->pool, - "-noinit -quiet -core /usr/lib/cmucl/clhp.core" ); - +#ifndef BROKEN_AP_CALL_EXEC + child->req->args = ap_psprintf ( child->req->pool, "%s %s %s", LISP_OPTIONS, + LISP_CORE, LISP_EVAL ); ap_cleanup_for_exec (); - child_pid = ap_call_exec ( child->req, pinfo, "/usr/bin/lisp", env, 1 ); - - return (0); -} - -static void send_to_lisp ( BUFF *out_buffer, const char *str ) -{ - ap_bwrite ( out_buffer, str, strlen ( str )); - ap_bflush ( out_buffer ); -} - -static void close_lisp ( BUFF *out_buff ) -{ - send_to_lisp ( out_buff, "(quit)" ); + child_pid = ap_call_exec ( child->req, pinfo, LISP_COMMAND, env, 1 ); +#else + char *command = ap_psprintf (child->req->pool, "%s %s %s %s", LISP_COMMAND, + LISP_OPTIONS, LISP_CORE, LISP_EVAL ); + ap_cleanup_for_exec (); + child_pid = ap_call_exec ( child->req, pinfo, command, env, 1 ); +#endif + +#ifdef WIN32 + return ( child_pid ); +#else + exit ( 0 ); + // Should not get here + return 0; +#endif } static int Handler ( request_rec *req ) @@ -70,9 +79,6 @@ BUFF *lisp_out, *lisp_in; child_stuff child; - req->content_type = "text/plain"; - ap_send_http_header ( req ); - ap_add_common_vars ( req ); ap_add_cgi_vars ( req ); child.req = req; @@ -81,25 +87,10 @@ kill_always, &lisp_out, &lisp_in, NULL )) return HTTP_INTERNAL_SERVER_ERROR; - ap_hard_timeout ( "Hard Timeout", req ); - - // Debugging output - ap_rputs ( "-----------------\n", child.req ); - ap_rprintf ( child.req, "ARGS: %s\n-------------\n", child.req->args ); - - - send_to_lisp ( lisp_out, "(mapcar #'print ext:*command-line-strings*)"); - send_to_lisp ( lisp_out, "(progn (loop for f from 1 to 50 do (format t \"-\")) (terpri))" ); - send_to_lisp ( lisp_out, "(mapcar #'print ext:*environment-list*)" ); - - - close_lisp ( lisp_out ); + // ap_hard_timeout ( "Hard Timeout", req ); ap_bclose ( lisp_out ); - ap_send_fb ( lisp_in, req ); ap_bclose ( lisp_in ); - - ap_rputs ( "Done", req ); ap_child_terminate ( req ); return OK; From aventimiglia at common-lisp.net Wed Nov 12 21:06:27 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 16:06:27 -0500 Subject: [clhp-cvs] CVS update: clhp/.cvsignore Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv17350 Removed Files: .cvsignore Log Message: REmoving .cvsignore Date: Wed Nov 12 16:06:27 2003 Author: aventimiglia From aventimiglia at common-lisp.net Wed Nov 12 21:06:26 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 16:06:26 -0500 Subject: [clhp-cvs] CVS update: clhp/tests/.cvsignore Message-ID: Update of /project/clhp/cvsroot/clhp/tests In directory common-lisp.net:/tmp/cvs-serv17350/tests Removed Files: .cvsignore Log Message: REmoving .cvsignore Date: Wed Nov 12 16:06:26 2003 Author: aventimiglia From aventimiglia at common-lisp.net Wed Nov 12 21:06:27 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 16:06:27 -0500 Subject: [clhp-cvs] CVS update: clhp/config/.cvsignore Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv17350/config Removed Files: .cvsignore Log Message: REmoving .cvsignore Date: Wed Nov 12 16:06:26 2003 Author: aventimiglia From aventimiglia at common-lisp.net Wed Nov 12 21:06:26 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 16:06:26 -0500 Subject: [clhp-cvs] CVS update: clhp/examples/.cvsignore Message-ID: Update of /project/clhp/cvsroot/clhp/examples In directory common-lisp.net:/tmp/cvs-serv17350/examples Removed Files: .cvsignore Log Message: REmoving .cvsignore Date: Wed Nov 12 16:06:26 2003 Author: aventimiglia From aventimiglia at common-lisp.net Wed Nov 12 21:22:24 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 16:22:24 -0500 Subject: [clhp-cvs] CVS update: clhp/ChangeLog Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv24699 Modified Files: ChangeLog Log Message: Updated ChangeLog with cvs2cl Date: Wed Nov 12 16:22:22 2003 Author: aventimiglia Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.20 clhp/ChangeLog:1.21 --- clhp/ChangeLog:1.20 Thu Oct 30 21:27:12 2003 +++ clhp/ChangeLog Wed Nov 12 16:22:20 2003 @@ -1,134 +1,290 @@ -2003-10-30 +2003-11-12 15:44 + + * mod_clhp.c: Got the module working !!! it needs refining, but it + works !!!! Now it's time to cook. + +2003-11-11 20:31 + + * mod_clhp.c: Getting nowhere slowly + +2003-11-10 14:21 + + * config/lispc.lisp: Only loads lisp-init at compile-time + +2003-11-10 10:39 + + * config/: build-core.lisp, lispc.lisp: Fixed path to + lisp-init.lisp + +2003-11-10 10:32 + + * config/lisp-init.lisp: Startup file for cmucl + +2003-10-30 21:27 * Makefile: Addedd rules for mod_clhp, but it will not yet be - included in the real distribution, also removed tests/ from dist - tarball. + included in the real distribution, also removed tests/ from dist + tarball. + +2003-10-30 21:26 + + * tests/clhp-xptests.lisp: This is a test file using xptest, I'm + not too sure I like xptest, but it's in here none the less + +2003-10-29 16:34 + + * mod_clhp.c: Working on Apache Module -2003-10-29 +2003-10-21 14:48 - * mod_clhp.c (Handler): Beginning work on Apache module + * BUGS: Found a bug where only one variable can be bound in a LET + form. -2003-10-21 +2003-10-21 12:57 - * cgi.lisp (*QUERY-VARS*): Fixed so test is #'equal, which will - work properly with strings + * ChangeLog, cgi.lisp: (*QUERY-VARS*): Fixed so test is #'equal, + which will work properly with strings - * examples/index.clhp (PRINT-HASH-TO-TABLE): Modified to work with - new hash-tables +2003-10-21 00:16 -2003-10-20 + * package.lisp, examples/index.clhp, (PRINT-HASH-TO-TABLE): + Modified to work with new hash-tables * examples/test.lisp (PRINT-HASH): Modified test program to work - with new hash-table + with new hash-table * cgi.lisp (*SERVER-ENV*,*QUERY-VARS*): Converted to hashtable. -2003-10-18 +2003-10-20 23:09 - * examples/test.lisp: Changed CGI: namespace to CLHP:, CGI: no - longer is a separate package, so it's use is depreciated. + * tests/: cgi-test.lisp, clhp-test.lisp, test-suite.lisp: Fixed cvs + keywords -2003-10-17 +2003-10-18 21:57 - * (Module): Moved COND-BIND, IF-BIND, A-LIST-VALUE, - CA-LIST-TO-A-LIST, MAKE-KEYWORD, and LIST-TO-A-LIST out of - cgi.lisp in here. + * examples/test.lisp, ChangeLog: Changed CGI: namespace to CLHP:, + CGI: no longer is a separate package, so it's use is depreciated. + +2003-10-17 09:11 + + * utility.lisp:: Moved COND-BIND, IF-BIND, A-LIST-VALUE, + CA-LIST-TO-A-LIST, MAKE-KEYWORD, and LIST-TO-A-LIST out of + cgi.lisp in here. * clhp.asd, package.lisp, clhp.lisp, cgi.lisp: Converted all this - to an ASDF system, it's not quite battle tested, but hey, that's - what this is all about. + to an ASDF system, it's not quite battle tested, but hey, that's + what this is all about. + +2003-10-17 08:58 + + * config/build-core.lisp, ChangeLog, Makefile, TODO, cgi.lisp, + clhp.asd, clhp.lisp, package.lisp: Converted all this to an ASDF + system, it's not quite battle tested, but hey, that's what this + is all about. + +2003-10-16 15:40 + + * Makefile: Got cvs-type versioning working, this way if someone + does a "make dist" on the cvs they won't get a mislabeled version + +2003-10-16 15:31 + + * Makefile, clhp.lisp: Trying to get a nice little feature where + the makefile creates a CVS version ID similar to how it's done in + clhp.lisp + +2003-10-16 12:57 + + * ChangeLog, clhp.lisp, tests/.cvsignore, tests/Makefile, + tests/cgi-test.lisp, tests/clhp-test.lisp, tests/test-suite.lisp: + * tests/clhp-test.lisp (*CLHP-TESTS*): Wrote tests for most of + :CLHP + + * clhp.lisp (FIND-PI-START, FIND-PI-END): Made 0 a default value + for START. + +2003-10-16 10:55 + + * config/binfmt-test.lisp: Addedd explanation to comments + +2003-10-16 00:00 + + * ChangeLog, tests/cgi-test.lisp, tests/test-suite.lisp: * + tests/test-suite.lisp: Exporting OUTPUT-FUNCTION-TEST-DATA-OUTPUT + + * tests/cgi-test.lisp (*CGI-TESTS*): Added tests for + LIST-TO-A-LIST + +2003-10-15 10:44 + + * ChangeLog, Makefile, NEWS, TODO, cgi.lisp, clhp.lisp: 0.1.1 + release + +2003-10-15 10:05 + + * tests/cgi-test.lisp, tests/test-suite.lisp, Makefile, + examples/Makefile, tests/Makefile: Moved test-suite out of + cgi-test into its own file, now I can write tests for clhp as + well. Modified Makefiles to deal with the new directory. Now + running make check from the toplevel runs the tests. + +2003-10-15 08:50 + + * examples/Makefile, examples/clhp-test.lisp, examples/index.clhp, + examples/test.lisp, tests/cgi-test.lisp, Makefile, cgi.lisp, + clhp.lisp, start-clcgi.lisp, config/binfmt-test.lisp, + config/build-core.lisp, config/lispc.lisp, config/runclcgi.src: + Fixed type with my name in copyright headers + +2003-10-14 18:47 + + * config/.cvsignore, ChangeLog, cgi.lisp: (debug): Changed format + string to ~S so objects will be printed more accuratley + +2003-10-08 11:43 + + * tests/cgi-test.lisp, ChangeLog, cgi.lisp, clhp.lisp: (cond-bind): + Addedd COND-BIND, basically it's a COND wrapped up inside a LET. + Imported into clhp, and used there as well. (IF-BIND): This is + similar to COND-BIND, the whole aim here is to reduce parentheses + and make it all a little more readable + +2003-10-03 01:14 + + * ChangeLog, tests/cgi-test.lisp: (SIDE-EFFECT-FUNCTION-TEST-DATA): + Test class for functions to test side effects that set globals. + Still don't have it working right. Also improved the run-test + methods by writing some macros, there's more work to do here as + well. + +2003-10-02 22:40 + + * ChangeLog, cgi.lisp, clhp.lisp, tests/cgi-test.lisp: Moved + LIST-TO-A-LIST from clhp.lisp into cgi.lisp, because I need it + there as part of the rewrite for QUERY-TO-A-LIST. Sooner or + later I'll have to merge all this into a single package so + things like this do not have to happen. + + (QUERY-TO-A-LIST): Rewrote this mostly to simplify it, and make + it prettier (*SERVER-ENV*,*QUERY-VARS*) : Converted them to list + type a-lists ((A B)(C D)) from the Cons type they had been ((A + . B) (C . D)). This is quite temporary, since I plan on making + them hashes soon. I basically did this because the TAG mechanism + needs List type a-lists, and I wanted to reuese list-to-a-list + in cgi.lisp. So as part of the rewrite to QUERY-TO-A-LIST, this + ended up as a result. + +2003-10-02 20:38 + + * tests/cgi-test.lisp, ChangeLog, cgi.lisp: * tests/cgi-test.lisp + (output-function-test-data): Designed a class to test functions + which print to *standard-output*. These test classes will be + reused for clhp.lisp, and eventually moved into their own + package. + +2003-10-02 13:43 + + * tests/cgi-test.lisp, ChangeLog, cgi.lisp: (a-list-value): + Convenience macro for getting the values of a-lists + +2003-10-01 15:11 + + * TODO, tests/cgi-test.lisp: Beginning tests for CGI package, right + now the code in tests/cgi-test.lisp has to be called + interactively, but it does do some of the job + +2003-10-01 10:32 + + * cgi.lisp, clhp.lisp, ChangeLog: Finally got defpackage to work + properly. + +2003-10-01 10:01 -2003-10-16 + * BUGS, TODO: Added some documentation, including BUGS page, which + should be considered part of the TODO list, only with a high + priority. - * tests/clhp-test.lisp (*CLHP-TESTS*): Wrote tests for most of - :CLHP +2003-09-23 22:11 - * clhp.lisp (FIND-PI-START, FIND-PI-END): Made 0 a default value - for START. + * ChangeLog, clhp.lisp: Enhanced error handling facility, now + errors are reported and processing continues. -2003-10-15 +2003-09-23 10:44 - * tests/test-suite.lisp: Exporting - OUTPUT-FUNCTION-TEST-DATA-OUTPUT + * examples/index.clhp, ChangeLog, clhp.lisp: Created XML-ELEMENT + structure and exported all it's associated symbols. This struct + includes a pritty printer PPRINT-XML-ELEMENT, which outputs the + structure as an xml tag. I also wrote TAG, which is a + convenience function that makes xml-element creation a breeze. - * tests/cgi-test.lisp (*CGI-TESTS*): Added tests for - LIST-TO-A-LIST + * examples/index.clhp: Placed some examples of using TAG function. + This includes the PRINT-A-LIST-TABLE macro, which is used to + create tables from (CONS . TYPE) a-lists. Also added some + comments. - * cgi.lisp, clhp.lisp: Changed real package names to a more exact - one ala java style. They still have :CGI and :CLHP for nicknames. +2003-09-23 07:13 - * tests/test-suite.lisp (run-tests): Moved test-suite out of - cgi-test into its own file, now I can write tests for clhp as - well. Modified Makefiles to deal with the new directory. Now - running make check from the toplevel runs the tests. + * Makefile: Addedd cleaning command to remove tarball to make + clean-dist -2003-10-14 +2003-09-19 10:04 - * cgi.lisp (debug): Changed format string to ~S so objects will be - printed more accuratley + * Makefile, clhp.lisp: Simply re adjusted the numbers to reflect a + CVS versioning rather than 0.1.0. If I don't do this now, I'll + probably forget to do it later, and I really don't want anyone + getting CVS sources that say they have 0.1.0 instead of the date + based cvs versioning scheme in clhp.lisp. -2003-10-08 +2003-09-19 00:49 - * cgi.lisp, clhp.lisp (cond-bind): Addedd COND-BIND, basically - it's a COND wrapped up inside a LET. Imported into clhp, and used - there as well. - (IF-BIND): This is similar to COND-BIND, the whole aim here is to - reduce parentheses and make it all a little more readable + * config/binfmt-test.lisp, config/runclcgi.src, + examples/clhp-test.lisp, examples/index.clhp, examples/test.lisp: + Addedd Missing CopyLeft info to some files -2003-10-03 +2003-09-18 16:57 - * tests/cgi-test.lisp (SIDE-EFFECT-FUNCTION-TEST-DATA): Test class - for functions to test side effects that set globals. Still don't - have it working right. Also improved the run-test methods by - writing some macros, there's more work to do here as well. + * examples/Makefile, examples/index.clhp, ChangeLog, INSTALL, NEWS, + README, TODO, clhp.lisp, start-clcgi.lisp: Finished writing the + initial documentation, I'm ready for a release, but I don't think + I'll have time until next week. The release is pretty much a very + alpha one anyhow, but it will be enough that it is useable. -2003-10-02 + Anyway, everything in INSTALL should work the way it is now. Of + course as it spreads out to different distros there may be some + problems. And some people may want to use wrapper scripts rather + than binfmt_misc. Of course once I right an Apache module, none + of this will make a difference. - * cgi.lisp, clhp.lisp (LIST-TO-A-LIST): Moved LIST-TO-A-LIST from - clhp.lisp into cgi.lisp, because I need it there as part of the - rewrite for QUERY-TO-A-LIST. Sooner or later I'll have to merge - all this into a single package so things like this do not have to - happen. +2003-09-18 00:39 - * cgi.lisp (QUERY-TO-A-LIST): Rewrote this mostly to - simplify it, and make it prettier - (*SERVER-ENV*,*QUERY-VARS*) : Converted them to list type a-lists - ((A B)(C D)) from the Cons type they had been ((A . B) (C - . D)). This is quite temporary, since I plan on making them hashes - soon. I basically did this because the TAG mechanism needs List - type a-lists, and I wanted to reuese list-to-a-list in - cgi.lisp. So as part of the rewrite to QUERY-TO-A-LIST, this ended - up as a result. + * config/binfmt-test.lisp, config/runclcgi.src, Makefile, + start-clcgi.lisp: All the necessary tools to run compiled code + directly from the command line are in place and working, as per + the documentation, which is a work in progress. - * tests/cgi-test.lisp (OUTPUT-FUNCTION-TEST-DATA): Designed a - class to test functions which print to *STANDARD-OUTPUT*. These - test classes will be reused for clhp.lisp, and eventually moved - into their own package. +2003-09-17 23:24 - * cgi.lisp (A-LIST-VALUE): Convenience macro for getting the - values of a-lists + * config/runclcgi.src: Test program to test if binfmt_misc support + is working, mentioned in INSTALL -2003-10-01 +2003-09-17 16:25 - * tests/cgi-test.lisp: Beginning tests for CGI package, right now - the code in tests/cgi-test.lisp has to be called interactively, - but it does do some of the job + * config/lispc.lisp: Addedd a little explanation for bad error + reporting, eventually this wrapper should do a better job + reporting errors. - * clhp.lisp, cgi.lisp: converted to easier defpackage construct. +2003-09-17 16:21 -2003-09-23 + * clhp.lisp: Wrote a nice little reader macro to make cvs + versioning automatic, the $Date: 2003/11/12 21:22:20 $ keyword is parsed to make a 8 + digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS + release with a $Date: 2003/11/12 21:22:20 $ of 2003/09/15 ends up with a + *CLHP-VERSION* of "20030915cvs" - * clhp.lisp: Created XML-ELEMENT structure and exported all it's - associated symbols. This struct includes a pritty printer - PPRINT-XML-ELEMENT, which outputs the structure as an xml tag. I - also wrote TAG, which is a convenience function that makes - xml-element creation a breeze. - (EVALUATE-CODE-BLOCK): Enhanced error handling facility, now - errors are reported and processing continues. +2003-09-17 14:47 - * examples/index.clhp: Placed some examples of using TAG - function. This includes the PRINT-A-LIST-TABLE macro, which is - used to create tables from (CONS . TYPE) a-lists. Also added some - comments. + * Makefile, config/lispc.lisp: Made lispc.lisp, a little program + that will aide in compiling lisp in a mkae freindly way by + passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.20 2003/10/31 02:27:12 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.21 2003/11/12 21:22:20 aventimiglia Exp $ \ No newline at end of file From aventimiglia at common-lisp.net Wed Nov 12 21:57:15 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 16:57:15 -0500 Subject: [clhp-cvs] CVS update: clhp/TODO clhp/INSTALL clhp/ChangeLog Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv8840 Modified Files: TODO INSTALL ChangeLog Log Message: Added some notes Date: Wed Nov 12 16:57:15 2003 Author: aventimiglia Index: clhp/TODO diff -u clhp/TODO:1.9 clhp/TODO:1.10 --- clhp/TODO:1.9 Tue Oct 21 00:16:58 2003 +++ clhp/TODO Wed Nov 12 16:57:11 2003 @@ -1,4 +1,6 @@ -$Id: TODO,v 1.9 2003/10/21 04:16:58 aventimiglia Exp $ -*- outline -*- +$Id: TODO,v 1.10 2003/11/12 21:57:11 aventimiglia Exp $ -*- outline -*- + +* Rewrite docs for new mod_clhp handler * Test suite ** Convert all this to new deal with single package. Index: clhp/INSTALL diff -u clhp/INSTALL:1.2 clhp/INSTALL:1.3 --- clhp/INSTALL:1.2 Thu Sep 18 16:57:30 2003 +++ clhp/INSTALL Wed Nov 12 16:57:12 2003 @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.2 2003/09/18 20:57:30 aventimiglia Exp $ -*- outline -*- +$Id: INSTALL,v 1.3 2003/11/12 21:57:12 aventimiglia Exp $ -*- outline -*- If you find anything about this documentation unclear, or you would like to contribute to the documentation or the CLHP project, please @@ -186,3 +186,6 @@ files. +* New installation notes +** Apache configuration + AddHandler clhp-handler .clhp \ No newline at end of file Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.21 clhp/ChangeLog:1.22 --- clhp/ChangeLog:1.21 Wed Nov 12 16:22:20 2003 +++ clhp/ChangeLog Wed Nov 12 16:57:12 2003 @@ -1,3 +1,7 @@ +2003-11-12 Anthony Ventimiglia + + * mod_clhp.c: Changed handler name to clhp-handler + 2003-11-12 15:44 * mod_clhp.c: Got the module working !!! it needs refining, but it @@ -276,9 +280,9 @@ 2003-09-17 16:21 * clhp.lisp: Wrote a nice little reader macro to make cvs - versioning automatic, the $Date: 2003/11/12 21:22:20 $ keyword is parsed to make a 8 + versioning automatic, the $Date: 2003/11/12 21:57:12 $ keyword is parsed to make a 8 digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS - release with a $Date: 2003/11/12 21:22:20 $ of 2003/09/15 ends up with a + release with a $Date: 2003/11/12 21:57:12 $ of 2003/09/15 ends up with a *CLHP-VERSION* of "20030915cvs" 2003-09-17 14:47 @@ -287,4 +291,4 @@ that will aide in compiling lisp in a mkae freindly way by passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.21 2003/11/12 21:22:20 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.22 2003/11/12 21:57:12 aventimiglia Exp $ \ No newline at end of file From aventimiglia at common-lisp.net Wed Nov 12 21:57:40 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 16:57:40 -0500 Subject: [clhp-cvs] CVS update: clhp/mod_clhp.c Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv9028 Modified Files: mod_clhp.c Log Message: changed name of clhp handler to clhp-handler for Apache coinfig Date: Wed Nov 12 16:57:40 2003 Author: aventimiglia Index: clhp/mod_clhp.c diff -u clhp/mod_clhp.c:1.3 clhp/mod_clhp.c:1.4 --- clhp/mod_clhp.c:1.3 Wed Nov 12 15:44:38 2003 +++ clhp/mod_clhp.c Wed Nov 12 16:57:40 2003 @@ -1,4 +1,4 @@ -/* $Id: mod_clhp.c,v 1.3 2003/11/12 20:44:38 aventimiglia Exp $ +/* $Id: mod_clhp.c,v 1.4 2003/11/12 21:57:40 aventimiglia Exp $ CLHP the Common Lisp Hypertext Preprocessor (C) 2003 Anthony J Ventimiglia @@ -100,7 +100,7 @@ // Associate the handler with Handler String static handler_rec Handlers[] = { - { "clhp", Handler }, + { "clhp-handler", Handler }, { NULL } }; From aventimiglia at common-lisp.net Wed Nov 12 22:41:58 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 17:41:58 -0500 Subject: [clhp-cvs] CVS update: clhp/package.lisp clhp/clhp.lisp clhp/ChangeLog Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv30903 Modified Files: package.lisp clhp.lisp ChangeLog Log Message: REQUIRE function, loads lisp files in the current clhp document-root Date: Wed Nov 12 17:41:56 2003 Author: aventimiglia Index: clhp/package.lisp diff -u clhp/package.lisp:1.2 clhp/package.lisp:1.3 --- clhp/package.lisp:1.2 Tue Oct 21 00:16:58 2003 +++ clhp/package.lisp Wed Nov 12 17:41:55 2003 @@ -1,4 +1,4 @@ -#+cmu (ext:file-comment "$Id: package.lisp,v 1.2 2003/10/21 04:16:58 aventimiglia Exp $") +#+cmu (ext:file-comment "$Id: package.lisp,v 1.3 2003/11/12 22:41:55 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -29,4 +29,5 @@ #:parse #:*clhp-version* #:echo #:include #:xml-element #:make-xml-element #:copy-xml-element #:xml-element-attributes #:xml-element-name #:xml-element-contents #:xml-element-p #:tag + #:require )) Index: clhp/clhp.lisp diff -u clhp/clhp.lisp:1.17 clhp/clhp.lisp:1.18 --- clhp/clhp.lisp:1.17 Fri Oct 17 09:11:44 2003 +++ clhp/clhp.lisp Wed Nov 12 17:41:55 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: clhp.lisp,v 1.17 2003/10/17 13:11:44 aventimiglia Exp $") + "$Id: clhp.lisp,v 1.18 2003/11/12 22:41:55 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -29,7 +29,7 @@ ;; will override the CVS keyword (defconstant *CLHP-VERSION* #.(or nil ; Set this for releases - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/10/17 13:11:44 $")) + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/12 22:41:55 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) @@ -192,6 +192,15 @@ (make-xml-element :name (car args) :attributes att-list :contents contents))) + +;; Similar to PHP's require, loads a lisp file in the local directory. +(defun require (filename) + "Load the lisp source or fasl file FILENAME, relative to the document root" + (let ((doc-root + (make-pathname :name nil :type nil :version nil + :defaults (parse-namestring + (gethash :script_filename *server-env*))))) + (load (merge-pathnames doc-root filename)))) ;; Error handling is probably the biggest room to work here. I should ;; eventually make a handler that binds the evaluation of clhp PI Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.22 clhp/ChangeLog:1.23 --- clhp/ChangeLog:1.22 Wed Nov 12 16:57:12 2003 +++ clhp/ChangeLog Wed Nov 12 17:41:56 2003 @@ -1,3 +1,8 @@ +2003-11-12 Anthony Ventimiglia + + * clhp.lisp (require): REQUIRE function, loads lisp files in the + current clhp document-root + 2003-11-12 Anthony Ventimiglia * mod_clhp.c: Changed handler name to clhp-handler @@ -280,9 +285,9 @@ 2003-09-17 16:21 * clhp.lisp: Wrote a nice little reader macro to make cvs - versioning automatic, the $Date: 2003/11/12 21:57:12 $ keyword is parsed to make a 8 + versioning automatic, the $Date: 2003/11/12 22:41:56 $ keyword is parsed to make a 8 digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS - release with a $Date: 2003/11/12 21:57:12 $ of 2003/09/15 ends up with a + release with a $Date: 2003/11/12 22:41:56 $ of 2003/09/15 ends up with a *CLHP-VERSION* of "20030915cvs" 2003-09-17 14:47 @@ -291,4 +296,4 @@ that will aide in compiling lisp in a mkae freindly way by passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.22 2003/11/12 21:57:12 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.23 2003/11/12 22:41:56 aventimiglia Exp $ \ No newline at end of file From aventimiglia at common-lisp.net Thu Nov 13 03:17:30 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 22:17:30 -0500 Subject: [clhp-cvs] CVS update: clhp/build.lisp clhp/TODO clhp/Makefile clhp/INSTALL clhp/ChangeLog Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv23663 Modified Files: TODO Makefile INSTALL ChangeLog Added Files: build.lisp Log Message: Working on the installation process using mod_clhp, I'm going to get this working, and make a 0.2.0 release, then I'll work on a whole new building approach. Date: Wed Nov 12 22:17:29 2003 Author: aventimiglia Index: clhp/TODO diff -u clhp/TODO:1.10 clhp/TODO:1.11 --- clhp/TODO:1.10 Wed Nov 12 16:57:11 2003 +++ clhp/TODO Wed Nov 12 22:17:29 2003 @@ -1,4 +1,4 @@ -$Id: TODO,v 1.10 2003/11/12 21:57:11 aventimiglia Exp $ -*- outline -*- +$Id: TODO,v 1.11 2003/11/13 03:17:29 aventimiglia Exp $ -*- outline -*- * Rewrite docs for new mod_clhp handler @@ -14,13 +14,6 @@ * Declare Declaim and Proclaim GO through everything and refine and type it all. -* COMPILE-CGI - This is just a convenience function that will compile and save fasl - files with the .clcgi extension. - - Maybe I could also write a compiler program and install it in - /usr/local/bin (or wherever), to drop into makefiles. - * Command-line CLHP Write a small program to enable CLHP to be parse at the command line, separate from the server. This mode should supress printing of @@ -52,11 +45,11 @@ * Pre-release check list ** version numbering - VERSION in Makefile and *CLHP-VERSION* in clhp.lisp should be - set. Eventually I'd like to set up a nice way to have this all - happen automatically. I think the best way to do this is to make - the whole build process more lisp dependent. The other option is - to go automake with it. + VERSION in Makefile, :version in clhp.asd and *CLHP-VERSION* in + clhp.lisp should be set. Eventually I'd like to set up a nice way + to have this all happen automatically. I think the best way to do + this is to make the whole build process more lisp dependent. The + other option is to go automake with it. The way it works now is very nice, in fact, I don't think Automake could do it so well. Index: clhp/Makefile diff -u clhp/Makefile:1.16 clhp/Makefile:1.17 --- clhp/Makefile:1.16 Thu Oct 30 21:27:11 2003 +++ clhp/Makefile Wed Nov 12 22:17:29 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.16 2003/10/31 02:27:11 aventimiglia Exp $ +# $Id: Makefile,v 1.17 2003/11/13 03:17:29 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -30,7 +30,7 @@ COREDIR=/usr/lib/cmucl # Directory to add runclcgi script -BINDIR=/usr/local/bin +# BINDIR=/usr/local/bin # Directory to install documentation DOCDIR=/usr/local/share/clhp @@ -61,12 +61,12 @@ LISPC=$(LISP) -noinit -load config/lispc -eval '(make)' BUILD_CORE=config/build-core.x86f -BINS=start-clcgi.x86f +#BINS=start-clcgi.x86f APACHE_MOD=mod_clhp.so SOURCES=cgi.lisp clhp.lisp start-clcgi.lisp package.lisp clhp.asd mod_clhp.c CORE=clhp.core LISPCBIN=config/lispc.x86f -RUNCGI=config/runclcgi +#RUNCGI=config/runclcgi TESTS=config/binfmt-test.clcgi DOCS=COPYING INSTALL ChangeLog NEWS README TODO @@ -79,8 +79,8 @@ NON_DIST= tests/Makefile tests/cgi-test.lisp tests/test-suite.lisp -CLEAN_TARGETS=$(LISPCBIN) $(CORE) $(CORE).BAK $(RUNCGI) $(TESTS) $(TARBALL) \ - $(APACHE_MOD) mod_clhp.o +CLEAN_TARGETS=$(LISPCBIN) $(CORE) $(CORE).BAK $(TESTS) $(TARBALL) \ + $(APACHE_MOD) mod_clhp.o # $(RUNCGI) DISTFILES=$(SOURCES) $(DOCS) $(EXTRADIST) @@ -94,7 +94,7 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/10/31 02:27:11 $ | \ +CVSID=$(shell echo $Date: 2003/11/13 03:17:29 $ | \ awk '{print $$2}'| sed s/\\///g )cvs VERSION=$(CVSID) @@ -104,7 +104,7 @@ RECURSIVE_TARGETS=clean-recursive clean-all-recursive check-recursive -all: $(LISPCBIN) $(CORE) $(RUNCGI) $(BINS) +all: $(LISPCBIN) $(CORE) # $(RUNCGI) $(BINS) module:$(APACHE_MOD) @@ -134,20 +134,20 @@ $(CORE): $(SOURCES) $(BUILD_CORE) $(LISP) -noinit -load "config/build-core" -$(RUNCGI): $(RUNCGI).src - sed 's:\(LISP=\):\1$(LISP):' < $< | \ - sed 's:\(CORE=\):\1$(COREDIR)/$(CORE):' | \ - sed 's:\(CMUCLLIB=\):\1$(LIBDIR):' > $@ +# $(RUNCGI): $(RUNCGI).src +# sed 's:\(LISP=\):\1$(LISP):' < $< | \ +# sed 's:\(CORE=\):\1$(COREDIR)/$(CORE):' | \ +# sed 's:\(CMUCLLIB=\):\1$(LIBDIR):' > $@ module-install: $(APACHE_MOD) $(APXS) -i -a $< install: all install-dirs install-core - for f in $(BINS) ; do \ - $(INSTALLFILE) $$f $(LIBDIR) ; \ - done +# for f in $(BINS) ; do \ +# $(INSTALLFILE) $$f $(LIBDIR) ; \ +# done $(INSTALL) $(DOCS) $(DOCDIR) - $(INSTALL) -m0755 $(RUNCGI) $(BINDIR) +# $(INSTALL) -m0755 $(RUNCGI) $(BINDIR) install-core: $(CORE) install-dirs $(INSTALLFILE) -b -S .BAK $(CORE) $(COREDIR) @@ -182,8 +182,8 @@ core=$(COREDIR)/$(CORE) ; \ if test -f $$core ; then rm -v $$core; fi ; \ if test -f $$core.BAK; then mv -v $$core.BAK $$core; fi - file=$(BINDIR)/`echo $(RUNCGI) | sed 's/config\///'` ; \ - if test -f $$file ; then rm -v $$file; fi +# file=$(BINDIR)/`echo $(RUNCGI) | sed 's/config\///'` ; \ +# if test -f $$file ; then rm -v $$file; fi uninstall-dirs: uninstall-files -rmdir -v $(SRCDIR) Index: clhp/INSTALL diff -u clhp/INSTALL:1.3 clhp/INSTALL:1.4 --- clhp/INSTALL:1.3 Wed Nov 12 16:57:12 2003 +++ clhp/INSTALL Wed Nov 12 22:17:29 2003 @@ -1,17 +1,24 @@ -$Id: INSTALL,v 1.3 2003/11/12 21:57:12 aventimiglia Exp $ -*- outline -*- +$Id: INSTALL,v 1.4 2003/11/13 03:17:29 aventimiglia Exp $ -*- outline -*- If you find anything about this documentation unclear, or you would like to contribute to the documentation or the CLHP project, please send email to clhp-devel at common-lisp.net * Requirements -** Linux -*** binfmt_misc kernel support - This is not a requirement, but it is preferred for these - installation instructions +** Operating System + This was developed on Linux, but it should work on any OS that + supports Apache and CMUCL ** CMU Common Lisp (cmucl) + Developed on CMUCL release 18e. There is not much CMUCL dependant + stuff so porting to another Lisp should be a fairly easy task. +*** ASDF + the build process uses ASDF, it can be built without, but you're + on your own with that. ** Apache Web Server -*** mod_cgi + Developed on 1.3.27. + + You should have dynamic module support, I guess it can be + installed without it, but that will require rebuilding the entire server. * Installation ** Getting the Latest source *** ftp @@ -25,6 +32,9 @@ $ cvs -d:pserver:anonymous at common-lisp.net:/project/clhp/cvsroot login >> enter anonymous as password $ cvs -d:pserver:anonymous at common-lisp.net:/project/clhp/cvsroot co clhp + + If you use the cvs source, please join the clhp-devel mailing + list, so you can stay up to date on what's going on with development. ** Edit Makefile variables Open the top level Makefile in a text editor and edit the SRCDIR, LIBDIR, COREDIR, LISP, and INSTALL variables. For a typical Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.23 clhp/ChangeLog:1.24 --- clhp/ChangeLog:1.23 Wed Nov 12 17:41:56 2003 +++ clhp/ChangeLog Wed Nov 12 22:17:29 2003 @@ -1,5 +1,8 @@ 2003-11-12 Anthony Ventimiglia + * Makefile: Modifying Makefile to build with new mod_clhp + interface, but staying with the Makefile approach. + * clhp.lisp (require): REQUIRE function, loads lisp files in the current clhp document-root @@ -285,9 +288,9 @@ 2003-09-17 16:21 * clhp.lisp: Wrote a nice little reader macro to make cvs - versioning automatic, the $Date: 2003/11/12 22:41:56 $ keyword is parsed to make a 8 + versioning automatic, the $Date: 2003/11/13 03:17:29 $ keyword is parsed to make a 8 digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS - release with a $Date: 2003/11/12 22:41:56 $ of 2003/09/15 ends up with a + release with a $Date: 2003/11/13 03:17:29 $ of 2003/09/15 ends up with a *CLHP-VERSION* of "20030915cvs" 2003-09-17 14:47 @@ -296,4 +299,4 @@ that will aide in compiling lisp in a mkae freindly way by passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.23 2003/11/12 22:41:56 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.24 2003/11/13 03:17:29 aventimiglia Exp $ \ No newline at end of file From aventimiglia at common-lisp.net Thu Nov 13 03:40:17 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 22:40:17 -0500 Subject: [clhp-cvs] CVS update: clhp/Makefile Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv32699 Modified Files: Makefile Log Message: Commented out LIBDIR, since it is not used in this insatllation Date: Wed Nov 12 22:40:16 2003 Author: aventimiglia Index: clhp/Makefile diff -u clhp/Makefile:1.17 clhp/Makefile:1.18 --- clhp/Makefile:1.17 Wed Nov 12 22:17:29 2003 +++ clhp/Makefile Wed Nov 12 22:40:15 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.17 2003/11/13 03:17:29 aventimiglia Exp $ +# $Id: Makefile,v 1.18 2003/11/13 03:40:15 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -24,7 +24,7 @@ SRCDIR=/usr/lib/cmucl/source/clhp # Directory where cmucl looks for libraries $CMUCLLIB -LIBDIR=/usr/lib/cmucl/lib +# LIBDIR=/usr/lib/cmucl/lib # Directory to install the clhp lisp core COREDIR=/usr/lib/cmucl @@ -94,7 +94,7 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/11/13 03:17:29 $ | \ +CVSID=$(shell echo $Date: 2003/11/13 03:40:15 $ | \ awk '{print $$2}'| sed s/\\///g )cvs VERSION=$(CVSID) @@ -158,7 +158,7 @@ done install-dirs: - $(INSTALLDIR) $(LIBDIR) +# $(INSTALLDIR) $(LIBDIR) $(INSTALLDIR) $(COREDIR) $(INSTALLDIR) $(BINDIR) $(INSTALLDIR) $(DOCDIR) @@ -172,9 +172,9 @@ for f in $(SOURCES) ; do \ if test -f $(SRCDIR)/$$f; then rm -v $(SRCDIR)/$$f ; fi ; \ done - for f in $(LIBS) ; do \ - if test -f $(LIBDIR)/$$f; then rm -v $(LIBDIR)/$$f ; fi ; \ - done +# for f in $(LIBS) ; do \ +# if test -f $(LIBDIR)/$$f; then rm -v $(LIBDIR)/$$f ; fi ; \ +# done for f in $(DOCS) ; do \ fullpath=$(DOCDIR)/$$f ; \ if test -f $$fullpath; then rm -v $$fullpath ; fi ; \ @@ -187,7 +187,7 @@ uninstall-dirs: uninstall-files -rmdir -v $(SRCDIR) - -rmdir -v $(LIBDIR) +# -rmdir -v $(LIBDIR) -rmdir -v $(COREDIR) -rmdir -v $(BINDIR) -rmdir -v $(DOCDIR) From aventimiglia at common-lisp.net Thu Nov 13 03:49:28 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 22:49:28 -0500 Subject: [clhp-cvs] CVS update: clhp/config/lisp-init.lisp Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv3354/config Modified Files: lisp-init.lisp Log Message: fixed commented out load command for debian Date: Wed Nov 12 22:49:28 2003 Author: aventimiglia Index: clhp/config/lisp-init.lisp diff -u clhp/config/lisp-init.lisp:1.2 clhp/config/lisp-init.lisp:1.3 --- clhp/config/lisp-init.lisp:1.2 Mon Nov 10 10:33:29 2003 +++ clhp/config/lisp-init.lisp Wed Nov 12 22:49:27 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: lisp-init.lisp,v 1.2 2003/11/10 15:33:29 aventimiglia Exp $") + "$Id: lisp-init.lisp,v 1.3 2003/11/13 03:49:27 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -24,5 +24,4 @@ ;; Any code required at startup time for cmucl should be added here. ;; For example, On a Debian system you may need this to load ASDF -;(eval-when (:load-toplevel :compile-toplevel) -; (load "/usr/share/common-lisp/source/asdf/asdf.lisp")) +;(load "/usr/share/common-lisp/source/asdf/asdf.lisp") From aventimiglia at common-lisp.net Thu Nov 13 03:57:04 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 22:57:04 -0500 Subject: [clhp-cvs] CVS update: clhp/Makefile Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv7141 Modified Files: Makefile Log Message: Commenting out more for new installation Date: Wed Nov 12 22:57:04 2003 Author: aventimiglia Index: clhp/Makefile diff -u clhp/Makefile:1.18 clhp/Makefile:1.19 --- clhp/Makefile:1.18 Wed Nov 12 22:40:15 2003 +++ clhp/Makefile Wed Nov 12 22:57:03 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.18 2003/11/13 03:40:15 aventimiglia Exp $ +# $Id: Makefile,v 1.19 2003/11/13 03:57:03 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -94,7 +94,7 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/11/13 03:40:15 $ | \ +CVSID=$(shell echo $Date: 2003/11/13 03:57:03 $ | \ awk '{print $$2}'| sed s/\\///g )cvs VERSION=$(CVSID) @@ -160,7 +160,7 @@ install-dirs: # $(INSTALLDIR) $(LIBDIR) $(INSTALLDIR) $(COREDIR) - $(INSTALLDIR) $(BINDIR) +# $(INSTALLDIR) $(BINDIR) $(INSTALLDIR) $(DOCDIR) install-source-dirs: From aventimiglia at common-lisp.net Thu Nov 13 04:21:35 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 23:21:35 -0500 Subject: [clhp-cvs] CVS update: clhp/ChangeLog clhp/INSTALL clhp/TODO Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv18166 Modified Files: ChangeLog INSTALL TODO Log Message: Updateed and tested the INSTALL installation Date: Wed Nov 12 23:21:34 2003 Author: aventimiglia Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.24 clhp/ChangeLog:1.25 --- clhp/ChangeLog:1.24 Wed Nov 12 22:17:29 2003 +++ clhp/ChangeLog Wed Nov 12 23:21:34 2003 @@ -1,5 +1,8 @@ 2003-11-12 Anthony Ventimiglia + * INSTALL: Commented out LIBDIR since it does not need to be used + for new installation, rewrote for new installation + * Makefile: Modifying Makefile to build with new mod_clhp interface, but staying with the Makefile approach. @@ -288,9 +291,9 @@ 2003-09-17 16:21 * clhp.lisp: Wrote a nice little reader macro to make cvs - versioning automatic, the $Date: 2003/11/13 03:17:29 $ keyword is parsed to make a 8 + versioning automatic, the $Date: 2003/11/13 04:21:34 $ keyword is parsed to make a 8 digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS - release with a $Date: 2003/11/13 03:17:29 $ of 2003/09/15 ends up with a + release with a $Date: 2003/11/13 04:21:34 $ of 2003/09/15 ends up with a *CLHP-VERSION* of "20030915cvs" 2003-09-17 14:47 @@ -299,4 +302,4 @@ that will aide in compiling lisp in a mkae freindly way by passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.24 2003/11/13 03:17:29 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.25 2003/11/13 04:21:34 aventimiglia Exp $ \ No newline at end of file Index: clhp/INSTALL diff -u clhp/INSTALL:1.4 clhp/INSTALL:1.5 --- clhp/INSTALL:1.4 Wed Nov 12 22:17:29 2003 +++ clhp/INSTALL Wed Nov 12 23:21:34 2003 @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.4 2003/11/13 03:17:29 aventimiglia Exp $ -*- outline -*- +$Id: INSTALL,v 1.5 2003/11/13 04:21:34 aventimiglia Exp $ -*- outline -*- If you find anything about this documentation unclear, or you would like to contribute to the documentation or the CLHP project, please @@ -19,6 +19,9 @@ You should have dynamic module support, I guess it can be installed without it, but that will require rebuilding the entire server. + + you need the apxs program to build the module, on some + distributions, this will be in the apache-dev package * Installation ** Getting the Latest source *** ftp @@ -37,22 +40,30 @@ list, so you can stay up to date on what's going on with development. ** Edit Makefile variables Open the top level Makefile in a text editor and edit the SRCDIR, - LIBDIR, COREDIR, LISP, and INSTALL variables. For a typical + COREDIR, LISP, APXS and INSTALL variables. For a typical installation of cmucl, these should be correct. +*** COREDIR + If you change the default, you also have to change the LISP_CORE + #define in mod_clhp.c to reflect this. ** Compiling the libraries and building the CLHP core image at the command line run: $ make + $ make module This will compile the CL-CGI and CLHP packages, then build a custom by loading your existing lisp, loading the CLHP and CGI packages and saving the new core as "clhp.core". + ** Installing Be root (or have write permissions to wherever you are installing *** Installing the package fasl files and custom core To install the CL-CGI and CLHP libraries and the clhp core use: # make install + # make module-install + +---------- IGNORE THE FOLLOWING two sections *** Installing the minimum, core-only Since you have a custom core, you really don't need to install the @@ -66,77 +77,7 @@ and compiled packages, use: # make install-source -** Setting up Linux binfmt_misc to run fasl files -*** Kernel requirements - In order to do this, you must have binfmt_misc support compiled - into your kernel, you can edit the CONFIG_BINFMT_MISC line in - your kernel configuration file /usr/src/linux/.config to read - the following: - - CONFIG_BINFMT_MISC=m - - The following instructions assume you have compiled binfmt_misc - as a module. If you compile it directly into the kernel, you can - delete the modprobe commands. -*** Enabling binfmt_misc - If you had to rebuild your kernel, you will obviously have to - reboot before you can contimue. - - To set up Linux to run CMUCL fasl files, execute the following - commands as root: - - # modprobe binfmt_misc - # mount -t binfmt_misc none /proc/sys/fs/binfmt_misc - # echo ":clcgi:E::clcgi::/usr/local/bin/runclcgi:" > \ - /proc/sys/fs/binfmt_misc/register - - This tells the kernel to use the /usr/local/bin/runclcgi shell - script to execute any files with a .clcgi extension. - - Now if you know a little about cmucl, you know that by default - it assigns the .x86f extension to compiled fasl files. I decided - to use the .clcgi extension for compiled files that require the - CL-CGI and CLHP enabled core. So if you already have your kernel - set up to run .x86f files, this new format will not interfere. - - For convenience, the cl-cgi package has an external function - COMPILE-CGI, which will save the binaries with the .clcgi - extension. This save you the trouble of having to rename your - compiled fasl files. - - ! I believe the binfmt_misc interface may be different on - earlier kernels, if you are having trouble, read binfmt_misc.txt - in the Documentation of your kernel sources. -*** Testing binfmt_misc setup. - Ok now you should be ready to see if all this works. I've - included a small program to test if the binfmt_misc support is - working. run: - - $ make tests - - This will compile config/binfmt-test.clcgi, a simple program - that will test your setup. If you've been following up to this - point, and have registered the clcgi file with the binfmt_misc - kernel interface, try it now, you should get the following - results: - - $ config/binfmt-test.clcgi - binfmt_misc is working - $ -*** Enabling binfmt_misc at bootup. - Now it would probably be a good idea to enable the binfmt_misc - support so it configures automatically at boottime. I'm - developing on Gentoo Linux, the way I've enabled it is by adding - the followin lines to /etc/conf.d/local.start: - - /sbin/modprobe binfmt_misc - mount -t binfmt_misc none /proc/sys/fs/binfmt_misc - echo ":clcgi:E::clcgi::/usr/local/bin/runclcgi:" > \ - /proc/sys/fs/binfmt_misc/register - - Other systems may have other ways to do this, if anyone would - like to send specific instructions for other Systems, I'd be - happy to include them here. +---------- END IGNORE ** Configuring Apache To set up Apache, there are really only two things we need to configure, first, we need to make Apache aware that the .clcgi @@ -144,58 +85,20 @@ lists all the AddHandler directives in you Apache configuration file, and add the following line: - AddHandler cgi-script .clcgi + AddHandler clhp-handler .clhp + + If you'd like index.clhp to be + automatically used with an empty URL, add index.clhp to the + DirectoryIndex Directive: - Now decide what directory you would like to enable to execute the - .clcgi and add make sure the "ExecCGI" Option is listed. On my - home computer I have a virtual host setup at http://clhp.dogpound/ - with the following configuration setting up the Virtual host: - - - ServerName clhp.dogpound - DocumentRoot /home/ant/public_html/clhp - Options +ExecCGI - DirectoryIndex index.clcgi index.html - - - While I eventually plan on writing an Apache module for clhp, I'd - also like to learn to exploit mod_rewrite to my advantage. I'd - appreciate any contributions in either of these departments. + DirectoryIndex index.clhp index.html index.htm index.shtml index.cgi + + After all this you'll need to restart apache to update the configuration. + * Testing your installation - Ok the moment of truth is drawing near, I've included some examples - in the examples/ directory (where else) that we'll use to test the - set-up. To build the example programs, you must first have installed - the minimal requirements as per the above instructions. - - Edit examples Makefile, and make sure all the Variables are correct - then from the top level source directory, do the following, using - the path to your clhp directory (in my example its - /home/ant/public_html/clhp) for INSTALL_PATH: - - $ cd examples - $ make - $ INSTALL_PATH=/home/ant/public_html/clhp make install - - Now fire up your browser and point it to the location of these test - files. In my example, the first is test.clcgi, which just tests the - CGI package: - - $ lynx http://clhp.dogpound/test.clcgi - - And the second which is full blown CLHP, clhp-test.clcgi is a ateway - that loads the content of index.clhp as its source. - - $ lynx http://clhp.dogpound/clhp-test.clcgi - - Take a look at index.clhp and clhp-test.lisp and you'll see how clhp works. -* Working with CLHP -** Compiling lisp files. - Ok I mentioned somewhere above that I was going to put a - COMPILE-CGI function. Well that's not done at the time of this - writing, so for now, you'll have to compile and rename the fasl - files. - - -* New installation notes -** Apache configuration - AddHandler clhp-handler .clhp \ No newline at end of file + There's a test file, examples/index.clhp copy it somewhere where + apache can see it, fire up the browser and it you should see a test + page. + + Take a look at index.clhp + Index: clhp/TODO diff -u clhp/TODO:1.11 clhp/TODO:1.12 --- clhp/TODO:1.11 Wed Nov 12 22:17:29 2003 +++ clhp/TODO Wed Nov 12 23:21:34 2003 @@ -1,6 +1,9 @@ -$Id: TODO,v 1.11 2003/11/13 03:17:29 aventimiglia Exp $ -*- outline -*- +$Id: TODO,v 1.12 2003/11/13 04:21:34 aventimiglia Exp $ -*- outline -*- * Rewrite docs for new mod_clhp handler + +* mod_clhp should check if the requested doc is actually there + Right now Lisp does it. * Test suite ** Convert all this to new deal with single package. From aventimiglia at common-lisp.net Thu Nov 13 04:36:14 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 23:36:14 -0500 Subject: [clhp-cvs] CVS update: clhp/config/runclcgi.src clhp/config/binfmt-test.lisp Message-ID: Update of /project/clhp/cvsroot/clhp/config In directory common-lisp.net:/tmp/cvs-serv25184/config Removed Files: runclcgi.src binfmt-test.lisp Log Message: Preparing for distribution, I've removed all files and stuff needed for the old cgi based clhp, mod_clhp makes it all simpler Date: Wed Nov 12 23:36:14 2003 Author: aventimiglia From aventimiglia at common-lisp.net Thu Nov 13 04:36:14 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 23:36:14 -0500 Subject: [clhp-cvs] CVS update: clhp/examples/test.lisp clhp/examples/clhp-test.lisp clhp/examples/Makefile Message-ID: Update of /project/clhp/cvsroot/clhp/examples In directory common-lisp.net:/tmp/cvs-serv25184/examples Removed Files: test.lisp clhp-test.lisp Makefile Log Message: Preparing for distribution, I've removed all files and stuff needed for the old cgi based clhp, mod_clhp makes it all simpler Date: Wed Nov 12 23:36:13 2003 Author: aventimiglia From aventimiglia at common-lisp.net Thu Nov 13 04:36:14 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 23:36:14 -0500 Subject: [clhp-cvs] CVS update: clhp/Makefile clhp/ChangeLog clhp/start-clcgi.lisp Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv25184 Modified Files: Makefile ChangeLog Removed Files: start-clcgi.lisp Log Message: Preparing for distribution, I've removed all files and stuff needed for the old cgi based clhp, mod_clhp makes it all simpler Date: Wed Nov 12 23:36:14 2003 Author: aventimiglia Index: clhp/Makefile diff -u clhp/Makefile:1.19 clhp/Makefile:1.20 --- clhp/Makefile:1.19 Wed Nov 12 22:57:03 2003 +++ clhp/Makefile Wed Nov 12 23:36:14 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.19 2003/11/13 03:57:03 aventimiglia Exp $ +# $Id: Makefile,v 1.20 2003/11/13 04:36:14 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -23,15 +23,9 @@ # This is where lisp sources will be installed SRCDIR=/usr/lib/cmucl/source/clhp -# Directory where cmucl looks for libraries $CMUCLLIB -# LIBDIR=/usr/lib/cmucl/lib - # Directory to install the clhp lisp core COREDIR=/usr/lib/cmucl -# Directory to add runclcgi script -# BINDIR=/usr/local/bin - # Directory to install documentation DOCDIR=/usr/local/share/clhp @@ -61,26 +55,22 @@ LISPC=$(LISP) -noinit -load config/lispc -eval '(make)' BUILD_CORE=config/build-core.x86f -#BINS=start-clcgi.x86f APACHE_MOD=mod_clhp.so -SOURCES=cgi.lisp clhp.lisp start-clcgi.lisp package.lisp clhp.asd mod_clhp.c +SOURCES=cgi.lisp clhp.lisp package.lisp clhp.asd mod_clhp.c CORE=clhp.core LISPCBIN=config/lispc.x86f -#RUNCGI=config/runclcgi -TESTS=config/binfmt-test.clcgi DOCS=COPYING INSTALL ChangeLog NEWS README TODO DIST_SUBDIRS=config examples NON_DIST_SUBDIRS=tests RECURSIVE_SUBDIRS = examples tests -EXTRADIST=config/binfmt-test.lisp config/build-core.lisp config/lispc.lisp \ - config/runclcgi.src examples/Makefile examples/clhp-test.lisp \ - examples/index.clhp examples/test.lisp Makefile +EXTRADIST=config/build-core.lisp config/lispc.lisp examples/index.clhp \ + Makefile NON_DIST= tests/Makefile tests/cgi-test.lisp tests/test-suite.lisp -CLEAN_TARGETS=$(LISPCBIN) $(CORE) $(CORE).BAK $(TESTS) $(TARBALL) \ - $(APACHE_MOD) mod_clhp.o # $(RUNCGI) +CLEAN_TARGETS=$(LISPCBIN) $(CORE) $(CORE).BAK $(TARBALL) \ + $(APACHE_MOD) mod_clhp.o DISTFILES=$(SOURCES) $(DOCS) $(EXTRADIST) @@ -94,7 +84,7 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/11/13 03:57:03 $ | \ +CVSID=$(shell echo $Date: 2003/11/13 04:36:14 $ | \ awk '{print $$2}'| sed s/\\///g )cvs VERSION=$(CVSID) @@ -104,7 +94,7 @@ RECURSIVE_TARGETS=clean-recursive clean-all-recursive check-recursive -all: $(LISPCBIN) $(CORE) # $(RUNCGI) $(BINS) +all: $(LISPCBIN) $(CORE) module:$(APACHE_MOD) @@ -113,7 +103,7 @@ .PHONY: all install uninstall clean clean-all clean-backups install-dirs \ install-source install-source-dirs uninstall-files uninstall-dirs \ - install-core tests clean-dist $(RECURSIVE_TARGETS) check \ + install-core clean-dist $(RECURSIVE_TARGETS) check \ module-install %.x86f: %.lisp @@ -122,11 +112,6 @@ %.clcgi: %.x86f mv -v $< $@ -tests: $(TESTS) - for file in $(TESTS); do \ - if test ! -x $$file; then $(CHMOD) -v a+x $$file ; fi \ - done - check: $(CORE) check-recursive $(LISPCBIN): config/lispc.lisp @@ -134,20 +119,11 @@ $(CORE): $(SOURCES) $(BUILD_CORE) $(LISP) -noinit -load "config/build-core" -# $(RUNCGI): $(RUNCGI).src -# sed 's:\(LISP=\):\1$(LISP):' < $< | \ -# sed 's:\(CORE=\):\1$(COREDIR)/$(CORE):' | \ -# sed 's:\(CMUCLLIB=\):\1$(LIBDIR):' > $@ - module-install: $(APACHE_MOD) $(APXS) -i -a $< install: all install-dirs install-core -# for f in $(BINS) ; do \ -# $(INSTALLFILE) $$f $(LIBDIR) ; \ -# done $(INSTALL) $(DOCS) $(DOCDIR) -# $(INSTALL) -m0755 $(RUNCGI) $(BINDIR) install-core: $(CORE) install-dirs $(INSTALLFILE) -b -S .BAK $(CORE) $(COREDIR) @@ -158,7 +134,6 @@ done install-dirs: -# $(INSTALLDIR) $(LIBDIR) $(INSTALLDIR) $(COREDIR) # $(INSTALLDIR) $(BINDIR) $(INSTALLDIR) $(DOCDIR) @@ -172,9 +147,6 @@ for f in $(SOURCES) ; do \ if test -f $(SRCDIR)/$$f; then rm -v $(SRCDIR)/$$f ; fi ; \ done -# for f in $(LIBS) ; do \ -# if test -f $(LIBDIR)/$$f; then rm -v $(LIBDIR)/$$f ; fi ; \ -# done for f in $(DOCS) ; do \ fullpath=$(DOCDIR)/$$f ; \ if test -f $$fullpath; then rm -v $$fullpath ; fi ; \ @@ -182,12 +154,9 @@ core=$(COREDIR)/$(CORE) ; \ if test -f $$core ; then rm -v $$core; fi ; \ if test -f $$core.BAK; then mv -v $$core.BAK $$core; fi -# file=$(BINDIR)/`echo $(RUNCGI) | sed 's/config\///'` ; \ -# if test -f $$file ; then rm -v $$file; fi uninstall-dirs: uninstall-files -rmdir -v $(SRCDIR) -# -rmdir -v $(LIBDIR) -rmdir -v $(COREDIR) -rmdir -v $(BINDIR) -rmdir -v $(DOCDIR) Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.25 clhp/ChangeLog:1.26 --- clhp/ChangeLog:1.25 Wed Nov 12 23:21:34 2003 +++ clhp/ChangeLog Wed Nov 12 23:36:14 2003 @@ -1,5 +1,7 @@ 2003-11-12 Anthony Ventimiglia + * Makefile: Removed pretty much all traces of old cgi based clhp + * INSTALL: Commented out LIBDIR since it does not need to be used for new installation, rewrote for new installation @@ -291,9 +293,9 @@ 2003-09-17 16:21 * clhp.lisp: Wrote a nice little reader macro to make cvs - versioning automatic, the $Date: 2003/11/13 04:21:34 $ keyword is parsed to make a 8 + versioning automatic, the $Date: 2003/11/13 04:36:14 $ keyword is parsed to make a 8 digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS - release with a $Date: 2003/11/13 04:21:34 $ of 2003/09/15 ends up with a + release with a $Date: 2003/11/13 04:36:14 $ of 2003/09/15 ends up with a *CLHP-VERSION* of "20030915cvs" 2003-09-17 14:47 @@ -302,4 +304,4 @@ that will aide in compiling lisp in a mkae freindly way by passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.25 2003/11/13 04:21:34 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.26 2003/11/13 04:36:14 aventimiglia Exp $ \ No newline at end of file From aventimiglia at common-lisp.net Thu Nov 13 04:57:45 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Wed, 12 Nov 2003 23:57:45 -0500 Subject: [clhp-cvs] CVS update: clhp/clhp.lisp clhp/clhp.asd clhp/TODO clhp/README clhp/NEWS clhp/Makefile clhp/ChangeLog Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv2306 Modified Files: clhp.lisp clhp.asd TODO README NEWS Makefile ChangeLog Log Message: Final commit for 0.2.0alpha release Date: Wed Nov 12 23:57:45 2003 Author: aventimiglia Index: clhp/clhp.lisp diff -u clhp/clhp.lisp:1.18 clhp/clhp.lisp:1.19 --- clhp/clhp.lisp:1.18 Wed Nov 12 17:41:55 2003 +++ clhp/clhp.lisp Wed Nov 12 23:57:44 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: clhp.lisp,v 1.18 2003/11/12 22:41:55 aventimiglia Exp $") + "$Id: clhp.lisp,v 1.19 2003/11/13 04:57:44 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -28,8 +28,8 @@ ;; by changing the NIL in the first part of the OR, a release number ;; will override the CVS keyword (defconstant *CLHP-VERSION* - #.(or nil ; Set this for releases - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/12 22:41:55 $")) + #.(or "0.2.0alpha" ; Set this for releases + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 04:57:44 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) Index: clhp/clhp.asd diff -u clhp/clhp.asd:1.2 clhp/clhp.asd:1.3 --- clhp/clhp.asd:1.2 Fri Oct 17 09:11:44 2003 +++ clhp/clhp.asd Wed Nov 12 23:57:44 2003 @@ -1,4 +1,4 @@ -#+cmu (ext:file-comment "$Id: clhp.asd,v 1.2 2003/10/17 13:11:44 aventimiglia Exp $") +#+cmu (ext:file-comment "$Id: clhp.asd,v 1.3 2003/11/13 04:57:44 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -30,8 +30,15 @@ :name "net.common-lisp.aventimiglia.clhp" :author "Anthony Ventimiglia " :maintainer "Anthony Ventimiglia " - :version "x.x.x" - :description "" + :version #.(or "0.2.0alpha" + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 04:57:44 $")) + (date (subseq trimmed 0 (search " " trimmed)))) + (concatenate 'string + (subseq date 0 4) + (subseq date 5 7) + (subseq date 8 10) + "cvs"))) + :description "CLHP the Common Lisp Hypertext Preprocesor" :long-description "" :licence "GNU Lesser General Public License" :components Index: clhp/TODO diff -u clhp/TODO:1.12 clhp/TODO:1.13 --- clhp/TODO:1.12 Wed Nov 12 23:21:34 2003 +++ clhp/TODO Wed Nov 12 23:57:44 2003 @@ -1,4 +1,9 @@ -$Id: TODO,v 1.12 2003/11/13 04:21:34 aventimiglia Exp $ -*- outline -*- +$Id: TODO,v 1.13 2003/11/13 04:57:44 aventimiglia Exp $ -*- outline -*- + +* Make a new installation method, more lisp based. + part of this should do automatic versioning, or at least make + version set in a single file instead of spread between Makefile, + clhp.asd and clhp.lisp like it is now * Rewrite docs for new mod_clhp handler Index: clhp/README diff -u clhp/README:1.2 clhp/README:1.3 --- clhp/README:1.2 Thu Sep 18 16:57:30 2003 +++ clhp/README Wed Nov 12 23:57:44 2003 @@ -1,4 +1,4 @@ -$Id: README,v 1.2 2003/09/18 20:57:30 aventimiglia Exp $ +$Id: README,v 1.3 2003/11/13 04:57:44 aventimiglia Exp $ CLHP The Common Lisp Hypertext Preprocessor @@ -6,11 +6,6 @@ Lisp. Basically it allows Common Lisp code to be embedded in HTML or XML using XML processing instructions. See INSTALL for installation instructions. See clhp-test.lisp and index.clhp for examples. - -It consists of two pacakges, CL-CGI, which provides a small package to -aide in writing CGI programs in lisp. CLHP is the full package, which -depends on CL-CGI. I decided to keep the two packages separate, -because users may find CL-CGI useful on its own. Please read COPYING for copyright information. Index: clhp/NEWS diff -u clhp/NEWS:1.3 clhp/NEWS:1.4 --- clhp/NEWS:1.3 Wed Oct 15 10:44:04 2003 +++ clhp/NEWS Wed Nov 12 23:57:44 2003 @@ -1,9 +1,17 @@ -$Id: NEWS,v 1.3 2003/10/15 14:44:04 aventimiglia Exp $ -*- outline -*- +$Id: NEWS,v 1.4 2003/11/13 04:57:44 aventimiglia Exp $ -*- outline -*- -* Wed Sep 17 15:17:02 EDT 2003 -- CLHP package migrated from my local - server to common-lisp.net - -* Fri Sep 19 01:56:45 EDT 2003 -- 0.1.0alpha released +* Wed Nov 12 23:52:02 EST 2003 -- 0.2.0alpha release +** mod_clhp + CLHP is now integrated into Apache as a dynamic module. This + simplifies quite a bit from both the users end and the developers + standpoint. +** package is built with ASDF + This also simplifies the build process +** REQUIRE function + used to load external lisp files relative to the Document-root +** *SERVER-ENV* and *QUERY-VARS are now hash-tables. +** CLHP is a single package. + the full package name is :net.common-lisp.aventimiglia.clhp * Wed Oct 15 10:08:33 EDT 2003 -- 0.1.1alpha release See ChangeLog for details, but here's a rundown of the new stuff: @@ -32,4 +40,9 @@ test suite since I didn't really want to deal with learning someone elses. In the future I'm going to write tests for :CLHP - +* Fri Sep 19 01:56:45 EDT 2003 -- 0.1.0alpha released + +* Wed Sep 17 15:17:02 EDT 2003 -- CLHP package migrated from my local + server to common-lisp.net + + Index: clhp/Makefile diff -u clhp/Makefile:1.20 clhp/Makefile:1.21 --- clhp/Makefile:1.20 Wed Nov 12 23:36:14 2003 +++ clhp/Makefile Wed Nov 12 23:57:44 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.20 2003/11/13 04:36:14 aventimiglia Exp $ +# $Id: Makefile,v 1.21 2003/11/13 04:57:44 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -56,16 +56,16 @@ BUILD_CORE=config/build-core.x86f APACHE_MOD=mod_clhp.so -SOURCES=cgi.lisp clhp.lisp package.lisp clhp.asd mod_clhp.c +SOURCES=cgi.lisp clhp.lisp package.lisp clhp.asd mod_clhp.c utility.lisp CORE=clhp.core LISPCBIN=config/lispc.x86f DOCS=COPYING INSTALL ChangeLog NEWS README TODO DIST_SUBDIRS=config examples NON_DIST_SUBDIRS=tests -RECURSIVE_SUBDIRS = examples tests +RECURSIVE_SUBDIRS = tests EXTRADIST=config/build-core.lisp config/lispc.lisp examples/index.clhp \ - Makefile + Makefile config/lisp-init.lisp NON_DIST= tests/Makefile tests/cgi-test.lisp tests/test-suite.lisp @@ -84,11 +84,11 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/11/13 04:36:14 $ | \ +CVSID=$(shell echo $Date: 2003/11/13 04:57:44 $ | \ awk '{print $$2}'| sed s/\\///g )cvs -VERSION=$(CVSID) -#VERSION=0.1.2alpha +#VERSION=$(CVSID) +VERSION=0.2.0alpha TARROOT=clhp-$(VERSION) TARBALL=$(TARROOT).tar.gz @@ -135,7 +135,6 @@ install-dirs: $(INSTALLDIR) $(COREDIR) -# $(INSTALLDIR) $(BINDIR) $(INSTALLDIR) $(DOCDIR) install-source-dirs: @@ -187,7 +186,6 @@ if test -f $$f ; then rm -v $$f ; fi \ done find -iname "*.x86f" -exec rm -v {} \; - $(MAKE) -C examples clean find -iname "*.tar.gz" -exec rm -v {} \; clean-backups: Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.26 clhp/ChangeLog:1.27 --- clhp/ChangeLog:1.26 Wed Nov 12 23:36:14 2003 +++ clhp/ChangeLog Wed Nov 12 23:57:44 2003 @@ -88,10 +88,6 @@ CA-LIST-TO-A-LIST, MAKE-KEYWORD, and LIST-TO-A-LIST out of cgi.lisp in here. - * clhp.asd, package.lisp, clhp.lisp, cgi.lisp: Converted all this - to an ASDF system, it's not quite battle tested, but hey, that's - what this is all about. - 2003-10-17 08:58 * config/build-core.lisp, ChangeLog, Makefile, TODO, cgi.lisp, @@ -293,9 +289,9 @@ 2003-09-17 16:21 * clhp.lisp: Wrote a nice little reader macro to make cvs - versioning automatic, the $Date: 2003/11/13 04:36:14 $ keyword is parsed to make a 8 + versioning automatic, the $Date: 2003/11/13 04:57:44 $ keyword is parsed to make a 8 digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS - release with a $Date: 2003/11/13 04:36:14 $ of 2003/09/15 ends up with a + release with a $Date: 2003/11/13 04:57:44 $ of 2003/09/15 ends up with a *CLHP-VERSION* of "20030915cvs" 2003-09-17 14:47 @@ -304,4 +300,4 @@ that will aide in compiling lisp in a mkae freindly way by passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.26 2003/11/13 04:36:14 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.27 2003/11/13 04:57:44 aventimiglia Exp $ \ No newline at end of file From aventimiglia at common-lisp.net Thu Nov 13 05:10:41 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 00:10:41 -0500 Subject: [clhp-cvs] CVS update: clhp/clhp.lisp clhp/clhp.asd clhp/Makefile Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv9587 Modified Files: clhp.lisp clhp.asd Makefile Log Message: post release version updates Date: Thu Nov 13 00:10:40 2003 Author: aventimiglia Index: clhp/clhp.lisp diff -u clhp/clhp.lisp:1.19 clhp/clhp.lisp:1.20 --- clhp/clhp.lisp:1.19 Wed Nov 12 23:57:44 2003 +++ clhp/clhp.lisp Thu Nov 13 00:10:40 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: clhp.lisp,v 1.19 2003/11/13 04:57:44 aventimiglia Exp $") + "$Id: clhp.lisp,v 1.20 2003/11/13 05:10:40 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -28,8 +28,8 @@ ;; by changing the NIL in the first part of the OR, a release number ;; will override the CVS keyword (defconstant *CLHP-VERSION* - #.(or "0.2.0alpha" ; Set this for releases - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 04:57:44 $")) + #.(or nil ; Set this for releases + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 05:10:40 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) Index: clhp/clhp.asd diff -u clhp/clhp.asd:1.3 clhp/clhp.asd:1.4 --- clhp/clhp.asd:1.3 Wed Nov 12 23:57:44 2003 +++ clhp/clhp.asd Thu Nov 13 00:10:40 2003 @@ -1,4 +1,4 @@ -#+cmu (ext:file-comment "$Id: clhp.asd,v 1.3 2003/11/13 04:57:44 aventimiglia Exp $") +#+cmu (ext:file-comment "$Id: clhp.asd,v 1.4 2003/11/13 05:10:40 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -30,8 +30,8 @@ :name "net.common-lisp.aventimiglia.clhp" :author "Anthony Ventimiglia " :maintainer "Anthony Ventimiglia " - :version #.(or "0.2.0alpha" - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 04:57:44 $")) + :version #.(or nil + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 05:10:40 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) Index: clhp/Makefile diff -u clhp/Makefile:1.21 clhp/Makefile:1.22 --- clhp/Makefile:1.21 Wed Nov 12 23:57:44 2003 +++ clhp/Makefile Thu Nov 13 00:10:40 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.21 2003/11/13 04:57:44 aventimiglia Exp $ +# $Id: Makefile,v 1.22 2003/11/13 05:10:40 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -84,11 +84,11 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/11/13 04:57:44 $ | \ +CVSID=$(shell echo $Date: 2003/11/13 05:10:40 $ | \ awk '{print $$2}'| sed s/\\///g )cvs -#VERSION=$(CVSID) -VERSION=0.2.0alpha +VERSION=$(CVSID) +#VERSION=0.2.0alpha TARROOT=clhp-$(VERSION) TARBALL=$(TARROOT).tar.gz From aventimiglia at common-lisp.net Thu Nov 13 15:33:14 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 10:33:14 -0500 Subject: [clhp-cvs] CVS update: public_html/style.css public_html/funcs.lisp public_html/index.clhp Message-ID: Update of /project/clhp/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv25925 Modified Files: index.clhp Added Files: style.css funcs.lisp Log Message: Working on the new, nice page. Date: Thu Nov 13 10:33:14 2003 Author: aventimiglia Index: public_html/index.clhp diff -u public_html/index.clhp:1.3 public_html/index.clhp:1.4 --- public_html/index.clhp:1.3 Mon Sep 29 13:21:11 2003 +++ public_html/index.clhp Thu Nov 13 10:33:14 2003 @@ -1,7 +1,5 @@ - From aventimiglia at common-lisp.net Thu Nov 13 16:21:41 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 11:21:41 -0500 Subject: [clhp-cvs] CVS update: public_html/index.clhp public_html/funcs.lisp Message-ID: Update of /project/clhp/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv16152 Modified Files: index.clhp funcs.lisp Log Message: Got most of the functions that will be used to make thesite working Date: Thu Nov 13 11:21:41 2003 Author: aventimiglia Index: public_html/index.clhp diff -u public_html/index.clhp:1.4 public_html/index.clhp:1.5 --- public_html/index.clhp:1.4 Thu Nov 13 10:33:14 2003 +++ public_html/index.clhp Thu Nov 13 11:21:40 2003 @@ -15,6 +15,14 @@ (require "funcs.lisp")) (use-package :www) +;; Page sections are all defined here each section is a list, with the +;; CAR as the section name and the CDR as the section contents. +(setq *page-sections* + '(("Introduction" + "CLHP combines the joys of common Lisp with the ease of PHP for web development") + ("Current version" + "The latest version is 0.2.0alpha"))) + ;; Start of page output (echon +doctype+) @@ -23,12 +31,8 @@ (list (head "CLHP the Common Lisp Hypertext Preprocessor") (tag '|body| - (list - (page-header "CLHP" "the Common Lisp Hypertext Preprocessor")))))) + (page-body))))) - - - ;(defvar *title* "CLHP the Common Lisp Hypertext Preprocessor") ;(defvar *readme* "/home/ant/src/clhp/README") Index: public_html/funcs.lisp diff -u public_html/funcs.lisp:1.1 public_html/funcs.lisp:1.2 --- public_html/funcs.lisp:1.1 Thu Nov 13 10:33:14 2003 +++ public_html/funcs.lisp Thu Nov 13 11:21:40 2003 @@ -1,4 +1,4 @@ -;; $Id: funcs.lisp,v 1.1 2003/11/13 15:33:14 aventimiglia Exp $ +;; $Id: funcs.lisp,v 1.2 2003/11/13 16:21:40 aventimiglia Exp $ ;; ;; Functions used on clhp website ;; at http://common-lisp.net/project/clhp @@ -7,7 +7,8 @@ (defpackage :net.common-lisp.aventimiglia.clhp.www (:nicknames #:www) (:use #:cl #:clhp) - (:export #:+doctype+ #:echon #:head #:page-header)) + (:export #:+doctype+ #:echon #:head #:*page-sections* + #:page-body)) (in-package :www) @@ -16,11 +17,16 @@ (defconstant +header-links+ '(("http://common-lisp.net/" "Common-Lisp.net"))) -(defvar *site-links* +(defconstant +site-links+ '(("http://common-lisp.net/cgi-bin/viewcvs.cgi/clhp/?cvsroot=clhp" "ViewCVS") ("ftp://common-lisp.net/pub/project/clhp/" "Downloads"))) +(defvar *page-sections* nil + "These are the text sections of the page. Each section is a element +list, where the CAR is the Section name and the CDR is the content.") + + (declaim (inline echon head)) (defun echon (&rest args) @@ -46,7 +52,31 @@ (tag '|span| '|class| "headerTitle" (list caption " ")) (tag '|span| '|class| "headerSubTitle" subtitle) (tag '|div| '|class| "headerLinks" (make-links +header-links+)) - (tag '|div| '|class| "siteMap" (make-links *site-links*))))) - + (tag '|div| '|class| "siteMap" (make-links +site-links+))))) + +(defun page-body () + (list + (page-header "CLHP" "the Common Lisp Hypertext Preprocessor") + (page-menu) + (tag '|div| '|id| "bodyText" + (loop for section in *page-sections* + nconcing (make-page-section section))))) + +(defun make-page-section (section) + (let ((name (car section))) + (cons + (tag '|h1| '|id| name name) + (loop for p in (cdr section) + collect (tag '|p| p))))) + +(defun page-menu () + (if *page-sections* + (tag '|div| '|class| "sideBox LHS" + (make-links (loop for section in *page-sections* + collect (let ((name (car section))) + (list (format nil "#~A" name) name))))) + "")) + + From aventimiglia at common-lisp.net Thu Nov 13 17:24:40 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 12:24:40 -0500 Subject: [clhp-cvs] CVS update: public_html/style.css public_html/index.clhp public_html/funcs.lisp Message-ID: Update of /project/clhp/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv13141 Modified Files: style.css index.clhp funcs.lisp Log Message: Addedd the footer and finished main page text. Date: Thu Nov 13 12:24:40 2003 Author: aventimiglia Index: public_html/style.css diff -u public_html/style.css:1.1 public_html/style.css:1.2 --- public_html/style.css:1.1 Thu Nov 13 10:33:14 2003 +++ public_html/style.css Thu Nov 13 12:24:40 2003 @@ -67,7 +67,7 @@ #bodyText { line-height: 1.5em; margin: 10mm 14em 0 12em; - padding: 0 1em 1ex 1em; + padding: 0 1em 3.25ex 1em; } #bodyTextWide { Index: public_html/index.clhp diff -u public_html/index.clhp:1.5 public_html/index.clhp:1.6 --- public_html/index.clhp:1.5 Thu Nov 13 11:21:40 2003 +++ public_html/index.clhp Thu Nov 13 12:24:40 2003 @@ -19,9 +19,21 @@ ;; CAR as the section name and the CDR as the section contents. (setq *page-sections* '(("Introduction" - "CLHP combines the joys of common Lisp with the ease of PHP for web development") - ("Current version" - "The latest version is 0.2.0alpha"))) + "CLHP combines the joys of common Lisp with the ease of PHP for web development. Just as with PHP, you embed code into an XML or HTML document using XML processing instructions <?clhp :like-this ?>. By using XML processing instructions, lisp code can be embedded in any valid XML document and still result in a valid XML document" + "The CLHP parser is integrated into the Apache web server as a module. When Apache recieves a request for a clhp page, Apache passes it on to a Lisp process which simply looks for the <?clhp processing instructions. The Lisp code inside the processing instructions is evaluated, all output through *STANDARD-OUTPUT* is printed in place of the processing instruction block. All other text outside of the processing instructions is passed on as is." + "The langauge inside CLHP is Common-Lisp, so CLHP itself defines very few functions. It allows you to build Web programs the same way you would write a Lisp program. You can define functions, structures etc inside your page, or you could load external precompiled files with utility functions in them.") + ("Current version" + "The latest version is 0.2.0alpha, it brings the Apache module, asdf package building, and a few small enhancements to the CLHP package.") + ("Mailing Lists" + "
    +
  • clhp-devel List for Developer discussion and bug reports.
  • +
  • clhp-devel Announcements on Releases, patches, bug-fixes and general news.
  • +
  • clhp-cvs Reports on CVS activity.
  • +
") + ("Documentation" + "Sorry, right now you're left to reading the source on how CLHP specific functions and variables work, but I'll have some basic documentation coming soon"))) + + ;; Start of page output (echon +doctype+) @@ -31,7 +43,7 @@ (list (head "CLHP the Common Lisp Hypertext Preprocessor") (tag '|body| - (page-body))))) + (page-body "$Date: 2003/11/13 17:24:40 $"))))) ;(defvar *title* "CLHP the Common Lisp Hypertext Preprocessor") Index: public_html/funcs.lisp diff -u public_html/funcs.lisp:1.2 public_html/funcs.lisp:1.3 --- public_html/funcs.lisp:1.2 Thu Nov 13 11:21:40 2003 +++ public_html/funcs.lisp Thu Nov 13 12:24:40 2003 @@ -1,4 +1,4 @@ -;; $Id: funcs.lisp,v 1.2 2003/11/13 16:21:40 aventimiglia Exp $ +;; $Id: funcs.lisp,v 1.3 2003/11/13 17:24:40 aventimiglia Exp $ ;; ;; Functions used on clhp website ;; at http://common-lisp.net/project/clhp @@ -49,25 +49,39 @@ web links" (tag '|div| '|id| "header" (list - (tag '|span| '|class| "headerTitle" (list caption " ")) + (tag '|span| '|class| "headerTitle" '|id| "top" + (list caption " ")) (tag '|span| '|class| "headerSubTitle" subtitle) (tag '|div| '|class| "headerLinks" (make-links +header-links+)) (tag '|div| '|class| "siteMap" (make-links +site-links+))))) -(defun page-body () +(defun page-body (cvs-date) (list (page-header "CLHP" "the Common Lisp Hypertext Preprocessor") (page-menu) (tag '|div| '|id| "bodyText" (loop for section in *page-sections* - nconcing (make-page-section section))))) + nconcing (make-page-section section))) + (page-footer cvs-date))) + +(defun page-footer (cvs-date) + (tag '|div| '|id| "footer" + (tag '|div| + (list + (tag '|b| "Modified: ") + (tag '|span| '|class| "footerCol2" cvs-date))))) + + (defun make-page-section (section) (let ((name (car section))) - (cons - (tag '|h1| '|id| name name) - (loop for p in (cdr section) - collect (tag '|p| p))))) + (nconc + (cons + (tag '|h1| '|id| name name) + (loop for p in (cdr section) + collect (tag '|p| p))) + (list (tag '|a| '|class| "topOfPage" '|href| "#top" + '|title| "Go to Top of Page" "top"))))) (defun page-menu () (if *page-sections* From aventimiglia at common-lisp.net Thu Nov 13 17:27:06 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 12:27:06 -0500 Subject: [clhp-cvs] CVS update: public_html/funcs.lisp Message-ID: Update of /project/clhp/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv14058 Modified Files: funcs.lisp Log Message: Finished footer function Date: Thu Nov 13 12:27:06 2003 Author: aventimiglia Index: public_html/funcs.lisp diff -u public_html/funcs.lisp:1.3 public_html/funcs.lisp:1.4 --- public_html/funcs.lisp:1.3 Thu Nov 13 12:24:40 2003 +++ public_html/funcs.lisp Thu Nov 13 12:27:05 2003 @@ -1,4 +1,4 @@ -;; $Id: funcs.lisp,v 1.3 2003/11/13 17:24:40 aventimiglia Exp $ +;; $Id: funcs.lisp,v 1.4 2003/11/13 17:27:05 aventimiglia Exp $ ;; ;; Functions used on clhp website ;; at http://common-lisp.net/project/clhp @@ -65,11 +65,12 @@ (page-footer cvs-date))) (defun page-footer (cvs-date) - (tag '|div| '|id| "footer" - (tag '|div| - (list - (tag '|b| "Modified: ") - (tag '|span| '|class| "footerCol2" cvs-date))))) + (let ((date (string-trim "$ Date:" cvs-date))) + (tag '|div| '|id| "footer" + (tag '|div| + (list + (tag '|b| "Modified: ") + (tag '|span| '|class| "footerCol2" date)))))) From aventimiglia at common-lisp.net Thu Nov 13 19:37:41 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 14:37:41 -0500 Subject: [clhp-cvs] CVS update: clhp/package.lisp clhp/mod_clhp.c clhp/clhp.lisp clhp/cgi.lisp clhp/ChangeLog Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv10767 Modified Files: package.lisp mod_clhp.c clhp.lisp cgi.lisp ChangeLog Log Message: Removed HEADER and INCLUDE functions, because they were not working properly. mod_clhp generates a simple header. In the future, CLHP will have to get control of this again, for doing things like setting cookies and redirections. Date: Thu Nov 13 14:37:41 2003 Author: aventimiglia Index: clhp/package.lisp diff -u clhp/package.lisp:1.3 clhp/package.lisp:1.4 --- clhp/package.lisp:1.3 Wed Nov 12 17:41:55 2003 +++ clhp/package.lisp Thu Nov 13 14:37:41 2003 @@ -1,4 +1,4 @@ -#+cmu (ext:file-comment "$Id: package.lisp,v 1.3 2003/11/12 22:41:55 aventimiglia Exp $") +#+cmu (ext:file-comment "$Id: package.lisp,v 1.4 2003/11/13 19:37:41 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -25,8 +25,8 @@ (defpackage #:net.common-lisp.aventimiglia.clhp (:nicknames #:clhp #:cgi) ; The CGI will go away eventually (:use #:cl #:ext) - (:export #:*server-env* #:*query-vars* #:header #:debug #:init - #:parse #:*clhp-version* #:echo #:include #:xml-element + (:export #:*server-env* #:*query-vars* #:debug #:init + #:parse #:*clhp-version* #:echo #:xml-element #:make-xml-element #:copy-xml-element #:xml-element-attributes #:xml-element-name #:xml-element-contents #:xml-element-p #:tag #:require Index: clhp/mod_clhp.c diff -u clhp/mod_clhp.c:1.4 clhp/mod_clhp.c:1.5 --- clhp/mod_clhp.c:1.4 Wed Nov 12 16:57:40 2003 +++ clhp/mod_clhp.c Thu Nov 13 14:37:41 2003 @@ -1,4 +1,4 @@ -/* $Id: mod_clhp.c,v 1.4 2003/11/12 21:57:40 aventimiglia Exp $ +/* $Id: mod_clhp.c,v 1.5 2003/11/13 19:37:41 aventimiglia Exp $ CLHP the Common Lisp Hypertext Preprocessor (C) 2003 Anthony J Ventimiglia @@ -82,6 +82,13 @@ ap_add_common_vars ( req ); ap_add_cgi_vars ( req ); child.req = req; + + // First we should check if the document exists + // But for now... + req->content_type = "text/html"; + ap_table_set ( req->headers_out, "X-Powered-By", + "CLHP Common Lisp Hypertext Preprocessor" ); + ap_send_http_header ( req ); if ( ! ap_bspawn_child ( req->pool, run_lisp, (void *) &child, kill_always, &lisp_out, &lisp_in, NULL )) Index: clhp/clhp.lisp diff -u clhp/clhp.lisp:1.20 clhp/clhp.lisp:1.21 --- clhp/clhp.lisp:1.20 Thu Nov 13 00:10:40 2003 +++ clhp/clhp.lisp Thu Nov 13 14:37:41 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: clhp.lisp,v 1.20 2003/11/13 05:10:40 aventimiglia Exp $") + "$Id: clhp.lisp,v 1.21 2003/11/13 19:37:41 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -29,7 +29,7 @@ ;; will override the CVS keyword (defconstant *CLHP-VERSION* #.(or nil ; Set this for releases - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 05:10:40 $")) + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 19:37:41 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) @@ -72,18 +72,6 @@ (use-package :cgi) (use-package :clhp) (init) - (header :content-type - :text/html - :extra - '(#.(format - nil - "X-Powered-By: CLHP/~a Common Lisp Hypertext Preprocessor" - *CLHP-VERSION*))) - (include file-name)) - -(defun include (file-name) - "parse FILE-NAME as a CLHP file, this is essentially the same as -PARSE, only it does not output headers." ;; We'll read the whole thing here into a buffer, then send it to ;; PARSE-BUFFER to recursively process it (handler-bind Index: clhp/cgi.lisp diff -u clhp/cgi.lisp:1.14 clhp/cgi.lisp:1.15 --- clhp/cgi.lisp:1.14 Tue Oct 21 12:57:27 2003 +++ clhp/cgi.lisp Thu Nov 13 14:37:41 2003 @@ -1,4 +1,4 @@ -#+cmu (ext:file-comment "$Id: cgi.lisp,v 1.14 2003/10/21 16:57:27 aventimiglia Exp $") +#+cmu (ext:file-comment "$Id: cgi.lisp,v 1.15 2003/11/13 19:37:41 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -42,28 +42,6 @@ "A hash-table of all variables passed through a GET or POST method, the key is a string, and all values are stored in string form.") -;; This will obviously be improved upon to handle different content -;; types, but for now it's just a stub to print plain text pages. It -;; is set up so it will only work the first time it is called, any -;; furthur calls will not do a thing -(let ((done nil)) - (defun header (&key (content-type 'text/plain) extra) - "This is the first output function that should be called by a CGI -program, it print the proper CGI header. The :CONTENT-TYPE field can -be a symbol, or a string, if whitespace is required. - -The :EXTRA key is used for any additional headers, it should be an a -list of strings, where each string will be printed on it's own line -exactly as it is passed, for example (HEADER :EXTRA -\"Content-Language: en\"). - -See RFC 2616 for more info" - (when (not done) - (dolist (header extra) - (format t "~a~%" header)) - (format t "Content-type: ~a~%~%" content-type) - (setf done t)))) - ;; This sets the main variables, since the library is already part of the lisp ;; core, we can't use an eval-when, I may eventually make a cgi:init that also ;; prints the header. @@ -217,7 +195,6 @@ (defun handle-general-error (condition) "A generic error handler function, this will basicall just print a text header, echoing the error-message." - (header :content-type :text/plain) (format t "CL-CGI: ~A~%" (error-message condition)) (quit)) Index: clhp/ChangeLog diff -u clhp/ChangeLog:1.27 clhp/ChangeLog:1.28 --- clhp/ChangeLog:1.27 Wed Nov 12 23:57:44 2003 +++ clhp/ChangeLog Thu Nov 13 14:37:41 2003 @@ -1,4 +1,17 @@ -2003-11-12 Anthony Ventimiglia +2003-11-13 Anthony Ventimiglia + + * cgi.lisp, clhp.lisp, package.lisp: Removed HEADER, since it is + no longer used. Removed INCLUDE, moved it's functionality into + PARSE, since HEADER no longer exists, there's no need for the two + of them. + + * mod_clhp.c: module generates the headers, since CLHP was not + doing it properly, For now this works, but eventually we'll need + to have clhp do it since we may want to modify headers or set + cookies using CLHP. I guess Apache will have to pass + req->headers_out to Lisp and CLHP will have to send them. + +2003-11-12 Anthony Ventimiglia * Makefile: Removed pretty much all traces of old cgi based clhp @@ -289,9 +302,9 @@ 2003-09-17 16:21 * clhp.lisp: Wrote a nice little reader macro to make cvs - versioning automatic, the $Date: 2003/11/13 04:57:44 $ keyword is parsed to make a 8 + versioning automatic, the $Date: 2003/11/13 19:37:41 $ keyword is parsed to make a 8 digit number YYYYMMDD with the suffix "cvs" addedd, so a CVS - release with a $Date: 2003/11/13 04:57:44 $ of 2003/09/15 ends up with a + release with a $Date: 2003/11/13 19:37:41 $ of 2003/09/15 ends up with a *CLHP-VERSION* of "20030915cvs" 2003-09-17 14:47 @@ -300,4 +313,4 @@ that will aide in compiling lisp in a mkae freindly way by passing a non-zero exit code when compilation fails -$Id: ChangeLog,v 1.27 2003/11/13 04:57:44 aventimiglia Exp $ \ No newline at end of file +$Id: ChangeLog,v 1.28 2003/11/13 19:37:41 aventimiglia Exp $ \ No newline at end of file From aventimiglia at common-lisp.net Thu Nov 13 20:06:15 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 15:06:15 -0500 Subject: [clhp-cvs] CVS update: public_html/view-source.clhp public_html/index.clhp public_html/funcs.lisp Message-ID: Update of /project/clhp/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv24505 Modified Files: index.clhp funcs.lisp Added Files: view-source.clhp Log Message: Beginning work on View-Source page. Date: Thu Nov 13 15:06:15 2003 Author: aventimiglia Index: public_html/index.clhp diff -u public_html/index.clhp:1.6 public_html/index.clhp:1.7 --- public_html/index.clhp:1.6 Thu Nov 13 12:24:40 2003 +++ public_html/index.clhp Thu Nov 13 15:06:14 2003 @@ -31,62 +31,24 @@
  • clhp-cvs Reports on CVS activity.
  • ") ("Documentation" - "Sorry, right now you're left to reading the source on how CLHP specific functions and variables work, but I'll have some basic documentation coming soon"))) + "Sorry, right now you're left to reading the source on how CLHP specific functions and variables work, but I'll have some basic documentation coming soon. If you want to see examples of CLHP in action, click the View-Source link at the top of any of the pages on this site."))) ;; Start of page output (echon +doctype+) +?> -(echon - (tag '|html| - (list - (head "CLHP the Common Lisp Hypertext Preprocessor") - (tag '|body| - (page-body "$Date: 2003/11/13 17:24:40 $"))))) - - -;(defvar *title* "CLHP the Common Lisp Hypertext Preprocessor") -;(defvar *readme* "/home/ant/src/clhp/README") -;(defvar *links* '(("Download" "ftp://common-lisp.net/pub/project/clhp"))) -; -; -;(defun dump-text-file (file-name) -; (with-open-file -; (stream file-name :direction :input :if-does-not-exist :error) -; (let* ((buffer-size (file-length stream)) -; (buffer (make-array buffer-size :element-type 'character))) -; (read-sequence buffer stream) -; buffer))) -; -;(defun link (pair) -; "Takes a cons pair (CONTENT URI) and forms a link." -; (tag "a" "href" (cadr pair) (car pair))) -; -;(echo -; (tag "html" -; (list -; (tag "head" -; (tag "title" *title*)) -; (tag "body" -; (list -; (tag "h1" *title*) -; (tag "hr") -; (tag "p" (list -; "I apologize for the lack of content on this site, " -; "CLHP is still in it's early stages, so this simply " -; "contains the README file, with the addition of some " -; "extra links")) -; (tag "p" -; (list -; "To get the latest version, click the " -; (link (assoc "Download" *links* :test #'string=)) -; " link. To checkout the CVS via anonymous pserver cvs, use " -; (tag "b" (list -; "anonymous at common-lisp.net:/project/clhp/cvsroot " -; "co clhp")))) -; (tag "h3" "README") -; (tag "hr") -; (tag "pre" (dump-text-file *readme*))))))) -;(format t "~&") -?> \ No newline at end of file + + + + + + + + + + Index: public_html/funcs.lisp diff -u public_html/funcs.lisp:1.4 public_html/funcs.lisp:1.5 --- public_html/funcs.lisp:1.4 Thu Nov 13 12:27:05 2003 +++ public_html/funcs.lisp Thu Nov 13 15:06:14 2003 @@ -1,4 +1,4 @@ -;; $Id: funcs.lisp,v 1.4 2003/11/13 17:27:05 aventimiglia Exp $ +;; $Id: funcs.lisp,v 1.5 2003/11/13 20:06:14 aventimiglia Exp $ ;; ;; Functions used on clhp website ;; at http://common-lisp.net/project/clhp @@ -7,8 +7,8 @@ (defpackage :net.common-lisp.aventimiglia.clhp.www (:nicknames #:www) (:use #:cl #:clhp) - (:export #:+doctype+ #:echon #:head #:*page-sections* - #:page-body)) + (:export #:+doctype+ #:echon #:head #:*page-sections* #:page-body + #:page-header)) (in-package :www) @@ -18,9 +18,11 @@ '(("http://common-lisp.net/" "Common-Lisp.net"))) (defconstant +site-links+ - '(("http://common-lisp.net/cgi-bin/viewcvs.cgi/clhp/?cvsroot=clhp" + '(("/" "Home") + ("http://common-lisp.net/cgi-bin/viewcvs.cgi/clhp/?cvsroot=clhp" "ViewCVS") ("ftp://common-lisp.net/pub/project/clhp/" "Downloads"))) + (defvar *page-sections* nil "These are the text sections of the page. Each section is a element @@ -53,7 +55,12 @@ (list caption " ")) (tag '|span| '|class| "headerSubTitle" subtitle) (tag '|div| '|class| "headerLinks" (make-links +header-links+)) - (tag '|div| '|class| "siteMap" (make-links +site-links+))))) + (tag '|div| '|class| "siteMap" + (make-links + (append +site-links+ + (list (list (format nil "/view-source.clhp?page=~A" + (gethash :script_name *server-env*)) + "View-Source")))))))) (defun page-body (cvs-date) (list From aventimiglia at common-lisp.net Thu Nov 13 20:40:51 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Thu, 13 Nov 2003 15:40:51 -0500 Subject: [clhp-cvs] CVS update: public_html/view-source.clhp public_html/index.clhp Message-ID: Update of /project/clhp/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv7957 Modified Files: view-source.clhp index.clhp Log Message: Ok here's a working source viewer, next up we work on making it pretty. Date: Thu Nov 13 15:40:51 2003 Author: aventimiglia Index: public_html/view-source.clhp diff -u public_html/view-source.clhp:1.1 public_html/view-source.clhp:1.2 --- public_html/view-source.clhp:1.1 Thu Nov 13 15:06:14 2003 +++ public_html/view-source.clhp Thu Nov 13 15:40:51 2003 @@ -1,21 +1,43 @@ - + ")) + (echon +doctype+) ?> + + +
     
    +
    Index: public_html/index.clhp diff -u public_html/index.clhp:1.7 public_html/index.clhp:1.8 --- public_html/index.clhp:1.7 Thu Nov 13 15:06:14 2003 +++ public_html/index.clhp Thu Nov 13 15:40:51 2003 @@ -1,16 +1,11 @@ index.html && \ - echo -e "1,3d\nwq\n" | ed index.html -|# -;; The HTTP Headers will have to be deleted from the resulting file. - +;; If you want to see the contents of "funcs.lisp" goto +;; http://common-lisp.net/project/clhp/view-source.clhp?page=/funcs.lisp (unless (find-package :www) (require "funcs.lisp")) (use-package :www) @@ -19,19 +14,45 @@ ;; CAR as the section name and the CDR as the section contents. (setq *page-sections* '(("Introduction" - "CLHP combines the joys of common Lisp with the ease of PHP for web development. Just as with PHP, you embed code into an XML or HTML document using XML processing instructions <?clhp :like-this ?>. By using XML processing instructions, lisp code can be embedded in any valid XML document and still result in a valid XML document" - "The CLHP parser is integrated into the Apache web server as a module. When Apache recieves a request for a clhp page, Apache passes it on to a Lisp process which simply looks for the <?clhp processing instructions. The Lisp code inside the processing instructions is evaluated, all output through *STANDARD-OUTPUT* is printed in place of the processing instruction block. All other text outside of the processing instructions is passed on as is." - "The langauge inside CLHP is Common-Lisp, so CLHP itself defines very few functions. It allows you to build Web programs the same way you would write a Lisp program. You can define functions, structures etc inside your page, or you could load external precompiled files with utility functions in them.") + "CLHP combines the joys of common Lisp with the ease of PHP +for web development. Just as with PHP, you embed code into an XML or +HTML document using XML processing instructions <?clhp +:like-this ?>. By using XML processing instructions, lisp code +can be embedded in any valid XML document and still result in a valid +XML document" + "The CLHP parser is integrated into the Apache web server as a module. When +Apache recieves a request for a clhp page, Apache passes it on to a +Lisp process which simply looks for the <?clhp processing +instructions. The Lisp code inside the processing instructions is +evaluated, all output through *STANDARD-OUTPUT* is printed in place of +the processing instruction block. All other text outside of the +processing instructions is passed on as is." + "The langauge inside CLHP is Common-Lisp, so CLHP itself +defines very few functions. It allows you to build Web programs the +same way you would write a Lisp program. You can define functions, +structures etc inside your page, or you could load external +precompiled files with utility functions in them.") ("Current version" - "The latest version is 0.2.0alpha, it brings the Apache module, asdf package building, and a few small enhancements to the CLHP package.") + "The latest version is 0.2.0alpha, it brings the Apache +module, asdf package building, and a few small enhancements to the +CLHP package.") ("Mailing Lists" "
      -
    • clhp-devel List for Developer discussion and bug reports.
    • -
    • clhp-devel Announcements on Releases, patches, bug-fixes and general news.
    • -
    • clhp-cvs Reports on CVS activity.
    • +
    • + clhp-devel List for Developer discussion and bug reports.
    • +
    • + clhp-announce Announcements on Releases, patches, bug-fixes +and general news.
    • +
    • + clhp-cvs Reports on CVS activity.
    ") ("Documentation" - "Sorry, right now you're left to reading the source on how CLHP specific functions and variables work, but I'll have some basic documentation coming soon. If you want to see examples of CLHP in action, click the View-Source link at the top of any of the pages on this site."))) + "Sorry, right now you're left to reading the source on how +CLHP specific functions and variables work, but I'll have some basic +documentation coming soon. If you want to see examples of CLHP in +action, click the View-Source link at the top of any of the +pages on this site."))) @@ -46,7 +67,7 @@ From aventimiglia at common-lisp.net Fri Nov 14 22:32:21 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Fri, 14 Nov 2003 17:32:21 -0500 Subject: [clhp-cvs] CVS update: clhp/clhp.lisp clhp/clhp.asd clhp/TODO clhp/NEWS clhp/Makefile Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv31678 Modified Files: clhp.lisp clhp.asd TODO NEWS Makefile Log Message: Changes for 0.2.1alpha release Date: Fri Nov 14 17:32:20 2003 Author: aventimiglia Index: clhp/clhp.lisp diff -u clhp/clhp.lisp:1.21 clhp/clhp.lisp:1.22 --- clhp/clhp.lisp:1.21 Thu Nov 13 14:37:41 2003 +++ clhp/clhp.lisp Fri Nov 14 17:32:10 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: clhp.lisp,v 1.21 2003/11/13 19:37:41 aventimiglia Exp $") + "$Id: clhp.lisp,v 1.22 2003/11/14 22:32:10 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -28,8 +28,8 @@ ;; by changing the NIL in the first part of the OR, a release number ;; will override the CVS keyword (defconstant *CLHP-VERSION* - #.(or nil ; Set this for releases - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 19:37:41 $")) + #.(or "0.2.1alpha" ; Set this for releases + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/14 22:32:10 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) Index: clhp/clhp.asd diff -u clhp/clhp.asd:1.4 clhp/clhp.asd:1.5 --- clhp/clhp.asd:1.4 Thu Nov 13 00:10:40 2003 +++ clhp/clhp.asd Fri Nov 14 17:32:10 2003 @@ -1,4 +1,4 @@ -#+cmu (ext:file-comment "$Id: clhp.asd,v 1.4 2003/11/13 05:10:40 aventimiglia Exp $") +#+cmu (ext:file-comment "$Id: clhp.asd,v 1.5 2003/11/14 22:32:10 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -30,8 +30,8 @@ :name "net.common-lisp.aventimiglia.clhp" :author "Anthony Ventimiglia " :maintainer "Anthony Ventimiglia " - :version #.(or nil - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/13 05:10:40 $")) + :version #.(or "0.2.1alpha" + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/14 22:32:10 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) Index: clhp/TODO diff -u clhp/TODO:1.13 clhp/TODO:1.14 --- clhp/TODO:1.13 Wed Nov 12 23:57:44 2003 +++ clhp/TODO Fri Nov 14 17:32:11 2003 @@ -1,4 +1,6 @@ -$Id: TODO,v 1.13 2003/11/13 04:57:44 aventimiglia Exp $ -*- outline -*- +$Id: TODO,v 1.14 2003/11/14 22:32:11 aventimiglia Exp $ -*- outline -*- + +* Turn Header printing over to CLHP * Make a new installation method, more lisp based. part of this should do automatic versioning, or at least make Index: clhp/NEWS diff -u clhp/NEWS:1.4 clhp/NEWS:1.5 --- clhp/NEWS:1.4 Wed Nov 12 23:57:44 2003 +++ clhp/NEWS Fri Nov 14 17:32:12 2003 @@ -1,4 +1,11 @@ -$Id: NEWS,v 1.4 2003/11/13 04:57:44 aventimiglia Exp $ -*- outline -*- +$Id: NEWS,v 1.5 2003/11/14 22:32:12 aventimiglia Exp $ -*- outline -*- + +* Fri Nov 14 17:27:53 EST 2003 -- 0.2.1alpha release +** Fixed a Header problem + In the last release CLHP was generating Headers improperly. Now + Apache generates and sends the headers, which means that you can't + control the headers from inside a CLHP program. This will be fixed + in a later version. * Wed Nov 12 23:52:02 EST 2003 -- 0.2.0alpha release ** mod_clhp Index: clhp/Makefile diff -u clhp/Makefile:1.22 clhp/Makefile:1.23 --- clhp/Makefile:1.22 Thu Nov 13 00:10:40 2003 +++ clhp/Makefile Fri Nov 14 17:32:13 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.22 2003/11/13 05:10:40 aventimiglia Exp $ +# $Id: Makefile,v 1.23 2003/11/14 22:32:13 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -84,11 +84,11 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/11/13 05:10:40 $ | \ +CVSID=$(shell echo $Date: 2003/11/14 22:32:13 $ | \ awk '{print $$2}'| sed s/\\///g )cvs -VERSION=$(CVSID) -#VERSION=0.2.0alpha +#VERSION=$(CVSID) +VERSION=0.2.1alpha TARROOT=clhp-$(VERSION) TARBALL=$(TARROOT).tar.gz From aventimiglia at common-lisp.net Fri Nov 14 22:45:40 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Fri, 14 Nov 2003 17:45:40 -0500 Subject: [clhp-cvs] CVS update: clhp/clhp.lisp clhp/clhp.asd clhp/Makefile Message-ID: Update of /project/clhp/cvsroot/clhp In directory common-lisp.net:/tmp/cvs-serv4958 Modified Files: clhp.lisp clhp.asd Makefile Log Message: Versioning changes post release Date: Fri Nov 14 17:45:40 2003 Author: aventimiglia Index: clhp/clhp.lisp diff -u clhp/clhp.lisp:1.22 clhp/clhp.lisp:1.23 --- clhp/clhp.lisp:1.22 Fri Nov 14 17:32:10 2003 +++ clhp/clhp.lisp Fri Nov 14 17:45:39 2003 @@ -1,5 +1,5 @@ (ext:file-comment - "$Id: clhp.lisp,v 1.22 2003/11/14 22:32:10 aventimiglia Exp $") + "$Id: clhp.lisp,v 1.23 2003/11/14 22:45:39 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -28,8 +28,8 @@ ;; by changing the NIL in the first part of the OR, a release number ;; will override the CVS keyword (defconstant *CLHP-VERSION* - #.(or "0.2.1alpha" ; Set this for releases - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/14 22:32:10 $")) + #.(or nil ; Set this for releases + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/14 22:45:39 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) Index: clhp/clhp.asd diff -u clhp/clhp.asd:1.5 clhp/clhp.asd:1.6 --- clhp/clhp.asd:1.5 Fri Nov 14 17:32:10 2003 +++ clhp/clhp.asd Fri Nov 14 17:45:39 2003 @@ -1,4 +1,4 @@ -#+cmu (ext:file-comment "$Id: clhp.asd,v 1.5 2003/11/14 22:32:10 aventimiglia Exp $") +#+cmu (ext:file-comment "$Id: clhp.asd,v 1.6 2003/11/14 22:45:39 aventimiglia Exp $") ;; ;; CLHP the Common Lisp Hypertext Preprocessor ;; (C) 2003 Anthony J Ventimiglia @@ -30,8 +30,8 @@ :name "net.common-lisp.aventimiglia.clhp" :author "Anthony Ventimiglia " :maintainer "Anthony Ventimiglia " - :version #.(or "0.2.1alpha" - (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/14 22:32:10 $")) + :version #.(or nil + (let* ((trimmed (string-trim "$ Date:" "$Date: 2003/11/14 22:45:39 $")) (date (subseq trimmed 0 (search " " trimmed)))) (concatenate 'string (subseq date 0 4) Index: clhp/Makefile diff -u clhp/Makefile:1.23 clhp/Makefile:1.24 --- clhp/Makefile:1.23 Fri Nov 14 17:32:13 2003 +++ clhp/Makefile Fri Nov 14 17:45:39 2003 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.23 2003/11/14 22:32:13 aventimiglia Exp $ +# $Id: Makefile,v 1.24 2003/11/14 22:45:39 aventimiglia Exp $ # # CLHP the Common Lisp Hypertext Preprocessor # (C) 2003 Anthony J Ventimiglia @@ -84,11 +84,11 @@ # makefile most likeley will not match the cvs version ID in # clhp.lisp, since they depend on their own file's cvs date keyword. -CVSID=$(shell echo $Date: 2003/11/14 22:32:13 $ | \ +CVSID=$(shell echo $Date: 2003/11/14 22:45:39 $ | \ awk '{print $$2}'| sed s/\\///g )cvs -#VERSION=$(CVSID) -VERSION=0.2.1alpha +VERSION=$(CVSID) +#VERSION=0.2.1alpha TARROOT=clhp-$(VERSION) TARBALL=$(TARROOT).tar.gz From aventimiglia at common-lisp.net Tue Nov 25 19:46:10 2003 From: aventimiglia at common-lisp.net (Anthony Ventimiglia) Date: Tue, 25 Nov 2003 14:46:10 -0500 Subject: [clhp-cvs] CVS update: public_html/view-source.clhp public_html/style.css public_html/index.clhp public_html/funcs.lisp Message-ID: Update of /project/clhp/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv4859 Modified Files: view-source.clhp style.css index.clhp funcs.lisp Log Message: Modified to be used as static page until clhp is allowed to run on common-lisp.net Date: Tue Nov 25 14:46:09 2003 Author: aventimiglia Index: public_html/view-source.clhp diff -u public_html/view-source.clhp:1.2 public_html/view-source.clhp:1.3 --- public_html/view-source.clhp:1.2 Thu Nov 13 15:40:51 2003 +++ public_html/view-source.clhp Tue Nov 25 14:46:09 2003 @@ -7,7 +7,8 @@ (defun real-path (page) "Return the true path of URI" (concatenate 'string (gethash :DOCUMENT_ROOT *SERVER-ENV*) - page)) + (if (search "../" page) "/index.clhp" + page))) (defun webify (string) "This converts the offending characters in STRING to characters that @@ -18,8 +19,10 @@ (case char (#\< '(#\& #\l #\t #\;)) (#\& '(#\& #\a #\m #\p #\;)) - (otherwise (list char)))) - "
    ")) + (otherwise (list char)))))) +(defun fontify (string) + "Syntax Highlighting function" + string) (echon +doctype+) ?> @@ -32,9 +35,10 @@
     
     
    Index: public_html/style.css diff -u public_html/style.css:1.2 public_html/style.css:1.3 --- public_html/style.css:1.2 Thu Nov 13 12:24:40 2003 +++ public_html/style.css Tue Nov 25 14:46:09 2003 @@ -1,9 +1,7 @@ -/* Style code taken from oswd.net, this design originally by haran. -/* original header: -/* TITLE: Stylesheet for Purple Haze -/* URI : /purplehaze/purplehaze.css -/* MODIF: 2002-12-15 17:34 +0800 - +/* c + * $Id: style.css,v 1.3 2003/11/25 19:46:09 aventimiglia Exp $ + * + * This is a modification of the common-lisp.net stylesheet */ /* ###### Color Scheme ###### */ @@ -17,18 +15,18 @@ */ .headerSubTitle, .topOfPage, q, h1, h2, h3, .headerTitle, .siteMap, .siteMap *, .headerLinks, .headerLinks *, .sideBox div, #footer * -{ /* Text Color: */ color: /* #a0a0ff; */ #1111ff; } +{ /* Text Color: */ color: #3121c3; } q, h2, #header, .sideBox, .sideBox div, #footer -{ /* Border Color: */ border-color: #c0c0ff; } +{ /* Border Color: */ border-color: #21752c; } #header, .sideBox div, .sideBox a:hover -{ /* Background Color (darker): */ background-color: #f0f0ff; } +{ /* Background Color (darker): */ background-color: #8fc371; } -q, .sideBox a, .sideBox span, #footer +q, .sideBox a, .sideBox span, #footer, body /* Background Color (lighter): */ - { background-color: #fcfcff; } + { background-color: #fbffb1; } @@ -85,7 +83,6 @@ } .topOfPage { - font-size: 90%; font-weight: bold; font-variant: small-caps; text-decoration: none; @@ -99,21 +96,19 @@ } body { - background-color: white; - color: black; - font-family: "arial"; /* verdana, tahoma, helvetica, arial, sans-serif;*/ - font-size: 100%; + font-family: "verdana"; + font-size: 110%; margin: 0; } h1, h2, h3 { - font-family: "arial"; /* , sans-serif; */ + font-family: "verdana"; } h1 { font-weight: bold; font-size: 150%; - font-family: "arial"; + font-family: "verdana"; border-bottom: 1px solid; padding-bottom: 0.5ex; } @@ -121,7 +116,7 @@ h2 { font-weight: bold; font-size: 100%; - font-family: "arial"; + font-family: "verdana"; padding-bottom: 0.5ex; } @@ -142,7 +137,7 @@ } q { - font-family: "arial"; /* , verdana, helvetica, arial, sans-serif; */ + font-family: "verdane"; /* , verdana, helvetica, arial, sans-serif; */ font-weight: bold; border: 2px dotted; margin: 0 1em 1ex 1em; @@ -156,17 +151,17 @@ #header { border-bottom: 2px solid; - height: 6em; + height: 6.6em; margin-bottom: 5mm; padding: 2em 2.5mm 0 5mm; } .headerTitle { - font-size: 370%; + font-size: 390%; } .headerSubTitle { - font-size: 180%; + font-size: 220%; } .headerLinks { @@ -198,7 +193,6 @@ .siteMap * { text-decoration: none; -/* font-weight: bold; */ padding-right: 1ex; } @@ -210,8 +204,6 @@ /* ###### Side Box ###### */ .sideBox { - border-top: 2px solid; - border-bottom: 2px solid; margin-top: 5mm; } Index: public_html/index.clhp diff -u public_html/index.clhp:1.8 public_html/index.clhp:1.9 --- public_html/index.clhp:1.8 Thu Nov 13 15:40:51 2003 +++ public_html/index.clhp Tue Nov 25 14:46:09 2003 @@ -47,12 +47,13 @@
  • clhp-cvs Reports on CVS activity.
  • ") - ("Documentation" - "Sorry, right now you're left to reading the source on how -CLHP specific functions and variables work, but I'll have some basic -documentation coming soon. If you want to see examples of CLHP in -action, click the View-Source link at the top of any of the -pages on this site."))) +; ("Documentation" +; "Sorry, right now you're left to reading the source on how +;CLHP specific functions and variables work, but I'll have some basic +;documentation coming soon. If you want to see examples of CLHP in +;action, click the View-Source link at the top of any of the +;pages on this site.") + )) @@ -67,7 +68,7 @@ Index: public_html/funcs.lisp diff -u public_html/funcs.lisp:1.5 public_html/funcs.lisp:1.6 --- public_html/funcs.lisp:1.5 Thu Nov 13 15:06:14 2003 +++ public_html/funcs.lisp Tue Nov 25 14:46:09 2003 @@ -1,4 +1,4 @@ -;; $Id: funcs.lisp,v 1.5 2003/11/13 20:06:14 aventimiglia Exp $ +;; $Id: funcs.lisp,v 1.6 2003/11/25 19:46:09 aventimiglia Exp $ ;; ;; Functions used on clhp website ;; at http://common-lisp.net/project/clhp @@ -13,7 +13,9 @@ (in-package :www) (defconstant +doctype+ "") + (defconstant +stylesheet+ "style.css") + (defconstant +header-links+ '(("http://common-lisp.net/" "Common-Lisp.net"))) @@ -29,8 +31,6 @@ list, where the CAR is the Section name and the CDR is the content.") -(declaim (inline echon head)) - (defun echon (&rest args) (apply #'echo (nconc args '(#\NewLine)))) @@ -56,11 +56,11 @@ (tag '|span| '|class| "headerSubTitle" subtitle) (tag '|div| '|class| "headerLinks" (make-links +header-links+)) (tag '|div| '|class| "siteMap" - (make-links - (append +site-links+ - (list (list (format nil "/view-source.clhp?page=~A" - (gethash :script_name *server-env*)) - "View-Source")))))))) + (make-links +site-links+))))) +; (append +site-links+ +; (list (list (format nil "/view-source.clhp?page=~A" +; (gethash :script_name *server-env*)) +; "View-Source")))))))) (defun page-body (cvs-date) (list @@ -93,7 +93,7 @@ (defun page-menu () (if *page-sections* - (tag '|div| '|class| "sideBox LHS" + (tag '|div| '|class| "sideBox RHS" (make-links (loop for section in *page-sections* collect (let ((name (car section))) (list (format nil "#~A" name) name)))))