[kaffe] CVS kaffe (guilhem): Fixlets for kaffeh.

Kaffe CVS cvs-commits at kaffe.org
Sun Jul 17 01:17:08 PDT 2005


PatchSet 6737 
Date: 2005/07/17 08:11:17
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixlets for kaffeh.

2005-07-17  Kurt Miller <truk at optonline.net>

        * kaffe/kaffeh/main.c
        (main): Handle inner classes. Added support for '-bootclasspath'.

Members: 
	ChangeLog:1.4261->1.4262 
	kaffe/kaffeh/main.c:1.16->1.17 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4261 kaffe/ChangeLog:1.4262
--- kaffe/ChangeLog:1.4261	Sat Jul 16 21:19:11 2005
+++ kaffe/ChangeLog	Sun Jul 17 08:11:17 2005
@@ -1,3 +1,8 @@
+2005-07-17  Kurt Miller <truk at optonline.net>
+
+	* kaffe/kaffeh/main.c
+	(main): Handle inner classes. Added support for '-bootclasspath'.
+	
 2005-07-16  Dalibor Topic  <robilad at kaffe.org>
 
 	* Resynced with GNU Classpath.
Index: kaffe/kaffe/kaffeh/main.c
diff -u kaffe/kaffe/kaffeh/main.c:1.16 kaffe/kaffe/kaffeh/main.c:1.17
--- kaffe/kaffe/kaffeh/main.c:1.16	Sat May  7 16:20:08 2005
+++ kaffe/kaffe/kaffeh/main.c	Sun Jul 17 08:11:20 2005
@@ -63,7 +63,7 @@
 main(int argc, char* argv[])
 {
 	char* nm;
-	int i, first = 1;
+	int i, j, first = 1;
 	int farg;
 
 	/* Process arguments */
@@ -91,28 +91,37 @@
 	for (nm = argv[farg]; nm != 0; nm = argv[++farg]) {
 
 		/* Derive various names from class name */
-		for (i = 0; nm[i] != 0; i++) {
-			if (i >= BUFSZ - 100) {
+		for (i = j = 0; nm[i] != 0; i++, j++) {
+			if (i >= BUFSZ - 100 || j >= BUFSZ - 105) {
 				dprintf(
 				    "kaffeh: class name too long\n");
 				exit(1);
 			}
 			switch (nm[i]) {
 			case '/':
-			case '$':
 			case '.':
-				className[i] = '_';
+				className[j] = '_';
 				pathName[i] = '/';
 				includeName[i] = '_';
 				break;
+			case '$':
+				className[j++] = '_';
+				className[j++] = '0';
+				className[j++] = '0';
+				className[j++] = '0';
+				className[j++] = '2';
+				className[j] = '4';
+				pathName[i] = nm[i];
+				includeName[i] = '_';
+				break;
 			default:
-				className[i] = nm[i];
+				className[j] = nm[i];
 				pathName[i] = nm[i];
 				includeName[i] = nm[i];
 				break;
 			}
 		}
-		className[i] = 0;
+		className[j] = 0;
 		pathName[i] = 0;
 		includeName[i] = 0;
 
@@ -237,6 +246,10 @@
 			i++;
 			strcpy(realClassPath, argv[i]);
 		}
+		else if (strcmp(argv[i], "-bootclasspath") == 0) {
+			i++;
+			strcpy(realClassPath, argv[i]);
+		}
 		else if (strcmp(argv[i], "-o") == 0) {
 			i++;
 			outputName = argv[i];
@@ -266,6 +279,7 @@
 	dprintf("	-help			Print this message\n");
 	dprintf("	-version		Print version number\n");
 	dprintf("	-classpath <path>	Set classpath\n");
+	dprintf("	-bootclasspath <path>	Set classpath\n");
 	dprintf("	-jni			Generate JNI interface\n");
 #ifdef KAFFE_VMDEBUG
 	dprintf("	-Xdebug <opts>		Kaffe debug options.\n");




More information about the kaffe mailing list