Changeset 2875
- Timestamp:
- Sep 4, 2016, 10:09:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/kSubmit.c
r2868 r2875 1141 1141 * @param pszValue The var=value string to apply. 1142 1142 */ 1143 static int kSubmitOptEnvSet(char ** papszEnv, unsigned *pcEnvVars, unsigned *pcAllocatedEnvVars,1143 static int kSubmitOptEnvSet(char ***ppapszEnv, unsigned *pcEnvVars, unsigned *pcAllocatedEnvVars, 1144 1144 int cVerbosity, const char *pszValue) 1145 1145 { … … 1147 1147 if (pszEqual) 1148 1148 { 1149 char **papszEnv = *ppapszEnv; 1149 1150 unsigned iEnvVar; 1150 1151 unsigned cEnvVars = *pcEnvVars; … … 1166 1167 { 1167 1168 *pcAllocatedEnvVars = (cEnvVars + 2 + 0xf) & ~(unsigned)0xf; 1168 papszEnv = (char **)xrealloc(papszEnv, *pcAllocatedEnvVars * sizeof(papszEnv[0]));1169 *ppapszEnv = papszEnv = (char **)xrealloc(papszEnv, *pcAllocatedEnvVars * sizeof(papszEnv[0])); 1169 1170 } 1170 1171 papszEnv[cEnvVars++] = xstrdup(pszValue); … … 1397 1398 { 1398 1399 char chOpt = *++pszArg; 1400 pszArg++; 1399 1401 if (chOpt != '-') 1400 1402 { … … 1409 1411 else 1410 1412 { 1411 pszArg++;1412 1413 1413 /* '--' indicates where the bits to execute start. */ 1414 1414 if (*pszArg == '\0') … … 1418 1418 } 1419 1419 1420 if (strcmp(pszArg, "watcom-brain-damage") == 0) 1420 if ( strcmp(pszArg, "wcc-brain-damage") == 0 1421 || strcmp(pszArg, "watcom-brain-damage") == 0) 1421 1422 { 1422 1423 fWatcomBrainDamage = 1; … … 1487 1488 1488 1489 case 'E': 1489 rcExit = kSubmitOptEnvSet( papszEnv, &cEnvVars, &cAllocatedEnvVars, cVerbosity, pszValue);1490 rcExit = kSubmitOptEnvSet(&papszEnv, &cEnvVars, &cAllocatedEnvVars, cVerbosity, pszValue); 1490 1491 pChild->environment = papszEnv; 1491 1492 if (rcExit == 0)
Note:
See TracChangeset
for help on using the changeset viewer.