Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
5ab74acc
Commit
5ab74acc
authored
Oct 28, 2015
by
Uwe Schulzweida
Browse files
added streamReadRecordF()
parent
17ac0d62
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_read.c
View file @
5ab74acc
...
...
@@ -271,8 +271,8 @@ void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, int
}
}
void
stream
R
ead
R
ecord
(
int
streamID
,
double
*
data
,
int
*
nmiss
)
static
void
stream
_r
ead
_r
ecord
(
int
streamID
,
int
memtype
,
void
*
data
,
int
*
nmiss
)
{
check_parg
(
data
);
check_parg
(
nmiss
);
...
...
@@ -287,21 +287,25 @@ void streamReadRecord(int streamID, double *data, int *nmiss)
#if defined (HAVE_LIBGRIB)
case
FILETYPE_GRB
:
case
FILETYPE_GRB2
:
if
(
memtype
==
MEMTYPE_FLOAT
)
Error
(
"grbReadRecord not implemented for memtype float!"
);
grbReadRecord
(
streamptr
,
data
,
nmiss
);
break
;
#endif
#if defined (HAVE_LIBSERVICE)
case
FILETYPE_SRV
:
if
(
memtype
==
MEMTYPE_FLOAT
)
Error
(
"srvReadRecord not implemented for memtype float!"
);
srvReadRecord
(
streamptr
,
data
,
nmiss
);
break
;
#endif
#if defined (HAVE_LIBEXTRA)
case
FILETYPE_EXT
:
if
(
memtype
==
MEMTYPE_FLOAT
)
Error
(
"extReadRecord not implemented for memtype float!"
);
extReadRecord
(
streamptr
,
data
,
nmiss
);
break
;
#endif
#if defined (HAVE_LIBIEG)
case
FILETYPE_IEG
:
if
(
memtype
==
MEMTYPE_FLOAT
)
Error
(
"iegReadRecord not implemented for memtype float!"
);
iegReadRecord
(
streamptr
,
data
,
nmiss
);
break
;
#endif
...
...
@@ -310,6 +314,7 @@ void streamReadRecord(int streamID, double *data, int *nmiss)
case
FILETYPE_NC2
:
case
FILETYPE_NC4
:
case
FILETYPE_NC4C
:
if
(
memtype
==
MEMTYPE_FLOAT
)
Error
(
"cdfReadRecord not implemented for memtype float!"
);
cdfReadRecord
(
streamptr
,
data
,
nmiss
);
break
;
#endif
...
...
@@ -320,3 +325,15 @@ void streamReadRecord(int streamID, double *data, int *nmiss)
}
}
}
void
streamReadRecord
(
int
streamID
,
double
*
data
,
int
*
nmiss
)
{
stream_read_record
(
streamID
,
MEMTYPE_DOUBLE
,
(
void
*
)
data
,
nmiss
);
}
void
streamReadRecordF
(
int
streamID
,
float
*
data
,
int
*
nmiss
)
{
stream_read_record
(
streamID
,
MEMTYPE_FLOAT
,
(
void
*
)
data
,
nmiss
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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