r11156: fix trans extension for sbcl, fix index for mrrel
[umlisp.git] / parse-common.lisp
index ba7aef61c816e8b8d4bf6897254dcfefabe9efc1..25d3ee3f11bc0dff11d8d1083dcb5a8bba3911ae 100644 (file)
 (defun ufile-pathname (ufile &optional (extension ""))
   "Return pathname for a umls filename with an optional extension"
   (assert (typep ufile 'ufile))
-  (let ((dirs (append (list (dir ufile))
-                     (awhen (subdir ufile) (list it)))))
+  (let* ((dirs (append (list (dir ufile))
+                       (awhen (subdir ufile) (list it))))
+         (name-list (delimited-string-to-list (fil ufile) #\.))
+         (name (if (second name-list)
+                   (first name-list)
+                   (concatenate 'string (first name-list) (or extension ""))))
+         (type (when (second name-list)
+                 (concatenate 'string (second name-list) (or extension "")))))
      (merge-pathnames
-      (make-pathname :name (concatenate 'string (fil ufile) extension)
+      (make-pathname :name name :type type
                     :directory (cons :relative dirs))
       *umls-path*)))