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

extralib.c servicelib.c update

parent 4303dbf7
2014-05-20 Uwe Schulzweida
* Version 1.6.4 released
* using EXSE library version 1.3.2
* using CGRIBEX library version 1.6.4
2014-04-10 Uwe Schulzweida
......
......@@ -32,7 +32,7 @@ static int extDefaultNumber = EXT_REAL;
*/
#undef LIBVERSION
#define LIBVERSION 1.3.1
#define LIBVERSION 1.3.2
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
static const char ext_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
......@@ -80,7 +80,7 @@ void extLibInit()
default:
Message("Invalid digit in %s: %s", envName, envString);
}
break;
break;
}
case 'c':
{
......@@ -92,12 +92,14 @@ void extLibInit()
default:
Message("Invalid digit in %s: %s", envName, envString);
}
break;
break;
}
default:
Message("Invalid character in %s: %s", envName, envString);
break;
}
{
Message("Invalid character in %s: %s", envName, envString);
break;
}
}
}
}
......@@ -215,7 +217,7 @@ int extInqHeader(void *ext, int *header)
for ( i = 0; i < EXT_HEADER_LEN; i++ )
header[i] = extp->header[i];
if ( EXT_Debug ) Message("datasize = %lu", extp->datasize);
return (0);
......@@ -229,7 +231,7 @@ int extDefHeader(void *ext, const int *header)
for ( i = 0; i < EXT_HEADER_LEN; i++ )
extp->header[i] = header[i];
extp->datasize = header[3];
if ( extp->number == EXT_COMP ) extp->datasize *= 2;
......@@ -270,7 +272,7 @@ int extInqData(void *ext, int prec, void *data)
else
{
Error("not implemented for %d byte float", sizeof(FLT32));
}
}
break;
}
case DOUBLE_PRECISION:
......@@ -287,12 +289,12 @@ int extInqData(void *ext, int prec, void *data)
else
{
Error("not implemented for %d byte float", sizeof(FLT64));
}
}
break;
default:
{
Error("unexpected data precision %d", rprec);
break;
break;
}
}
......@@ -451,7 +453,7 @@ int extRead(int fileID, void *ext)
}
default:
{
Error("unexpected header precision %d", hprec);
Error("Unexpected header precision %d", hprec);
break;
}
}
......@@ -460,8 +462,8 @@ int extRead(int fileID, void *ext)
if ( blocklen2 != blocklen )
{
Warning("header blocklen differ!");
return (-1);
Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
if ( blocklen2 != 0 ) return (-1);
}
extp->datasize = extp->header[3];
......@@ -498,7 +500,7 @@ int extRead(int fileID, void *ext)
if ( dprec != SINGLE_PRECISION && dprec != DOUBLE_PRECISION )
{
Warning("unexpected data precision %d", dprec);
Warning("Unexpected data precision %d", dprec);
return (-1);
}
......@@ -508,8 +510,8 @@ int extRead(int fileID, void *ext)
if ( blocklen2 != blocklen )
{
Warning("data blocklen differ!");
return (-1);
Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
if ( blocklen2 != 0 ) return (-1);
}
return (0);
......@@ -564,7 +566,7 @@ int extWrite(int fileID, void *ext)
break;
}
}
binWriteF77Block(fileID, byteswap, blocklen);
datasize = header[3];
......
......@@ -29,7 +29,7 @@ static int iegDefaultDprec = 0;
*/
#undef LIBVERSION
#define LIBVERSION 1.3.1
#define LIBVERSION 1.3.2
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
static const char ieg_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
......@@ -72,12 +72,14 @@ void iegLibInit()
default:
Message("Invalid digit in %s: %s", envName, envString);
}
break;
break;
}
default:
Message("Invalid character in %s: %s", envName, envString);
break;
}
{
Message("Invalid character in %s: %s", envName, envString);
break;
}
}
pos += 2;
}
}
......@@ -254,7 +256,7 @@ int iegInqData(iegrec_t *iegp, int prec, void *data)
else
{
Error("not implemented for %d byte float", sizeof(FLT32));
}
}
break;
}
case DOUBLE_PRECISION:
......@@ -271,7 +273,7 @@ int iegInqData(iegrec_t *iegp, int prec, void *data)
else
{
Error("not implemented for %d byte float", sizeof(FLT64));
}
}
break;
default:
{
......@@ -453,13 +455,13 @@ int iegRead(int fileID, iegrec_t *iegp)
for ( i = 0; i < 100; i++ )
iegp->vct[i] = (double) ((double *) tmpbuf)[i];
}
/*
fprintf(stderr, "refval %g\n", iegp->refval);
for ( i = 0; i < 100; i++ )
fprintf(stderr, "%3d %g\n", i, iegp->vct[i]);
{
int i;
for ( i = 0; i < 37; i++ )
......@@ -568,7 +570,7 @@ int iegWrite(int fileID, iegrec_t *iegp)
{
binWriteFlt64(fileID, byteswap, 100, iegp->vct);
}
binWriteF77Block(fileID, byteswap, blocklen);
datasize = iegp->igdb[4]*iegp->igdb[5];
......
......@@ -32,7 +32,7 @@ static int srvDefaultDprec = 0;
*/
#undef LIBVERSION
#define LIBVERSION 1.3.1
#define LIBVERSION 1.3.2
#define XSTRING(x) #x
#define STRING(x) XSTRING(x)
static const char srv_libvers[] = STRING(LIBVERSION) " of "__DATE__" "__TIME__;
......@@ -94,12 +94,14 @@ void srvLibInit()
default:
Message("Invalid digit in %s: %s", envName, envString);
}
break;
break;
}
default:
Message("Invalid character in %s: %s", envName, envString);
break;
}
{
Message("Invalid character in %s: %s", envName, envString);
break;
}
}
pos += 2;
}
}
......@@ -275,7 +277,7 @@ int srvInqData(srvrec_t *srvp, int prec, void *data)
else
{
Error("not implemented for %d byte float", sizeof(FLT32));
}
}
break;
}
case DOUBLE_PRECISION:
......@@ -292,7 +294,7 @@ int srvInqData(srvrec_t *srvp, int prec, void *data)
else
{
Error("not implemented for %d byte float", sizeof(FLT64));
}
}
break;
default:
{
......@@ -338,7 +340,7 @@ int srvDefData(srvrec_t *srvp, int prec, const void *data)
else hprec = srvp->hprec;
if ( ! hprec ) hprec = dprec;
srvp->hprec = hprec;
header = srvp->header;
......@@ -461,7 +463,7 @@ int srvRead(int fileID, srvrec_t *srvp)
}
default:
{
Error("unexpected header precision %d", hprec);
Error("Unexpected header precision %d", hprec);
break;
}
}
......@@ -470,8 +472,8 @@ int srvRead(int fileID, srvrec_t *srvp)
if ( blocklen2 != blocklen )
{
Warning("header blocklen differ!");
return (-1);
Warning("Header blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
if ( blocklen2 != 0 ) return (-1);
}
srvp->datasize = srvp->header[4]*srvp->header[5];
......@@ -502,7 +504,7 @@ int srvRead(int fileID, srvrec_t *srvp)
if ( dprec != SINGLE_PRECISION && dprec != DOUBLE_PRECISION )
{
Warning("unexpected data precision %d", dprec);
Warning("Unexpected data precision %d", dprec);
return (-1);
}
......@@ -512,8 +514,8 @@ int srvRead(int fileID, srvrec_t *srvp)
if ( blocklen2 != blocklen )
{
Warning("data blocklen differ!");
return (-1);
Warning("Data blocklen differ (blocklen1=%d; blocklen2=%d)!", blocklen, blocklen2);
if ( blocklen2 != 0 ) return (-1);
}
return (0);
......@@ -566,7 +568,7 @@ int srvWrite(int fileID, srvrec_t *srvp)
break;
}
}
binWriteF77Block(fileID, byteswap, blocklen);
datasize = header[4]*header[5];
......
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