aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2022-03-07 10:12:05 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2022-03-07 10:12:05 +0100
commitf6df8471931faeac7be76b8cdedc6daa48ab961d (patch)
treeb0d1f6181ed480975d041630858c96d661b47801 /src
parentecd8bbf2c0b7a4ca20c9cdc5f8f26836d4082c36 (diff)
downloadnissy-f6df8471931faeac7be76b8cdedc6daa48ab961d.tar.gz
nissy-f6df8471931faeac7be76b8cdedc6daa48ab961d.zip
Set up for adding freemem command
Diffstat (limited to 'src')
-rw-r--r--src/commands.c22
-rw-r--r--src/shell.c2
2 files changed, 24 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c
index 6bfc7b7..1396b69 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -18,6 +18,7 @@ static void solve_exec(CommandArgs *args);
18static void scramble_exec(CommandArgs *args); 18static void scramble_exec(CommandArgs *args);
19static void steps_exec(CommandArgs *args); 19static void steps_exec(CommandArgs *args);
20static void commands_exec(CommandArgs *args); 20static void commands_exec(CommandArgs *args);
21static void freemem_exec(CommandArgs *args);
21static void print_exec(CommandArgs *args); 22static void print_exec(CommandArgs *args);
22static void twophase_exec(CommandArgs *args); 23static void twophase_exec(CommandArgs *args);
23static void help_exec(CommandArgs *args); 24static void help_exec(CommandArgs *args);
@@ -88,6 +89,15 @@ commands_cmd = {
88}; 89};
89 90
90Command 91Command
92freemem_cmd = {
93 .name = "freemem",
94 .usage = "freemem",
95 .description = "free large tables from RAM",
96 .parse_args = parse_no_arg,
97 .exec = freemem_exec,
98};
99
100Command
91print_cmd = { 101print_cmd = {
92 .name = "print", 102 .name = "print",
93 .usage = "print SCRAMBLE", 103 .usage = "print SCRAMBLE",
@@ -535,6 +545,18 @@ commands_exec(CommandArgs *args)
535} 545}
536 546
537static void 547static void
548freemem_exec(CommandArgs *args)
549{
550/* TODO: implement these functions
551 free_allpd();
552 free_allsd();
553 free_invtables();
554 free_ttables();
555 free_mtables();
556*/
557}
558
559static void
538print_exec(CommandArgs *args) 560print_exec(CommandArgs *args)
539{ 561{
540 init_moves(); 562 init_moves();
diff --git a/src/shell.c b/src/shell.c
index 31dde0e..420dc1c 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -163,5 +163,7 @@ main(int argc, char *argv[])
163 launch(false); 163 launch(false);
164 } 164 }
165 165
166 /* TODO: exec freemem */
167
166 return 0; 168 return 0;
167} 169}

Generated with cgit - Back to sebastiano.tronto.net