} while(0)
#define Malloc(lvalue,n,type) do {\
- if (!(lvalue = (type*) malloc((n) * sizeof(type)))) \
- Err("out of memory");\
+ if (!(lvalue = (type*) calloc((n), sizeof(type)))) \
+ abort();\
} while(0)
#define Realloc(lvalue,n,type) do {\
if (!(lvalue = (type*) realloc(lvalue, (n) * sizeof(type)))) \
- Err("out of memory");\
+ abort();\
} while(0)
#define Calloc(lvalue,n,type) do {\
if (!(lvalue = (type*) calloc(n, sizeof(type))))\
- Err("out of memory");\
+ abort();\
} while(0)
#define Matalloc(lvalue,n,m,type) do {\
if (!(lvalue = (type**) matalloc(n, (m) * sizeof(type))))\
- Err("out of memory");\
+ abort();\
} while(0)
#define Sprintfrac(lvalue,x) do {\
* Dihedral Schwarz Triangles (D5 only)
***************************************************************************/
+ /* {"3|2 5/2", "xyz",
+ "xyz",
+ "xyz",
+ "",
+ "",
+ 0, 0},
+*/
+
+
+
/* (2 2 5) (D1/5) */
/* 1 */ {"2 5|2", "Pentagonal Prism",
"Pentagonal Dipyramid",
"Catalan Solid",
30, 14},
- /* 33 */ {"2 3 5|", "Truncated Icosidodechedon",
+ /* 33 */ {"2 3 5|", "Truncated Icosidodecahedron",
"Disdyakistriacontahedron",
"Icosahedral (I[1])",
"Archimedian Solid",
facelets++;
} else if (P->even != -1) {
- if (hit[i]) {
+ if (hit && hit[i]) {
push_face3 (result, P->incid[3][i], P->incid[0][i], ii);
push_face3 (result, P->incid[1][i], P->incid[2][i], ii);
} else {
int count = 0;
polyhedron **result;
- Malloc (result, last_uniform * 2 + 1, polyhedron*);
+ Malloc (result, last_uniform * 2 + 3, polyhedron*);
while (index < last_uniform) {
char sym[4];
}
*polyhedra_ret = result;
+ count++; /* leave room for teapot */
return count;
}