mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 15:41:30 -07:00
Filling: turn printv() into a macro, and only for STANDALONE_SOLVER builds.
This was breaking Rockbox builds due to the lack of vprintf().
This commit is contained in:

committed by
Simon Tatham

parent
c70878c4ad
commit
6b453e4e98
18
filling.c
18
filling.c
@ -72,16 +72,11 @@
|
|||||||
|
|
||||||
static bool verbose;
|
static bool verbose;
|
||||||
|
|
||||||
static void printv(const char *fmt, ...) {
|
#ifdef STANDALONE_SOLVER
|
||||||
#ifndef PALM
|
#define printv if (!verbose); else printf
|
||||||
if (verbose) {
|
#else
|
||||||
va_list va;
|
#define printv(...)
|
||||||
va_start(va, fmt);
|
|
||||||
vprintf(fmt, va);
|
|
||||||
va_end(va);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* GAME CONFIGURATION AND PARAMETERS *
|
* GAME CONFIGURATION AND PARAMETERS *
|
||||||
@ -2202,6 +2197,11 @@ const struct game thegame = {
|
|||||||
#ifdef STANDALONE_SOLVER /* solver? hah! */
|
#ifdef STANDALONE_SOLVER /* solver? hah! */
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
if (!strcmp(argv[1], "--verbose")) {
|
||||||
|
verbose = true;
|
||||||
|
argv++;
|
||||||
|
}
|
||||||
|
|
||||||
while (*++argv) {
|
while (*++argv) {
|
||||||
game_params *params;
|
game_params *params;
|
||||||
game_state *state;
|
game_state *state;
|
||||||
|
Reference in New Issue
Block a user