mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Again, just syncronizing. The a function name was changed in the sll
module but none of Samba uses it directly. The macros are used instead so the change is hidden. Good.
This commit is contained in:
parent
164cc91d81
commit
c5d7ee506d
@ -24,7 +24,13 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_dLinkList.c,v
|
||||
* Log: ubi_dLinkList.c,v
|
||||
* Revision 0.11 1999/06/19 16:58:06 crh
|
||||
* Renamed the ubi_slRemove() function in ubi_sLinkList to
|
||||
* ubi_slRemoveNext(). I was bothered by the fact that it didn't
|
||||
* match the functionality of the ubi_dlRemove() function in
|
||||
* ubi_dLinkList. The new name is more 'correct'.
|
||||
*
|
||||
* Revision 0.10 1998/07/24 07:30:20 crh
|
||||
* Added the ubi_dlNewList() macro.
|
||||
*
|
||||
@ -64,7 +70,7 @@
|
||||
* This module is similar to the ubi_sLinkList module, but it is neither a
|
||||
* descendant type nor an easy drop-in replacement for the latter. One key
|
||||
* difference is that the ubi_dlRemove() function removes the indicated node,
|
||||
* while the ubi_slRemove() function (in ubi_sLinkList) removes the node
|
||||
* while the ubi_slRemoveNext() function (in ubi_sLinkList) removes the node
|
||||
* *following* the indicated node.
|
||||
*
|
||||
* ========================================================================== **
|
||||
|
@ -26,7 +26,13 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_dLinkList.h,v
|
||||
* Log: ubi_dLinkList.h,v
|
||||
* Revision 0.11 1999/06/19 16:58:06 crh
|
||||
* Renamed the ubi_slRemove() function in ubi_sLinkList to
|
||||
* ubi_slRemoveNext(). I was bothered by the fact that it didn't
|
||||
* match the functionality of the ubi_dlRemove() function in
|
||||
* ubi_dLinkList. The new name is more 'correct'.
|
||||
*
|
||||
* Revision 0.10 1998/07/24 07:30:20 crh
|
||||
* Added the ubi_dlNewList() macro.
|
||||
*
|
||||
@ -66,7 +72,7 @@
|
||||
* This module is similar to the ubi_sLinkList module, but it is neither a
|
||||
* descendant type nor an easy drop-in replacement for the latter. One key
|
||||
* difference is that the ubi_dlRemove() function removes the indicated node,
|
||||
* while the ubi_slRemove() function (in ubi_sLinkList) removes the node
|
||||
* while the ubi_slRemoveNext() function (in ubi_sLinkList) removes the node
|
||||
* *following* the indicated node.
|
||||
*
|
||||
* ========================================================================== **
|
||||
|
@ -24,7 +24,13 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_sLinkList.c,v
|
||||
* Log: ubi_sLinkList.c,v
|
||||
* Revision 0.10 1999/06/19 16:58:06 crh
|
||||
* Renamed the ubi_slRemove() function in ubi_sLinkList to
|
||||
* ubi_slRemoveNext(). I was bothered by the fact that it didn't
|
||||
* match the functionality of the ubi_dlRemove() function in
|
||||
* ubi_dLinkList. The new name is more 'correct'.
|
||||
*
|
||||
* Revision 0.9 1998/07/24 07:30:20 crh
|
||||
* Added the ubi_slNewList() macro.
|
||||
*
|
||||
@ -88,9 +94,9 @@
|
||||
* - In this module, if the list is empty, the tail pointer will
|
||||
* point back to the head of the list as described above. This
|
||||
* is not done in ubi_dLinkList.
|
||||
* - The ubi_slRemove() function, by necessity, removed the 'next'
|
||||
* node. In ubi_dLinkList, the ubi_dlRemove() function removes
|
||||
* the 'current' node.
|
||||
* - The ubi_slRemoveNext() function, by necessity, removes the
|
||||
* 'next' node. In ubi_dLinkList, the ubi_dlRemove() function
|
||||
* removes the 'current' node.
|
||||
*
|
||||
* ========================================================================== **
|
||||
*/
|
||||
@ -148,14 +154,14 @@ ubi_slNodePtr ubi_slInsert( ubi_slListPtr ListPtr,
|
||||
return( New );
|
||||
} /* ubi_slInsert */
|
||||
|
||||
ubi_slNodePtr ubi_slRemove( ubi_slListPtr ListPtr, ubi_slNodePtr After )
|
||||
ubi_slNodePtr ubi_slRemoveNext( ubi_slListPtr ListPtr, ubi_slNodePtr AfterMe )
|
||||
/* ------------------------------------------------------------------------ **
|
||||
* Remove the node followng <After>. If <After> is NULL, remove from the
|
||||
* head of the list.
|
||||
* Remove the node followng <AfterMe>. If <AfterMe> is NULL, remove from
|
||||
* the head of the list.
|
||||
*
|
||||
* Input: ListPtr - A pointer to the list from which the node is to be
|
||||
* removed.
|
||||
* After - Pointer to the node preceeding the node to be
|
||||
* AfterMe - Pointer to the node preceeding the node to be
|
||||
* removed.
|
||||
*
|
||||
* Output: A pointer to the node that was removed, or NULL if the list is
|
||||
@ -166,16 +172,16 @@ ubi_slNodePtr ubi_slRemove( ubi_slListPtr ListPtr, ubi_slNodePtr After )
|
||||
{
|
||||
ubi_slNodePtr DelNode;
|
||||
|
||||
After = After ? After : (ubi_slNodePtr)ListPtr;
|
||||
DelNode = After->Next;
|
||||
AfterMe = AfterMe ? AfterMe : (ubi_slNodePtr)ListPtr;
|
||||
DelNode = AfterMe->Next;
|
||||
if( DelNode )
|
||||
{
|
||||
if( !(DelNode->Next) )
|
||||
ListPtr->Tail = After;
|
||||
After->Next = DelNode->Next;
|
||||
ListPtr->Tail = AfterMe;
|
||||
AfterMe->Next = DelNode->Next;
|
||||
(ListPtr->count)--;
|
||||
}
|
||||
return( DelNode );
|
||||
} /* ubi_slRemove */
|
||||
} /* ubi_slRemoveNext */
|
||||
|
||||
/* ================================ The End ================================= */
|
||||
|
@ -26,7 +26,13 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_sLinkList.h,v
|
||||
* Log: ubi_sLinkList.h,v
|
||||
* Revision 0.10 1999/06/19 16:58:06 crh
|
||||
* Renamed the ubi_slRemove() function in ubi_sLinkList to
|
||||
* ubi_slRemoveNext(). I was bothered by the fact that it didn't
|
||||
* match the functionality of the ubi_dlRemove() function in
|
||||
* ubi_dLinkList. The new name is more 'correct'.
|
||||
*
|
||||
* Revision 0.9 1998/07/24 07:30:20 crh
|
||||
* Added the ubi_slNewList() macro.
|
||||
*
|
||||
@ -90,9 +96,9 @@
|
||||
* - In this module, if the list is empty, the tail pointer will
|
||||
* point back to the head of the list as described above. This
|
||||
* is not done in ubi_dLinkList.
|
||||
* - The ubi_slRemove() function, by necessity, removed the 'next'
|
||||
* node. In ubi_dLinkList, the ubi_dlRemove() function removes
|
||||
* the 'current' node.
|
||||
* - The ubi_slRemoveNext() function, by necessity, removes the
|
||||
* 'next' node. In ubi_dLinkList, the ubi_dlRemove() function
|
||||
* removes the 'current' node.
|
||||
*
|
||||
* ========================================================================== **
|
||||
*/
|
||||
@ -176,10 +182,10 @@ typedef ubi_slList *ubi_slListPtr;
|
||||
(ubi_slNodePtr)(N), \
|
||||
((ubi_slListPtr)(L))->Tail )
|
||||
|
||||
#define ubi_slRemHead( L ) ubi_slRemove( (ubi_slListPtr)(L), NULL )
|
||||
#define ubi_slRemHead( L ) ubi_slRemoveNext( (ubi_slListPtr)(L), NULL )
|
||||
|
||||
#define ubi_slRemNext( L, N ) \
|
||||
ubi_slRemove( (ubi_slListPtr)(L), (ubi_slNodePtr)(N) )
|
||||
ubi_slRemoveNext( (ubi_slListPtr)(L), (ubi_slNodePtr)(N) )
|
||||
|
||||
#define ubi_slFirst( L ) (((ubi_slListPtr)(L))->Head)
|
||||
|
||||
@ -228,14 +234,14 @@ ubi_slNodePtr ubi_slInsert( ubi_slListPtr ListPtr,
|
||||
* ------------------------------------------------------------------------ **
|
||||
*/
|
||||
|
||||
ubi_slNodePtr ubi_slRemove( ubi_slListPtr ListPtr, ubi_slNodePtr After );
|
||||
ubi_slNodePtr ubi_slRemoveNext( ubi_slListPtr ListPtr, ubi_slNodePtr AfterMe );
|
||||
/* ------------------------------------------------------------------------ **
|
||||
* Remove the node followng <After>. If <After> is NULL, remove from the
|
||||
* head of the list.
|
||||
* Remove the node followng <AfterMe>. If <AfterMe> is NULL, remove from
|
||||
* the head of the list.
|
||||
*
|
||||
* Input: ListPtr - A pointer to the list from which the node is to be
|
||||
* removed.
|
||||
* After - Pointer to the node preceeding the node to be
|
||||
* AfterMe - Pointer to the node preceeding the node to be
|
||||
* removed.
|
||||
*
|
||||
* Output: A pointer to the node that was removed, or NULL if the list is
|
||||
|
Loading…
Reference in New Issue
Block a user