38 unsigned char **csec2)
40 g2int ierr = 0, isecnum;
41 g2int lensec, ipos, j;
46 gbit(cgrib, &lensec, *iofst, 32);
48 *lencsec2 = lensec - 5;
49 gbit(cgrib, &isecnum, *iofst, 8);
57 fprintf(stderr,
"g2_unpack2: Not Section 2 data.\n");
67 if (!(*csec2 = malloc(*lencsec2 + 1)))
75 for (j = 0; j < *lencsec2; j++)
76 *(*csec2 + j) = cgrib[ipos + j];
78 *iofst = *iofst + (*lencsec2 * 8);
g2int g2_unpack2(unsigned char *cgrib, g2int *iofst, g2int *lencsec2, unsigned char **csec2)
This subroutine unpacks Section 2 (Local Use Section) as defined in GRIB Edition 2.
void gbit(unsigned char *in, g2int *iout, g2int iskip, g2int nbyte)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
Header file for NCEPLIBS-g2c library.
int64_t g2int
Long integer type.