The actual data structure that holds the contact list is maintained using the four functions in lines 274-277:
void icq_ContactAdd(ICQLINK *link, unsigned long cuin);
void icq_ContactRemove(ICQLINK *link, unsigned long cuin);
void icq_ContactClear(ICQLINK *link );
void icq_ContactSetVis(ICQLINK *link, unsigned long cuin, unsigned char vu);
Use icq_ContactAdd to add a UIN to the list and icq_ContactRemove to remove a UIN from the list.
We did not use the other two functions in the csicq project but it is our guess that icq_ContactClear will clear the entire contact list and icq_ContactSetVis will toggle your visibility to the contact. We do not know, however, what the argument unsigned char vu stands for.