/******************************************************************/
/* Module: TBLFree /
/ Function: free list /
/ Input: * pMng /
/ Output: pMng */
/ NOTE: /
/ Return: void /
/******************************************************************/
void TBLFree (MNG* pMng)
{
int nCnt = pMng->nNodeCnt;
int i;
if(NULL == pMng)
{
printf("error !\n");
}
LTBL *EX = NULL;
LTBL *EY = NULL;
pMng->nNodeCnt = nCnt;
EX = pMng->pHead;
for(i = 1;i <= nCnt;i++)
{
EY = EX->pNxt;
free(EX);
EX = NULL;
EX = EY;
}
pMng->pHead = NULL;
pMng->nNodeCnt = 0;
printf("Free list successful !\n");
printf("\n");
printf("\n");
printf("\n");
}