aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.md5
-rw-r--r--src/commands.c22
-rw-r--r--src/shell.c2
3 files changed, 27 insertions, 2 deletions
diff --git a/TODO.md b/TODO.md
index 553207f..a18c068 100644
--- a/TODO.md
+++ b/TODO.md
@@ -5,8 +5,7 @@ It's more of a personal reminder than anything else.
5 5
6## For version 2.1 6## For version 2.1
7### Memory management 7### Memory management
8* Free large tables from memory before exit (this is not strictly necessary, 8* freemem command: implement the 5 functions, execute at the end of shell.c
9 but can help with WSL bugs)
10### Installation 9### Installation
11* Is it possible to make table generation at least 3x faster? 10* Is it possible to make table generation at least 3x faster?
12### Documentation 11### Documentation
@@ -40,6 +39,8 @@ including e.g. solutions that were not shown because -c)
40* transform alg, rufify etc... 39* transform alg, rufify etc...
41* command notation to list available moves 40* command notation to list available moves
42* make multi-step solve much more general and create command 41* make multi-step solve much more general and create command
42* input directly cube status instead of moves
43 (graphical: maybe there is a cubing.js function; command line: ???)
43 44
44## Distribution 45## Distribution
45 46
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