Commit 541860a1 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cgribexlib update

parent 2253166c
/* Automatically generated by m214003 at 2013-02-27, do not edit */
/* Automatically generated by m214003 at 2013-03-05, do not edit */
/* CGRIBEXLIB_VERSION="1.6.0" */
......@@ -9035,6 +9035,7 @@ int grib1Sections(unsigned char *gribbuffer, long bufsize, unsigned char **pdsp,
{
fprintf(stderr, "Missing end section >%2x %2x %2x %2x<\n",
bufpointer[0], bufpointer[1], bufpointer[2], bufpointer[3]);
return (-2);
}
return (0);
......@@ -9219,6 +9220,7 @@ int grib2Sections(unsigned char *gribbuffer, long bufsize, unsigned char **idsp,
{
fprintf(stderr, "Missing end section >%2x %2x %2x %2x<\n",
section[0], section[1], section[2], section[3]);
return (-2);
}
return (0);
......@@ -9993,7 +9995,7 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
nerr = grib1Sections(dbuf, dbufsize, &pds, &gds, &bms, &bds);
if ( nerr )
{
fprintf(stdout, "grib1Sections error\n");
fprintf(stdout, "grib1Sections error!\n");
return (rec_len);
}
......@@ -10004,7 +10006,7 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
int bdsLen;
int gribLenOld = 0;
int status;
int datstart, datsize;
size_t datstart, datsize;
#if defined (HAVE_LIBAEC)
struct aec_stream strm;
#else
......@@ -10117,7 +10119,7 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
status = aec_buffer_encode(&strm);
if ( status != AEC_OK )
{
if ( status != AEC_DATA_ERROR )
if ( status != AEC_DATA_ERROR )
Warning("AEC ERROR: %d code %3d level %3d", status, PDS_Parameter, PDS_Level2);
}
......@@ -10143,7 +10145,6 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
/*
fprintf(stderr, "sourceLen, destLen %d %d\n", sourceLen, destLen);
*/
if ( destLen < MIN_COMPRESS*sourceLen )
{
source = bds + datstart + bds_zoffset;
......@@ -10236,13 +10237,16 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
bdslen = gribLen - bdslen;
SetLen3(bds, 0, bdsLen);
SetLen3(bds, 0, bdslen);
}
else
{
SetLen3(dbuf, 4, gribLen);
}
}
else
{
}
/*
fprintf(stderr, "%3d %3d griblen in %6d out %6d CR %g slen %6d dlen %6d CR %g\n",
PDS_Parameter, PDS_Level1, gribLenOld, gribLen,
......@@ -10259,7 +10263,10 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
}
#endif
while ( gribLen & 7 ) dbuf[gribLen++] = 0;
if ( llarge )
while ( gribLen%120 ) dbuf[gribLen++] = 0;
else
while ( gribLen & 7 ) dbuf[gribLen++] = 0;
rec_len = gribLen;
......@@ -10494,7 +10501,10 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
/*
fprintf(stderr, "recLen, gribLen, bdsLen %d %d %d\n", recLen, gribLen, bdsLen);
*/
while ( gribLen & 7 ) dbuf[gribLen++] = 0;
if ( llarge )
while ( gribLen%120 ) dbuf[gribLen++] = 0;
else
while ( gribLen & 7 ) dbuf[gribLen++] = 0;
/*
fprintf(stderr, "recLen, gribLen, bdsLen %d %d %d\n", recLen, gribLen, bdsLen);
*/
......@@ -10509,7 +10519,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return (gribLen);
}
static const char grb_libvers[] = "1.6.0" " of ""Feb 27 2013"" ""11:00:05";
static const char grb_libvers[] = "1.6.0" " of ""Mar 5 2013"" ""11:10:25";
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