Remove obsolute uso class, simply loop exit
[umlisp.git] / create-sql.lisp
index 544267c4037b2efb1789afc27cedeaac912ebc90..974087726b0dde19e71c699399e0311f15bcb7d4 100644 (file)
@@ -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)