chiark / gitweb /
compute initial layout - not yet checked
[moebius2.git] / common.c
index 900102513cf2c7305b31b85deb223a4c9b36f872..b87dedb3110950267c54157283a03d9592f5c1b0 100644 (file)
--- a/common.c
+++ b/common.c
@@ -45,3 +45,6 @@ void xprod(double r[D3], const double a[D3], const double b[D3]) {
   r[1]= a[2]*b[0] - a[0]*b[2];
   r[2]= a[0]*b[1] - a[1]*b[0];
 }
+
+void diee(const char *what) { perror(what); exit(16); }
+void flushoutput(void) { if (fflush(stdout)||ferror(stdout)) diee("stdout"); }