mrumtl

Describe materials that vary spectrally
git clone git://git.meso-star.fr/mrumtl.git
Log | Files | Refs | README | LICENSE

commit dc9ac231011a87383dbbfabd3858c2f0a7f3964d
parent 3b91a936e1b113f3c3eb2c6246fc199bd2f136b6
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 28 Feb 2020 15:56:55 +0100

Write the mrumtl_load_stream function

Diffstat:
Msrc/mrumtl.c | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/mrumtl.c b/src/mrumtl.c @@ -749,3 +749,22 @@ error: goto exit; } +res_T +mrumtl_load_stream(struct mrumtl* mrumtl, FILE* stream, const char* stream_name) +{ + res_T res = RES_OK; + + if(!mrumtl || !stream) { + res = RES_BAD_ARG; + goto error; + } + + res = load_stream(mrumtl, stream, stream_name ? stream_name : "<stream>"); + if(res != RES_OK) goto error; + +exit: + return res; +error: + goto exit; +} +