commit 693ce7f5ce4ae2d866ca48b3c8bdfa0cfc6dabba
parent 56b1bbb7d4d02066b6004062ac56b9eb9f90cea1
Author: Benjamin Piaud <benjamin.piaud@meso-star.com>
Date: Mon, 21 Mar 2022 10:36:51 +0100
Replace FATAL by fprintf(stderr,...)
Diffstat:
| M | src/scad.c | | | 36 | ++++++++++++++++++------------------ |
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/scad.c b/src/scad.c
@@ -19,7 +19,7 @@ scad_init(void)
exit:
return res;
error:
- FATAL("Can't initialize gmsh !\n");
+ fprintf(stderr,"Can't initialize gmsh !\n");
goto exit;
}
@@ -34,7 +34,7 @@ scad_release(void)
exit:
return ierr;
error:
- FATAL("Can't release gmsh !\n");
+ fprintf(stderr,"Can't release gmsh !\n");
goto exit;
}
@@ -61,7 +61,7 @@ scad_concat(scad_geom_T* geom1, const scad_geom_T geom2)
int res = RES_OK;
int i;
- if (!geom2) {FATAL("Can't concat \n"); res = RES_BAD_ARG; goto error;}
+ if (!geom2) {fprintf(stderr,"Can't concat \n"); res = RES_BAD_ARG; goto error;}
for (i=0; i<(int)sa_size(geom2) ; ++i)
{
@@ -84,7 +84,7 @@ scad_addbox
int tag = 0;
if(!xyz || !dxdydz) {
- FATAL("Invalid data !\n");
+ fprintf(stderr,"Invalid data !\n");
return RES_BAD_ARG;
}
@@ -103,7 +103,7 @@ exit:
return res;
error:
res = ierr;
- FATAL("Can't create box !\n");
+ fprintf(stderr,"Can't create box !\n");
goto exit;
}
@@ -118,7 +118,7 @@ scad_addcylinder
int tag = 0;
if(!xyz || !axis) {
- FATAL("Invalid data !\n");
+ fprintf(stderr,"Invalid data !\n");
return RES_BAD_ARG;
}
@@ -143,7 +143,7 @@ exit:
return res;
error:
res = ierr;
- FATAL("Can't create cylinder !\n");
+ fprintf(stderr,"Can't create cylinder !\n");
goto exit;
}
@@ -156,7 +156,7 @@ scad_addsphere
int tag = 0;
if(!xyz) {
- FATAL("Invalid data !\n");
+ fprintf(stderr,"Invalid data !\n");
return RES_BAD_ARG;
}
@@ -180,7 +180,7 @@ exit:
return res;
error:
res = ierr;
- FATAL("Can't create sphere !\n");
+ fprintf(stderr,"Can't create sphere !\n");
goto exit;
}
@@ -198,7 +198,7 @@ exit:
return res;
error:
res = ierr;
- FATAL("Can't remove geometry !\n");
+ fprintf(stderr,"Can't remove geometry !\n");
goto exit;
}
@@ -222,7 +222,7 @@ scad_fuse
remove,
&ierr);
- if (ierr != 0 ) {FATAL("Fuse not possible !\n"); goto error;}
+ if (ierr != 0 ) {fprintf(stderr,"Fuse not possible !\n"); goto error;}
for (i=0; i<(int)tagoutn; ++i){
sa_push(*out, tagout[i]);
@@ -257,7 +257,7 @@ scad_cut
remove,
&ierr);
- if (ierr != 0 ) {FATAL("Cut not possible !\n"); goto error;}
+ if (ierr != 0 ) {fprintf(stderr,"Cut not possible !\n"); goto error;}
for (i=0; i<(int)tagoutn; ++i){
sa_push(*out, tagout[i]);
@@ -291,7 +291,7 @@ scad_intersect
remove,
&ierr);
- if (ierr != 0 ) {FATAL("Intersection not possible !\n"); goto error;}
+ if (ierr != 0 ) {fprintf(stderr,"Intersection not possible !\n"); goto error;}
tagoutn = 0;
@@ -363,7 +363,7 @@ scad_fragment
remove,
&ierr);
- if (ierr != 0 ) {FATAL("Fragment not possible !\n"); goto error;}
+ if (ierr != 0 ) {fprintf(stderr,"Fragment not possible !\n"); goto error;}
for (i=0; i<(int)tagoutn; ++i){
sa_push(*out, tagout[i]);
@@ -387,7 +387,7 @@ scad_translate
int ierr;
if (!geom || !dxdydz){
- FATAL("Invalid data !\n");
+ fprintf(stderr,"Invalid data !\n");
return RES_BAD_ARG;
}
@@ -397,7 +397,7 @@ scad_translate
dxdydz[2],
&ierr);
- if (ierr != 0 ) {FATAL("Translation not possible !\n"); goto error;}
+ if (ierr != 0 ) {fprintf(stderr,"Translation not possible !\n"); goto error;}
exit:
return res;
@@ -414,7 +414,7 @@ scad_rotate
int ierr;
if (!geom || !pt || !axis){
- FATAL("Invalid data !\n");
+ fprintf(stderr,"Invalid data !\n");
return RES_BAD_ARG;
}
@@ -428,7 +428,7 @@ scad_rotate
angle,
&ierr);
- if (ierr != 0 ) {FATAL("Rotation not possible !\n"); goto error;}
+ if (ierr != 0 ) {fprintf(stderr,"Rotation not possible !\n"); goto error;}
exit:
return res;