Changeset 13836 in vbox for trunk/src/VBox/Runtime/common/string
- Timestamp:
- Nov 5, 2008 2:42:54 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 38827
- Location:
- trunk/src/VBox/Runtime/common/string
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strformatrt.cpp
r11413 r13836 271 271 const char *pszType = *ppszFormat - 1; 272 272 int iStart = 0; 273 int iEnd = ELEMENTS(s_aTypes) - 1;274 int i = ELEMENTS(s_aTypes) / 2;273 int iEnd = RT_ELEMENTS(s_aTypes) - 1; 274 int i = RT_ELEMENTS(s_aTypes) / 2; 275 275 276 276 union … … 765 765 const char *pszType = *ppszFormat - 1; 766 766 int iStart = 0; 767 int iEnd = ELEMENTS(s_aTypes) - 1;768 int i = ELEMENTS(s_aTypes) / 2;767 int iEnd = RT_ELEMENTS(s_aTypes) - 1; 768 int i = RT_ELEMENTS(s_aTypes) / 2; 769 769 770 770 union -
trunk/src/VBox/Runtime/common/string/uniread.cpp
r8245 r13836 361 361 362 362 RTUNICP CodePoint = ToNum(pszCodePoint); 363 if (CodePoint >= ELEMENTS(g_aCPInfo))363 if (CodePoint >= RT_ELEMENTS(g_aCPInfo)) 364 364 continue; 365 365 … … 394 394 } 395 395 /* catchup? */ 396 while (i < ELEMENTS(g_aCPInfo))396 while (i < RT_ELEMENTS(g_aCPInfo)) 397 397 NullEntry(i++); 398 398 fclose(pFile); … … 410 410 static void ApplyProperty(RTUNICP StartCP, const char *pszProperty) 411 411 { 412 if (StartCP >= ELEMENTS(g_aCPInfo))412 if (StartCP >= RT_ELEMENTS(g_aCPInfo)) 413 413 return; 414 414 struct CPINFO *pCPInfo = &g_aCPInfo[StartCP]; … … 649 649 RTUNICP i = 0; 650 650 int iStart = -1; 651 while (i < ELEMENTS(g_aCPInfo))651 while (i < RT_ELEMENTS(g_aCPInfo)) 652 652 { 653 653 /* figure how far off the next chunk is */ … … 655 655 unsigned iNonNull = i; 656 656 while ( (g_aCPInfo[iNonNull].fNullEntry || !CalcFlags(&g_aCPInfo[iNonNull], szFlags)) 657 && iNonNull < ELEMENTS(g_aCPInfo)657 && iNonNull < RT_ELEMENTS(g_aCPInfo) 658 658 && iNonNull >= 256) 659 659 iNonNull++; 660 if (iNonNull - i > 4096 || iNonNull == ELEMENTS(g_aCPInfo))660 if (iNonNull - i > 4096 || iNonNull == RT_ELEMENTS(g_aCPInfo)) 661 661 { 662 662 if (iStart >= 0) … … 698 698 RTUNICP i = 0; 699 699 int iStart = -1; 700 while (i < ELEMENTS(g_aCPInfo))700 while (i < RT_ELEMENTS(g_aCPInfo)) 701 701 { 702 702 /* figure how far off the next chunk is */ 703 703 unsigned iSameCase = i; 704 704 while ( g_aCPInfo[iSameCase].SimpleUpperCaseMapping == g_aCPInfo[iSameCase].CodePoint 705 && iSameCase < ELEMENTS(g_aCPInfo)705 && iSameCase < RT_ELEMENTS(g_aCPInfo) 706 706 && iSameCase >= 256) 707 707 iSameCase++; 708 if (iSameCase - i > 4096/sizeof(RTUNICP) || iSameCase == ELEMENTS(g_aCPInfo))708 if (iSameCase - i > 4096/sizeof(RTUNICP) || iSameCase == RT_ELEMENTS(g_aCPInfo)) 709 709 { 710 710 if (iStart >= 0) … … 745 745 RTUNICP i = 0; 746 746 int iStart = -1; 747 while (i < ELEMENTS(g_aCPInfo))747 while (i < RT_ELEMENTS(g_aCPInfo)) 748 748 { 749 749 /* figure how far off the next chunk is */ 750 750 unsigned iSameCase = i; 751 751 while ( g_aCPInfo[iSameCase].SimpleLowerCaseMapping == g_aCPInfo[iSameCase].CodePoint 752 && iSameCase < ELEMENTS(g_aCPInfo)752 && iSameCase < RT_ELEMENTS(g_aCPInfo) 753 753 && iSameCase >= 256) 754 754 iSameCase++; 755 if (iSameCase - i > 4096/sizeof(RTUNICP) || iSameCase == ELEMENTS(g_aCPInfo))755 if (iSameCase - i > 4096/sizeof(RTUNICP) || iSameCase == RT_ELEMENTS(g_aCPInfo)) 756 756 { 757 757 if (iStart >= 0)
Note:
See TracChangeset
for help on using the changeset viewer.