Various fixes to case-dependent code, in order to allow CLASH to work

with Allegro CL in "modern" mode.  Although we don't think that
"modern" mode is the correct approach to case-sensitivity in CL, the
changes we made should also make it easier to work in ANSI-compliant
implementations/modes, with all the settings for readtable-case.  Note
though that this is a first best effort attempt, and so further
case-ification bugs might still remain.  YMMV.
This commit is contained in:
2001-02-07 13:31:29 +00:00
parent 88ec83c086
commit 57583b37ce
6 changed files with 34 additions and 30 deletions

View File

@ -7,7 +7,7 @@
;;;; Checkout Tag: $Name$ ;;;; Checkout Tag: $Name$
;;;; $Id$ ;;;; $Id$
(in-package :MAKE) (in-package :make)
;;;; %File Description: ;;;; %File Description:
;;;; ;;;;
@ -25,11 +25,11 @@
:source-pathname "" :source-pathname ""
:components ((:file "package") :components ((:file "package")
(:file "utility" :depends-on ("package")) (:file "utility" :depends-on ("package"))
#+CMU #+cmu
(:file "cmu-locking" :depends-on ("package")) (:file "cmu-locking" :depends-on ("package"))
#+LISPWORKS4.1 #+lispworks4.1
(:file "lwl-locking" :depends-on ("package")) (:file "lwl-locking" :depends-on ("package"))
#+ALLEGRO #+allegro
(:file "acl-locking" :depends-on ("package")))) (:file "acl-locking" :depends-on ("package"))))
(:module "main" (:module "main"
:source-pathname "main" :source-pathname "main"
@ -79,10 +79,10 @@
:depends-on ("base")) :depends-on ("base"))
(:module "driver" (:module "driver"
:source-pathname "drivers" :source-pathname "drivers"
:components (#+CMU :components (#+cmu
(:file "simple-cmu") (:file "simple-cmu")
#+LISPWORKS4.1 #+lispworks4.1
(:file "simple-lwl") (:file "simple-lwl")
#+ALLEGRO #+allegro
(:file "simple-acl")) (:file "simple-acl"))
:depends-on ("base" "main")))) :depends-on ("base" "main"))))

View File

