Commits

Shlomi Fish committed fb211df

Convert msg to fc_solve_msg for namespace sanity.

  • Participants
  • Parent commits 7d648fe
  • Branches make-code-suitable-for-fc-solve

Comments (0)

Files changed (4)

File patsolve/pat.c

 
 	if (l == NULL) {
 		if (Pilenum == NPILES) {
-			msg("Ran out of pile numbers!");
+			fc_solve_msg("Ran out of pile numbers!");
 			return -1;
 		}
 		l = new(BUCKETLIST);

File patsolve/patmain.c

   "-S speed mode; find a solution quickly, rather than a good solution\n"
   "-q quiet, -v verbose\n"
   "-s implies -aw10 -t4, -f implies -aw8 -t4\n";
-#define USAGE() msg(Usage, Progname)
+#define USAGE() fc_solve_msg(Usage, Progname)
 
 int Interactive = TRUE; /* interactive mode. */
 int Noexit = FALSE;     /* -E means don't exit */
 	c = 0;
 	for (i = 0; i <= 0xFFFF; i++) {
 		if (Clusternum[i]) {
-			msg("%04X: %6d", i, Clusternum[i]);
+			fc_solve_msg("%04X: %6d", i, Clusternum[i]);
 			c++;
 			if (c % 5 == 0) {
 				c = 0;
-				msg("\n");
+				fc_solve_msg("\n");
 			} else {
-				msg("\t");
+				fc_solve_msg("\t");
 			}
 		}
 	}
 	if (c != 0) {
-		msg("\n");
+		fc_solve_msg("\n");
 	}
 	print_layout(soft_thread);
 
 	Progname = *argv;
 #if DEBUG
 	signal(SIGQUIT, quit);
-msg("sizeof(POSITION) = %d\n", sizeof(POSITION));
+    fc_solve_msg("sizeof(POSITION) = %d\n", sizeof(POSITION));
 #endif
 
 	/* Parse args twice.  Once to get the operating mode, and the
 				break;
 
 			default:
-				msg("%s: unknown flag -%c\n", Progname, c);
+				fc_solve_msg("%s: unknown flag -%c\n", Progname, c);
 				USAGE();
 				exit(1);
 			}
 	}
 #if DEBUG
 if (Mem_remain != Init_mem_remain) {
- msg("Mem_remain = %ld\n", Mem_remain);
+ fc_solve_msg("Mem_remain = %ld\n", Mem_remain);
 }
 #endif
 }
 {
   printcard(mp->card, stderr);
   if (mp->totype == T_TYPE) {
-   msg("to temp (%d)\n", mp->pri);
+   fc_solve_msg("to temp (%d)\n", mp->pri);
   } else if (mp->totype == O_TYPE) {
-   msg("out (%d)\n", mp->pri);
+   fc_solve_msg("out (%d)\n", mp->pri);
   } else {
-   msg("to ");
+   fc_solve_msg("to ");
    if (mp->destcard == NONE) {
-    msg("empty pile (%d)", mp->pri);
+    fc_solve_msg("empty pile (%d)", mp->pri);
    } else {
     printcard(mp->destcard, stderr);
-    msg("(%d)", mp->pri);
+    fc_solve_msg("(%d)", mp->pri);
    }
    fputc('\n', stderr);
   }

File patsolve/util.c

 
 /* Just print a message. */
 
-void msg(char *msg, ...)
+void fc_solve_msg(char *msg, ...)
 {
 	va_list ap;
 

File patsolve/util.h

 extern void free_blocks(void);
 
 /* Error messages. */
-extern void msg(char *msg, ...);
+extern void fc_solve_msg(char *msg, ...);
 
 #ifdef  __cplusplus
 }