Tous Fini
please use "gcc Block*" to compile the code
This commit is contained in:
@@ -63,6 +63,10 @@ void DeleteList(SList *list)
|
||||
SCell *GetCellFromBlock(SList *list)
|
||||
{
|
||||
SCell *pcell;
|
||||
if ((pcell = GetCellFromRecycle(list)))
|
||||
{
|
||||
return pcell;
|
||||
}
|
||||
while (!(pcell = _GetCellFromBlock(list->block)))
|
||||
{
|
||||
AddBlock(list->block);
|
||||
@@ -97,6 +101,16 @@ SCell *_GetCellFromBlock(SBlock *bList)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SCell *GetCellFromRecycle(SList *list)
|
||||
{
|
||||
SCell *pcell = list->recycle;
|
||||
if (pcell != NULL)
|
||||
{
|
||||
list->recycle = pcell->next;
|
||||
}
|
||||
return pcell;
|
||||
}
|
||||
|
||||
SCell *AddElementBegin(SList *list, int data)
|
||||
{
|
||||
SCell *cell = GetCellFromBlock(list);
|
||||
|
||||
Reference in New Issue
Block a user