+
+static void mustfail1(const char *file, int line, const char *what) {
+ fprintf(stderr,
+ "\n\n"
+ "Unable to figure out contents YPP client display.\n"
+ " Check that your client is logged in has the correct display.\n"
+ " If that isn't the problem, please report this as a fault.\n\n"
+ "Technical details:"
+ " %s:%d: requirement failed: %s\n",
+ file, line, what);
+}
+static void mustfail2(void) NORET;
+static void mustfail2(void) {
+ fprintf(stderr, "\n\nGiving up.\n");
+ exit(8);
+}
+
+#define MUST(x, ifnot) do{ \
+ if (!(x)) { \
+ mustfail1(__FILE__,__LINE__,#x); \
+ ifnot; \
+ mustfail2(); \
+ } \
+ }while(0)
+
+#define MP(v) fprintf(stderr," %s=%d,%d",#v,(v).x,(v).y)
+#define MI(v) fprintf(stderr," %s=%d", #v,(v))
+#define MC(v) fprintf(stderr," %s='%c'", #v,(v))
+#define MS(v) fprintf(stderr," %s=\"%s\"", #v,(v))
+#define MSB(v) fprintf(stderr," %s", (v))
+#define MR(v) fprintf(stderr," %s=%d,%d..%d,%d",\
+ #v,(v).tl.x,(v).tl.y,(v).br.x,(v).br.y)
+
+