Commit 005bc5ce authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Renamed COMPRESS_XXX to CDI_COMPRESS_XXX.

parent 8e9fd78c
......@@ -2084,7 +2084,7 @@ void after_processing(struct Control *globs, struct Variable *vars)
if ( globs->ostreamID < 0 ) cdiError(globs->ostreamID, "Open failed on %s", ofile);
#endif
if ( globs->Szip ) streamDefCompType(globs->ostreamID, COMPRESS_SZIP);
if ( globs->Szip ) streamDefCompType(globs->ostreamID, CDI_COMPRESS_SZIP);
globs->ovlistID = vlistCreate();
}
......@@ -2094,7 +2094,7 @@ void after_processing(struct Control *globs, struct Variable *vars)
globs->ostreamID2 = streamOpenWrite(ofile2, ofiletype);
if ( globs->ostreamID2 < 0 ) cdiError(globs->ostreamID2, "Open failed on %s", ofile2);
if ( globs->Szip ) streamDefCompType(globs->ostreamID, COMPRESS_SZIP);
if ( globs->Szip ) streamDefCompType(globs->ostreamID, CDI_COMPRESS_SZIP);
globs->ovlistID2 = vlistCreate();
}
......
......@@ -53,7 +53,7 @@ void *Copy(void *argument)
if ( operatorID == SZIP )
{
cdoCompType = COMPRESS_SZIP;
cdoCompType = CDI_COMPRESS_SZIP;
cdoCompLevel = 0;
}
......
......@@ -226,7 +226,7 @@ void *Sinfo(void *argument)
set_text_color(stdout, RESET, BLUE);
fprintf(stdout, " %-3s", pstr);
if ( vlistInqVarCompType(vlistID, varID) == COMPRESS_NONE )
if ( vlistInqVarCompType(vlistID, varID) == CDI_COMPRESS_NONE )
fprintf(stdout, " ");
else
fprintf(stdout, "z ");
......
......@@ -630,22 +630,22 @@ void defineCompress(const char *arg)
if ( strncmp(arg, "szip", len) == 0 )
{
cdoCompType = COMPRESS_SZIP;
cdoCompType = CDI_COMPRESS_SZIP;
cdoCompLevel = 0;
}
else if ( strncmp(arg, "jpeg", len) == 0 )
{
cdoCompType = COMPRESS_JPEG;
cdoCompType = CDI_COMPRESS_JPEG;
cdoCompLevel = 0;
}
else if ( strncmp(arg, "gzip", len) == 0 )
{
cdoCompType = COMPRESS_GZIP;
cdoCompType = CDI_COMPRESS_GZIP;
cdoCompLevel = 6;
}
else if ( strncmp(arg, "zip", 3) == 0 )
{
cdoCompType = COMPRESS_ZIP;
cdoCompType = CDI_COMPRESS_ZIP;
if ( len == 5 && arg[3] == '_' && isdigit(arg[4]) )
cdoCompLevel = atoi(&arg[4]);
else
......
......@@ -314,7 +314,7 @@ int vlistIsSzipped(int vlistID)
for ( int varID = 0; varID < nvars; varID++ )
{
int comptype = vlistInqVarCompType(vlistID, varID);
if ( comptype == COMPRESS_SZIP )
if ( comptype == CDI_COMPRESS_SZIP )
{
lszip = TRUE;
break;
......
......@@ -115,9 +115,9 @@ void printFiletype(int streamID, int vlistID)
comptype = vlistInqVarCompType(vlistID, varID);
if ( comptype )
{
if ( comptype == COMPRESS_SZIP )
if ( comptype == CDI_COMPRESS_SZIP )
printf(" SZIP");
else if ( comptype == COMPRESS_ZIP )
else if ( comptype == CDI_COMPRESS_ZIP )
printf(" ZIP");
break;
......@@ -134,7 +134,7 @@ void printFiletype(int streamID, int vlistID)
comptype = vlistInqVarCompType(vlistID, varID);
if ( comptype )
{
if ( comptype == COMPRESS_JPEG )
if ( comptype == CDI_COMPRESS_JPEG )
printf(" JPEG");
break;
......
......@@ -653,29 +653,29 @@ void set_comp(int fileID, int filetype)
{
if ( filetype == FILETYPE_GRB )
{
cdoCompType = COMPRESS_SZIP;
cdoCompType = CDI_COMPRESS_SZIP;
cdoCompLevel = 0;
}
else if ( filetype == FILETYPE_NC4 || filetype == FILETYPE_NC4C )
{
cdoCompType = COMPRESS_ZIP;
cdoCompType = CDI_COMPRESS_ZIP;
cdoCompLevel = 1;
}
}
if ( cdoCompType != COMPRESS_NONE )
if ( cdoCompType != CDI_COMPRESS_NONE )
{
streamDefCompType(fileID, cdoCompType);
streamDefCompLevel(fileID, cdoCompLevel);
if ( cdoCompType == COMPRESS_SZIP &&
if ( cdoCompType == CDI_COMPRESS_SZIP &&
(filetype != FILETYPE_GRB && filetype != FILETYPE_GRB2 && filetype != FILETYPE_NC4 && filetype != FILETYPE_NC4C) )
cdoWarning("SZIP compression not available for non GRIB/NetCDF4 data!");
if ( cdoCompType == COMPRESS_JPEG && filetype != FILETYPE_GRB2 )
if ( cdoCompType == CDI_COMPRESS_JPEG && filetype != FILETYPE_GRB2 )
cdoWarning("JPEG compression not available for non GRIB2 data!");
if ( cdoCompType == COMPRESS_ZIP && (filetype != FILETYPE_NC4 && filetype != FILETYPE_NC4C) )
if ( cdoCompType == CDI_COMPRESS_ZIP && (filetype != FILETYPE_NC4 && filetype != FILETYPE_NC4C) )
cdoWarning("Deflate compression not available for non NetCDF4 data!");
}
}
......
......@@ -92,7 +92,7 @@ int CDO_Reduce_Dim = FALSE;
int CDO_Append_History = TRUE;
int CDO_Reset_History = FALSE;
int cdoCompType = COMPRESS_NONE; // compression type
int cdoCompType = CDI_COMPRESS_NONE; // compression type
int cdoCompLevel = 0; // compression level
int cdoDebug = 0;
int cdoChunkType = CDI_UNDEFID;
......@@ -780,7 +780,7 @@ void cdoGenFileSuffix(char *filesuffix, size_t maxlen, int filetype, int vlistID
if ( cdoDefaultFileType == FILETYPE_GRB && vlistIsSzipped(vlistID) ) lcompsz = true;
}
if ( cdoDefaultFileType == FILETYPE_GRB && cdoCompType == COMPRESS_SZIP ) lcompsz = true;
if ( cdoDefaultFileType == FILETYPE_GRB && cdoCompType == CDI_COMPRESS_SZIP ) lcompsz = true;
if ( lcompsz ) strncat(filesuffix, ".sz", maxlen-1);
}
}
......
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