htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

commit a46de58225e8d475c588bfe45cc6c13bc2d06896
parent 93b11041d1cdebe18f985e97b39f98bd26681f25
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 26 Mar 2020 12:10:04 +0100

Fix the parsing of the material file

Diffstat:
Msrc/htrdr_mtl.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/htrdr_mtl.c b/src/htrdr_mtl.c @@ -75,7 +75,7 @@ parse_material goto error; } - tk = strtok_r(NULL, "", &tk_ctx); + tk = strtok_r(NULL, " \t", &tk_ctx); if(!tk) { htrdr_log_err(mtl->htrdr, "%s:%lu: missing the MruMtl file for the material `%s'.\n", @@ -108,6 +108,12 @@ parse_material goto error; } + tk = strtok_r(NULL, " \t", &tk_ctx); + if(tk) { + htrdr_log_warn(mtl->htrdr, "%s:%lu: unexpected text `%s'.\n", + txtrdr_get_name(txtrdr), (unsigned long)txtrdr_get_line_num(txtrdr), tk); + } + exit: return res; error: