儲存庫 vbox 的更動 13477
- 時間撮記:
- 2008-10-22 上午09:41:41 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/STAM.cpp
r13005 r13477 1524 1524 1525 1525 /** 1526 * Matches a sample name against a pattern.1527 *1528 * @returns True if matches, false if not.1529 * @param pszPat Pattern.1530 * @param pszName Name to match against the pattern.1531 */1532 static bool stamR3Match(const char *pszPat, const char *pszName)1533 {1534 /* ASSUMES ASCII */1535 for (;;)1536 {1537 char chPat = *pszPat;1538 switch (chPat)1539 {1540 default:1541 if (*pszName != chPat)1542 return false;1543 break;1544 1545 case '*':1546 {1547 while ((chPat = *++pszPat) == '*' || chPat == '?')1548 /* nothing */;1549 1550 for (;;)1551 {1552 char ch = *pszName++;1553 if ( ch == chPat1554 && ( !chPat1555 || stamR3Match(pszPat + 1, pszName)))1556 return true;1557 if (!ch)1558 return false;1559 }1560 /* won't ever get here */1561 break;1562 }1563 1564 case '?':1565 if (!*pszName)1566 return false;1567 break;1568 1569 case '\0':1570 return !*pszName;1571 }1572 pszName++;1573 pszPat++;1574 }1575 return true;1576 }1577 1578 1579 /**1580 1526 * Match a name against an array of patterns. 1581 1527 * … … 1592 1538 { 1593 1539 const char *pszPat = papszExpressions[i]; 1594 if ( stamR3Match(pszPat, pszName))1540 if (RTStrSimplePatternMatch(pszPat, pszName)) 1595 1541 { 1596 1542 /* later: … … 1706 1652 * no end (at least for debug and profile builds). */ 1707 1653 for (PSTAMDESC pCur = pUVM->stam.s.pHead; pCur; pCur = pCur->pNext) 1708 if ( stamR3Match(pszPat, pCur->pszName))1654 if (RTStrSimplePatternMatch(pszPat, pCur->pszName)) 1709 1655 { 1710 1656 rc = pfnCallback(pCur, pvArg);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器