From: Kevin M. Rosenberg Date: Sat, 20 Mar 2010 17:17:21 +0000 (-0600) Subject: Remove obsolute uso class, simply loop exit X-Git-Tag: debian-2007ac.2-6~5 X-Git-Url: http://git.kpe.io/?p=umlisp.git;a=commitdiff_plain;h=20b21169e71e1a70b95289fb0e6a6a7a8a55153e Remove obsolute uso class, simply loop exit --- diff --git a/classes.lisp b/classes.lisp index 4df25ab..db6def5 100644 --- a/classes.lisp +++ b/classes.lisp @@ -126,27 +126,6 @@ (: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) diff --git a/create-sql.lisp b/create-sql.lisp index 544267c..9740877 100644 --- a/create-sql.lisp +++ b/create-sql.lisp @@ -339,25 +339,24 @@ This is much faster that using create-umls-db-insert." (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) diff --git a/package.lisp b/package.lisp index e8b4b4f..aa02443 100644 --- a/package.lisp +++ b/package.lisp @@ -66,6 +66,10 @@ #:set-umls-sql-host #:umls-sql-type #:set-umls-sql-type + #:with-sql-connection + #:with-sql-connection + #:sql-disconnect + #:sql-disconnect-pooled ;; From utils.lisp #:fmt-cui