70 g2int zero = 0, one = 1;
78 g2int mapsec1[
MAPSEC1LEN] = {2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1};
79 g2int i, lensec1, iofst, ibeg, nbits, len;
84 printf(
"g2_create: can only code GRIB edition 2.");
94 sbit(cgrib, &zero, 32, 16);
95 sbit(cgrib, listsec0 + 0, 48, 8);
96 sbit(cgrib, listsec0 + 1, 56, 8);
101 sbit(cgrib, &one, iofst, 8);
109 nbits = mapsec1[i] * 8;
110 sbit(cgrib, listsec1 + i, iofst, nbits);
111 iofst = iofst + nbits;
116 lensec1 = (iofst - ibeg) / 8;
117 sbit(cgrib, &lensec1, ibeg, 32);
120 sbit(cgrib, &zero, 64, 32);
122 sbit(cgrib, &len, 96, 32);