aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-10-14 14:51:48 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-10-14 14:51:48 +0200
commit59b8f818c7d2e62933df41ede266b05687fd7ab1 (patch)
treedff31a1984ac27b74830298e90777474909e128b /shell
parent8a91354f7b94c669c77fe628a81f9bfe9f599ef0 (diff)
downloadnissy-core-59b8f818c7d2e62933df41ede266b05687fd7ab1.tar.gz
nissy-core-59b8f818c7d2e62933df41ede266b05687fd7ab1.zip
Fix shell
Diffstat (limited to '')
-rw-r--r--shell/shell.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/shell/shell.c b/shell/shell.c
index 41af972..24ae243 100644
--- a/shell/shell.c
+++ b/shell/shell.c
@@ -50,10 +50,10 @@ typedef struct {
50 char *str_trans; 50 char *str_trans;
51 char *str_solver; 51 char *str_solver;
52 char *str_nisstype; 52 char *str_nisstype;
53 unsigned int minmoves; 53 unsigned minmoves;
54 unsigned int maxmoves; 54 unsigned maxmoves;
55 unsigned int optimal; 55 unsigned optimal;
56 unsigned int maxsolutions; 56 unsigned maxsolutions;
57} args_t; 57} args_t;
58 58
59static int64_t compose_exec(args_t *); 59static int64_t compose_exec(args_t *);
@@ -70,7 +70,7 @@ static int64_t solve_scramble_exec(args_t *);
70static int64_t help_exec(args_t *); 70static int64_t help_exec(args_t *);
71 71
72static int parse_args(int, char **, args_t *); 72static int parse_args(int, char **, args_t *);
73static bool parse_uint(char *, unsigned int *); 73static bool parse_uint(char *, unsigned *);
74 74
75static bool set_cube(int, char **, args_t *); 75static bool set_cube(int, char **, args_t *);
76static bool set_cube_perm(int, char **, args_t *); 76static bool set_cube_perm(int, char **, args_t *);
@@ -482,7 +482,7 @@ solve_exec(args_t *args)
482static int64_t 482static int64_t
483solve_scramble_exec(args_t *args) 483solve_scramble_exec(args_t *args)
484{ 484{
485 nissy_frommoves(args->str_moves, args->cube); 485 nissy_applymoves(NISSY_SOLVED_CUBE, args->str_moves, args->cube);
486 486
487 return solve_exec(args); 487 return solve_exec(args);
488} 488}
@@ -584,7 +584,7 @@ parse_args(int argc, char **argv, args_t *args)
584} 584}
585 585
586bool 586bool
587parse_uint(char *argv, int8_t *result) 587parse_uint(char *argv, unsigned *result)
588{ 588{
589 *result = strtol(argv, NULL, 10); 589 *result = strtol(argv, NULL, 10);
590 590

Generated with cgit - Back to sebastiano.tronto.net