Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2007-02-26 13:00:22 -0500
committerAndrew Niefer2007-02-26 13:00:22 -0500
commit82769ac6bab26cec6cd711023da572a87649d174 (patch)
treeee668352728e1dc3c38ed523cdfd3c32743db17a
parent008786d1021f08fee63f1ddf715a16d2980feb67 (diff)
downloadrt.equinox.framework-82769ac6bab26cec6cd711023da572a87649d174.tar.gz
rt.equinox.framework-82769ac6bab26cec6cd711023da572a87649d174.tar.xz
rt.equinox.framework-82769ac6bab26cec6cd711023da572a87649d174.zip
bug 173665
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseConfig.c11
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseOS.h1
-rw-r--r--bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c1
3 files changed, 10 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
index 8a78b42b6..f3ba7ba81 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
@@ -66,9 +66,10 @@ int readConfigFile( _TCHAR * config_file, int *argc, _TCHAR ***argv )
{
_TCHAR buffer[1024];
_TCHAR argument[1024];
+ _TCHAR * arg;
FILE *file = NULL;
int maxArgs = 128;
- int index;
+ int index, length;
/* Open the config file as a text file
* Note that carriage return-linefeed combination \r\n are automatically
@@ -90,7 +91,13 @@ int readConfigFile( _TCHAR * config_file, int *argc, _TCHAR ***argv )
*/
if (_stscanf(buffer, _T_ECLIPSE("%[^\n]"), argument) == 1)
{
- (*argv)[index] = _tcsdup(argument);
+ arg = _tcsdup(argument);
+ length = _tcslen(arg);
+ /* basic whitespace trimming */
+ while (arg[length - 1] == _T_ECLIPSE(' ') || arg[length - 1] == _T_ECLIPSE('\t')) {
+ arg[--length] = 0;
+ }
+ (*argv)[index] = arg;
index++;
/* Grow the array of TCHAR*. Ensure one more entry is
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseOS.h b/bundles/org.eclipse.equinox.executable/library/eclipseOS.h
index c142de599..4567a374e 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseOS.h
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseOS.h
@@ -31,6 +31,7 @@
#define restartLauncher restartLauncherW
#define launchJavaVM launchJavaVMW
#define eeLibPath eeLibPathW
+#define processVMArgs processVMArgsW
#endif
/* Operating System Dependent Information */
diff --git a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c
index 69e789954..8d7363363 100644
--- a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c
+++ b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c
@@ -367,4 +367,3 @@ static void CALLBACK detectJvmExit( HWND hwnd, UINT uMsg, UINT id, DWORD dwTime
void processVMArgs(_TCHAR **vmargs[] ) {
/* nothing yet */
}
-} \ No newline at end of file

Back to the top