X-Git-Url: http://git.kpe.io/?p=umlisp.git;a=blobdiff_plain;f=class-support.lisp;h=2b94e91a93c2451f861100aa3446168d3686f837;hp=dd969038bc87ee7e65396631be22e207d85c1d2c;hb=51451987c4fee40b475e014ee5c801b1657d119d;hpb=c88fbfe8bd947b12c89f32effaf328699ba067ab diff --git a/class-support.lisp b/class-support.lisp index dd96903..2b94e91 100644 --- a/class-support.lisp +++ b/class-support.lisp @@ -101,6 +101,19 @@ aui (fmt-aui (parse-integer aui)))) +(defgeneric fmt-rui (rui)) +(when *has-fixnum-class* + (defmethod fmt-rui ((rui fixnum)) + (prefixed-fixnum-string aui #\A 8))) + +(defmethod fmt-rui ((rui integer)) + (prefixed-integer-string rui #\A 8)) + +(defmethod fmt-rui ((rui string)) + (if (eql (aref rui 0) #\R) + rui + (fmt-rui (parse-integer rui)))) + (defgeneric fmt-eui (e)) (when *has-fixnum-class* (defmethod fmt-eui ((e fixnum))