summaryrefslogtreecommitdiff
path: root/fastjar/jartool.c
Commit message (Collapse)AuthorAgeFilesLines
* * jartool.c (extract_jar): Unconditionally read extra data in thetromey2004-09-231-3/+3
| | | | | | | entry header; don't read it after the file contents. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87990 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-19 Bryce McKinlay <mckinlay@redhat.com>bryce2004-07-191-2/+1
| | | | | | | | * jartool.c (main): Ensure that only one of ftruncate and _chsize is used. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84931 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-11 Bryce McKinlay <mckinlay@redhat.com>bryce2004-07-191-0/+8
| | | | | | | | | | PR java/16472 * configure.ac: Check for ftruncate() and _chsize(). * jartool.c (main): Use _chsize if ftruncate not available. * configure, config.h.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84929 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (find_entry, looks_like_dir): Remove inline spec.rsandifo2004-07-091-4/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84345 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-06 Matthias Klose <doko@debian.org>doko2004-07-061-62/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in: Regenerate. * fastjar.texi: Update for '-u'. 2004-05-19 Casey Marshall <csm@gnu.org> PR 7854 * Makefile.am (jar_SOURCES): added shift.c, shift.h. (jar_CPPFLAGS): define WITH_SHIFT_DOWN. * compress.c Added FSF copyright. (write_data): new function. (compress_file): call write_data. * 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. * jartool.h Added #ifndef __FASTJAR_JARTOOL_H__. (struct zipentry): added `flags'. * shift.c: new file. * shift.h: new file. * zipfile.h (CEN_FLAGS): new constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84171 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-01-07 Andreas Tobler <a.tobler@schweiz.ch>andreast2004-01-071-2/+8
| | | | | | | | * jartool.c (make_manifest): Fix off-by-one bug when creating an empty MANIFEST.MF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75511 138bc75d-0d04-0410-961f-82ee72b054a4
* PR java/9532neroden2003-07-021-30/+31
| | | | | | | | | * jartool.c (add_to_jar): Return 1 on failure to open file. Split out -C case to: * jartool.c (add_to_jar_with_dir): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68847 138bc75d-0d04-0410-961f-82ee72b054a4
* PR java/9532neroden2003-06-151-14/+22
| | | | | | | | | | | * jartool.c (main) Give proper error messages with -C, and check for missing arguments properly. Send error messages to stderr. * jartool.c (add_to_jar): Make getcwd() call portable, and check for error return. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67985 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-01-31 Daiki Ueno <ueno@unixuser.org>tromey2003-01-311-7/+9
| | | | | | | | * jartool.c (extract_jar): Don't lseek to skip extra fields. (consume): If the stream is seekable, do lseek. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62208 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-01-21 Ranjit Mathew <rmathew@hotmail.com>tromey2003-01-211-1/+3
| | | | | | | | | * jartool.c (list_jar): Terminate the 'ascii_date' buffer with a '\0' to guard against the case where the formatted time string is more than the size allowed by the buffer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61571 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-9/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-11-21 Ranjit Mathew <rmathew@hotmail.com>tromey2002-11-221-1/+2
| | | | | | | | * jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extracted files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59366 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (add_to_jar): Only compare file to jarfile if jarfile isjakub2002-11-101-2/+3
| | | | | | | | | | non-NULL. * configure.in (AC_CHECK_HEADERS): Add limits.h. * configure, config.h.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58990 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c: Use mode 0666 when opening new file.tromey2002-10-201-2/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58341 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (mkdir): Define.tromey2002-09-091-0/+6
| | | | | | | | | | | * config.h.in: Rebuilt. * aclocal.m4, configure: Rebuilt. * acinclude.m4: New file. Copied gcc_AC_COMPILE_CHECK_SIZEOF, gcc_AC_EXAMINE_OBJECT, and fastjar_AC_COMPILE_C_BIGENDIAN from aclocal.m4. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56983 138bc75d-0d04-0410-961f-82ee72b054a4
* From greenrd@hotmail.com:tromey2002-09-041-2/+2
| | | | | | | | * jartool.c (list_jar): Correctly determine when new `filename' buffer must be allocated. Fixes PR java/7830. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56818 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (expand_options): Handle tar-style argument list with abryce2002-03-181-3/+14
| | | | | | | leading "-". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50957 138bc75d-0d04-0410-961f-82ee72b054a4
* jar -C fixgreen2002-02-241-4/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50009 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (main): NULL-terminate new_argv. Pass 0 as argumenttromey2002-01-311-1/+2
| | | | | | | to init_args. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49351 138bc75d-0d04-0410-961f-82ee72b054a4
* For PR libgcj/5303:tromey2002-01-091-68/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jargrep.h: Removed RCS keywords. (GVERSION): Removed. * configure, Makefile.in, config.h.in: Rebuilt. * configure.in: Added AM_MAINTAINER_MODE. Don't look for getopt.h. Use `fastjar' as package name. * Makefile.am (INCLUDES): Look in ../include. (LIBIBERTY): New macro. (jar_LDADD): Use it. (jar_DEPENDENCIES): Likewise. (grepjar_LDADD): Likewise. (grepjar_DEPENDENCIES): Likewise. * jargrep.c: Removed RCS keywords. Always include getopt.h. (LONG_OPT): New macro. (OPT_HELP): Likewise. (main): Use getopt_long. Let getopt print invalid argument message. Handle --help. Use version(). (version): New function. (optarg, optind): Don't declare. (option_vec): New global. (help): New function. (Usage): Updated to GNU standards. * jartool.c: Removed RCS keywords. Include getopt.h. (LONG_OPT): New macro. (OPT_HELP): Likewise. (options): New global. (help): New function. (usage): Print a single line. (version): New function. (expand_options): New function. (main): Use getopt_long and expand_options. Fail if `-u' specified. Changed handling of -f, -m, -V options. (OPTION_STRING): New macro. (version_string): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48697 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-01-02 Craig Rodrigues <rodrigc@gcc.gnu.org>rodrigc2002-01-031-4/+8
| | | | | | | | | | | | | | | | | PR bootstrap/5117 * configure.in (AC_CHECK_HEADERS): Check for stdlib.h. * Makefile.am: Move grepjar to bin_PROGRAMS. * config.h.in: Regenerated. * Makefile.in: Regenerated. * aclocal.m4: Regenerated. * jargrep.c: Eliminate some signed/unsigned and default uninitialized warnings. Use HAVE_STDLIB_H instead of STDC_HEADERS macro. * jartool.c: Likewise. * compress.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48493 138bc75d-0d04-0410-961f-82ee72b054a4
* * jatool.c (extract_jar): Account for null termination whenbryce2001-10-121-2/+10
| | | | | | | determining whether to expand "filename". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46220 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>apbianco2001-08-291-1/+6
| | | | | | | | | | * jartool.c (add_to_jar): Return 1 if `stat' initialy failed. Fixes PR java/3949. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01641.html) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45250 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (jarfile): Remove length limitation.tromey2001-08-271-4/+12
| | | | | | | (main): Use jt_strdup when initializing jarfile. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45217 138bc75d-0d04-0410-961f-82ee72b054a4
* Modified from patch by Julian Hall <jules@acris.co.uk>:tromey2001-07-041-7/+18
| | | | | | | | | | | * jartool.c (errno): Conditionally declare. (O_BINARY): Conditionally define. (main): Use open, not creat. Use O_BINARY everywhere. (make_manifest): Use O_BINARY. (add_to_jar): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43766 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (jt_strdup): New function.danglin2001-05-031-3/+20
| | | | | | | (get_next_arg): Use jt_strdup instead of strdup. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41815 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-12-28 Robert Lipe <robertl@sco.com>robertl2000-12-281-2/+32
| | | | | | | * jartool.c (MAXPATHLEN): Provide if not defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38515 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi2000-12-141-32/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * compress.c: Include stdlib.h and compress.h. (rcsid): Delete. (report_str_error): Make static. (ez_inflate_str): Delete unused variable. Add parens in if-stmt. (hrd_inflate_str): Likewise. * compress.h (init_compression, end_compression, init_inflation, end_inflation): Prototype void arguments. * dostime.c (rcsid): Delete. * jargrep.c: Include ctype.h, stdlib.h, zlib.h and compress.h. Make functions static. Cast ctype function argument to `unsigned char'. Add parens in if-stmts. Constify. (Usage): Change into a macro. (jargrep): Remove unused parameter. * jartool.c: Constify. Add parens in if-stmts. Align signed/unsigned char pointers in functions calls using casts. (rcsid): Delete. (list_jar): Fix printf format specifier. (usage): Chop long string into bits. Reformat. * pushback.c (rcsid): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38254 138bc75d-0d04-0410-961f-82ee72b054a4
* * jartool.c (extract_jar): Use strchr, not index.tromey2000-12-131-5/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38225 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>apbianco2000-12-091-0/+1757
* fastjar: Imported. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38145 138bc75d-0d04-0410-961f-82ee72b054a4