39 unsigned char **csec2)
42 g2int lensec, ipos, j;
48 gbit(cgrib, &lensec, *iofst, 32);
50 *lencsec2 = lensec - 5;
53 gbit(cgrib, &isecnum, *iofst, 8);
60 fprintf(stderr,
"g2_unpack2: Not Section 2 data.\n");
68 if (!(*csec2 = malloc(*lencsec2)))
74 for (j = 0; j < *lencsec2; j++)
75 (*csec2)[j] = cgrib[ipos + j];
77 *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 nbits)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
#define G2_UNPACK_BAD_SEC
Bad section number in unpacking function.
#define G2_UNPACK_NO_MEM
Error allocating memory in unpack function.
#define G2_NO_ERROR
Function succeeded.
int64_t g2int
Long integer type.
Header file with internal function prototypes NCEPLIBS-g2c library.