[PATCH] [fastjar] implement `-u'

Casey Marshall csm@gnu.org
Thu May 20 09:05:00 GMT 2004


Hi.

Attached is an attempt to implement `-u' properly in fastjar. It tries
to do this in-place; existing entries are overwritten with new
entries, and subsequent entries are moved up or down in the file if
needed. New entries are appended to th end.

2004-05-19  Casey Marshall <csm@gnu.org>

	* fastjar/Makefile.am
	(jar_SOURCES): added shift.c, shift.h.
        (jar_CPPFLAGS): define WITH_SHIFT_DOWN.

        * fastjar/compress.c
        Added FSF copyright.
        (write_data): new function.
        (compress_file): call write_data.

        * fastjar/jartool.c
        Updated copyright year.
        (progname): new variable.
        (end_of_entries): new variable.
        (main): open and read file when updating.
        (find_entry): new function.
        (looks_like_dir): new function.
        (read_entries): new function.
        (make_manifest): added parameter `updating'.
        Call `add_file_to_jar' with `updating'.
        (add_to_jar_with_dir): added parameter `updating'.
        Call `add_to_jar' with `updating'.
        (add_to_jar): added parameter `updating'.
        Call `add_file_to_jar' with `updating'.
        Don't add directories if they already exist.
        (add_file_to_jar): added parameter `updating'.
        Update entries if they already exist.

        * fastjar/jartool.h
        Added #ifndef __FASTJAR_JARTOOL_H__.
        (struct zipentry): added `flags'.

        * fastjar/shift.c: new file.

        * fastjar/shift.h: new file.

        * fastjar/zipfile.h
        (CEN_FLAGS): new constant.

-- 
Casey Marshall || csm@gnu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fastjar.patch
Type: text/x-patch
Size: 30336 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040520/ec64f2de/attachment.bin>


More information about the Java-patches mailing list