You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2006/09/21 04:09:17 UTC
svn commit: r448431 -
/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
Author: geirm
Date: Wed Sep 20 19:09:16 2006
New Revision: 448431
URL: http://svn.apache.org/viewvc?view=rev&rev=448431
Log:
Fixing where I broke the compile on windows - moved decls
to top of respective blocks.
Sorry all.
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?view=diff&rev=448431&r1=448430&r2=448431
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c Wed Sep 20 19:09:16 2006
@@ -132,6 +132,8 @@
int genericLauncher = 0;
char *str;
char *knownGenericNames[] = { "java", "java.exe", "javaw.exe", NULL };
+ char *dirs[2];
+
PORT_ACCESS_FROM_PORT (args->portLibrary);
@@ -299,7 +301,6 @@
/* HYNLS_EXELIB_INTERNAL_VM_ERR_OUT_OF_MEMORY=Internal VM error: Out of memory\n */
PORTLIB->nls_printf (PORTLIB, HYNLS_ERROR,
HYNLS_EXELIB_INTERNAL_VM_ERR_OUT_OF_MEMORY);
- goto bail;
}
vmiPath[0] = '\0';
strcpy (newPathToAdd, exeName);
@@ -308,8 +309,6 @@
strcat (vmiPath, DIR_SEPERATOR_STRING);
strcat (vmiPath, vmdll);
- char *dirs[2];
-
dirs[0] = newPathToAdd;
dirs[1] = exeName;
@@ -1016,10 +1015,12 @@
char *oldPath = NULL;
char *variableName = NULL;
char *separator = NULL;
- UDATA newPathLength;
char *newPath;
int rc = 0;
char *exeName;
+ int found = 0;
+ int i=0;
+ int strLen;
PORT_ACCESS_FROM_PORT (portLibrary);
@@ -1042,9 +1043,6 @@
* see if we can find all paths in the current path
*/
- int found = 0;
- int i=0;
-
for (i=0; i < count; i++) {
if (newPathToAdd[i] != NULL && strstr(oldPath, newPathToAdd[i]) != 0) {
found++;
@@ -1064,7 +1062,7 @@
* short) and then add the old path on the end
*/
- int strLen = strlen(variableName) + strlen("=") + strlen(oldPath);
+ strLen = strlen(variableName) + strlen("=") + strlen(oldPath);
for (i=0; i < count; i++) {
if (newPathToAdd[i] != NULL && strstr(oldPath, newPathToAdd[i]) == 0) {