# #include /* * IHEAD inputs a CVL picture header from the specified file descriptor. * The length of the comment field is returned, unless an error occurs, * in which case -1 is returned. * Joseph Pallas 9/18/80 cc -O -c ihead.c * Modified by Robert L. Kirby for more distinctive tag1 on Oct 8, 1980. */ int ihead (fdin, oldarea) int fdin; struct cvl_p *oldarea; { register int numread; register int total; register char *p; p = (char *)oldarea; for(total = 0; total < sizeof *oldarea; total += numread) if((numread = read(fdin, &p[total], sizeof *oldarea - total)) == 0 || numread == -1) return(-1); if(oldarea->cv_tag != 'TCIP' + 020000000000) return(-1); return(oldarea->cv_lcom); }