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
981b8736
Commit
981b8736
authored
Jan 09, 2013
by
Uwe Schulzweida
Browse files
cdi_create_records: changed argument type to stream_t
parent
e0838ab1
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/stream.c
View file @
981b8736
...
...
@@ -1438,7 +1438,7 @@ int streamDefTimestep(int streamID, int tsID)
&&
time_is_varying
)
cdfDefTimestep
(
streamID
,
tsID
);
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
return
(
streamptr
->
ntsteps
);
}
...
...
src/stream_cgribex.c
View file @
981b8736
...
...
@@ -833,7 +833,7 @@ int cgribexScanTimestep2(int streamID)
fileSetPos
(
fileID
,
streamptr
->
tsteps
[
tsID
].
position
,
SEEK_SET
);
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecords
=
streamptr
->
tsteps
[
tsID
].
nallrecs
;
streamptr
->
tsteps
[
1
].
recIDs
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
...
...
@@ -1110,7 +1110,7 @@ int cgribexScanTimestep(int streamID)
gribbuffer
=
(
unsigned
char
*
)
streamptr
->
record
->
buffer
;
buffersize
=
streamptr
->
record
->
buffersize
;
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecs
=
streamptr
->
tsteps
[
1
].
nrecs
;
...
...
src/stream_ext.c
View file @
981b8736
...
...
@@ -529,7 +529,7 @@ int extScanTimestep2(int streamID)
fileSetPos
(
fileID
,
streamptr
->
tsteps
[
tsID
].
position
,
SEEK_SET
);
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecords
=
streamptr
->
tsteps
[
0
].
nallrecs
;
streamptr
->
tsteps
[
1
].
recIDs
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
...
...
@@ -540,9 +540,9 @@ int extScanTimestep2(int streamID)
for
(
recID
=
0
;
recID
<
nrecords
;
recID
++
)
{
varID
=
streamptr
->
tsteps
[
0
].
records
[
recID
].
varID
;
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
position
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
position
=
streamptr
->
tsteps
[
0
].
records
[
recID
].
position
;
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
size
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
size
=
streamptr
->
tsteps
[
0
].
records
[
recID
].
size
;
}
...
...
@@ -718,7 +718,7 @@ int extScanTimestep(int streamID)
if
(
streamptr
->
tsteps
[
tsID
].
recordSize
==
0
)
{
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecs
=
streamptr
->
tsteps
[
1
].
nrecs
;
...
...
src/stream_gribapi.c
View file @
981b8736
...
...
@@ -1324,7 +1324,7 @@ int gribapiScanTimestep2(int streamID)
fileSetPos
(
fileID
,
streamptr
->
tsteps
[
tsID
].
position
,
SEEK_SET
);
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecords
=
streamptr
->
tsteps
[
tsID
].
nallrecs
;
streamptr
->
tsteps
[
1
].
recIDs
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
...
...
@@ -1626,7 +1626,7 @@ int gribapiScanTimestep(int streamID)
gribbuffer
=
(
unsigned
char
*
)
streamptr
->
record
->
buffer
;
buffersize
=
streamptr
->
record
->
buffersize
;
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecs
=
streamptr
->
tsteps
[
1
].
nrecs
;
...
...
src/stream_ieg.c
View file @
981b8736
...
...
@@ -1046,7 +1046,7 @@ int iegScanTimestep2(int streamID)
fileSetPos
(
fileID
,
streamptr
->
tsteps
[
tsID
].
position
,
SEEK_SET
);
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecords
=
streamptr
->
tsteps
[
0
].
nallrecs
;
streamptr
->
tsteps
[
1
].
recIDs
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
...
...
@@ -1057,9 +1057,9 @@ int iegScanTimestep2(int streamID)
for
(
recID
=
0
;
recID
<
nrecords
;
recID
++
)
{
varID
=
streamptr
->
tsteps
[
0
].
records
[
recID
].
varID
;
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
position
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
position
=
streamptr
->
tsteps
[
0
].
records
[
recID
].
position
;
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
size
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
size
=
streamptr
->
tsteps
[
0
].
records
[
recID
].
size
;
}
...
...
@@ -1239,7 +1239,7 @@ int iegScanTimestep(int streamID)
if
(
streamptr
->
tsteps
[
tsID
].
recordSize
==
0
)
{
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecs
=
streamptr
->
tsteps
[
1
].
nrecs
;
...
...
src/stream_int.h
View file @
981b8736
...
...
@@ -295,7 +295,7 @@ void cdi_generate_vars(stream_t *streamptr);
void
vlist_check_contents
(
int
vlistID
);
void
cdi
C
reate
R
ecords
(
in
t
stream
ID
,
int
tsID
);
void
cdi
_c
reate
_r
ecords
(
stream_
t
*
stream
ptr
,
int
tsID
);
int
recordNewEntry
(
stream_t
*
streamptr
,
int
tsID
);
...
...
src/stream_record.c
View file @
981b8736
...
...
@@ -494,21 +494,16 @@ void streamCopyRecord(int streamID2, int streamID1)
}
void
cdi
C
reate
R
ecords
(
in
t
stream
ID
,
int
tsID
)
void
cdi
_c
reate
_r
ecords
(
stream_
t
*
stream
ptr
,
int
tsID
)
{
int
nrecords
,
maxrecords
;
int
nvars
,
varID
,
recID
;
record_t
*
records
;
int
vlistID
;
stream_t
*
streamptr
;
streamptr
=
stream_to_pointer
(
streamID
);
stream_check_ptr
(
__func__
,
streamptr
);
if
(
streamptr
->
tsteps
[
tsID
].
records
)
return
;
vlistID
=
stream
InqVlist
(
stream
ID
)
;
vlistID
=
stream
ptr
->
vlist
ID
;
if
(
tsID
==
0
)
{
...
...
src/stream_srv.c
View file @
981b8736
...
...
@@ -529,7 +529,7 @@ int srvScanTimestep2(int streamID)
fileSetPos
(
fileID
,
streamptr
->
tsteps
[
tsID
].
position
,
SEEK_SET
);
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecords
=
streamptr
->
tsteps
[
0
].
nallrecs
;
streamptr
->
tsteps
[
1
].
recIDs
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
...
...
@@ -717,7 +717,7 @@ int srvScanTimestep(int streamID)
if
(
streamptr
->
tsteps
[
tsID
].
recordSize
==
0
)
{
cdi
C
reate
R
ecords
(
stream
ID
,
tsID
);
cdi
_c
reate
_r
ecords
(
stream
ptr
,
tsID
);
nrecs
=
streamptr
->
tsteps
[
1
].
nrecs
;
...
...
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