Ignore:
Timestamp:
Mar 18, 2000, 5:17:35 PM (25 years ago)
Author:
cbratschi
Message:

Corel 20000317 merge, ccbase finished, bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/comctl32undoc.cpp

    r2875 r3154  
    1 /* $Id: comctl32undoc.cpp,v 1.1 2000-02-23 17:09:40 cbratschi Exp $ */
     1/* $Id: comctl32undoc.cpp,v 1.2 2000-03-18 16:17:22 cbratschi Exp $ */
    22/*
    33 * Undocumented functions from COMCTL32.DLL
     
    1313
    1414/*
    15  - Corel 20000212 level
    16  - WINE 20000130 level
     15 - Corel 20000317 level
     16 - (WINE 20000130 level)
    1717*/
    1818
     
    764764    LPVOID pSrc;
    765765
    766     dprintf(("COMCTL32: DSA_GetItem"));
     766    dprintf2(("COMCTL32: DSA_GetItem"));
    767767
    768768    if (!hdsa)
     
    797797    LPVOID pSrc;
    798798
    799     dprintf(("COMCTL32: DSA_GetItemPtr"));
     799    dprintf2(("COMCTL32: DSA_GetItemPtr"));
    800800
    801801    if (!hdsa)
     
    833833    LPVOID pDest, lpTemp;
    834834
    835     dprintf(("COMCTL32: DSA_SetItem"));
     835    dprintf2(("COMCTL32: DSA_SetItem"));
    836836
    837837    if ((!hdsa) || nIndex < 0)
     
    890890    LPDWORD p;
    891891
    892     dprintf(("COMCTL32: DSA_InsertItem"));
     892    dprintf2(("COMCTL32: DSA_InsertItem"));
    893893
    894894    if ((!hdsa) || nIndex < 0)
     
    959959    INT  nSize;
    960960
    961     dprintf(("COMCTL32: DSA_DeleteItem"));
     961    dprintf2(("COMCTL32: DSA_DeleteItem"));
    962962
    963963    if (!hdsa)
     
    12001200DPA_GetPtr (const HDPA hdpa, INT i)
    12011201{
    1202     dprintf(("COMCTL32: DPA_GetPtr"));
     1202    dprintf2(("COMCTL32: DPA_GetPtr"));
    12031203
    12041204    if (!hdpa)
     
    12341234    INT i;
    12351235
    1236     dprintf(("COMCTL32: DPA_GetPtrIndex"));
     1236    dprintf2(("COMCTL32: DPA_GetPtrIndex"));
    12371237
    12381238    if (!hdpa->ptrs)
     
    12691269    LPVOID  *lpTemp, *lpDest;
    12701270
    1271     dprintf(("COMCTL32: DPA_InsertPtr"));
     1271    dprintf2(("COMCTL32: DPA_InsertPtr"));
    12721272
    12731273    if ((!hdpa) || (i < 0))
     
    13411341    LPVOID *lpTemp;
    13421342
    1343     dprintf(("COMCTL32: DPA_SetPtr"));
     1343    dprintf2(("COMCTL32: DPA_SetPtr"));
    13441344
    13451345    if ((!hdpa) || i < 0)
     
    13951395    INT  nSize;
    13961396
    1397     dprintf(("COMCTL32: DPA_DeletePtr"));
     1397    dprintf2(("COMCTL32: DPA_DeletePtr"));
    13981398
    13991399    if ((!hdpa) || i < 0 || i >= hdpa->nItemCount)
     
    14791479 * RETURNS
    14801480 *     NONE
     1481 *
     1482 * NOTES:
     1483 *          Reverted back to the orginal quick sort, because the existing sort did not sort.
     1484 *          Kudos to the orginal author of the quick sort.
    14811485 */
    14821486
     
    14921496    i = l;
    14931497    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 )
     1498    v = lpPtrs[(int)(l+r)/2];
     1499    do {
     1500        while ((pfnCompare)(lpPtrs[i], v, lParam) < 0) i++;
     1501        while ((pfnCompare)(lpPtrs[j], v, lParam) > 0) j--;
     1502        if (i <= j)
    15001503        {
    1501             t = lpPtrs[i];
    1502             lpPtrs[i] = lpPtrs[j];
    1503             lpPtrs[j] = t;
    1504         }
    1505         return;
    1506     }
    1507 
    1508     v = lpPtrs[(int)(l+r)/2];
    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 )
    1519         {
    1520             /* Swap the values; increment i and decrement j to avoid
    1521                infinite conditions where i and j swap forever */
    15221504            t = lpPtrs[i];
    15231505            lpPtrs[i++] = lpPtrs[j];
    15241506            lpPtrs[j--] = t;
    15251507        }
    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);
     1508    } while (i <= j);
     1509    if (l < j) DPA_QuickSort (lpPtrs, l, j, pfnCompare, lParam);
     1510    if (i < r) DPA_QuickSort (lpPtrs, i, r, pfnCompare, lParam);
    15321511}
    15331512
Note: See TracChangeset for help on using the changeset viewer.