aboutsummaryrefslogtreecommitdiff
path: root/fastjar
diff options
context:
space:
mode:
Diffstat (limited to 'fastjar')
-rw-r--r--fastjar/ChangeLog38
-rw-r--r--fastjar/Makefile.am8
-rw-r--r--fastjar/Makefile.in8
-rw-r--r--fastjar/dostime.c2
-rw-r--r--fastjar/fastjar.texi9
-rw-r--r--fastjar/jargrep.c6
-rw-r--r--fastjar/jartool.c20
7 files changed, 70 insertions, 21 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog
index 34a5bdcccbf..bde5a8ad275 100644
--- a/fastjar/ChangeLog
+++ b/fastjar/ChangeLog
@@ -1,3 +1,41 @@
+2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * fastjar.texi: Remove @ at start of file.
+
+2003-03-10 Mohan Embar <gnustuff@thisiscool.com>
+
+ * dostime.c: add #include <stddef.h> for definition of NULL
+
+2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * fastjar.texi: Update to GFDL 1.2.
+
+2003-01-31 Daiki Ueno <ueno@unixuser.org>
+
+ * jartool.c (extract_jar): Don't lseek to skip extra fields.
+ (consume): If the stream is seekable, do lseek.
+
+2003-01-28 Ranjit Mathew <rmathew@hotmail.com>
+
+ * jargrep.c: Include xregex.h from libiberty instead of
+ system regex.h for better portability.
+
+2003-01-21 Ranjit Mathew <rmathew@hotmail.com>
+
+ * 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.
+
+2002-12-30 DJ Delorie <dj@redhat.com>
+
+ * Makefile.am (jar.1, grepjar.1): Protect against
+ texi2pod/pod2man failing.
+ * Makefile.in: Regenerated.
+
+2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * fastjar.texi: Include Cover Texts in man page.
+
2002-12-04 Jakub Jelinek <jakub@redhat.com>
* fastjar.texi (jar @direntry, grepjar @direntry): Add (fastjar).
diff --git a/fastjar/Makefile.am b/fastjar/Makefile.am
index 39a57c40d22..74f491e850c 100644
--- a/fastjar/Makefile.am
+++ b/fastjar/Makefile.am
@@ -85,14 +85,14 @@ POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@"
$(srcdir)/jar.1: $(srcdir)/fastjar.texi
-$(TEXI2POD) -D jar < $(srcdir)/fastjar.texi > fastjar.pod
- ($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \
+ -($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \
mv -f jar.1.T$$$$ $(srcdir)/jar.1) || \
(rm -f jar.1.T$$$$ && exit 1)
- rm -f fastjar.pod
+ -rm -f fastjar.pod
$(srcdir)/grepjar.1: $(srcdir)/fastjar.texi
-$(TEXI2POD) -D grepjar < $(srcdir)/fastjar.texi > grepjar.pod
- ($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \
+ -($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \
mv -f grepjar.1.T$$$$ $(srcdir)/grepjar.1) || \
(rm -f grepjar.1.T$$$$ && exit 1)
- rm -f grepjar.pod
+ -rm -f grepjar.pod
diff --git a/fastjar/Makefile.in b/fastjar/Makefile.in
index 4b6675000fe..fe294dcd42f 100644
--- a/fastjar/Makefile.in
+++ b/fastjar/Makefile.in
@@ -614,17 +614,17 @@ fastjar.info: fastjar.texi $(fastjar_TEXINFOS)
$(srcdir)/jar.1: $(srcdir)/fastjar.texi
-$(TEXI2POD) -D jar < $(srcdir)/fastjar.texi > fastjar.pod
- ($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \
+ -($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \
mv -f jar.1.T$$$$ $(srcdir)/jar.1) || \
(rm -f jar.1.T$$$$ && exit 1)
- rm -f fastjar.pod
+ -rm -f fastjar.pod
$(srcdir)/grepjar.1: $(srcdir)/fastjar.texi
-$(TEXI2POD) -D grepjar < $(srcdir)/fastjar.texi > grepjar.pod
- ($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \
+ -($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \
mv -f grepjar.1.T$$$$ $(srcdir)/grepjar.1) || \
(rm -f grepjar.1.T$$$$ && exit 1)
- rm -f grepjar.pod
+ -rm -f grepjar.pod
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/fastjar/dostime.c b/fastjar/dostime.c
index 5117a82014e..b202705bec3 100644
--- a/fastjar/dostime.c
+++ b/fastjar/dostime.c
@@ -21,6 +21,8 @@
#include <time.h>
+#include <stddef.h>
+
#include "dostime.h"
/*
diff --git a/fastjar/fastjar.texi b/fastjar/fastjar.texi
index f51cb99e730..b7c1259f05a 100644
--- a/fastjar/fastjar.texi
+++ b/fastjar/fastjar.texi
@@ -1,4 +1,4 @@
-@\input texinfo @c -*-texinfo-*-
+\input texinfo @c -*-texinfo-*-
@setfilename fastjar.info
@settitle Guide to GNU jar utilites
@@ -35,7 +35,7 @@
Copyright (C) @value{copyrights-fastjar} Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
+under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``GNU General Public License'', the Front-Cover
texts being (a) (see below), and with the Back-Cover Texts being (b)
@@ -49,6 +49,8 @@ man page gfdl(7).
@c man end
@end ignore
+@c man begin COPYRIGHT
+
(a) The FSF's Front-Cover Text is:
A GNU Manual
@@ -58,6 +60,7 @@ man page gfdl(7).
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.
+@c man end
@end ifinfo
@titlepage
@@ -75,7 +78,7 @@ Published by the Free Software Foundation @*
Boston, MA 02111-1307, USA@*
@sp 1
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
+under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``GNU General Public License'', the Front-Cover
texts being (a) (see below), and with the Back-Cover Texts being (b)
diff --git a/fastjar/jargrep.c b/fastjar/jargrep.c
index 1a9ee91be5d..9e0e4914ed9 100644
--- a/fastjar/jargrep.c
+++ b/fastjar/jargrep.c
@@ -1,6 +1,6 @@
/*
jargrep.c - main functions for jargrep utility
- Copyright (C) 2002 Free Software Foundation
+ Copyright (C) 2002, 2003 Free Software Foundation
Copyright (C) 1999, 2000 Bryan Burns
Copyright (C) 2000 Cory Hollingsworth
@@ -105,7 +105,6 @@ will test some other platforms later.
#include "config.h"
#include <stdio.h>
#include <unistd.h>
-#include <regex.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
@@ -115,6 +114,9 @@ will test some other platforms later.
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+
+#include "xregex.h"
+
#include "jargrep.h"
#include "jartool.h"
#include "pushback.h"
diff --git a/fastjar/jartool.c b/fastjar/jartool.c
index 7cc06aaad5b..615cc401834 100644
--- a/fastjar/jartool.c
+++ b/fastjar/jartool.c
@@ -1471,9 +1471,6 @@ int extract_jar(int fd, char **files, int file_num){
}
if(method == 8 || flags & 0x0008){
- if(seekable)
- lseek(fd, eflen, SEEK_CUR);
- else
consume(&pbf, eflen);
inflate_file(&pbf, f_fd, &ze);
@@ -1508,9 +1505,6 @@ int extract_jar(int fd, char **files, int file_num){
#endif
}
- if(seekable)
- lseek(fd, eflen, SEEK_CUR);
- else
consume(&pbf, eflen);
}
@@ -1571,7 +1565,7 @@ int list_jar(int fd, char **files, int file_num){
int i, j;
time_t tdate;
struct tm *s_tm;
- char ascii_date[30];
+ char ascii_date[31];
zipentry ze;
#ifdef DEBUG
@@ -1662,6 +1656,7 @@ int list_jar(int fd, char **files, int file_num){
tdate = dos2unixtime(mdate);
s_tm = localtime(&tdate);
strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm);
+ ascii_date[30] = '\0';
}
if(filename_len < fnlen + 1){
@@ -1781,6 +1776,7 @@ int list_jar(int fd, char **files, int file_num){
tdate = dos2unixtime(mdate);
s_tm = localtime(&tdate);
strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm);
+ ascii_date[30] = '\0';
}
if(filename_len < fnlen + 1){
@@ -1854,6 +1850,14 @@ int consume(pb_file *pbf, int amt){
printf("Consuming %d bytes\n", amt);
#endif
+ if (seekable){
+ if (amt <= (int)pbf->buff_amt)
+ pb_read(pbf, buff, amt);
+ else {
+ lseek(pbf->fd, amt - pbf->buff_amt, SEEK_CUR);
+ pb_read(pbf, buff, pbf->buff_amt); /* clear pbf */
+ }
+ } else
while(tc < amt){
rdamt = pb_read(pbf, buff, ((amt - tc) < RDSZ ? (amt - tc) : RDSZ));
#ifdef DEBUG
@@ -1863,7 +1867,7 @@ int consume(pb_file *pbf, int amt){
}
#ifdef DEBUG
- printf("%d bytes consumed\n", tc);
+ printf("%d bytes consumed\n", amt);
#endif
return 0;