51 |
do { |
do { |
52 |
nread=read(*fd, &word, 2); //reads 16 bits |
nread=read(*fd, &word, 2); //reads 16 bits |
53 |
if(nread == 0) { |
if(nread == 0) { |
54 |
printf("findstart: Unexpected end of file %d at %d \n",*fd,nread); |
//printf("findstart: Unexpected end of file %d at %d \n",*fd,nread); |
55 |
*error=1; |
*error=1; |
56 |
return ; |
return ; |
57 |
} |
} |
58 |
if(nread != 2) { |
if(nread != 2) { |
59 |
printf("findstart: Error on reading: bytes read -> nread = %d \n",nread); |
//printf("findstart: Error on reading: bytes read -> nread = %d \n",nread); |
60 |
*error=-1; |
*error=-1; |
61 |
return ; |
return ; |
62 |
} |
} |