(defun fix-file (filename) "Type the file to stream using the :line-out operation." (let ((i (or (probe-file filename) (return-from fix-file nil)))) (let ((o (send i :new-directory (append '("CT-ADA") (if (atom (send i :directory)) (list (send i :directory)) (send i :directory)))))) (format t "~&; Hacking ~A to ~A" i o) (fs:create-directory o) (if (probe-file o) (return-from fix-file (format t " which already exists"))) (with-open-file (input i) (with-open-file (output o :out) (map-over-stream-lines #'(lambda (string start end) (cond ((string-search-char 12. ; ascii code for #\FORM string start end) (do ((j start (1+ j))) ((= j end)) (send output :tyo (if (= (aref string j) 12.) #\form (aref string j)))) (terpri output)) ('else (send output :line-out string start end)))) input))))))