[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file system



When while writing on a file (with-open-file .. (Format ...))
the volume runs out of space, the file-system of MACL 1.3.2 gets totally confused.
It seems like a bug to us.
Even if you delete some files and start again to write the file, you get the same error
message.Example code:

(defun fill_disk (nummer)
  (with-open-file (file (make-pathname :directory "an empty 800 K Disk"
                                        :name (princ-to-string nummer))
                         :direction :output
                         :if-exists :overwrite
                         :if-does-not-exist :create)
    (dotimes (x 10000)
      (format file "A lot of unimportant stuff"))))
(defun small_file ()
  (with-open-file (file (make-pathname :directory "an empty 800 K Disk"
                                        :name "Small")
                         :direction :output :if-exists :overwrite
                         :if-does-not-exist :create)
    (dotimes (x 100)
      (format file "Some more Bytes"))))

(fill_disk 1)
 ==> nil
(fill_disk 2)
==> nil
(fill_disk 3)
==> nil ,17 K free
(fill_disk 4)
==>
> Error: Error #512
> While executing: CCL::TYO
> Type Command-/ to continue, Command-. to abort.
1 >
> Error: Error #-23198
> While executing: "Unknown"
> Type Command-/ to continue, Command-. to abort.
1 >

(delete-file "an empty 800 K Disk:1")
==> #P"an empty 800 K Disk:1", file deleted, 254K free

(small_file)
1 >
> Error: Error #512
> While executing: CCL::TYO
> Type Command-/ to continue, Command-. to abort.
1 >
> Error: Error #-24242
> While executing: "Unknown"
> Type Command-/ to continue, Command-. to abort.
Aborted

We managed to circumvent this 'BUG' by directing the output
to a *FRED-WINDOW* saving it afterwards.
Example code:

(defun small_file_2 ()
  (let ((file (oneof *fred-window*)))
    (ask file (set-window-filename "an empty 800 K Disk:small2")
         (dotimes (x 100)
           (format file "Some more Bytes"))
         (window-save)
         (window-close))))

(small_file_2)
==> nil, file created

Karsten Poeck and Ute Gappa
Karlsruhe University
Institut of Logic
P.O. BOX 6980, 7500 Karlsuhe, West-Germany
e-mail: gappa@ira.uka.de