Changeset 2858 for trunk/src/comctl32/comctl32undoc.c
- Timestamp:
- Feb 22, 2000, 6:11:41 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/comctl32undoc.c
r2820 r2858 1 /* $Id: comctl32undoc.c,v 1.1 8 2000-02-18 17:13:37cbratschi Exp $ */1 /* $Id: comctl32undoc.c,v 1.19 2000-02-22 17:11:38 cbratschi Exp $ */ 2 2 /* 3 3 * Undocumented functions from COMCTL32.DLL … … 12 12 */ 13 13 14 /* WINE 20000130 level */ 14 /* 15 - Corel 20000212 level 16 - WINE 20000130 level 17 */ 15 18 16 19 /* CB: todo … … 1485 1488 INT i, j; 1486 1489 1487 // TRACE (commctrl,"l=%i r=%i\n", l, r);1490 //TRACE("l=%i r=%i\n", l, r); 1488 1491 1489 1492 i = l; 1490 1493 j = r; 1494 1495 if ( i >= j ) 1496 return; 1497 else if ( i == (j - 1) ) 1498 { 1499 if ( (pfnCompare)( lpPtrs[i], lpPtrs[j], lParam ) > 0 ) 1500 { 1501 t = lpPtrs[i]; 1502 lpPtrs[i] = lpPtrs[j]; 1503 lpPtrs[j] = t; 1504 } 1505 return; 1506 } 1507 1491 1508 v = lpPtrs[(int)(l+r)/2]; 1492 do { 1493 while ((pfnCompare)(lpPtrs[i], v, lParam) < 0) i++; 1494 while ((pfnCompare)(lpPtrs[j], v, lParam) > 0) j--; 1495 if (i <= j) 1509 1510 while ( i < j) 1511 { 1512 while ( (pfnCompare)( lpPtrs[i], v, lParam ) <= 0 && i < j ) 1513 i++; 1514 1515 while ( (pfnCompare)( v, lpPtrs[j], lParam ) <= 0 && i < j ) 1516 j--; 1517 1518 if ( i < j ) 1496 1519 { 1520 /* Swap the values; increment i and decrement j to avoid 1521 infinite conditions where i and j swap forever */ 1497 1522 t = lpPtrs[i]; 1498 1523 lpPtrs[i++] = lpPtrs[j]; 1499 1524 lpPtrs[j--] = t; 1500 1525 } 1501 } while (i <= j); 1502 if (l < j) DPA_QuickSort (lpPtrs, l, j, pfnCompare, lParam); 1503 if (i < r) DPA_QuickSort (lpPtrs, i, r, pfnCompare, lParam); 1526 } 1527 1528 if ( i - 1 > l ) 1529 DPA_QuickSort (lpPtrs, l, i - 1, pfnCompare, lParam); 1530 if ( j + 1 < r ) 1531 DPA_QuickSort (lpPtrs, j + 1, r, pfnCompare, lParam); 1504 1532 } 1505 1533
Note:
See TracChangeset
for help on using the changeset viewer.