10 #define BITS_PER_BYTE 8
41 g2int k, k4, ipos, nread, lim, start, vers, lengrib;
46 cbuf = (
unsigned char *)malloc(mseek);
51 while (*lgrib == 0 && nread == mseek)
54 fseek(lugb, ipos, SEEK_SET);
55 nread = fread(cbuf,
sizeof(
unsigned char), mseek, lugb);
59 for (k = 0; k < lim; k++)
69 if (start == 1196575042 && (vers == 1 || vers == 2))
78 fseek(lugb, ipos + k + lengrib - 4, SEEK_SET);
79 k4 = fread(&end, 4, 1, lugb);
82 if (k4 == 1 && end == 926365495)