X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=create-sql.lisp;h=974087726b0dde19e71c699399e0311f15bcb7d4;hb=6c10979737dc10b0c510b1edfe070346bcac3ff5;hp=544267c4037b2efb1789afc27cedeaac912ebc90;hpb=5f22946ec144f413cd4306bc60daad9658fced72;p=umlisp.git 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)