harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r482522 - /harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c
Date Tue, 05 Dec 2006 06:40:11 GMT
Author: geirm
Date: Mon Dec  4 22:40:10 2006
New Revision: 482522

URL: http://svn.apache.org/viewvc?view=rev&rev=482522
Log:
minor cleanup 


Modified:
    harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c

Modified: harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c?view=diff&rev=482522&r1=482521&r2=482522
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c (original)
+++ harmony/enhanced/jdktools/trunk/modules/samsa/src/main/native/samsa/samsa.c Mon Dec  4
22:40:10 2006
@@ -26,10 +26,8 @@
 #endif
 
 #define TOOL_JAR      "tools.jar"
-#define ECJ_JAR       "ecj_3.2.jar"
 #define CLASS_PREFIX  "org.apache.harmony.tools."
 #define CLASS_POSTFIX ".Main"
-#define PATH_SEP      "/"
 
 typedef struct ToolData {
     int numJars; 
@@ -37,17 +35,19 @@
 } TOOLDATA;
 
 #if defined(LINUX)
-#define PATH_SEPARATOR '/'
-#define EXE_POSTFIX   "/jre/bin/java"
-#define LIB_POSTFIX   "/lib/"
-#define CLASSPATH_SEP ":"
+#define PATH_SEPARATOR_CHAR '/'
+#define PATH_SEPARATOR      "/"
+#define EXE_POSTFIX         "/jre/bin/java"
+#define LIB_POSTFIX         "/lib/"
+#define CLASSPATH_SEP       ":"
 #endif
 
 #if defined(WIN32)
-#define PATH_SEPARATOR '\\'
-#define EXE_POSTFIX   "\\jre\\bin\\java.exe"
-#define LIB_POSTFIX   "\\lib\\"
-#define CLASSPATH_SEP ";"
+#define PATH_SEPARATOR_CHAR '\\'
+#define PATH_SEPARATOR      "\\"
+#define EXE_POSTFIX         "\\jre\\bin\\java.exe"
+#define LIB_POSTFIX         "\\lib\\"
+#define CLASSPATH_SEP       ";"
 #endif
 
 char *cleanToolName(const char *);
@@ -234,7 +234,7 @@
     
     char *exeDir = getExeDir();
 
-    char *last = strrchr(exeDir, PATH_SEPARATOR);
+    char *last = strrchr(exeDir, PATH_SEPARATOR_CHAR);
     
     if (last != NULL) { 
         *last = '\0';
@@ -267,7 +267,7 @@
     // FIXME - handle this right
 #endif
 
-    last = strrchr(buffer, PATH_SEPARATOR);
+    last = strrchr(buffer, PATH_SEPARATOR_CHAR);
 
     if (last != NULL) { 
         *last = '\0';
@@ -305,16 +305,16 @@
    /*
     *  assumes that the data files are in jdk/bin/data with a ".dat" extension
     */ 
-    temp = (char *) malloc(strlen(jdkRoot) + strlen(PATH_SEP) + strlen("bin") 
-            + strlen(PATH_SEP) + strlen("data") + strlen(PATH_SEP) + strlen(toolName) 
+    temp = (char *) malloc(strlen(jdkRoot) + strlen(PATH_SEPARATOR) + strlen("bin") 
+            + strlen(PATH_SEPARATOR) + strlen("data") + strlen(PATH_SEPARATOR) + strlen(toolName)

             + strlen(".dat") + 1);
                 
     strcpy(temp, jdkRoot);
-    strcat(temp, PATH_SEP);
+    strcat(temp, PATH_SEPARATOR);
     strcat(temp, "bin");
-    strcat(temp, PATH_SEP);
+    strcat(temp, PATH_SEPARATOR);
     strcat(temp, "data");
-    strcat(temp, PATH_SEP);
+    strcat(temp, PATH_SEPARATOR);
     strcat(temp, toolName);
     strcat(temp, ".dat");
     



Mime
View raw message