From 1fd6a8c66e5b01705107cccc76ba9a63fed88b17 Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Sun, 13 Oct 2002 15:53:24 +0000 Subject: [PATCH] Got rid of non-ANSI compliant DEFCONSTANT forms. --- ansi-tests/ansi-aux.lsp | 28 +++++++++++++++++++--------- ansi-tests/cl-symbols.lsp | 2 +- ansi-tests/defconstant.lsp | 4 +++- ansi-tests/random-intern.lsp | 8 -------- ansi-tests/types-and-class.lsp | 3 ++- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/ansi-tests/ansi-aux.lsp b/ansi-tests/ansi-aux.lsp index 064c59ac..bd888ea0 100644 --- a/ansi-tests/ansi-aux.lsp +++ b/ansi-tests/ansi-aux.lsp @@ -215,19 +215,29 @@ the condition to go uncaught if it cannot be classified." (rotatef (elt seq r) (elt seq (1- i)))))) seq) -(defconstant +standard-chars+ +(defparameter +standard-chars+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~!@#$%^&*()_+|\\=-`{}[]:\";'<>?,./ ") -(defconstant +alpha-chars+ (subseq +standard-chars+ 0 52)) -(defconstant +lower-case-chars+ (subseq +alpha-chars+ 0 26)) -(defconstant +upper-case-chars+ (subseq +alpha-chars+ 26 52)) -(defconstant +alphanumeric-chars+ (subseq +standard-chars+ 0 62)) -(defconstant +digit-chars+ "0123456789") -(defconstant +extended-digit-chars+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") -(defconstant +code-chars+ +(defparameter + +base-chars+ #.(concatenate 'string + "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789" + "<,>.?/\"':;[{]}~`!@#$%^&*()_-+= \\|")) + +(defparameter +num-base-chars+ (length +base-chars+)) + + +(defparameter +alpha-chars+ (subseq +standard-chars+ 0 52)) +(defparameter +lower-case-chars+ (subseq +alpha-chars+ 0 26)) +(defparameter +upper-case-chars+ (subseq +alpha-chars+ 26 52)) +(defparameter +alphanumeric-chars+ (subseq +standard-chars+ 0 62)) +(defparameter +digit-chars+ "0123456789") +(defparameter +extended-digit-chars+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") +(defparameter +code-chars+ (coerce (loop for i from 0 below 256 for c = (code-char i) when c collect c) 'string)) -(defconstant +rev-code-chars+ (reverse +code-chars+)) +(defparameter +rev-code-chars+ (reverse +code-chars+)) diff --git a/ansi-tests/cl-symbols.lsp b/ansi-tests/cl-symbols.lsp index 1fde8ac5..6bcf2bfe 100644 --- a/ansi-tests/cl-symbols.lsp +++ b/ansi-tests/cl-symbols.lsp @@ -1048,7 +1048,7 @@ ;;; See section 3.1.2.1.2.1 -(defconstant +special-operators+ +(defparameter +special-operators+ '(block let* return-from catch load-time-value setq eval-when locally symbol-macrolet flet macrolet tagbody function multiple-value-call the go multiple-value-prog1 throw if diff --git a/ansi-tests/defconstant.lsp b/ansi-tests/defconstant.lsp index 825226c9..50760ca3 100644 --- a/ansi-tests/defconstant.lsp +++ b/ansi-tests/defconstant.lsp @@ -19,7 +19,9 @@ (documentation 'test-constant-1 'variable) nil) -(defconstant test-constant-2 'a "This is the documentation.") +(defconstant test-constant-2 'a + (if (boundp test-constant-2) test-constant-2 + "This is the documentation.")) (deftest defconstant.4 (documentation 'test-constant-2 'variable) diff --git a/ansi-tests/random-intern.lsp b/ansi-tests/random-intern.lsp index 2688cad2..80bda183 100644 --- a/ansi-tests/random-intern.lsp +++ b/ansi-tests/random-intern.lsp @@ -5,14 +5,6 @@ (in-package :cl-test) -(defconstant - +base-chars+ #.(concatenate 'string - "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789" - "<,>.?/\"':;[{]}~`!@#$%^&*()_-+= \\|")) -(defconstant +num-base-chars+ (length +base-chars+)) - (defconstant +max-len-random-symbol+ 63) (defun make-random-symbol (package) diff --git a/ansi-tests/types-and-class.lsp b/ansi-tests/types-and-class.lsp index 9e4e3637..2ebae61f 100644 --- a/ansi-tests/types-and-class.lsp +++ b/ansi-tests/types-and-class.lsp @@ -156,7 +156,8 @@ *subtype-table*) 0) -(defconstant +float-types+ '(long-float double-float short-float single-float)) +(defparameter +float-types+ + '(long-float double-float short-float single-float)) (defun types-4-body () (let ((parent-table (make-hash-table :test #'equal)) -- GitLab