From bknr at bknr.net Fri Dec 1 10:37:34 2006 From: bknr at bknr.net (bknr at bknr.net) Date: Fri, 1 Dec 2006 05:37:34 -0500 (EST) Subject: [bknr-cvs] r2093 - branches Message-ID: <20061201103734.97D5056006@common-lisp.net> Author: hhubner Date: 2006-12-01 05:37:34 -0500 (Fri, 01 Dec 2006) New Revision: 2093 Added: branches/grin-neu/ Log: Add branch for GRiN development, moving to SBCL Copied: branches/grin-neu (from rev 2092, trunk) From bknr at bknr.net Fri Dec 1 10:39:53 2006 From: bknr at bknr.net (bknr at bknr.net) Date: Fri, 1 Dec 2006 05:39:53 -0500 (EST) Subject: [bknr-cvs] r2094 - in branches/grin-neu: bknr/src bknr/src/utils bknr/src/web bknr/src/xml-impex projects/bos/payment-website/templates/da projects/bos/worldpay-test projects/mah-jongg/src projects/mah-jongg/website site thirdparty thirdparty/cl-ppcre thirdparty/cl-ppcre/doc thirdparty/cxml thirdparty/cxml/contrib thirdparty/cxml/doc thirdparty/cxml/dom thirdparty/cxml/runes thirdparty/cxml/test thirdparty/cxml/xml thirdparty/cxml/xml/sax-tests thirdparty/emacs/slime thirdparty/kmrcl-1.72 thirdparty/net-telent-date thirdparty/net.post-office thirdparty/portableaserve/acl-compat/sbcl thirdparty/portableaserve/aserve thirdparty/puri thirdparty/trivial-gray-streams thirdparty/trivial-gray-streams/CVS thirdparty/uffi/src/corman thirdparty/uffi/tests tools Message-ID: <20061201103953.C6DB656006@common-lisp.net> Author: hhubner Date: 2006-12-01 05:39:49 -0500 (Fri, 01 Dec 2006) New Revision: 2094 Added: branches/grin-neu/thirdparty/cxml/COPYING branches/grin-neu/thirdparty/cxml/DOMTEST branches/grin-neu/thirdparty/cxml/GNUmakefile branches/grin-neu/thirdparty/cxml/OLDNEWS branches/grin-neu/thirdparty/cxml/XMLCONF branches/grin-neu/thirdparty/cxml/XMLS-SYMBOLS.diff branches/grin-neu/thirdparty/cxml/contrib/ branches/grin-neu/thirdparty/cxml/contrib/xhtmlgen.lisp branches/grin-neu/thirdparty/cxml/doc/ branches/grin-neu/thirdparty/cxml/doc/bg.png branches/grin-neu/thirdparty/cxml/doc/cxml.css branches/grin-neu/thirdparty/cxml/doc/dom.html branches/grin-neu/thirdparty/cxml/doc/installation.html branches/grin-neu/thirdparty/cxml/doc/quickstart.html branches/grin-neu/thirdparty/cxml/doc/using.html branches/grin-neu/thirdparty/cxml/doc/xmls-compat.html branches/grin-neu/thirdparty/cxml/glisp/ branches/grin-neu/thirdparty/cxml/runes/definline.lisp branches/grin-neu/thirdparty/cxml/runes/definline.x86f branches/grin-neu/thirdparty/cxml/runes/utf8.lisp branches/grin-neu/thirdparty/cxml/runes/ystream.lisp branches/grin-neu/thirdparty/cxml/test/utf8domtest.diff branches/grin-neu/thirdparty/cxml/xml/sax-proxy.lisp branches/grin-neu/thirdparty/cxml/xml/space-normalizer.lisp branches/grin-neu/thirdparty/cxml/xml/util.lisp branches/grin-neu/thirdparty/cxml/xml/xmlns-normalizer.lisp branches/grin-neu/thirdparty/net-telent-date/ branches/grin-neu/thirdparty/net-telent-date/CVS/ branches/grin-neu/thirdparty/net-telent-date/INSTALL.asdf branches/grin-neu/thirdparty/net-telent-date/README branches/grin-neu/thirdparty/net-telent-date/date.lisp branches/grin-neu/thirdparty/net-telent-date/defpackage.lisp branches/grin-neu/thirdparty/net-telent-date/maintainer-Makefile branches/grin-neu/thirdparty/net-telent-date/make-makefile.lisp branches/grin-neu/thirdparty/net-telent-date/net-telent-date.asd branches/grin-neu/thirdparty/net-telent-date/net-telent-date.system branches/grin-neu/thirdparty/net-telent-date/parse-time.lisp branches/grin-neu/thirdparty/net-telent-date/tests.lisp branches/grin-neu/thirdparty/puri/ branches/grin-neu/thirdparty/puri/LICENSE branches/grin-neu/thirdparty/puri/README branches/grin-neu/thirdparty/puri/puri.asd branches/grin-neu/thirdparty/puri/src.lisp branches/grin-neu/thirdparty/puri/tests.lisp branches/grin-neu/thirdparty/puri/uri.html branches/grin-neu/thirdparty/trivial-gray-streams/ branches/grin-neu/thirdparty/trivial-gray-streams/COPYING branches/grin-neu/thirdparty/trivial-gray-streams/CVS/ branches/grin-neu/thirdparty/trivial-gray-streams/CVS/Entries branches/grin-neu/thirdparty/trivial-gray-streams/CVS/Repository branches/grin-neu/thirdparty/trivial-gray-streams/CVS/Root branches/grin-neu/thirdparty/trivial-gray-streams/CVS/Template branches/grin-neu/thirdparty/trivial-gray-streams/Makefile branches/grin-neu/thirdparty/trivial-gray-streams/README branches/grin-neu/thirdparty/trivial-gray-streams/mixin.lisp branches/grin-neu/thirdparty/trivial-gray-streams/package.lisp branches/grin-neu/thirdparty/trivial-gray-streams/trivial-gray-streams.asd Removed: branches/grin-neu/thirdparty/cl-ppcre/testdata branches/grin-neu/thirdparty/cl-ppcre/testinput Modified: branches/grin-neu/bknr/src/bknr-utils.asd branches/grin-neu/bknr/src/bknr.asd branches/grin-neu/bknr/src/packages.lisp branches/grin-neu/bknr/src/utils/package.lisp branches/grin-neu/bknr/src/web/handlers.lisp branches/grin-neu/bknr/src/web/templates.lisp branches/grin-neu/bknr/src/xml-impex/package.lisp branches/grin-neu/bknr/src/xml-impex/xml-export.lisp branches/grin-neu/bknr/src/xml-impex/xml-import.lisp branches/grin-neu/projects/bos/payment-website/templates/da/bestellung.xml branches/grin-neu/projects/bos/worldpay-test/tags.lisp branches/grin-neu/projects/mah-jongg/src/game.lisp branches/grin-neu/projects/mah-jongg/website/game.xsl branches/grin-neu/site/svn-config branches/grin-neu/thirdparty/cl-ppcre/CHANGELOG branches/grin-neu/thirdparty/cl-ppcre/api.lisp branches/grin-neu/thirdparty/cl-ppcre/cl-ppcre-test.asd branches/grin-neu/thirdparty/cl-ppcre/cl-ppcre-test.system branches/grin-neu/thirdparty/cl-ppcre/cl-ppcre.asd branches/grin-neu/thirdparty/cl-ppcre/cl-ppcre.system branches/grin-neu/thirdparty/cl-ppcre/closures.lisp branches/grin-neu/thirdparty/cl-ppcre/convert.lisp branches/grin-neu/thirdparty/cl-ppcre/doc/index.html branches/grin-neu/thirdparty/cl-ppcre/errors.lisp branches/grin-neu/thirdparty/cl-ppcre/lexer.lisp branches/grin-neu/thirdparty/cl-ppcre/lispworks-defsystem.lisp branches/grin-neu/thirdparty/cl-ppcre/load.lisp branches/grin-neu/thirdparty/cl-ppcre/optimize.lisp branches/grin-neu/thirdparty/cl-ppcre/packages.lisp branches/grin-neu/thirdparty/cl-ppcre/parser.lisp branches/grin-neu/thirdparty/cl-ppcre/ppcre-tests.lisp branches/grin-neu/thirdparty/cl-ppcre/regex-class.lisp branches/grin-neu/thirdparty/cl-ppcre/repetition-closures.lisp branches/grin-neu/thirdparty/cl-ppcre/scanner.lisp branches/grin-neu/thirdparty/cl-ppcre/specials.lisp branches/grin-neu/thirdparty/cl-ppcre/util.lisp branches/grin-neu/thirdparty/cxml/README.html branches/grin-neu/thirdparty/cxml/catalog.dtd branches/grin-neu/thirdparty/cxml/cxml.asd branches/grin-neu/thirdparty/cxml/dom/dom-builder.lisp branches/grin-neu/thirdparty/cxml/dom/dom-impl.lisp branches/grin-neu/thirdparty/cxml/dom/dom-sax.lisp branches/grin-neu/thirdparty/cxml/dom/package.lisp branches/grin-neu/thirdparty/cxml/mlisp-patch.diff branches/grin-neu/thirdparty/cxml/runes/characters.lisp branches/grin-neu/thirdparty/cxml/runes/encodings-data.lisp branches/grin-neu/thirdparty/cxml/runes/encodings.lisp branches/grin-neu/thirdparty/cxml/runes/package.lisp branches/grin-neu/thirdparty/cxml/runes/runes.lisp branches/grin-neu/thirdparty/cxml/runes/syntax.lisp branches/grin-neu/thirdparty/cxml/runes/xstream.lisp branches/grin-neu/thirdparty/cxml/test/domtest.lisp branches/grin-neu/thirdparty/cxml/test/xmlconf.lisp branches/grin-neu/thirdparty/cxml/xml/catalog.lisp branches/grin-neu/thirdparty/cxml/xml/package.lisp branches/grin-neu/thirdparty/cxml/xml/recoder.lisp branches/grin-neu/thirdparty/cxml/xml/sax-handler.lisp branches/grin-neu/thirdparty/cxml/xml/sax-tests/tests.lisp branches/grin-neu/thirdparty/cxml/xml/unparse.lisp branches/grin-neu/thirdparty/cxml/xml/xml-name-rune-p.lisp branches/grin-neu/thirdparty/cxml/xml/xml-parse.lisp branches/grin-neu/thirdparty/cxml/xml/xmls-compat.lisp branches/grin-neu/thirdparty/emacs/slime/swank-loader.x86f branches/grin-neu/thirdparty/kmrcl-1.72/byte-stream.lisp branches/grin-neu/thirdparty/kmrcl-1.72/kmrcl.asd branches/grin-neu/thirdparty/net.post-office/net.post-office.asd branches/grin-neu/thirdparty/net.post-office/packages.lisp branches/grin-neu/thirdparty/portableaserve/acl-compat/sbcl/acl-excl.lisp branches/grin-neu/thirdparty/portableaserve/acl-compat/sbcl/acl-mp.lisp branches/grin-neu/thirdparty/portableaserve/acl-compat/sbcl/acl-socket.lisp branches/grin-neu/thirdparty/portableaserve/aserve/main.cl branches/grin-neu/thirdparty/uffi/src/corman/getenv-ccl.lisp branches/grin-neu/thirdparty/uffi/tests/package.lisp branches/grin-neu/tools/make-core.lisp Log: SBCL-1.0 compatibility changes and package updates. Modified: branches/grin-neu/bknr/src/bknr-utils.asd =================================================================== --- branches/grin-neu/bknr/src/bknr-utils.asd 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/bknr-utils.asd 2006-12-01 10:39:49 UTC (rev 2094) @@ -18,7 +18,8 @@ :depends-on (:cl-interpol :cl-ppcre :cxml - :md5 + #-sbcl :md5 + #+sbcl :sb-md5 #+(not allegro) :acl-compat :iconv) Modified: branches/grin-neu/bknr/src/bknr.asd =================================================================== --- branches/grin-neu/bknr/src/bknr.asd 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/bknr.asd 2006-12-01 10:39:49 UTC (rev 2094) @@ -24,7 +24,8 @@ :cl-gd :aserve ;:net.post-office - :md5 + #-sbcl :md5 + #+sbcl :sb-md5 :cxml :unit-test :bknr-utils Modified: branches/grin-neu/bknr/src/packages.lisp =================================================================== --- branches/grin-neu/bknr/src/packages.lisp 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/packages.lisp 2006-12-01 10:39:49 UTC (rev 2094) @@ -113,7 +113,8 @@ :cl-user :cl-interpol :cl-ppcre - :md5 + #+cmu :md5 + #+sbcl :sb-md5 :bknr.datastore :bknr.indices :bknr.utils @@ -183,7 +184,8 @@ :cxml-xmls :xhtml-generator :puri - :md5 + #+cmu :md5 + #+sbcl :sb-md5 :js :bknr.datastore :bknr.indices Modified: branches/grin-neu/bknr/src/utils/package.lisp =================================================================== --- branches/grin-neu/bknr/src/utils/package.lisp 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/utils/package.lisp 2006-12-01 10:39:49 UTC (rev 2094) @@ -5,7 +5,8 @@ :cl-ppcre :cl-interpol :cxml-xmls - :md5 + #+cmu :md5 + #+sbcl :sb-md5 #+cmu :extensions ; #+sbcl :sb-ext #+(not allegro) :acl-compat.mp Modified: branches/grin-neu/bknr/src/web/handlers.lisp =================================================================== --- branches/grin-neu/bknr/src/web/handlers.lisp 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/web/handlers.lisp 2006-12-01 10:39:49 UTC (rev 2094) @@ -449,8 +449,7 @@ (defgeneric xml-object-handler-show-object (handler object req)) (defmethod xml-object-handler-show-object ((handler xml-object-handler) object req) - (write-to-xml object - :string-rod-fn #'cxml::utf8-string-to-rod)) + (write-to-xml object)) (defmethod handle-object ((handler xml-object-handler) object req) (xml-object-handler-show-object handler object req)) Modified: branches/grin-neu/bknr/src/web/templates.lisp =================================================================== --- branches/grin-neu/bknr/src/web/templates.lisp 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/web/templates.lisp 2006-12-01 10:39:49 UTC (rev 2094) @@ -11,6 +11,7 @@ ;; FreeBSD "/usr/local/share/xml/catalog.ports")) +#-sbcl (eval-when (:load-toplevel :execute) (let ((env-catalog (assoc :xmlcatalog ext:*environment-list*))) (when env-catalog Modified: branches/grin-neu/bknr/src/xml-impex/package.lisp =================================================================== --- branches/grin-neu/bknr/src/xml-impex/package.lisp 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/xml-impex/package.lisp 2006-12-01 10:39:49 UTC (rev 2094) @@ -24,5 +24,7 @@ #:with-xml-export* #:write-to-xml + #:set-string-rod-fn + #:create-instance #:set-slot-value)) Modified: branches/grin-neu/bknr/src/xml-impex/xml-export.lisp =================================================================== --- branches/grin-neu/bknr/src/xml-impex/xml-export.lisp 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/xml-impex/xml-export.lisp 2006-12-01 10:39:49 UTC (rev 2094) @@ -1,5 +1,10 @@ (in-package :bknr.impex) +(defvar *string-rod-fn* #'cxml::string-rod) + +(defun set-string-rod-fn (function) + (setf *string-rod-fn* function)) + (defmethod slot-serialize-value ((slot xml-effective-slot-definition) value) (with-slots (serializer object-to-id) slot (when object-to-id @@ -12,7 +17,7 @@ (defmacro with-xml-export* ((&key output indentation canonical) &body body) `(let ((*objects-written* (make-hash-table :test #'equal)) (cxml::*sink* (cxml:make-character-stream-sink ,output - :indentation ,indentation :canonical ,canonical))) + :indentation ,indentation :canonical ,canonical))) , at body)) (defmacro with-xml-export (nil &body body) @@ -26,23 +31,23 @@ (declare (ignore name))) (defmethod write-to-xml ((object list) &key (name (error "Can not serialize list to XML without an element name~%")) no-recurse) - (sax:start-element cxml::*sink* nil nil (cxml::string-rod name) nil) + (sax:start-element cxml::*sink* nil nil (funcall *string-rod-fn* name) nil) (dolist (obj object) (write-to-xml obj)) - (sax:end-element cxml::*sink* nil nil (cxml::string-rod name))) + (sax:end-element cxml::*sink* nil nil (funcall *string-rod-fn* name))) (defmethod write-to-xml ((object string) &key (name (error "Can not serialize string ~A to XML without an element name." object)) no-recurse) - (sax:start-element cxml::*sink* nil nil (cxml::string-rod name) nil) - (sax:characters cxml::*sink* (cxml::string-rod object)) - (sax:end-element cxml::*sink* nil nil (cxml::string-rod name))) + (sax:start-element cxml::*sink* nil nil (funcall *string-rod-fn* name) nil) + (sax:characters cxml::*sink* (funcall *string-rod-fn* object)) + (sax:end-element cxml::*sink* nil nil (funcall *string-rod-fn* name))) (defun write-object-reference (class object unique-id-slot-name name) (let ((slotdef (find unique-id-slot-name (class-slots class) :key #'slot-definition-name))) (unless (xml-effective-slot-definition-attribute slotdef) (error "Slot ~A is not defined as :attribute slot and cannot be used as unique-id slot for class ~A" unique-id-slot-name (class-name class))) (sax:start-element cxml::*sink* nil nil name - (list (sax:make-attribute :qname (cxml::string-rod (xml-effective-slot-definition-attribute slotdef)) - :value (cxml::string-rod (slot-serialize-value slotdef (slot-value object unique-id-slot-name)))))) + (list (sax:make-attribute :qname (funcall *string-rod-fn* (xml-effective-slot-definition-attribute slotdef)) + :value (funcall *string-rod-fn* (slot-serialize-value slotdef (slot-value object unique-id-slot-name)))))) (sax:end-element cxml::*sink* nil nil name))) (defmethod write-to-xml ((object t) &key name no-recurse) @@ -50,7 +55,7 @@ (cond ((typep class 'xml-class) (xml-object-check-validity object) - (let ((qname (cxml::string-rod (or name (xml-class-element class))))) + (let ((qname (funcall *string-rod-fn* (or name (xml-class-element class))))) ;; If this object has been serialized to the XML stream, ;; write a reference to the object and return. @@ -72,13 +77,13 @@ ;; attributes (attributes (loop for slot in attr-slots for name = (slot-definition-name slot) - for attdef = (cxml::string-rod (xml-effective-slot-definition-attribute slot)) + for attdef = (funcall *string-rod-fn* (xml-effective-slot-definition-attribute slot)) when (and (slot-boundp object name) (slot-value object name)) collect (sax:make-attribute :qname attdef :value - (cxml::string-rod + (funcall *string-rod-fn* (slot-serialize-value slot (slot-value object name))))))) (sax:start-element cxml::*sink* nil nil qname attributes) @@ -104,9 +109,9 @@ (when (slot-boundp object name) (sax:characters cxml::*sink* - (cxml::string-rod + (funcall *string-rod-fn* (funcall (xml-effective-slot-definition-serializer body-slot) (slot-value object name))))))) (sax:end-element cxml::*sink* nil nil qname)))) - (t nil))))) + (t nil)))) Modified: branches/grin-neu/bknr/src/xml-impex/xml-import.lisp =================================================================== --- branches/grin-neu/bknr/src/xml-impex/xml-import.lisp 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/bknr/src/xml-impex/xml-import.lisp 2006-12-01 10:39:49 UTC (rev 2094) @@ -185,3 +185,14 @@ :class-hash class-hash))) (cxml:parse-file xml-file (cxml:make-recoder importer recoder)) (importer-root-elt importer)))) + +(defun parse-xml-string (string classes &key (recoder #'cxml::rod-string) + (importer-class 'xml-class-importer)) + (with-input-from-string (stream string) + (let ((class-hash (make-hash-table :test #'equal))) + (dolist (class classes) + (setf (gethash (xml-class-element class) class-hash) class)) + (let ((importer (make-instance importer-class + :class-hash class-hash))) + (cxml:parse-stream stream (cxml:make-recoder importer recoder)) + (importer-root-elt importer))))) \ No newline at end of file Modified: branches/grin-neu/projects/bos/payment-website/templates/da/bestellung.xml =================================================================== --- branches/grin-neu/projects/bos/payment-website/templates/da/bestellung.xml 2006-12-01 10:37:34 UTC (rev 2093) +++ branches/grin-neu/projects/bos/payment-website/templates/da/bestellung.xml 2006-12-01 10:39:49 UTC (rev 2094) @@ -19,7 +19,7 @@