@ -21,7 +21,7 @@
"CLASH error: ~?~& Possible HTTP status code: ~D (~A)." "CLASH error: ~?~& Possible HTTP status code: ~D (~A)."
fmt args fmt args
(clash-error-code condition) (clash-error-code condition)
(HTTP-code-description (clash-error-code condition)))) (HTTP-Code-Description (clash-error-code condition))))
(define-condition clash-error (error) (define-condition clash-error (error)
((code :initarg :code :initform +HTTP-Code-Internal-Server-Error+ ((code :initarg :code :initform +HTTP-Code-Internal-Server-Error+

View File

@ -575,23 +575,23 @@
(defconstant +HTTP-Code-Symbols+ (defconstant +HTTP-Code-Symbols+
'(+HTTP-CODE-NO-CONTENT+ +HTTP-CODE-GATEWAY-TIMEOUT+ '(+HTTP-Code-No-Content+ +HTTP-Code-Gateway-Timeout+
+HTTP-CODE-REQUEST-URI-TOO-LONG+ +HTTP-CODE-NON-AUTHORITATIVE-INFORMATION+ +HTTP-Code-Request-URI-Too-Long+ +HTTP-Code-Non-Authoritative-Information+
+HTTP-CODE-USE-PROXY+ +HTTP-CODE-SERVICE-UNAVAILABLE+ +HTTP-Code-Use-Proxy+ +HTTP-Code-Service-Unavailable+
+HTTP-CODE-BAD-REQUEST+ +HTTP-CODE-MULTIPLE-CHOICES+ +HTTP-Code-Bad-Request+ +HTTP-Code-Multiple-Choices+
+HTTP-CODE-SWITCHING-PROTOCOLS+ +HTTP-CODE-CREATED+ +HTTP-CODE-UNAUTHORIZED+ +HTTP-Code-Switching-Protocols+ +HTTP-Code-Created+ +HTTP-Code-Unauthorized+
+HTTP-CODE-BAD-GATEWAY+ +HTTP-CODE-FORBIDDEN+ +HTTP-CODE-CONFLICT+ +HTTP-Code-Bad-Gateway+ +HTTP-Code-Forbidden+ +HTTP-Code-Conflict+
+HTTP-CODE-CONTINUE+ +HTTP-CODE-INTERNAL-SERVER-ERROR+ +HTTP-Code-Continue+ +HTTP-Code-Internal-Server-Error+
+HTTP-CODE-RESET-CONTENT+ +HTTP-CODE-PRECONDITION-FAILED+ +HTTP-Code-Reset-Content+ +HTTP-Code-Precondition-Failed+
+HTTP-CODE-UNSUPPORTED-MEDIA-TYPE+ +HTTP-CODE-OK+ +HTTP-Code-Unsupported-Media-Type+ +HTTP-Code-OK+
+HTTP-CODE-METHOD-NOT-ALLOWED+ +HTTP-CODE-LENGTH-REQUIRED+ +HTTP-Code-Method-Not-Allowed+ +HTTP-Code-Length-Required+
+HTTP-CODE-REQUEST-ENTITY-TOO-LARGE+ +HTTP-CODE-MOVED-TEMPORARILY+ +HTTP-Code-Request-Entity-Too-Large+ +HTTP-Code-Moved-Temporarily+
+HTTP-CODE-NOT-FOUND+ +HTTP-CODE-NOT-MODIFIED+ +HTTP-Code-Not-Found+ +HTTP-Code-Not-Modified+
+HTTP-CODE-HTTP-VERSION-NOT-SUPPORTED+ +HTTP-CODE-PARTIAL-CONTENT+ +HTTP-Code-HTTP-Version-Not-Supported+ +HTTP-Code-Partial-Content+
+HTTP-CODE-PAYMENT-REQUIRED+ +HTTP-CODE-PROXY-AUTHENTICATION-REQUIRED+ +HTTP-Code-Payment-Required+ +HTTP-Code-Proxy-Authentication-Required+
+HTTP-CODE-ACCEPTED+ +HTTP-CODE-NOT-ACCEPTABLE+ +HTTP-Code-Accepted+ +HTTP-Code-Not-Acceptable+
+HTTP-CODE-MOVED-PERMANENTLY+ +HTTP-CODE-REQUEST-TIMEOUT+ +HTTP-Code-Moved-Permanently+ +HTTP-Code-Request-Timeout+
+HTTP-CODE-NOT-IMPLEMENTED+ +HTTP-CODE-SEE-OTHER+ +HTTP-CODE-GONE+) +HTTP-Code-Not-Implemented+ +HTTP-Code-See-Other+ +HTTP-Code-Gone+)
"List of all HTTP-Code symbols.") "List of all HTTP-Code symbols.")
(defun HTTP-Code-Description (code) (defun HTTP-Code-Description (code)

View File

@ -127,8 +127,8 @@ indicates the presence of authority information.")
(defmacro def-uri-char-p (name char &body body) (defmacro def-uri-char-p (name char &body body)
"Declares an inlined predicate function on characters that is named "Declares an inlined predicate function on characters that is named
`URI-name-CHAR-P', has a lambda list of (char) and the body body." `uri-name-char-p', has a lambda list of (char) and the body body."
(let ((realname (intern (format nil "URI-~A-CHAR-P" (symbol-name name)) (let ((realname (intern (concatenate-symbol-names '#:uri- name '#:-char-p)
(symbol-package name)))) (symbol-package name))))
`(progn `(progn
(declaim (inline ,realname)) (declaim (inline ,realname))

View File

@ -6,15 +6,15 @@
;;;; Checkout Tag: $Name$ ;;;; Checkout Tag: $Name$
;;;; $Id$ ;;;; $Id$
(in-package :CL-USER) (in-package :cl-user)
;;;; %File Description: ;;;; %File Description:
;;;; ;;;;
;;;; ;;;;
;;;; ;;;;
(defpackage "CLASH" (defpackage :CLASH
(:use :CL #+(and :CMU :MP) :MP) (:use :cl #+(and :cmu :mp) :mp)
(:export (:export
;; Status Codes ;; Status Codes
#:+HTTP-Code-Continue+ #:+HTTP-Code-Continue+

View File

@ -91,3 +91,7 @@ All other keywords work analogously to those for CL:POSITION."
(funcall predicate x)) (funcall predicate x))
keys)) keys))
;;; Symbol hacking stuff
(defun concatenate-symbol-names (&rest symbols)
(apply #'concatenate 'string (mapcar #'symbol-name symbols)))