[kaffe] CVS kaffe (robilad): removed lookupJarFile function

Kaffe CVS cvs-commits at kaffe.org
Fri Feb 15 12:07:23 PST 2008


PatchSet 7754 
Date: 2008/02/15 20:04:05
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
removed lookupJarFile function

2008-02-15  Dalibor Topic  <robilad at kaffe.org>

* kaffe/kaffevm/jar.h, kaffe/kaffevm/jar.c (lookupJarFile): Removed.

* libraries/clib/zip/ZipFile.c (getZipEntry)
(java_util_zip_ZipFile_getZipEntries0),
kaffe/kaffevm/findInJar.c (findClassInJar)
(getManifestMainAttribute),
kaffe/kaffeh/support.c (kaffeh_findClass): Use zzip_file_open directly.

Members: 
	ChangeLog:1.5254->1.5255 
	kaffe/kaffeh/support.c:1.60->1.61 
	kaffe/kaffevm/findInJar.c:1.79->1.80 
	kaffe/kaffevm/jar.c:1.47->1.48 
	kaffe/kaffevm/jar.h:1.13->1.14 
	libraries/clib/zip/ZipFile.c:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5254 kaffe/ChangeLog:1.5255
--- kaffe/ChangeLog:1.5254	Fri Feb 15 19:10:37 2008
+++ kaffe/ChangeLog	Fri Feb 15 20:04:05 2008
@@ -1,5 +1,15 @@
 2008-02-15  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/jar.h, kaffe/kaffevm/jar.c (lookupJarFile): Removed.
+
+	* libraries/clib/zip/ZipFile.c (getZipEntry)
+	(java_util_zip_ZipFile_getZipEntries0), 
+	kaffe/kaffevm/findInJar.c (findClassInJar)
+	(getManifestMainAttribute),
+	kaffe/kaffeh/support.c (kaffeh_findClass): Use zzip_file_open directly.
+
+2008-02-15  Dalibor Topic  <robilad at kaffe.org>
+
 	* kaffe/kaffevm/jar.h, kaffe/kaffevm/jar.c (closeJarFile): Removed.
 
 	* libraries/clib/zip/ZipFile.c (java_util_zip_ZipFile_closeZipFile0),
Index: kaffe/kaffe/kaffeh/support.c
diff -u kaffe/kaffe/kaffeh/support.c:1.60 kaffe/kaffe/kaffeh/support.c:1.61
--- kaffe/kaffe/kaffeh/support.c:1.60	Fri Feb 15 19:10:39 2008
+++ kaffe/kaffe/kaffeh/support.c	Fri Feb 15 20:04:07 2008
@@ -878,7 +878,7 @@
 			strcpy(superName, nm);
 			strcat(superName, ".class");
 
-			jentry = lookupJarFile(jfile, superName);
+			jentry = zzip_file_open(jfile, superName, 0);
 			if (jentry == 0) {
 				zzip_closedir(jfile);
 				continue;
Index: kaffe/kaffe/kaffevm/findInJar.c
diff -u kaffe/kaffe/kaffevm/findInJar.c:1.79 kaffe/kaffe/kaffevm/findInJar.c:1.80
--- kaffe/kaffe/kaffevm/findInJar.c:1.79	Fri Feb 15 18:59:35 2008
+++ kaffe/kaffe/kaffevm/findInJar.c	Fri Feb 15 20:04:07 2008
@@ -228,7 +228,7 @@
 #endif
 			}
 
-			entry = lookupJarFile(ptr->u.jar, cname);
+			entry = zzip_file_open(ptr->u.jar, cname, 0);
 			if (entry == 0) {
 				break;
 			}
@@ -637,7 +637,7 @@
 	int posAttrValue;
 
 	/* Locate manifest entry in jar */
-	mf = lookupJarFile(file, "META-INF/MANIFEST.MF");
+	mf = zzip_file_open(file, "META-INF/MANIFEST.MF", 0);
 	if (mf == 0)
 		return (NULL);
 
Index: kaffe/kaffe/kaffevm/jar.c
diff -u kaffe/kaffe/kaffevm/jar.c:1.47 kaffe/kaffe/kaffevm/jar.c:1.48
--- kaffe/kaffe/kaffevm/jar.c:1.47	Fri Feb 15 19:10:39 2008
+++ kaffe/kaffe/kaffevm/jar.c	Fri Feb 15 20:04:07 2008
@@ -40,8 +40,4 @@
   return -1;
 }
 
-ZZIP_FILE *lookupJarFile(ZZIP_DIR *jf, zzip_char_t *entry_name)
-{
-  return zzip_file_open(jf, entry_name, 0);
-}
 
Index: kaffe/kaffe/kaffevm/jar.h
diff -u kaffe/kaffe/kaffevm/jar.h:1.13 kaffe/kaffe/kaffevm/jar.h:1.14
--- kaffe/kaffe/kaffevm/jar.h:1.13	Fri Feb 15 19:10:40 2008
+++ kaffe/kaffe/kaffevm/jar.h	Fri Feb 15 20:04:08 2008
@@ -19,14 +19,6 @@
 
 #include <zzip/zzip.h>
 
-/**
- * Lookup a file stored in the given jarFile.
- *
- * @param jf The jarFile in which to search for the given file.
- * @param entry_name The name of the file to search for in the JAR.
- * @return the file entry in the jar file.
- */
-ZZIP_FILE *lookupJarFile(ZZIP_DIR *jf, zzip_char_t *entry_name);
 /*
  * Read in and, if necessary, decompress the contents of a file stored in a
  * JAR file.
Index: kaffe/libraries/clib/zip/ZipFile.c
diff -u kaffe/libraries/clib/zip/ZipFile.c:1.4 kaffe/libraries/clib/zip/ZipFile.c:1.5
--- kaffe/libraries/clib/zip/ZipFile.c:1.4	Fri Feb 15 19:10:40 2008
+++ kaffe/libraries/clib/zip/ZipFile.c	Fri Feb 15 20:04:08 2008
@@ -84,7 +84,7 @@
 	char* str;
 
 	str = checkPtr(stringJava2C(zname));
-	entry = lookupJarFile((ZZIP_DIR*)zip, str);
+	entry = zzip_file_open((ZZIP_DIR*)zip, str, 0);
 	gc_free(str);
 
 	return entry;
@@ -157,7 +157,7 @@
 	do {
 	  zip_entry = zzip_readdir(zfile);
 	  if (NULL != zip_entry) {
-	    entry = lookupJarFile(zfile, zip_entry->d_name);
+	    entry = zzip_file_open(zfile, zip_entry->d_name, 0);
 	    elems[i] = (HObject*)makeZipEntry(entry, stringC2Java(zip_entry->d_name));
 	    i++;
 	  }




More information about the kaffe mailing list