Commit ccf33c83 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

added cdoStreamClose, refactored pstreamClose, pstream_int.* does no longer...

added cdoStreamClose, refactored pstreamClose, pstream_int.* does no longer need to include process_int.h
parent 2340f1df
......@@ -331,8 +331,8 @@ Adisit(void *process)
tsID++;
}
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
vlistDestroy(vlistID2);
......
......@@ -1929,7 +1929,7 @@ after_processing(struct Control *globs, struct Variable *vars)
after_control(globs, vars);
if (globs->ostreamID != CDI_UNDEFID) pstreamClose(globs->ostreamID);
if (globs->ostreamID != CDI_UNDEFID) cdoStreamClose(globs->ostreamID);
processDefVarNum(vlistNvars(globs->ivlistID));
processSelf().addNvals(streamNvals(globs->istreamID));
......
......@@ -234,7 +234,7 @@ Arith(void *process)
if (filltype == FILL_FILE)
{
tsID2 = 0;
pstreamClose(streamID2);
cdoStreamClose(streamID2);
streamID2 = cdoStreamOpenRead(1);
streamIDx2 = streamID2;
......@@ -328,9 +328,9 @@ Arith(void *process)
tsID2++;
}
pstreamClose(streamID3);
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID3);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
vlistDestroy(vlistID3);
......
......@@ -155,8 +155,8 @@ Arithc(void *process)
tsID++;
}
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
if (field.ptr) Free(field.ptr);
......
......@@ -155,8 +155,8 @@ Arithdays(void *process)
tsID++;
}
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
if (field.ptr) Free(field.ptr);
......
......@@ -133,8 +133,8 @@ Arithlat(void *process)
tsID++;
}
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
cdoFinish();
......
......@@ -20,6 +20,7 @@
#include "cdo_int.h"
#include "parameterConversion.h"
#include "pstream_int.h"
#include "process_int.h"
#include "timer.h"
const char *
......@@ -171,7 +172,7 @@ CDIread(void *process)
tsID++;
}
pstreamClose(streamID);
cdoStreamClose(streamID);
tw = timer_val(timer_read) - tw0;
twsum += tw;
......
......@@ -96,8 +96,8 @@ CDItest(void *process)
tsID2++;
}
pstreamClose(streamID1);
pstreamClose(streamID2);
cdoStreamClose(streamID1);
cdoStreamClose(streamID2);
vlistDestroy(vlistID2);
taxisDestroy(taxisID2);
......
......@@ -217,7 +217,7 @@ CDIwrite(void *process)
}
}
pstreamClose(streamID);
cdoStreamClose(streamID);
tw = timer_val(timer_write) - tw0;
twsum += tw;
......
......@@ -1157,7 +1157,7 @@ addcharvar(keyValues_t *charvars, int vlistID, const char *key, struct mapping v
}
var->charvars = 1;
pstreamClose(streamID2);
cdoStreamClose(streamID2);
Free(buffer_old);
if (Options::cdoVerbose)
......@@ -4920,7 +4920,7 @@ write_variables(list_t *kvl, int *streamID, struct mapping vars[], int miptab_fr
charname = (char *) Malloc(CDI_MAX_NAME * sizeof(char));
vlistInqVarName(vlistID, vars[i].cdi_varID, charname);
pstreamClose(*streamID);
cdoStreamClose(*streamID);
*streamID = cdoStreamOpenRead(cdoStreamName(0));
pscheck = 0;
if (Options::cdoVerbose) cdoPrint("10.3. Successfully retrieved auxiliary variables.");
......@@ -5815,7 +5815,7 @@ CMOR(void *process)
/* Free(miptableInput); */
list_destroy(lol);
pstreamClose(streamID);
cdoStreamClose(streamID);
#else
cdoWarning("CMOR support not compiled in!");
#endif
......
......@@ -534,8 +534,8 @@ CMOR_lite(void *process)
tsID1++;
}
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
#ifdef HAVE_UDUNITS2
for (int varID = 0; varID < nvars; varID++)
......
......@@ -156,13 +156,13 @@ Cat(void *process)
tsID2++;
}
pstreamClose(streamID1);
cdoStreamClose(streamID1);
if (cdoTimer) tw = timer_val(timer_cat) - tw0;
if (cdoTimer) cdoPrint("Processed file: %s %.2f seconds", cdoGetStreamName(indf), tw);
}
pstreamClose(streamID2);
cdoStreamClose(streamID2);
if (cdoTimer) timer_stop(timer_cat);
......
......@@ -313,8 +313,8 @@ Change(void *process)
tsID1++;
}
pstreamClose(streamID1);
pstreamClose(streamID2);
cdoStreamClose(streamID1);
cdoStreamClose(streamID2);
cdoFinish();
......
......@@ -153,8 +153,8 @@ Change_e5slm(void *process)
tsID++;
}
pstreamClose(streamID1);
pstreamClose(streamID2);
cdoStreamClose(streamID1);
cdoStreamClose(streamID2);
cdoFinish();
......
......@@ -333,8 +333,8 @@ Cloudlayer(void *process)
tsID++;
}
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
vlistDestroy(vlistID2);
......
......@@ -593,9 +593,9 @@ Collgrid(void *process)
}
while (nrecs0 > 0);
for (int fileID = 0; fileID < nfiles; fileID++) pstreamClose(ef[fileID].streamID);
for (int fileID = 0; fileID < nfiles; fileID++) cdoStreamClose(ef[fileID].streamID);
pstreamClose(streamID2);
cdoStreamClose(streamID2);
cdoFinish();
......
......@@ -295,9 +295,9 @@ Comp(void *process)
tsID++;
}
pstreamClose(streamID3);
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID3);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
cdoFinish();
......
......@@ -134,8 +134,8 @@ Compc(void *process)
tsID++;
}
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
cdoFinish();
......
......@@ -114,9 +114,9 @@ Complextorect(void *process)
tsID++;
}
pstreamClose(streamID3);
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID3);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
vlistDestroy(vlistID2);
vlistDestroy(vlistID3);
......
......@@ -187,9 +187,9 @@ Cond(void *process)
tsID++;
}
pstreamClose(streamID3);
pstreamClose(streamID2);
pstreamClose(streamID1);
cdoStreamClose(streamID3);
cdoStreamClose(streamID2);
cdoStreamClose(streamID1);
cdoFinish();
......
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