chiark / gitweb /
Merge branch 'master' of chiark:/home/ijackson/things/ypp-sc-tools
[ypp-sc-tools.main.git] / pctb / structure.c
index 63cd641e82ebb843977bf0797ab5f589cf685d62..0fbfb40e6eb076b5dd7081635362e1dabc1fead7 100644 (file)
@@ -84,7 +84,7 @@ const CanonColourInfo canoncolourinfos[]= {
 static void mustfail1(const char *file, int line, const char *what) {
   fprintf(stderr,
          "\n\n"
-         "Unable to figure out contents YPP client display.\n"
+         "Unable to figure out contents of 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:"
@@ -304,17 +304,10 @@ void check_correct_commodities(void) {
        for (y=0; y<allh; y++) {
          int want= all[y][x];
          if (want==' ') continue;
-#define PIXCHECK(dx,dy) \
-          if (get(alloffx+x+dx, alloffy+y+dy) == want) goto pix_found
-         PIXCHECK( 0, 0);
-         PIXCHECK(-1,-1);
-         PIXCHECK(-1,+1);
-         PIXCHECK(+1,-1);
-         PIXCHECK(+1,+1);
-         bad++;
-         continue;
-       pix_found:
-         good++;
+          if (get(alloffx+x, alloffy+y) == want)
+           good++;
+         else
+           bad++;
        }
       debugf("CHECKCOMMOD alloff=%d,%d good=%d bad=%d\n",
             alloffx,alloffy, good,bad);