[zip-devel] Patch and question

Edi Weitz edi at agharta.de
Tue Apr 5 11:02:13 UTC 2005


Hi!

First, here's a little patch to fix what looks like a typo:

  --- /usr/local/lisp/source/zip/acl.lisp 2005-04-05 12:56:32.000000000 +0200
  +++ acl.lisp    2005-04-05 12:56:42.000000000 +0200
  @@ -4,7 +4,7 @@
     (excl:octets-to-string octets :external-format ef))

   (defun string-to-octets (string ef)
  -  (excl:string-to-octets octets :external-format ef))
  +  (excl:string-to-octets string :external-format ef))

   (defun make-buffer-output-stream (outbuf)
     (excl:make-buffer-output-stream outbuf))

But then I still can't seem to create ZIP files.  Below is what I get
(Linux, AllegroCL 7.0, Salza 0.7).  What am I doing wrong?

  CL-USER(1): (asdf:oos 'asdf:load-op :zip)
  ; loading system definition from /usr/local/lisp/Registry/zip.asd into
  ; #<The ASDF38 package>
  ; Loading /usr/local/lisp/Registry/zip.asd
  ; registering #<SYSTEM :ZIP @ #x7152a082> as ZIP
  ; loading system definition from /usr/local/lisp/Registry/salza.asd
  ; into #<The ASDF39 package>
  ; Loading /usr/local/lisp/Registry/salza.asd
  ; registering #<SYSTEM :SALZA @ #x7153b1d2> as SALZA
  ; Fast loading /usr/local/lisp/source/salza-0.7/fixhash.fasl
  ; Fast loading /usr/local/lisp/source/salza-0.7/packages.fasl
  ; Fast loading /usr/local/lisp/source/salza-0.7/types.fasl
  ; Fast loading /usr/local/lisp/source/salza-0.7/deflate-stream.fasl
  ; Fast loading /usr/local/lisp/source/salza-0.7/huffman.fasl
  ; Fast loading /usr/local/lisp/source/salza-0.7/octet-replace.fasl
  ; Fast loading /usr/local/lisp/source/salza-0.7/compressor.fasl
  ; Fast loading
  ;    /usr/local/lisp/source/salza-0.7/deflate-stream-interface.fasl
  ; Fast loading /usr/local/lisp/source/salza-0.7/zlib.fasl
  ; Fast loading /usr/local/lisp/source/zip/package.fasl
  ; Fast loading /usr/local/lisp/source/zip/acl.fasl
  ; Fast loading /usr/local/lisp/source/zip/ifstar.fasl
  ; Fast loading /usr/local/lisp/source/zip/inflate.fasl
  ; Fast loading /usr/local/lisp/source/zip/zip.fasl
  NIL
  CL-USER(2): (use-package :zip)
  T
  CL-USER(3): (with-output-to-zipfile (out "/shared/test.zip" :if-exists :supersede)
                (with-open-file (in "README.bak" :element-type '(unsigned-byte 8))
                  (write-zipentry out "foo.txt" in)))
  ; Fast loading from bundle code/streamc.fasl.
  ;   Fast loading from bundle code/efft-utf8-base.fasl.
  ;   Fast loading from bundle code/efft-void.fasl.
  ;   Fast loading from bundle code/efft-latin1-base.fasl.
  Error: Received signal number 11 (Segmentation violation)
    [condition type: SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL]

  Restart actions (select using :continue):
   0: Return to Top Level (an "abort" restart).
   1: Abort entirely from this (lisp) process.
  [1] CL-USER(4): :zoom
  Evaluation stack:

     (ERROR SYNCHRONOUS-OPERATING-SYSTEM-SIGNAL :NAME ...)
   ->(ZLIB::ADLER32 15 50213 ...)
     (ZLIB:ZLIB-WRITE-SEQUENCE #(67 111 109 ...)
                               #<ZLIB::ZLIB-STREAM 2 @ #x7158608a> ...)
     (COMPRESS
        #<EXCL::BINARY-INPUT-FILE-STREAM #P"README.bak" pos 2118 @
          #x7156933a>
        #<EXCL::BINARY-OUTPUT-FILE-STREAM #P"/shared/test.zip" pos 38 @
          #x71566b52>)
     (WRITE-ZIPENTRY #S(ZIP::ZIPWRITER :STREAM # ...) "foo.txt" ...)
     (MULTIPLE-VALUE-PROG1 (PROGN #) (SETQ #:G40 NIL))
     [... EXCL::%EVAL ]
     (UNWIND-PROTECT (MULTIPLE-VALUE-PROG1 # #) (WHEN # #))
     [... EXCL::EVAL-AS-PROGN ]
     (LET (# #) (UNWIND-PROTECT # #))
     [... EXCL::%EVAL ]
     (UNWIND-PROTECT (PROGN #) (ZIP::CLOSE-ZIPFILE-WRITER OUT))
     [... EXCL::EVAL-AS-PROGN ]

  ... more older frames ...
  [1] CL-USER(5): (probe-file "README.bak")
  #P"/tmp/README.bak"

Thanks,
Edi.



More information about the zip-devel mailing list