X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=class-support.lisp;h=413f31470b94724bfaea8e4173356e49b4084416;hb=2038ce2f480179fd23cb3ded6fa1250e61e22029;hp=0a2dc5fa421a4591cd45d865b00dbb63b70c7c48;hpb=0fbd7d20375c0b8b81ee2916efc0ab0847493a8d;p=umlisp.git diff --git a/class-support.lisp b/class-support.lisp index 0a2dc5f..413f314 100644 --- a/class-support.lisp +++ b/class-support.lisp @@ -7,10 +7,10 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: class-support.lisp,v 1.7 2003/05/14 21:34:52 kevin Exp $ +;;;; $Id: class-support.lisp,v 1.11 2003/06/10 22:30:16 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2003 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. @@ -21,14 +21,12 @@ ;;; Formatting routines - - (defgeneric fmt-cui (c)) (defmethod fmt-cui ((c ucon)) (fmt-cui (cui c))) (defmethod fmt-cui ((c fixnum)) - (prefixed-fixnum-string c #\C 8)) + (prefixed-fixnum-string c #\C 7)) (defmethod fmt-cui ((c string)) (if (eql (aref c 0) #\C) @@ -43,7 +41,7 @@ (fmt-lui (lui l))) (defmethod fmt-lui ((l fixnum)) - (prefixed-fixnum-string l #\L 8)) + (prefixed-fixnum-string l #\L 7)) (defmethod fmt-lui ((l string)) (if (eql (aref l 0) #\L) @@ -55,7 +53,7 @@ (fmt-sui (sui s))) (defmethod fmt-sui ((s fixnum)) - (prefixed-fixnum-string s #\S 8)) + (prefixed-fixnum-string s #\S 7)) (defmethod fmt-sui ((s string)) (if (eql (aref s 0) #\S) @@ -64,7 +62,7 @@ (defgeneric fmt-tui (tui)) (defmethod fmt-tui ((tui fixnum)) - (prefixed-fixnum-string tui #\T 4)) + (prefixed-fixnum-string tui #\T 3)) (defmethod fmt-tui ((tui string)) (if (eql (aref tui 0) #\T) @@ -73,7 +71,7 @@ (defgeneric fmt-eui (e)) (defmethod fmt-eui ((e fixnum)) - (prefixed-fixnum-string e #\E 8)) + (prefixed-fixnum-string e #\E 7)) (defmethod fmt-eui ((e string)) (if (eql (aref e 0) #\E) @@ -128,6 +126,16 @@ "Return the string for a ulo object" (find-string-sui (sui lo))) +(defun uterm-pfstr (uterm) + "Return the preferred string for a uterm" + (dolist (ustr (s#str uterm)) + (when (string= "PF" (stt ustr)) + (return-from uterm-pfstr (str ustr))))) + +(defun remove-non-english-terms (uterms) + (remove-if-not #'english-term-p uterms)) + + #+(or scl cmu) (dolist (c '(urank udef usat uso ucxt ustr ulo uterm usty urel ucoc uatx ucon uxw uxnw uxns lexterm labr lagr lcmp lmod lnom lprn lprp lspl ltrm ltyp lwd sdef sstr sstre1 sstre2 usrl)) #+cmu