From 1b9cdab98cd98d4a014c2f5d39486ea071f92979 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 6 Apr 2020 08:38:05 +0200 Subject: [PATCH] added missing CAP_COMMANDLINE guards --- debug.cpp | 2 ++ dpgen.cpp | 2 ++ fieldpattern.cpp | 5 ++++- nonisotropic.cpp | 3 ++- wfcgen.cpp | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/debug.cpp b/debug.cpp index 20b2e1a6..4aa72729 100644 --- a/debug.cpp +++ b/debug.cpp @@ -557,6 +557,7 @@ EX void viewall() { } } +#if CAP_COMMANDLINE /** perform a move for the -cmove command */ int cheat_move_gen = 7; @@ -582,6 +583,7 @@ void cheat_move(char c) { else if(c == 'g') cheat_move_gen = -1; else println(hlog, "unknown move command: ", c); } +#endif /** launch a debugging screen, and continue normal working only after this screen is closed */ EX void modalDebug(cell *c) { diff --git a/dpgen.cpp b/dpgen.cpp index 24d75d07..2ae31d50 100644 --- a/dpgen.cpp +++ b/dpgen.cpp @@ -234,6 +234,7 @@ EX void show_menu() { dialog::display(); } +#if CAP_COMMANDLINE auto sbhook = addHook(hooks_args, 100, [] { using namespace arg; @@ -261,6 +262,7 @@ auto sbhook = addHook(hooks_args, 100, [] { if(in) return named_dialog(XLAT("select a puzzle"), show_menu); else return named_functionality(); }); +#endif EX } } \ No newline at end of file diff --git a/fieldpattern.cpp b/fieldpattern.cpp index 8b718c51..54a8d8d8 100644 --- a/fieldpattern.cpp +++ b/fieldpattern.cpp @@ -1301,6 +1301,7 @@ int hk = discoveries.clear(); }) #endif +#if CAP_COMMANDLINE + addHook(hooks_args, 0, [] { using namespace arg; if(0) ; @@ -1309,7 +1310,9 @@ int hk = else if(argis("-q3-limitv")) { shift(); limitv = argi(); } else return 1; return 0; - }); + }) +#endif + + 0; EX purehookset on_geometry_change; diff --git a/nonisotropic.cpp b/nonisotropic.cpp index 66154ff7..1fe1daf9 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -2065,6 +2065,7 @@ EX namespace nisot { return NULL; } + #if CAP_COMMANDLINE auto config = addHook(hooks_args, 0, [] () { using namespace arg; #if CAP_SOLV @@ -2161,7 +2162,7 @@ EX namespace nisot { } return 1; }); - + #endif } } diff --git a/wfcgen.cpp b/wfcgen.cpp index d4680704..39140265 100644 --- a/wfcgen.cpp +++ b/wfcgen.cpp @@ -266,6 +266,7 @@ EX void wfc_menu() { dialog::display(); } +#if CAP_COMMANDLINE auto wfc_hook = // addHook(hooks_handleKey, 100, wfc_handleKey) + addHook(hooks_args, 100, [] { @@ -285,6 +286,7 @@ auto wfc_hook = else return 1; return 0; }); +#endif auto cgm = addHook(clearmemory, 40, [] () { centers.clear(); }) + addHook(hooks_removecells, 0, [] () { eliminate_if(centers, is_cell_removed); });