38 unsigned char **csec2)
41 g2int lensec, ipos, j;
47 gbit(cgrib, &lensec, *iofst, 32);
49 *lencsec2 = lensec - 5;
52 gbit(cgrib, &isecnum, *iofst, 8);
59 fprintf(stderr,
"g2_unpack2: Not Section 2 data.\n");
67 if (!(*csec2 = malloc(*lencsec2)))
73 for (j = 0; j < *lencsec2; j++)
74 (*csec2)[j] = cgrib[ipos + j];
76 *iofst = *iofst + (*lencsec2 * 8);
g2int g2_unpack2(unsigned char *cgrib, g2int *iofst, g2int *lencsec2, unsigned char **csec2)
Unpack Section 2 (Local Use Section) of a GRIB2 message.
void gbit(unsigned char *in, g2int *iout, g2int iskip, g2int nbits)
Get arbitrary size values from a packed bit string, right justifying each value in the unpacked iout ...
#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.