diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-14 14:51:48 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-14 14:51:48 +0200 |
| commit | 59b8f818c7d2e62933df41ede266b05687fd7ab1 (patch) | |
| tree | dff31a1984ac27b74830298e90777474909e128b | |
| parent | 8a91354f7b94c669c77fe628a81f9bfe9f599ef0 (diff) | |
| download | nissy-core-59b8f818c7d2e62933df41ede266b05687fd7ab1.tar.gz nissy-core-59b8f818c7d2e62933df41ede266b05687fd7ab1.zip | |
Fix shell
| -rw-r--r-- | shell/shell.c | 14 |
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 | ||
| 59 | static int64_t compose_exec(args_t *); | 59 | static int64_t compose_exec(args_t *); |
| @@ -70,7 +70,7 @@ static int64_t solve_scramble_exec(args_t *); | |||
| 70 | static int64_t help_exec(args_t *); | 70 | static int64_t help_exec(args_t *); |
| 71 | 71 | ||
| 72 | static int parse_args(int, char **, args_t *); | 72 | static int parse_args(int, char **, args_t *); |
| 73 | static bool parse_uint(char *, unsigned int *); | 73 | static bool parse_uint(char *, unsigned *); |
| 74 | 74 | ||
| 75 | static bool set_cube(int, char **, args_t *); | 75 | static bool set_cube(int, char **, args_t *); |
| 76 | static bool set_cube_perm(int, char **, args_t *); | 76 | static bool set_cube_perm(int, char **, args_t *); |
| @@ -482,7 +482,7 @@ solve_exec(args_t *args) | |||
| 482 | static int64_t | 482 | static int64_t |
| 483 | solve_scramble_exec(args_t *args) | 483 | solve_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 | ||
| 586 | bool | 586 | bool |
| 587 | parse_uint(char *argv, int8_t *result) | 587 | parse_uint(char *argv, unsigned *result) |
| 588 | { | 588 | { |
| 589 | *result = strtol(argv, NULL, 10); | 589 | *result = strtol(argv, NULL, 10); |
| 590 | 590 | ||
