shithub: puzzles

Download patch

ref: 6bbcf248aa79799be8468542dbb147b546aeb640
parent: 3d3d00991a728a5cb7a1cbb7ba4985057043beb9
author: Simon Tatham <anakin@pobox.com>
date: Sun Sep 11 10:53:39 EDT 2005

Oops; left some rogue diagnostics in.

[originally from svn r6291]

--- a/inertia.c
+++ b/inertia.c
@@ -1160,7 +1160,7 @@
 	}
     }
 
-#ifndef TSP_DIAGNOSTICS
+#ifdef TSP_DIAGNOSTICS
     printf("before reduction, moves are ");
     x = nodes[circuit[0]] / DP1 % w;
     y = nodes[circuit[0]] / DP1 / w;
@@ -1246,7 +1246,7 @@
 		    p = min(i, j);
 		    q = max(i, j);
 
-#ifndef TSP_DIAGNOSTICS
+#ifdef TSP_DIAGNOSTICS
 		    printf("optimising section from %d - %d\n", p, q);
 #endif
 
@@ -1280,7 +1280,7 @@
 		    if (dir > 0)
 			i = q;	       /* resume loop from the right place */
 
-#ifndef TSP_DIAGNOSTICS
+#ifdef TSP_DIAGNOSTICS
 		    printf("new section runs from %d - %d\n", p, q);
 #endif
 
@@ -1316,7 +1316,7 @@
 
 		    j = i;
 
-#ifndef TSP_DIAGNOSTICS
+#ifdef TSP_DIAGNOSTICS
 		    printf("during reduction, circuit is");
 		    for (k = 0; k < circuitlen; k++) {
 			int nc = nodes[circuit[k]];
@@ -1345,7 +1345,7 @@
 		}
 	    }
 
-#ifndef TSP_DIAGNOSTICS
+#ifdef TSP_DIAGNOSTICS
 	    printf("after reduction, moves are ");
 	    x = nodes[circuit[0]] / DP1 % w;
 	    y = nodes[circuit[0]] / DP1 / w;