Changeset 8382 for trunk/src/comctl32/comctl32undoc.c
- Timestamp:
- May 8, 2002, 1:26:30 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/comctl32undoc.c
r7815 r8382 5 5 * 1998 Juergen Schmied <j.schmied@metronet.de> 6 6 * 2000 Eric Kohl for CodeWeavers 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 7 21 * 8 22 * NOTES … … 34 48 #include "comctl32.h" 35 49 36 #include " debugtools.h"37 38 DEFAULT_DEBUG_CHANNEL(commctrl);50 #include "wine/debug.h" 51 52 WINE_DEFAULT_DEBUG_CHANNEL(commctrl); 39 53 40 54 … … 206 220 INT nCount; 207 221 LPVOID *pWork1, *pWork2; 208 INT nResult ;222 INT nResult, i; 209 223 INT nIndex; 210 224 … … 224 238 return FALSE; 225 239 226 if ( dwFlags & DPAM_SORT) {240 if (!(dwFlags & DPAM_NOSORT)) { 227 241 TRACE("sorting dpa's!\n"); 228 242 if (hdpa1->nItemCount > 0) … … 251 265 do 252 266 { 253 if (nIndex < 0) break; 267 if (nIndex < 0) { 268 if ((nCount >= 0) && (dwFlags & DPAM_INSERT)) { 269 /* Now insert the remaining new items into DPA 1 */ 270 TRACE("%d items to be inserted at start of DPA 1\n", 271 nCount+1); 272 for (i=nCount; i>=0; i--) { 273 PVOID ptr; 274 275 ptr = (pfnMerge)(3, *pWork2, NULL, lParam); 276 if (!ptr) 277 return FALSE; 278 DPA_InsertPtr (hdpa1, 0, ptr); 279 pWork2--; 280 } 281 } 282 break; 283 } 254 284 nResult = (pfnCompare)(*pWork1, *pWork2, lParam); 255 285 TRACE("compare result=%d, dpa1.cnt=%d, dpa2.cnt=%d\n", … … 270 300 pWork1--; 271 301 } 272 else if (nResult <0)302 else if (nResult > 0) 273 303 { 274 if (!(dwFlags & 8)) 304 /* item in DPA 1 missing from DPA 2 */ 305 if (dwFlags & DPAM_DELETE) 275 306 { 307 /* Now delete the extra item in DPA1 */ 276 308 PVOID ptr; 277 309 … … 285 317 else 286 318 { 287 if (!(dwFlags & 4)) 319 /* new item in DPA 2 */ 320 if (dwFlags & DPAM_INSERT) 288 321 { 322 /* Now insert the new item in DPA 1 */ 289 323 PVOID ptr; 290 324 … … 292 326 if (!ptr) 293 327 return FALSE; 294 DPA_InsertPtr (hdpa1, nIndex , ptr);328 DPA_InsertPtr (hdpa1, nIndex+1, ptr); 295 329 } 296 330 nCount--; … … 2800 2834 return TRUE; 2801 2835 } 2802
Note:
See TracChangeset
for help on using the changeset viewer.