r11098: 2006 updates
[umlisp.git] / class-support.lisp
index 89dbd6e2b5d399236e93d1805a908900c1124719..eb600eb5b45a2de4d6c5b11ed4919cc833e20ddf 100644 (file)
@@ -10,7 +10,7 @@
 ;;;; $Id$
 ;;;;
 ;;;; This file, part of UMLisp, is
-;;;;    Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D.
+;;;;    Copyright (c) 2000-2006 by Kevin M. Rosenberg, M.D.
 ;;;;
 ;;;; UMLisp users are granted the rights to distribute and use this software
 ;;;; as governed by the terms of the GNU General Public License.
 (defmethod fmt-tui ((tui string))
   (if (eql (aref tui 0) #\T)
       tui
-      (fmt-tui (parse-integer tui))))
+    (fmt-tui (parse-integer tui))))
+
+(defgeneric fmt-aui (aui))
+(defmethod fmt-aui ((aui fixnum))
+  (prefixed-fixnum-string aui #\A 7))
+
+(defmethod fmt-aui ((aui string))
+  (if (eql (aref aui 0) #\A)
+      aui
+      (fmt-aui (parse-integer aui))))
 
 (defgeneric fmt-eui (e))
 (defmethod fmt-eui ((e fixnum))
 
 
 (defvar +language-abbreviations+
-  '(("BAQ" . "Basque")
-    ("DAN" . "Danish")
-    ("DUT" . "Dutch")
-    ("ENG" . "English")
-    ("FIN" . "Finnish")
-    ("FRE" . "French")
-    ("GER" . "German")
-    ("HEB" . "Hebrew")
-    ("HUN" . "Hungarian")
-    ("ITA" . "Italian")
-    ("NOR" . "Norwegian")
-    ("POR" . "Portuguese")
-    ("RUS" . "Russian")
-    ("SPA" . "Spanish")
-    ("SWE" . "Swedish")))
+    '(("BAQ" . "Basque")
+      ("CZE" . "Chech")
+      ("DAN" . "Danish")
+      ("DUT" . "Dutch")
+      ("ENG" . "English")
+      ("FIN" . "Finnish")
+      ("FRE" . "French")
+      ("GER" . "German")
+      ("HEB" . "Hebrew")
+      ("HUN" . "Hungarian")
+      ("ITA" . "Italian")
+      ("JPN" . "Japanese")
+      ("NOR" . "Norwegian")
+      ("POR" . "Portuguese")
+      ("RUS" . "Russian")
+      ("SPA" . "Spanish")
+      ("SWE" . "Swedish")))
 
 (defvar *lat-info-table* (make-hash-table :size 30 :test 'equal))
 (defvar *is-lat-table-init* nil)
   (setq *is-lat-table-init* t))
 
 (defun lat-abbr-info (lat)
-  (nth-value 0 (gethash (string-downcase lat) *lat-info-table*)))
+  (aif (nth-value 0 (gethash (string-downcase lat) *lat-info-table*))
+       it
+       lat))
+
 
 
 (defun stt-abbr-info (stt)
       (let* ((anc-this-cxn (remove-if-not
                            (lambda (cxt) (= (1+ i) (cxn cxt))) anc)))
        (push
-        (sort anc-this-cxn (lambda (a b) (< (rnk a) (rnk b))))
+        (sort anc-this-cxn (lambda (a b) (< (rank a) (rank b))))
         anc-lists)))))