Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
489f2410
Commit
489f2410
authored
Jan 09, 2013
by
Uwe Schulzweida
Browse files
tstepsNewEntry: changed argument type to stream_t
parent
1b2cdef4
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/stream.c
View file @
489f2410
...
...
@@ -1409,7 +1409,7 @@ int streamDefTimestep(int streamID, int tsID)
}
}
newtsID
=
tstepsNewEntry
(
stream
ID
);
newtsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
newtsID
)
Error
(
"Internal problem: tsID = %d newtsID = %d"
,
tsID
,
newtsID
);
...
...
src/stream_cgribex.c
View file @
489f2410
...
...
@@ -560,7 +560,7 @@ int cgribexScanTimestep1(int streamID)
isec3
=
streamptr
->
record
->
sec3
;
isec4
=
streamptr
->
record
->
sec4
;
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
taxis
=
&
streamptr
->
tsteps
[
tsID
].
taxis
;
if
(
tsID
!=
0
)
...
...
@@ -751,7 +751,7 @@ int cgribexScanTimestep1(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -1039,7 +1039,7 @@ int cgribexScanTimestep2(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -1313,7 +1313,7 @@ int cgribexScanTimestep(int streamID)
if
(
streamptr
->
ntsteps
!=
streamptr
->
rtsteps
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
src/stream_ext.c
View file @
489f2410
...
...
@@ -29,7 +29,7 @@
typedef
struct
{
int
param
;
int
level
;
}
extcompvar_t
;
}
extcompvar_t
;
static
int
extInqDatatype
(
int
prec
,
int
number
)
...
...
@@ -379,7 +379,7 @@ void extScanTimestep1(int streamID)
streamptr
->
curTsID
=
0
;
extp
=
streamptr
->
record
->
extp
;
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
taxis
=
&
streamptr
->
tsteps
[
tsID
].
taxis
;
if
(
tsID
!=
0
)
...
...
@@ -469,7 +469,7 @@ void extScanTimestep1(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -492,7 +492,7 @@ void extScanTimestep1(int streamID)
static
int
extScanTimestep2
(
int
streamID
)
{
{
int
header
[
4
];
int
status
;
int
fileID
;
...
...
@@ -643,7 +643,7 @@ int extScanTimestep2(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -790,7 +790,7 @@ int extScanTimestep(int streamID)
if
(
streamptr
->
ntsteps
!=
streamptr
->
rtsteps
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
src/stream_gribapi.c
View file @
489f2410
...
...
@@ -1002,7 +1002,7 @@ int gribapiScanTimestep1(int streamID)
streamptr
->
curTsID
=
0
;
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
taxis
=
&
streamptr
->
tsteps
[
tsID
].
taxis
;
if
(
tsID
!=
0
)
...
...
@@ -1243,7 +1243,7 @@ int gribapiScanTimestep1(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -1557,7 +1557,7 @@ int gribapiScanTimestep2(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -1856,7 +1856,7 @@ int gribapiScanTimestep(int streamID)
if
(
streamptr
->
ntsteps
!=
streamptr
->
rtsteps
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
src/stream_ieg.c
View file @
489f2410
...
...
@@ -893,7 +893,7 @@ void iegScanTimestep1(int streamID)
streamptr
->
curTsID
=
0
;
iegp
=
streamptr
->
record
->
iegp
;
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
taxis
=
&
streamptr
->
tsteps
[
tsID
].
taxis
;
if
(
tsID
!=
0
)
...
...
@@ -987,7 +987,7 @@ void iegScanTimestep1(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -1010,7 +1010,7 @@ void iegScanTimestep1(int streamID)
static
int
iegScanTimestep2
(
int
streamID
)
{
{
int
status
;
int
fileID
;
int
tabnum
;
...
...
@@ -1165,7 +1165,7 @@ int iegScanTimestep2(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -1312,7 +1312,7 @@ int iegScanTimestep(int streamID)
if
(
streamptr
->
ntsteps
!=
streamptr
->
rtsteps
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
src/stream_int.h
View file @
489f2410
...
...
@@ -287,7 +287,7 @@ int streamsNewEntry(int filetype);
void
streamsInitEntry
(
int
streamID
);
int
streamNewVar
(
int
streamID
,
int
gridID
,
int
zaxisID
);
int
tstepsNewEntry
(
in
t
stream
ID
);
int
tstepsNewEntry
(
stream_
t
*
stream
ptr
);
char
*
strfiletype
(
int
filetype
);
...
...
src/stream_srv.c
View file @
489f2410
...
...
@@ -381,7 +381,7 @@ void srvScanTimestep1(int streamID)
streamptr
->
curTsID
=
0
;
srvp
=
streamptr
->
record
->
srvp
;
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
taxis
=
&
streamptr
->
tsteps
[
tsID
].
taxis
;
if
(
tsID
!=
0
)
...
...
@@ -473,7 +473,7 @@ void srvScanTimestep1(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -645,7 +645,7 @@ int srvScanTimestep2(int streamID)
if
(
streamptr
->
ntsteps
==
-
1
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
@@ -793,7 +793,7 @@ int srvScanTimestep(int streamID)
if
(
streamptr
->
ntsteps
!=
streamptr
->
rtsteps
)
{
tsID
=
tstepsNewEntry
(
stream
ID
);
tsID
=
tstepsNewEntry
(
stream
ptr
);
if
(
tsID
!=
streamptr
->
rtsteps
)
Error
(
"Internal error. tsID = %d"
,
tsID
);
...
...
src/tsteps.c
View file @
489f2410
...
...
@@ -8,12 +8,9 @@
#include
"stream_int.h"
static
void
tstepsInitEntry
(
int
streamID
,
int
tsID
)
static
void
tstepsInitEntry
(
stream_t
*
streamptr
,
int
tsID
)
{
stream_t
*
streamptr
;
streamptr
=
stream_to_pointer
(
streamID
);
streamptr
->
tsteps
[
tsID
].
curRecID
=
CDI_UNDEFID
;
streamptr
->
tsteps
[
tsID
].
position
=
0
;
streamptr
->
tsteps
[
tsID
].
records
=
NULL
;
...
...
@@ -27,14 +24,11 @@ static void tstepsInitEntry(int streamID, int tsID)
}
int
tstepsNewEntry
(
in
t
stream
ID
)
int
tstepsNewEntry
(
stream_
t
*
stream
ptr
)
{
int
tsID
=
0
;
int
tstepsTableSize
;
tsteps_t
*
tstepsTable
;
stream_t
*
streamptr
;
streamptr
=
stream_to_pointer
(
streamID
);
tsID
=
streamptr
->
tstepsNextID
++
;
tstepsTableSize
=
streamptr
->
tstepsTableSize
;
...
...
@@ -58,7 +52,7 @@ int tstepsNewEntry(int streamID)
streamptr
->
tstepsTableSize
=
tstepsTableSize
;
streamptr
->
tsteps
=
tstepsTable
;
tstepsInitEntry
(
stream
ID
,
tsID
);
tstepsInitEntry
(
stream
ptr
,
tsID
);
streamptr
->
tsteps
[
tsID
].
taxis
.
used
=
TRUE
;
...
...
@@ -89,7 +83,7 @@ void cdiCreateTimesteps(int streamID)
for
(
tsID
=
0
;
tsID
<
ntsteps
;
tsID
++
)
{
tstepsInitEntry
(
stream
ID
,
tsID
);
tstepsInitEntry
(
stream
ptr
,
tsID
);
streamptr
->
tsteps
[
tsID
].
taxis
.
used
=
TRUE
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment