shithub: puzzles

Download patch

ref: d7588e60487337b6d0ca4a6280a812804afe08e6
parent: 6ea61aa98e9b4a39504f0cd2eb768ecb4d508f7a
author: Jacob Nevins <[email protected]>
date: Wed Jul 6 16:10:03 EDT 2005

Move various printf()s after declarations.

[originally from svn r6078]

--- a/solo.c
+++ b/solo.c
@@ -529,8 +529,8 @@
         if (!usage->grid[YUNTRANS(y)*cr+x]) {
 #ifdef STANDALONE_SOLVER
             if (solver_show_working) {
-		printf("%*s", solver_recurse_depth*4, "");
                 va_list ap;
+		printf("%*s", solver_recurse_depth*4, "");
                 va_start(ap, fmt);
                 vprintf(fmt, ap);
                 va_end(ap);
@@ -544,8 +544,8 @@
     } else if (m == 0) {
 #ifdef STANDALONE_SOLVER
 	if (solver_show_working) {
-	    printf("%*s", solver_recurse_depth*4, "");
 	    va_list ap;
+	    printf("%*s", solver_recurse_depth*4, "");
 	    va_start(ap, fmt);
 	    vprintf(fmt, ap);
 	    va_end(ap);
@@ -598,8 +598,8 @@
                 int px, py, pn;
 
                 if (!ret) {
-		    printf("%*s", solver_recurse_depth*4, "");
                     va_list ap;
+		    printf("%*s", solver_recurse_depth*4, "");
                     va_start(ap, fmt);
                     vprintf(fmt, ap);
                     va_end(ap);
@@ -732,9 +732,9 @@
             if (rows > n - count) {
 #ifdef STANDALONE_SOLVER
 		if (solver_show_working) {
+		    va_list ap;
 		    printf("%*s", solver_recurse_depth*4,
 			   "");
-		    va_list ap;
 		    va_start(ap, fmt);
 		    vprintf(fmt, ap);
 		    va_end(ap);
@@ -776,9 +776,9 @@
                                     int px, py, pn;
 
                                     if (!progress) {
+                                        va_list ap;
 					printf("%*s", solver_recurse_depth*4,
 					       "");
-                                        va_list ap;
                                         va_start(ap, fmt);
                                         vprintf(fmt, ap);
                                         va_end(ap);