Changeset 86 for trunk/src/helpers/linklist.c
- Timestamp:
- Jul 15, 2001, 10:57:25 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/linklist.c
r74 r86 263 263 } 264 264 265 #e ndif// __DEBUG_MALLOC_ENABLED__265 #else // __DEBUG_MALLOC_ENABLED__ 266 266 267 267 /* … … 286 286 */ 287 287 288 PLINKLIST (lstCreate)(BOOL fItemsFreeable) // in: invoke free() on the data288 PLINKLIST lstCreate(BOOL fItemsFreeable) // in: invoke free() on the data 289 289 // item pointers upon destruction? 290 290 { … … 294 294 return (pNewList); 295 295 } 296 297 #endif // __DEBUG_MALLOC_ENABLED__ 296 298 297 299 /* … … 614 616 } 615 617 616 #e ndif// __DEBUG_MALLOC_ENABLED__618 #else // __DEBUG_MALLOC_ENABLED__ 617 619 618 620 /* … … 626 628 */ 627 629 628 PLISTNODE (lstAppendItem)(PLINKLIST pList,630 PLISTNODE lstAppendItem(PLINKLIST pList, 629 631 void* pNewItemData) // in: data to store in list node 630 632 { … … 668 670 } 669 671 672 #endif // __DEBUG_MALLOC_ENABLED__ 673 670 674 /* 671 675 *@@ lstInsertItemBefore: … … 688 692 * This returns the LISTNODE of the new list item, 689 693 * or NULL upon errors. 694 * 695 *@@changed V0.9.14 (2001-07-14) [umoeller]: this never worked on empty lists, fixed 690 696 */ 691 697 … … 716 722 pList->pFirst = pNewNode; 717 723 718 pList->ulCount++; 724 if (!pList->pLast) 725 // the list was empty: 726 pList->pLast = pNewNode; // V0.9.14 (2001-07-14) [umoeller] 727 728 (pList->ulCount)++; 719 729 } 720 730 else … … 744 754 pList->pLast = pNewNode; 745 755 746 pList->ulCount++;756 (pList->ulCount)++; 747 757 } 748 758 else
Note:
See TracChangeset
for help on using the changeset viewer.