Ignore:
Timestamp:
Apr 2, 2001, 12:38:55 PM (24 years ago)
Author:
umoeller
Message:

Dialog mgr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/linklist.c

    r47 r53  
    10711071 *      a pseudo-stack LIFO LINKLIST using lstPush.
    10721072 *
    1073  *      Note that to really "pop" the item, i.e. remove
    1074  *      it from the list, you MUST call lstRemoveNode
    1075  *      with the list node returned from this function,
    1076  *      or otherwise you keep getting the same last item
    1077  *      on subsequent calls.
     1073 *      If (fRemove == TRUE), the item is also removed
     1074 *      from the stack. Otherwise it remains there so the
     1075 *      next lstPop would return the next item.
    10781076 *
    10791077 *      Example:
     
    10811079 +          LINKLIST ll;
    10821080 +          PLISTNODE pNode;
    1083  +          lstInit(&ll, FALSE;
     1081 +          lstInit(&ll, FALSE);
    10841082 +
    10851083 +          lstPush(&ll, (PVOID)1);
    10861084 +          lstPush(&ll, (PVOID)2);
    10871085 +
    1088  +          pNode = lstPop(&ll);     // returns the node containing "2"
     1086 +          pNode = lstPop(&ll);  // returns the node containing "2"
    10891087 +          lstRemoveNode(pNode);
    1090  +          pNode = lstPop(&ll);     // returns the node containing "1"
    1091  +          lstRemoveNode(pNode);
     1088 +          pNode = lstPop(&ll);  // returns the node containing "1"
    10921089 *
    10931090 *@@added V0.9.3 (2000-05-18) [umoeller]
     
    10971094{
    10981095    return (pList->pLast);
    1099     /* unsigned long cItems = lstCountItems(pList);
    1100     if (cItems)
    1101     {
    1102         // list not empty:
    1103         // get last item on the list
    1104         pNodeReturn = lstNodeFromIndex(pList,
    1105                                        cItems - 1);
    1106     }
    1107     return (pNodeReturn); */
    1108 }
    1109 
     1096}
     1097
     1098
Note: See TracChangeset for help on using the changeset viewer.