Lines Matching refs:fork
169 * hqx_read is called until it returns zero for each fork. when it is
173 * times for the same fork. hqx_read must be called enough times to
177 ssize_t hqx_read(int fork, char *buffer, size_t length)
189 fprintf( stderr, "hqx_read: fork is %s\n", forkname[ fork ] );
190 fprintf( stderr, "hqx_read: remaining length is %d\n", hqx.forklen[fork] );
193 if (hqx.forklen[fork] > 0x7FFFFFFF) {
194 fprintf(stderr, "This should never happen, dude!, fork length == %u\n", hqx.forklen[fork]);
198 if ( hqx.forklen[ fork ] == 0 ) {
204 fprintf( stderr, "hqx_read: observed crc\t\t%x\n\n", hqx.forkcrc[fork] );
206 if ( storedcrc == hqx.forkcrc[ fork ] ) {
209 fprintf( stderr, "hqx_read: Bad %s fork crc, dude\n",
210 forkname[ fork ] );
215 if ( hqx.forklen[ fork ] < length ) {
216 readlen = hqx.forklen[ fork ];
226 hqx.forkcrc[ fork ] =
227 updcrc( hqx.forkcrc[ fork ], (u_char *)buffer, cc );
228 hqx.forklen[ fork ] -= cc;
334 fprintf( stderr, "data fork length\t%ld\n", hqx.forklen[DATA] );
335 fprintf( stderr, "resource fork length\t%ld\n", hqx.forklen[RESOURCE] );
553 * called to get the data for each fork, and the crc data for each
554 * fork. it has the same basic calling structure as unix read. the