Status InitList ( SqList &L )
{
/allocate memory/
L.elem = (ElemType *)malloc( LIST_INIT_SIZE * sizeof(SqList) );
if ( !L.elem ) return MEM_ALLOCATE_ERROR;
/*initialize structure parament*/
L.length = 0;
L.listszie = LIST_INIT_SIZE;
return OPRERTER_SUCCESS ;
}
Status DestroyList ( SqList &L )
{
if ( !L.elem ) return SQLIST_NOT_EXIST;
free((void *)L.elem);
return OPRERTER_SUCCESS ;
}