pinfo.c and testing program and script