(:default-print-slots sui stt lrl str suppress))
-(defclass uso (umlsclass)
- ((aui :value-type fixnum :initarg :aui :reader aui :print-formatter fmt-aui
- :hyperlink find-ucon-aui)
- (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
- :hyperlink find-ucon-cui)
- (sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui
- :hyperlink find-ucon-sui)
- (saui :value-type string :initarg :saui :reader saui)
- (sdui :value-type string :initarg :sdui :reader sdui)
- (scui :value-type string :initarg :scui :reader scui)
- (tty :value-type string :initarg :tty :reader tty)
- (code :value-type string :initarg :code :reader code)
- (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
- (lat :value-type string :initarg :lat :reader lat)
- (str :value-type cdata :initarg :str :reader str)
- (srl :value-type fixnum :initarg :srl :reader srl)
- (ts :value-type string :initarg :ts :reader ts))
- (:metaclass hyperobject-class)
- (:user-name "Source")
- (:default-print-slots aui sab code saui sdui scui tty srl ts))
-
(defclass uterm (umlsclass)
((lui :value-type fixnum :initarg :lui :reader lui :print-formatter fmt-lui
:hyperlink find-uterm-lui)
(let ((translated-lines 0)
(input-lines 0)
(eof (cons nil nil)))
- (catch 'done-counting
- (with-open-file (ts output-path :direction :input
- #+(and sbcl sb-unicode) :external-format
- #+(and sbcl sb-unicode) :UTF-8
- #+(and allegro ics) :external-format
- #+(and allegro ics) :UTF-8
- #+lispworks :external-format
- #+lispworks :UTF-8
- #+(and clisp unicode) :external-format
- #+(and clisp unicode) charset:utf-8)
- (do ((c (read-char ts nil eof) (read-char ts nil eof)))
- ((eq c eof))
- (when (eql c #\newline)
- (incf translated-lines))))
- (dolist (input-ufile input-ufiles)
- (with-umls-ufile (line input-ufile)
- (incf input-lines)
- (when (> input-lines translated-lines)
- (throw 'done-counting 'incomplete)))))
+ (with-open-file (ts output-path :direction :input
+ #+(and sbcl sb-unicode) :external-format
+ #+(and sbcl sb-unicode) :UTF-8
+ #+(and allegro ics) :external-format
+ #+(and allegro ics) :UTF-8
+ #+lispworks :external-format
+ #+lispworks :UTF-8
+ #+(and clisp unicode) :external-format
+ #+(and clisp unicode) charset:utf-8)
+ (do ((c (read-char ts nil eof) (read-char ts nil eof)))
+ ((eq c eof))
+ (when (eql c #\newline)
+ (incf translated-lines))))
+ (dolist (input-ufile input-ufiles)
+ (with-umls-ufile (line input-ufile)
+ (incf input-lines)
+ (when (> input-lines translated-lines)
+ (return))))
(cond
((< input-lines translated-lines)
(format t "Translated file ~A incomplete, deleting...~%" output-path)