Skip to content

Commit

Permalink
eclipse.c: improved program argument comment vs count consistency.
Browse files Browse the repository at this point in the history
- Fixed comment to match implementation.
- Align comment/count lines to make it easier to keep them consistent.
  • Loading branch information
dhendriks committed Jun 23, 2024
1 parent bd786c0 commit 808b90f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions features/org.eclipse.equinox.executable.feature/library/eclipse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,12 +1103,15 @@ static void getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmA
(*vmArgv)[dst] = NULL;

/* Program arguments */
/* OS <os> + WS <ws> + ARCH <arch> + LAUNCHER <launcher> + NAME <officialName> +
* + LIBRARY <library> + SHOWSPLASH <cmd> + EXITDATA <cmd> + STARTUP <jar> + OVERRIDE/APPEND + argv[] + VM + <vm> +
* VMARGS + vmArg + requiredVMargs
/* OS <os> + WS <ws> + ARCH <arch> + SHOWSPLASH <cmd> + LAUNCHER <program> + NAME <officialName>
* + LIBRARY <eclipseLibrary> + STARTUP <jarFile> + PROTECT <protectMode> + APPEND/OVERRIDE
* + EXITDATA <sharedId> + argv[] + VM <jniLib/javaVM> + 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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 808b90f

Please sign in to comment.