Commit a01188b5 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cgribexlib update.

parent 540bc6d0
2018-11-08 Uwe Schulzweida
2019-01-24 Uwe Schulzweida
* using CGRIBEX library version 1.9.2
* using EXSE library version 1.4.1
* Version 1.9.6 released
......
/* Automatically generated by m214003 at 2018-08-20, do not edit */
/* Automatically generated by m214003 at 2018-11-14, do not edit */
/* CGRIBEXLIB_VERSION="1.9.2" */
......@@ -43,7 +43,7 @@
#ifndef GRIB_INT_H
#define GRIB_INT_H
#ifdef HAVE_CONFIG_H
#if defined (HAVE_CONFIG_H)
#include "config.h"
#endif
......@@ -3708,7 +3708,7 @@ void gribPrintSec4Wave(int *isec4)
fprintf(grprsm, "%20.10f\n", *ptemp);
}
}
#ifdef HAVE_CONFIG_H
#if defined (HAVE_CONFIG_H)
#endif
#include <string.h>
......@@ -5766,7 +5766,7 @@ void gribRepair1(int nrec, long recsize, unsigned char *gribbuffer)
#include <stdio.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
#if defined (HAVE_CONFIG_H)
#endif
#if defined (HAVE_LIBSZ)
......@@ -9526,7 +9526,8 @@ void TEMPLATE(grib_decode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *
due to the count being only 24 bits. It is only possible because
the (default) rounding for GRIB products is 120 bytes.
*/
if ( gribLen > JP23SET && bdsLen <= 120 )
bool llarge = (gribLen > JP23SET && bdsLen <= 120);
if ( llarge )
{
gribLen &= JP23SET;
gribLen *= 120;
......@@ -9681,14 +9682,12 @@ void TEMPLATE(grib_decode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *
}
}
if ( ISEC0_GRIB_Version == 1 ) isLen = 8;
int esLen = 4;
const int esLen = 4;
gribLen = isLen + pdsLen + gdsLen + bmsLen + bdsLen + esLen;
if ( ISEC0_GRIB_Len )
if ( ISEC0_GRIB_Len < gribLen )
Warning("Inconsistent length of GRIB message (grib_message_size=%d < grib_record_size=%d)!", ISEC0_GRIB_Len, gribLen);
if ( !llarge && ISEC0_GRIB_Len && ISEC0_GRIB_Len < gribLen )
Warning("Inconsistent length of GRIB message (grib_message_size=%d < grib_record_size=%d)!", ISEC0_GRIB_Len, gribLen);
ISEC0_GRIB_Len = gribLen;
......@@ -10354,7 +10353,8 @@ void TEMPLATE(grib_decode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *
due to the count being only 24 bits. It is only possible because
the (default) rounding for GRIB products is 120 bytes.
*/
if ( gribLen > JP23SET && bdsLen <= 120 )
bool llarge = (gribLen > JP23SET && bdsLen <= 120);
if ( llarge )
{
gribLen &= JP23SET;
gribLen *= 120;
......@@ -10509,14 +10509,12 @@ void TEMPLATE(grib_decode,T)(int *isec0, int *isec1, int *isec2, T *fsec2, int *
}
}
if ( ISEC0_GRIB_Version == 1 ) isLen = 8;
int esLen = 4;
const int esLen = 4;
gribLen = isLen + pdsLen + gdsLen + bmsLen + bdsLen + esLen;
if ( ISEC0_GRIB_Len )
if ( ISEC0_GRIB_Len < gribLen )
Warning("Inconsistent length of GRIB message (grib_message_size=%d < grib_record_size=%d)!", ISEC0_GRIB_Len, gribLen);
if ( !llarge && ISEC0_GRIB_Len && ISEC0_GRIB_Len < gribLen )
Warning("Inconsistent length of GRIB message (grib_message_size=%d < grib_record_size=%d)!", ISEC0_GRIB_Len, gribLen);
ISEC0_GRIB_Len = gribLen;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment