X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fwxs.lisp;h=10fbd8ebf4fd1a99b1a5c1dfeb28ffb05c0ab070;hb=b43b6e70ce48d959d77f7f56be9d11aa101fdd7d;hp=b6d4faa052885521044a97cd9bae6f681ff1cb3d;hpb=1acfa21e0796f5d72d776b0fd53645813d5f2d98;p=sbcl.git diff --git a/tools-for-build/wxs.lisp b/tools-for-build/wxs.lisp index b6d4faa..10fbd8e 100644 --- a/tools-for-build/wxs.lisp +++ b/tools-for-build/wxs.lisp @@ -78,13 +78,18 @@ (loop for flag in (directory "../contrib/*/test-passed") collect (car (last (pathname-directory flag))))) +(defvar *id-char-substitutions* '((#\\ . #\_) + (#\/ . #\_) + (#\: . #\.) + (#\- . #\.))) + (defun id (string) ;; Mangle a string till it can be used as an Id. A-Z, a-z, 0-9, and ;; _ are ok, nothing else is. - (nsubstitute #\_ #\- - (nsubstitute #\. #\: - (nsubstitute #\. #\/ - (substitute #\. #\\ string))))) + (map 'string (lambda (c) + (or (cdr (assoc c *id-char-substitutions*)) + c)) + string)) (defun directory-id (name) (id (format nil "Directory_~A" (enough-namestring name))))