aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/clear.txt9
-rw-r--r--docs/pre.txt18
-rwxr-xr-xnissybin171912 -> 521128 bytes
-rw-r--r--src/main.c12
4 files changed, 20 insertions, 19 deletions
diff --git a/docs/clear.txt b/docs/clear.txt
new file mode 100644
index 0000000..8ba961a
--- /dev/null
+++ b/docs/clear.txt
@@ -0,0 +1,9 @@
1
2HELP PAGE FOR COMMAND clear
3
4SYNTAX
5clear
6
7DESCRIPTION
8Resets all saved scrambles and output sequences.
9
diff --git a/docs/pre.txt b/docs/pre.txt
deleted file mode 100644
index c2cfd96..0000000
--- a/docs/pre.txt
+++ /dev/null
@@ -1,18 +0,0 @@
1
2HELP PAGE FOR COMMAND pre
3
4SYNTAX
5pre [MOVES|$ID1|@ID1] $ID2
6
7DESCRIPTION
8Prepends either MOVES, the scramble memorized under $ID1 or the output sequence
9memorized under @ID1 at the beginning of the scramble memorized under $ID2. If
10none of MOVES, $ID1 or @ID1 is specified, the user will be asked to type the
11moves.
12Menmonic: "pre(pend) x to y" or just "pre(pend) to y".
13
14EXAMPLES
15add $1
16 The user is required to type the moves that will be prepended to $1.
17add F R B $1
18 Prepends the moves F R B to scramble $1. Now scramble $1 begins with F R B.
diff --git a/nissy b/nissy
index d471eb7..d0ed5f5 100755
--- a/nissy
+++ b/nissy
Binary files differ
diff --git a/src/main.c b/src/main.c
index d68f4af..9758a2f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -32,6 +32,8 @@ char *commands[][10] = {
32 "Solves a scramble."}, 32 "Solves a scramble."},
33 {"replace", "[MOVES|$ID|@ID]", 33 {"replace", "[MOVES|$ID|@ID]",
34 "Find non-optimal subsequences."}, 34 "Find non-optimal subsequences."},
35 {"clear", "",
36 "Delete saved scrambles and output sequences."},
35 {"eo", "[MOVES|$ID|@ID]", 37 {"eo", "[MOVES|$ID|@ID]",
36 "Solves EO."}, 38 "Solves EO."},
37 {"dr", "[MOVES|$ID|@ID]", 39 {"dr", "[MOVES|$ID|@ID]",
@@ -459,6 +461,14 @@ void replace_cmd(int n, char cmdtok[][100]) {
459 } 461 }
460} 462}
461 463
464void clear_cmd(int n, char cmdtok[][100]) {
465 if (n > 1 || cmdtok[0][0] != 'c') { /* Avoid unused variable warning */
466 printf("clear: syntax error.\n");
467 return;
468 }
469 scr_count = tmp_count = 1;
470}
471
462void eo_cmd(int n, char cmdtok[][100]) { 472void eo_cmd(int n, char cmdtok[][100]) {
463 473
464 /* Default values */ 474 /* Default values */
@@ -818,7 +828,7 @@ void exit_quit_cmd(int n, char cmdtok[][100]) {
818void (*cmd_list[])(int n, char cmdtok[][100]) = { 828void (*cmd_list[])(int n, char cmdtok[][100]) = {
819 help_cmd, scramble_cmd, save_cmd, change_cmd, print_cmd, 829 help_cmd, scramble_cmd, save_cmd, change_cmd, print_cmd,
820 add_cmd, invert_cmd, unniss_cmd, pic_cmd, 830 add_cmd, invert_cmd, unniss_cmd, pic_cmd,
821 solve_cmd, replace_cmd, 831 solve_cmd, replace_cmd, clear_cmd,
822 eo_cmd, dr_cmd, htr_cmd, 832 eo_cmd, dr_cmd, htr_cmd,
823 drfinish_cmd, htrfinish_cmd, drcorners_cmd, 833 drfinish_cmd, htrfinish_cmd, drcorners_cmd,
824 exit_quit_cmd, exit_quit_cmd, NULL 834 exit_quit_cmd, exit_quit_cmd, NULL

Generated with cgit - Back to sebastiano.tronto.net