aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2024-07-21 19:12:13 -0400
committerSimon Tatham <anakin@pobox.com>2024-07-31 23:29:00 +0100
commit6b453e4e984c1d881c431265eb3cd9b43688721f (patch)
tree01de5e4b3bcd34fa3e93724d8b2fa6ead044cc22
parentc70878c4adde680fc569ff9ab75e49581c907fa5 (diff)
downloadpuzzles-6b453e4e984c1d881c431265eb3cd9b43688721f.zip
puzzles-6b453e4e984c1d881c431265eb3cd9b43688721f.tar.gz
puzzles-6b453e4e984c1d881c431265eb3cd9b43688721f.tar.bz2
puzzles-6b453e4e984c1d881c431265eb3cd9b43688721f.tar.xz
Filling: turn printv() into a macro, and only for STANDALONE_SOLVER builds.
This was breaking Rockbox builds due to the lack of vprintf().
-rw-r--r--filling.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/filling.c b/filling.c
index ccae7e2..a0c1447 100644
--- a/filling.c
+++ b/filling.c
@@ -72,16 +72,11 @@
static bool verbose;
-static void printv(const char *fmt, ...) {
-#ifndef PALM
- if (verbose) {
- va_list va;
- va_start(va, fmt);
- vprintf(fmt, va);
- va_end(va);
- }
+#ifdef STANDALONE_SOLVER
+#define printv if (!verbose); else printf
+#else
+#define printv(...)
#endif
-}
/*****************************************************************************
* GAME CONFIGURATION AND PARAMETERS *
@@ -2202,6 +2197,11 @@ const struct game thegame = {
#ifdef STANDALONE_SOLVER /* solver? hah! */
int main(int argc, char **argv) {
+ if (!strcmp(argv[1], "--verbose")) {
+ verbose = true;
+ argv++;
+ }
+
while (*++argv) {
game_params *params;
game_state *state;