Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2007-08-21 13:45:17 +0000
committerAndrew Niefer2007-08-21 13:45:17 +0000
commit1389d58ac191af2bdb04fe64e233cc3c9612e6d1 (patch)
tree3e23d2f9e7599dd96e97e710a08af0551ba6fba9 /bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
parentfd7e6318858ce092598e344b812ff441bc9f63dc (diff)
downloadrt.equinox.framework-1389d58ac191af2bdb04fe64e233cc3c9612e6d1.tar.gz
rt.equinox.framework-1389d58ac191af2bdb04fe64e233cc3c9612e6d1.tar.xz
rt.equinox.framework-1389d58ac191af2bdb04fe64e233cc3c9612e6d1.zip
bug 198823
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/eclipseConfig.c')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseConfig.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
index 0edb80ce2..7930b1d68 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
@@ -85,7 +85,8 @@ int readConfigFile( _TCHAR * config_file, int *argc, _TCHAR ***argv )
/* Open the config file as a text file
* Note that carriage return-linefeed combination \r\n are automatically
- * translated into single linefeeds on input in the t (translated) mode.
+ * translated into single linefeeds on input in the t (translated) mode
+ * on windows, on other platforms we will strip the \r as whitespace.
*/
file = _tfopen(config_file, _T_ECLIPSE("rt"));
if (file == NULL) return -3;
@@ -111,7 +112,10 @@ int readConfigFile( _TCHAR * config_file, int *argc, _TCHAR ***argv )
continue;
/* basic whitespace trimming */
- while (length > 0 && (arg[length - 1] == _T_ECLIPSE(' ') || arg[length - 1] == _T_ECLIPSE('\t'))) {
+ while (length > 0 && (arg[length - 1] == _T_ECLIPSE(' ') ||
+ arg[length - 1] == _T_ECLIPSE('\t') ||
+ arg[length - 1] == _T_ECLIPSE('\r')))
+ {
arg[--length] = 0;
}
/* ignore empty lines */

Back to the top