Commit 37fae0cd authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cgribexlib.c update.

parent 423ade0b
/* Automatically generated by m214003 at 2017-09-19, do not edit */
/* Automatically generated by m214003 at 2017-09-29, do not edit */
/* CGRIBEXLIB_VERSION="1.9.0" */
......@@ -1894,21 +1894,11 @@ double decfp2(int kexp, int kmant)
- replace pow(16.0, (double)(iexp - 64)) by pow16m64tab[iexp]
*/
double pval;
//extern int CGRIBEX_Debug;
/* ----------------------------------------------------------------- */
/* Section 1 . Convert value of 0.0. Ignore sign bit. */
/* ----------------------------------------------------------------- */
//if ( CGRIBEX_Debug ) Message("KEXP = %d KMANT = %d", kexp, kmant);
/*
if ( (kexp == 128 || kexp == 0) && kmant == 0 )
*/
if ( (kexp == 128) || (kexp == 0) || (kexp == 255) )
{
pval = 0.0;
goto LABEL900;
}
if ( (kexp == 128) || (kexp == 0) || (kexp == 255) ) return 0.0;
/* ----------------------------------------------------------------- */
/* Section 2 . Convert other values. */
......@@ -1916,7 +1906,7 @@ double decfp2(int kexp, int kmant)
/* Sign of value. */
int iexp = kexp,
int iexp = kexp,
isign = (iexp < 128) * 2 - 1;
iexp -= iexp < 128 ? 0 : 128;
......@@ -1927,17 +1917,13 @@ double decfp2(int kexp, int kmant)
iexp -= 64;
pval = ldexp(1.0, 4 * iexp) * isign * POW_2_M24 * kmant;
double pval = ldexp(1.0, 4 * iexp) * isign * POW_2_M24 * kmant;
/* ----------------------------------------------------------------- */
/* Section 9. Return to calling routine. */
/* ----------------------------------------------------------------- */
LABEL900:
//if ( CGRIBEX_Debug ) Message("Returned value = %f", pval);
return (pval);
return pval;
} /* decfp2 */
#include <stdint.h>
#include <string.h>
......@@ -5879,7 +5865,6 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufsi
return gribrecsize;
}
int bds_zstart = 14;
int bds_zoffset = 12;
int bds_len = BDS_Len;
......@@ -5896,6 +5881,7 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufsi
#if defined(HAVE_LIBSZ)
{
int bds_zstart = 14;
unsigned gribLenOld = 0;
int bds_head = 11;
int bds_ext = 0;
......@@ -6140,9 +6126,6 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return 0;
}
int bds_zstart = 14;
unsigned recLen = GET_UINT3(bds[bds_zstart], bds[bds_zstart+1], bds[bds_zstart+2]);
//unsigned bds_len = BDS_Len;
bool llarge = false;
......@@ -6202,6 +6185,9 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
#if defined(HAVE_LIBSZ)
{
int bds_zstart = 14;
unsigned recLen = GET_UINT3(bds[bds_zstart], bds[bds_zstart+1], bds[bds_zstart+2]);
int bits_per_sample = (bds_nbits == 24) ? 8 : bds_nbits;
SZ_com_t sz_param; /* szip parameter block */
......@@ -13173,7 +13159,7 @@ void encode_dummy(void)
(void) encode_array_unrolled_double(0, 0, 0, NULL, NULL, 0, 0, NULL);
(void) encode_array_unrolled_float(0, 0, 0, NULL, NULL, 0, 0, NULL);
}
static const char grb_libvers[] = "1.9.0" " of ""Sep 19 2017"" ""09:31:14";
static const char grb_libvers[] = "1.9.0" " of ""Sep 29 2017"" ""10:16:02";
const char *
cgribexLibraryVersion(void)
{
......
Supports Markdown
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