Changeset 41303 in vbox for trunk/src/bldprogs
- Timestamp:
- May 15, 2012 10:17:39 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77972
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bldprogs/VBoxCPP.cpp
r41301 r41303 523 523 *******************************************************************************/ 524 524 static PVBCPPMACRO vbcppMacroLookup(PVBCPP pThis, const char *pszDefine, size_t cchDefine); 525 static RTEXITCODE vbcppMacroExpandIt(PVBCPP pThis, PVBCPPMACROEXP pExp, size_t offMacro, PVBCPPMACRO pMacro, size_t *poffParameters);525 static RTEXITCODE vbcppMacroExpandIt(PVBCPP pThis, PVBCPPMACROEXP pExp, size_t offMacro, PVBCPPMACRO pMacro, size_t offParameters); 526 526 static RTEXITCODE vbcppMacroExpandReScan(PVBCPP pThis, PVBCPPMACROEXP pExp, VBCPPMACRORESCANMODE enmMode, size_t *pcReplacements); 527 527 static void vbcppMacroExpandCleanup(PVBCPPMACROEXP pExp); … … 1578 1578 rcExit = vbcppStrBufAppendN(&ExpCtx.StrBuf, pchDefine, cchDefine); 1579 1579 if (rcExit == RTEXITCODE_SUCCESS) 1580 { 1581 size_t offIgnore = cchDefine; 1582 rcExit = vbcppMacroExpandIt(pThis, &ExpCtx, 0 /* offset */, pMacro, &offIgnore); 1583 } 1580 rcExit = vbcppMacroExpandIt(pThis, &ExpCtx, 0 /* offset */, pMacro, cchDefine); 1584 1581 if (rcExit == RTEXITCODE_SUCCESS) 1585 1582 rcExit = vbcppMacroExpandReScan(pThis, &ExpCtx, kMacroReScanMode_Normal, NULL); … … 2195 2192 * invocation. 2196 2193 * @param pMacro The macro. 2197 * @param poffParameters The start of the parameter list if applicable. 2198 * Ignored if not function macro. 2199 * 2200 * If the parameter list starts at the current stream position shall 2201 * be at the end of the expansion buffer. 2202 * 2203 * Will be advanced to the character following the 2204 * closing parenthesis on success. Undefined on 2205 * failure. 2194 * @param offParameters The start of the parameter list if applicable. 2195 * Ignored if not function macro. If the 2196 * parameter list starts at the current stream 2197 * position shall be at the end of the expansion 2198 * buffer. 2206 2199 */ 2207 2200 static RTEXITCODE vbcppMacroExpandIt(PVBCPP pThis, PVBCPPMACROEXP pExp, size_t offMacro, PVBCPPMACRO pMacro, 2208 size_t *poffParameters)2201 size_t offParameters) 2209 2202 { 2210 2203 RTEXITCODE rcExit; … … 2217 2210 if (pMacro->fFunction) 2218 2211 { 2219 rcExit = vbcppMacroExpandGatherParameters(pThis, pExp, poffParameters, pMacro->cArgs + pMacro->fVarArg);2212 rcExit = vbcppMacroExpandGatherParameters(pThis, pExp, &offParameters, pMacro->cArgs + pMacro->fVarArg); 2220 2213 if (rcExit == RTEXITCODE_SUCCESS) 2221 2214 { … … 2233 2226 rcExit = vbcppMacroExpandValueWithArguments(pThis, pExp, pMacro, &ValueBuf); 2234 2227 if (rcExit == RTEXITCODE_SUCCESS) 2235 rcExit = vbcppMacroExpandReplace(pThis, pExp, offMacro, *poffParameters - offMacro,2228 rcExit = vbcppMacroExpandReplace(pThis, pExp, offMacro, offParameters - offMacro, 2236 2229 ValueBuf.pszBuf, ValueBuf.cchBuf); 2237 2230 vbcppStrBufDelete(&ValueBuf); … … 2446 2439 && ( !pMacro->fFunction 2447 2440 || vbcppMacroExpandLookForLeftParenthesis(pThis, pExp, &off)) ) 2448 rcExit = vbcppMacroExpandIt(pThis, pExp, offDefine, pMacro, &off); 2441 { 2442 rcExit = vbcppMacroExpandIt(pThis, pExp, offDefine, pMacro, off); 2443 off = offDefine; 2444 } 2449 2445 else 2450 2446 {
Note:
See TracChangeset
for help on using the changeset viewer.