handling tars programatically in c

How can I untar tar files within a c program? I have looked online for libs that would assist but just getting too much clutter back from google searches.

Any thoughts? Obviously this is for qnx based apps. I need to be able to untar a tar file and then sift through it’s contents.

TIA
chris

system(), spawn(), …