grib2.h   grib2.h 
#ifndef _grib2_H #ifndef _grib2_H
#define _grib2_H #define _grib2_H
#include<stdio.h> #include<stdio.h>
#define G2_VERSION "g2clib-1.1.7" #define G2_VERSION "g2clib-1.1.8"
/* . . . . /* . . . .
// PRGMMR: Gilbert ORG: W/NP11 DATE: 2002-10-25 // PRGMMR: Gilbert ORG: W/NP11 DATE: 2002-10-25
// //
// PROGRAM HISTORY LOG:
// 2002-10-25 Gilbert
// 2009-01-14 Vuong Changed struct template to gtemplate
//
// Each element of structure gribfield is defined as: // Each element of structure gribfield is defined as:
// //
// gribfield gfld; // gribfield gfld;
// //
// gfld->version = GRIB edition number ( currently 2 ) // gfld->version = GRIB edition number ( currently 2 )
// gfld->discipline = Message Discipline ( see Code Table 0.0 ) // gfld->discipline = Message Discipline ( see Code Table 0.0 )
// gfld->idsect = Contains the entries in the Identification // gfld->idsect = Contains the entries in the Identification
// Section ( Section 1 ) // Section ( Section 1 )
// This element is a pointer to an array // This element is a pointer to an array
// that holds the data. // that holds the data.
skipping to change at line 159 skipping to change at line 163
#ifdef __64BIT__ #ifdef __64BIT__
typedef int g2int; typedef int g2int;
typedef unsigned int g2intu; typedef unsigned int g2intu;
#else #else
typedef long g2int; typedef long g2int;
typedef unsigned long g2intu; typedef unsigned long g2intu;
#endif #endif
typedef float g2float; typedef float g2float;
struct template { struct gtemplate {
g2int type; /* 3=Grid Defintion Template. */ g2int type; /* 3=Grid Defintion Template. */
/* 4=Product Defintion Template. */ /* 4=Product Defintion Template. */
/* 5=Data Representation Template. */ /* 5=Data Representation Template. */
g2int num; /* template number. */ g2int num; /* template number. */
g2int maplen; /* number of entries in the static part */ g2int maplen; /* number of entries in the static part */
/* of the template. */ /* of the template. */
g2int *map; /* num of octets of each entry in the */ g2int *map; /* num of octets of each entry in the */
/* static part of the template. */ /* static part of the template. */
g2int needext; /* indicates whether or not the template needs */ g2int needext; /* indicates whether or not the template needs */
/* to be extended. */ /* to be extended. */
g2int extlen; /* number of entries in the template extension. */ g2int extlen; /* number of entries in the template extension. */
g2int *ext; /* num of octets of each entry in the extension */ g2int *ext; /* num of octets of each entry in the extension */
/* part of the template. */ /* part of the template. */
}; };
typedef struct template template; typedef struct gtemplate gtemplate;
struct gribfield { struct gribfield {
g2int version,discipline; g2int version,discipline;
g2int *idsect; g2int *idsect;
g2int idsectlen; g2int idsectlen;
unsigned char *local; unsigned char *local;
g2int locallen; g2int locallen;
g2int ifldnum; g2int ifldnum;
g2int griddef,ngrdpts; g2int griddef,ngrdpts;
g2int numoct_opt,interp_opt,num_opt; g2int numoct_opt,interp_opt,num_opt;
skipping to change at line 223 skipping to change at line 227
g2int g2_addgrid(unsigned char *,g2int *,g2int *,g2int *,g2int ); g2int g2_addgrid(unsigned char *,g2int *,g2int *,g2int *,g2int );
g2int g2_addfield(unsigned char *,g2int ,g2int *, g2int g2_addfield(unsigned char *,g2int ,g2int *,
g2float *,g2int ,g2int ,g2int *, g2float *,g2int ,g2int ,g2int *,
g2float *,g2int ,g2int ,g2int *); g2float *,g2int ,g2int ,g2int *);
g2int g2_gribend(unsigned char *); g2int g2_gribend(unsigned char *);
/* Prototypes for supporting routines */ /* Prototypes for supporting routines */
extern double int_power(double, g2int ); extern double int_power(double, g2int );
extern void mkieee(g2float *,g2int *,g2int); extern void mkieee(g2float *,g2int *,g2int);
void rdieee(g2int *,g2float *,g2int ); void rdieee(g2int *,g2float *,g2int );
extern template *getpdstemplate(g2int); extern gtemplate *getpdstemplate(g2int);
extern template *extpdstemplate(g2int,g2int *); extern gtemplate *extpdstemplate(g2int,g2int *);
extern template *getdrstemplate(g2int); extern gtemplate *getdrstemplate(g2int);
extern template *extdrstemplate(g2int,g2int *); extern gtemplate *extdrstemplate(g2int,g2int *);
extern template *getgridtemplate(g2int); extern gtemplate *getgridtemplate(g2int);
extern template *extgridtemplate(g2int,g2int *); extern gtemplate *extgridtemplate(g2int,g2int *);
extern void simpack(g2float *,g2int,g2int *,unsigned char *,g2int *); extern void simpack(g2float *,g2int,g2int *,unsigned char *,g2int *);
extern void compack(g2float *,g2int,g2int,g2int *,unsigned char *,g2int *); extern void compack(g2float *,g2int,g2int,g2int *,unsigned char *,g2int *);
void misspack(g2float *,g2int ,g2int ,g2int *, unsigned char *, g2int *); void misspack(g2float *,g2int ,g2int ,g2int *, unsigned char *, g2int *);
void gbit(unsigned char *,g2int *,g2int ,g2int ); void gbit(unsigned char *,g2int *,g2int ,g2int );
void sbit(unsigned char *,g2int *,g2int ,g2int ); void sbit(unsigned char *,g2int *,g2int ,g2int );
void gbits(unsigned char *,g2int *,g2int ,g2int ,g2int ,g2int ); void gbits(unsigned char *,g2int *,g2int ,g2int ,g2int ,g2int );
void sbits(unsigned char *,g2int *,g2int ,g2int ,g2int ,g2int ); void sbits(unsigned char *,g2int *,g2int ,g2int ,g2int ,g2int );
int pack_gp(g2int *, g2int *, g2int *, int pack_gp(g2int *, g2int *, g2int *,
g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *,
 End of changes. 5 change blocks. 
9 lines changed or deleted 13 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/