Changeset 91 for trunk/src/helpers/memdebug_win.c
- Timestamp:
- Aug 2, 2001, 10:36:35 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/memdebug_win.c
r71 r91 104 104 105 105 ULONG ulLine; 106 107 ULONG ulAddress; // has pAfterMagic, invisible, only 108 // for sorting V0.9.14 (2001-08-01) [umoeller] 106 109 107 110 PSZ pszAddress; // points to szAddress … … 235 238 } 236 239 237 sprintf(pMemRecordThis->szAddress, "0x%lX", pMemRecordThis->pObject); 238 strcpy(pMemRecordThis->szSource, 240 pMemRecordThis->ulAddress = (ULONG)pMemRecordThis->pObject; 241 242 sprintf(pMemRecordThis->szAddress, 243 "0x%lX", 244 pMemRecordThis->pObject); 245 strhcpy(pMemRecordThis->szSource, 239 246 (pMemRecordThis->filename) 240 247 ? pMemRecordThis->filename … … 332 339 pMemRecordThis->ulTID = pHeapItem->ulTID; 333 340 334 str cpy(pMemRecordThis->szSource, pHeapItem->pcszSourceFile);341 strhcpy(pMemRecordThis->szSource, pHeapItem->pcszSourceFile); 335 342 pMemRecordThis->pszSource = pMemRecordThis->szSource; 336 343 337 344 pMemRecordThis->ulLine = pHeapItem->ulLine; 338 345 339 str cpy(pMemRecordThis->szFunction, pHeapItem->pcszFunction);346 strhcpy(pMemRecordThis->szFunction, pHeapItem->pcszFunction); 340 347 pMemRecordThis->pszFunction = pMemRecordThis->szFunction; 341 348 342 sprintf(pMemRecordThis->szAddress, "0x%lX", pHeapItem->pAfterMagic); 349 pMemRecordThis->ulAddress = (ULONG)pHeapItem->pAfterMagic; 350 351 sprintf(pMemRecordThis->szAddress, 352 "0x%lX", 353 pHeapItem->pAfterMagic); 343 354 pMemRecordThis->pszAddress = pMemRecordThis->szAddress; 344 355 … … 361 372 362 373 sprintf(pMemRecordThis->szAddress, "0x%lX", pMemRecordThis->pObject); 363 str cpy(pMemRecordThis->szSource,374 strhcpy(pMemRecordThis->szSource, 364 375 (pMemRecordThis->filename) 365 376 ? pMemRecordThis->filename … … 391 402 SHORT EXPENTRY mnu_fnCompareIndex(PMEMRECORD pmrc1, PMEMRECORD pmrc2, PVOID pStorage) 392 403 { 393 // HAB habDesktop = WinQueryAnchorBlock(HWND_DESKTOP);394 404 pStorage = pStorage; // to keep the compiler happy 395 405 if ((pmrc1) && (pmrc2)) … … 434 444 *@@ mnu_fnCompareSourceFile: 435 445 * 436 * V0.9.6 (2000-11-12) [umoeller]446 *@@added V0.9.6 (2000-11-12) [umoeller] 437 447 */ 438 448 439 449 SHORT EXPENTRY mnu_fnCompareSize(PMEMRECORD pmrc1, PMEMRECORD pmrc2, PVOID pStorage) 440 450 { 441 HAB habDesktop = WinQueryAnchorBlock(HWND_DESKTOP);442 451 pStorage = pStorage; // to keep the compiler happy 443 452 if ((pmrc1) && (pmrc2)) … … 452 461 } 453 462 463 /* 464 *@@ mnu_fnCompareAddress: 465 * 466 *@@added V0.9.14 (2001-08-01) [umoeller] 467 */ 468 469 SHORT EXPENTRY mnu_fnCompareAddress(PMEMRECORD pmrc1, PMEMRECORD pmrc2, PVOID pStorage) 470 { 471 pStorage = pStorage; // to keep the compiler happy 472 if ((pmrc1) && (pmrc2)) 473 { 474 if (pmrc1->ulAddress > pmrc2->ulAddress) 475 return (1); 476 else if (pmrc1->ulAddress < pmrc2->ulAddress) 477 return (-1); 478 } 479 480 return (0); 481 } 482 454 483 #define ID_MEMCNR 1000 455 484 … … 469 498 * 470 499 *@@added V0.9.1 (99-12-04) [umoeller] 500 *@@changed V0.9.14 (2001-08-01) [umoeller]: added sort by address 471 501 */ 472 502 … … 648 678 "Sort by object size", 649 679 MIS_TEXT, 0); 680 winhInsertMenuItem(G_hwndMemDebugMenu, 681 MIT_END, 682 1004, 683 "Sort by address", 684 MIS_TEXT, 0); 650 685 651 686 WinSetFocus(HWND_DESKTOP, hwndCnr); … … 715 750 CM_SORTRECORD, 716 751 (MPARAM)mnu_fnCompareSize, 752 0); 753 break; 754 755 case 1004: // sort by address V0.9.14 (2001-08-01) [umoeller] 756 WinSendMsg(WinWindowFromID(hwndClient, ID_MEMCNR), 757 CM_SORTRECORD, 758 (MPARAM)mnu_fnCompareAddress, 717 759 0); 718 760 break; … … 788 830 { 789 831 int i = 0; 832 i++; 790 833 } 791 834 #endif
Note:
See TracChangeset
for help on using the changeset viewer.