From 808b90f9ccc486f614dc989be24cef6e9c73b7e1 Mon Sep 17 00:00:00 2001 From: Dennis Hendriks Date: Tue, 18 Jun 2024 19:37:02 +0200 Subject: [PATCH] eclipse.c: improved program argument comment vs count consistency. - Fixed comment to match implementation. - Align comment/count lines to make it easier to keep them consistent. --- .../library/eclipse.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c index d4796c2e87..1ea56bf3da 100644 --- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c +++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c @@ -1103,12 +1103,15 @@ static void getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmA (*vmArgv)[dst] = NULL; /* Program arguments */ - /* OS + WS + ARCH + LAUNCHER + NAME + - * + LIBRARY + SHOWSPLASH + EXITDATA + STARTUP + OVERRIDE/APPEND + argv[] + VM + + - * VMARGS + vmArg + requiredVMargs + /* OS + WS + ARCH + SHOWSPLASH + LAUNCHER + NAME + * + LIBRARY + STARTUP + PROTECT + APPEND/OVERRIDE + * + EXITDATA + argv[] + VM + VMARGS + vmArg[] + eeVMarg[] + reqVMarg[] * + NULL) */ - totalProgArgs = 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 1 + argc + 2 + 1 + nVMarg + nEEargs + nReqVMarg + 1; + totalProgArgs = 2 + 2 + 2 + 2 + 2 + 2 + + 2 + 2 + 2 + 1 + + 2 + argc + 2 + 1 + nVMarg + nEEargs + nReqVMarg + + 1; *progArgv = malloc( totalProgArgs * sizeof( _TCHAR* ) ); dst = 0; @@ -1157,6 +1160,11 @@ static void getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmA /* override or append vm args */ (*progArgv)[ dst++ ] = appendVmargs ? APPEND_VMARGS : OVERRIDE_VMARGS; + /* 'No restart' argument, if applicable. */ + if (noRestart) { + (*progArgv)[ dst++ ] = LAUNCHER_NORESTART; + } + /* Append the exit data command. */ if (sharedID) { (*progArgv)[ dst++ ] = EXITDATA;