summaryrefslogtreecommitdiff
path: root/fastjar
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-13 18:11:57 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-13 18:11:57 +0000
commit88724014be3befd97b1e018834a3b925bc8a779b (patch)
tree7592c7c737a20508fd6b749be876d6254a9bb6d9 /fastjar
parenta973e2b199393c97deffd9bfa5f29c9d379b8e91 (diff)
downloadgcc-88724014be3befd97b1e018834a3b925bc8a779b.tar.gz
* jartool.c (extract_jar): Use strchr, not index.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fastjar')
-rw-r--r--fastjar/ChangeLog4
-rw-r--r--fastjar/jartool.c15
2 files changed, 14 insertions, 5 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog
index 5ea513b213d..9c1f0bb7453 100644
--- a/fastjar/ChangeLog
+++ b/fastjar/ChangeLog
@@ -1,3 +1,7 @@
+2000-12-13 Tom Tromey <tromey@redhat.com>
+
+ * jartool.c (extract_jar): Use strchr, not index.
+
2000-12-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* install-defs.sh: Removed.
diff --git a/fastjar/jartool.c b/fastjar/jartool.c
index 402d09ba901..b7459e0bb62 100644
--- a/fastjar/jartool.c
+++ b/fastjar/jartool.c
@@ -1,6 +1,6 @@
/*
jartool.c - main functions for fastjar utility
- Copyright (C) 1999 Bryan Burns
+ Copyright (C) 1999, 2000 Bryan Burns
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,9 +17,14 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/* $Id: jartool.c,v 1.5 2000/08/24 15:01:27 cory Exp $
+/* $Id: jartool.c,v 1.1 2000/12/09 03:08:23 apbianco Exp $
$Log: jartool.c,v $
+ Revision 1.1 2000/12/09 03:08:23 apbianco
+ 2000-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * fastjar: Imported.
+
Revision 1.5 2000/08/24 15:01:27 cory
Made certain that fastjar opened the jar file before trying to update it
with the -u option.
@@ -164,7 +169,7 @@
#endif
static char version_string[] = VERSION;
-static char rcsid[] = "$Id: jartool.c,v 1.5 2000/08/24 15:01:27 cory Exp $";
+static char rcsid[] = "$Id: jartool.c,v 1.1 2000/12/09 03:08:23 apbianco Exp $";
extern int errno;
@@ -1266,7 +1271,7 @@ int extract_jar(int fd, char **files, int file_num){
/* OK, there is some directory information in the file. Nothing to do
but ensure the directory(s) exist, and create them if they don't.
What a pain! */
- if(index(filename, '/') != NULL && handle){
+ if(strchr(filename, '/') != NULL && handle){
/* Loop through all the directories in the path, (everything w/ a '/') */
ub1 *start = filename;
char *tmp_buff;
@@ -1275,7 +1280,7 @@ int extract_jar(int fd, char **files, int file_num){
tmp_buff = malloc(sizeof(char) * strlen(filename));
for(;;){
- ub1 *idx = index(start, '/');
+ ub1 *idx = strchr(start, '/');
if(idx == NULL)
break;