diff options
| -rw-r--r-- | src/alg.c | 4 | ||||
| -rw-r--r-- | src/alg.h | 4 | ||||
| -rw-r--r-- | src/commands.c | 2 | ||||
| -rw-r--r-- | src/commands.h | 2 | ||||
| -rw-r--r-- | src/coord.c | 18 | ||||
| -rw-r--r-- | src/coord.h | 3 | ||||
| -rw-r--r-- | src/cube.c | 14 | ||||
| -rw-r--r-- | src/cube.h | 2 | ||||
| -rw-r--r-- | src/env.c | 2 | ||||
| -rw-r--r-- | src/env.h | 2 | ||||
| -rw-r--r-- | src/moves.c | 11 | ||||
| -rw-r--r-- | src/moves.h | 2 | ||||
| -rw-r--r-- | src/shell.c | 2 | ||||
| -rw-r--r-- | src/shell.h | 2 | ||||
| -rw-r--r-- | src/symcoord.c | 26 | ||||
| -rw-r--r-- | src/symcoord.h | 2 | ||||
| -rw-r--r-- | src/trans.c | 11 | ||||
| -rw-r--r-- | src/trans.h | 2 |
18 files changed, 56 insertions, 55 deletions
| @@ -376,7 +376,7 @@ new_alg(char *str) | |||
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | AlgList * | 378 | AlgList * |
| 379 | new_alglist() | 379 | new_alglist(void) |
| 380 | { | 380 | { |
| 381 | AlgList *ret = malloc(sizeof(AlgList)); | 381 | AlgList *ret = malloc(sizeof(AlgList)); |
| 382 | 382 | ||
| @@ -515,7 +515,7 @@ init_moveset(Moveset *ms) | |||
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | void | 517 | void |
| 518 | init_all_movesets() | 518 | init_all_movesets(void) |
| 519 | { | 519 | { |
| 520 | int i; | 520 | int i; |
| 521 | 521 | ||
| @@ -29,7 +29,7 @@ char * move_string(Move m); | |||
| 29 | void movelist_to_position(Move *ml, int *pos); | 29 | void movelist_to_position(Move *ml, int *pos); |
| 30 | void moveset_to_list(Moveset ms, Move *lst); | 30 | void moveset_to_list(Moveset ms, Move *lst); |
| 31 | Alg * new_alg(char *str); | 31 | Alg * new_alg(char *str); |
| 32 | AlgList * new_alglist(); | 32 | AlgList * new_alglist(void); |
| 33 | Alg * on_inverse(Alg *alg); | 33 | Alg * on_inverse(Alg *alg); |
| 34 | void print_alg(Alg *alg, bool l); | 34 | void print_alg(Alg *alg, bool l); |
| 35 | void print_alglist(AlgList *al, bool l); | 35 | void print_alglist(AlgList *al, bool l); |
| @@ -37,7 +37,7 @@ void swapmove(Move *m1, Move *m2); | |||
| 37 | Alg * unniss(Alg *alg); | 37 | Alg * unniss(Alg *alg); |
| 38 | 38 | ||
| 39 | void init_moveset(Moveset *ms); | 39 | void init_moveset(Moveset *ms); |
| 40 | void init_all_movesets(); | 40 | void init_all_movesets(void); |
| 41 | 41 | ||
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
diff --git a/src/commands.c b/src/commands.c index 4d3ad50..7dd2e45 100644 --- a/src/commands.c +++ b/src/commands.c | |||
| @@ -736,7 +736,7 @@ free_args(CommandArgs *args) | |||
| 736 | } | 736 | } |
| 737 | 737 | ||
| 738 | CommandArgs * | 738 | CommandArgs * |
| 739 | new_args() | 739 | new_args(void) |
| 740 | { | 740 | { |
| 741 | CommandArgs *args = malloc(sizeof(CommandArgs)); | 741 | CommandArgs *args = malloc(sizeof(CommandArgs)); |
| 742 | 742 | ||
diff --git a/src/commands.h b/src/commands.h index b7a4c36..ca09875 100644 --- a/src/commands.h +++ b/src/commands.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include "steps.h" | 7 | #include "steps.h" |
| 8 | 8 | ||
| 9 | void free_args(CommandArgs *args); | 9 | void free_args(CommandArgs *args); |
| 10 | CommandArgs * new_args(); | 10 | CommandArgs * new_args(void); |
| 11 | 11 | ||
| 12 | extern Command * commands[]; | 12 | extern Command * commands[]; |
| 13 | 13 | ||
diff --git a/src/coord.c b/src/coord.c index a9df9fd..0d87ffa 100644 --- a/src/coord.c +++ b/src/coord.c | |||
| @@ -30,12 +30,12 @@ static uint64_t move_htr_drud(Move m, uint64_t ind); | |||
| 30 | static uint64_t move_htrfin(Move m, uint64_t ind); | 30 | static uint64_t move_htrfin(Move m, uint64_t ind); |
| 31 | static uint64_t move_cpud_separate(Move m, uint64_t ind); | 31 | static uint64_t move_cpud_separate(Move m, uint64_t ind); |
| 32 | 32 | ||
| 33 | static void init_cphtr_cosets(); | 33 | static void init_cphtr_cosets(void); |
| 34 | static void init_cphtr_left_cosets_bfs(int i, int c); | 34 | static void init_cphtr_left_cosets_bfs(int i, int c); |
| 35 | static void init_cphtr_right_cosets_color(int i, int c); | 35 | static void init_cphtr_right_cosets_color(int i, int c); |
| 36 | static void init_cpud_separate(); | 36 | static void init_cpud_separate(void); |
| 37 | static void init_cornershtrfin(); | 37 | static void init_cornershtrfin(void); |
| 38 | static void init_htr_eposs(); | 38 | static void init_htr_eposs(void); |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | /* All sorts of useful costants and tables **********************************/ | 41 | /* All sorts of useful costants and tables **********************************/ |
| @@ -463,7 +463,7 @@ move_cpud_separate(Move m, uint64_t ind) | |||
| 463 | * know how to do. | 463 | * know how to do. |
| 464 | */ | 464 | */ |
| 465 | static void | 465 | static void |
| 466 | init_cphtr_cosets() | 466 | init_cphtr_cosets(void) |
| 467 | { | 467 | { |
| 468 | unsigned int i; | 468 | unsigned int i; |
| 469 | int c = 0, d = 0; | 469 | int c = 0, d = 0; |
| @@ -531,7 +531,7 @@ init_cphtr_right_cosets_color(int i, int d) | |||
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | static void | 533 | static void |
| 534 | init_cpud_separate() | 534 | init_cpud_separate(void) |
| 535 | { | 535 | { |
| 536 | unsigned int ui; | 536 | unsigned int ui; |
| 537 | int i, co[8]; | 537 | int i, co[8]; |
| @@ -545,7 +545,7 @@ init_cpud_separate() | |||
| 545 | } | 545 | } |
| 546 | 546 | ||
| 547 | static void | 547 | static void |
| 548 | init_cornershtrfin() | 548 | init_cornershtrfin(void) |
| 549 | { | 549 | { |
| 550 | unsigned int i, j; | 550 | unsigned int i, j; |
| 551 | int n, c; | 551 | int n, c; |
| @@ -576,7 +576,7 @@ init_cornershtrfin() | |||
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | void | 578 | void |
| 579 | init_htr_eposs() | 579 | init_htr_eposs(void) |
| 580 | { | 580 | { |
| 581 | int ep[12], ep2[12]; | 581 | int ep[12], ep2[12]; |
| 582 | int eps_solved[4] = {UL, UR, DL, DR}; | 582 | int eps_solved[4] = {UL, UR, DL, DR}; |
| @@ -594,7 +594,7 @@ init_htr_eposs() | |||
| 594 | } | 594 | } |
| 595 | 595 | ||
| 596 | void | 596 | void |
| 597 | init_coord() | 597 | init_coord(void) |
| 598 | { | 598 | { |
| 599 | static bool initialized = false; | 599 | static bool initialized = false; |
| 600 | if (initialized) | 600 | if (initialized) |
diff --git a/src/coord.h b/src/coord.h index 61398a4..d9fbc4c 100644 --- a/src/coord.h +++ b/src/coord.h | |||
| @@ -22,7 +22,6 @@ extern int cpud_separate_ant[BINOM8ON4]; | |||
| 22 | extern int cpud_separate_ind[FACTORIAL8]; | 22 | extern int cpud_separate_ind[FACTORIAL8]; |
| 23 | extern int cornershtrfin_ant[24*24/6]; | 23 | extern int cornershtrfin_ant[24*24/6]; |
| 24 | 24 | ||
| 25 | void init_coord(); | 25 | void init_coord(void); |
| 26 | 26 | ||
| 27 | #endif | 27 | #endif |
| 28 | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | /* Local functions ***********************************************************/ | 3 | /* Local functions ***********************************************************/ |
| 4 | 4 | ||
| 5 | static void init_inverse(); | 5 | static void init_inverse(void); |
| 6 | static bool read_invtables_file(); | 6 | static bool read_invtables_file(void); |
| 7 | static bool write_invtables_file(); | 7 | static bool write_invtables_file(void); |
| 8 | 8 | ||
| 9 | /* Tables ********************************************************************/ | 9 | /* Tables ********************************************************************/ |
| 10 | 10 | ||
| @@ -761,7 +761,7 @@ where_is_edge(Cube c, Edge e) | |||
| 761 | } | 761 | } |
| 762 | 762 | ||
| 763 | static bool | 763 | static bool |
| 764 | read_invtables_file() | 764 | read_invtables_file(void) |
| 765 | { | 765 | { |
| 766 | init_env(); | 766 | init_env(); |
| 767 | 767 | ||
| @@ -802,7 +802,7 @@ read_invtables_file() | |||
| 802 | } | 802 | } |
| 803 | 803 | ||
| 804 | static bool | 804 | static bool |
| 805 | write_invtables_file() | 805 | write_invtables_file(void) |
| 806 | { | 806 | { |
| 807 | init_env(); | 807 | init_env(); |
| 808 | 808 | ||
| @@ -843,7 +843,7 @@ write_invtables_file() | |||
| 843 | } | 843 | } |
| 844 | 844 | ||
| 845 | void | 845 | void |
| 846 | init_inverse() | 846 | init_inverse(void) |
| 847 | { | 847 | { |
| 848 | static bool initialized = false; | 848 | static bool initialized = false; |
| 849 | if (initialized) | 849 | if (initialized) |
| @@ -926,7 +926,7 @@ init_inverse() | |||
| 926 | } | 926 | } |
| 927 | 927 | ||
| 928 | void | 928 | void |
| 929 | init_cube() | 929 | init_cube(void) |
| 930 | { | 930 | { |
| 931 | init_inverse(); | 931 | init_inverse(); |
| 932 | } | 932 | } |
| @@ -40,7 +40,7 @@ Center where_is_center(Cube cube, Center c); | |||
| 40 | Corner where_is_corner(Cube cube, Corner c); | 40 | Corner where_is_corner(Cube cube, Corner c); |
| 41 | Edge where_is_edge(Cube cube, Edge e); | 41 | Edge where_is_edge(Cube cube, Edge e); |
| 42 | 42 | ||
| 43 | void init_cube(); | 43 | void init_cube(void); |
| 44 | 44 | ||
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| @@ -14,7 +14,7 @@ mymkdir(char *d, int m) | |||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | void | 16 | void |
| 17 | init_env() | 17 | init_env(void) |
| 18 | { | 18 | { |
| 19 | char *nissydata = getenv("NISSYDATA"); | 19 | char *nissydata = getenv("NISSYDATA"); |
| 20 | char *localdata = getenv("XDG_DATA_HOME"); | 20 | char *localdata = getenv("XDG_DATA_HOME"); |
| @@ -10,6 +10,6 @@ | |||
| 10 | 10 | ||
| 11 | extern char *tabledir; | 11 | extern char *tabledir; |
| 12 | 12 | ||
| 13 | void init_env(); | 13 | void init_env(void); |
| 14 | 14 | ||
| 15 | #endif | 15 | #endif |
diff --git a/src/moves.c b/src/moves.c index 02880ca..955e8cf 100644 --- a/src/moves.c +++ b/src/moves.c | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | static Cube apply_move_cubearray(Move m, Cube cube, PieceFilter f); | 5 | static Cube apply_move_cubearray(Move m, Cube cube, PieceFilter f); |
| 6 | static void cleanup_aux(Alg *alg, Alg *ret, bool inv); | 6 | static void cleanup_aux(Alg *alg, Alg *ret, bool inv); |
| 7 | static bool read_mtables_file(); | 7 | static bool read_mtables_file(void); |
| 8 | static bool write_mtables_file(); | 8 | static bool write_mtables_file(void); |
| 9 | 9 | ||
| 10 | /* Tables and other data *****************************************************/ | 10 | /* Tables and other data *****************************************************/ |
| 11 | 11 | ||
| @@ -342,7 +342,7 @@ cleanup_aux(Alg *alg, Alg *ret, bool inv) | |||
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | static bool | 344 | static bool |
| 345 | read_mtables_file() | 345 | read_mtables_file(void) |
| 346 | { | 346 | { |
| 347 | init_env(); | 347 | init_env(); |
| 348 | 348 | ||
| @@ -391,7 +391,7 @@ read_mtables_file() | |||
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | static bool | 393 | static bool |
| 394 | write_mtables_file() | 394 | write_mtables_file(void) |
| 395 | { | 395 | { |
| 396 | init_env(); | 396 | init_env(); |
| 397 | 397 | ||
| @@ -440,7 +440,8 @@ write_mtables_file() | |||
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | void | 442 | void |
| 443 | init_moves() { | 443 | init_moves(void) |
| 444 | { | ||
| 444 | static bool initialized = false; | 445 | static bool initialized = false; |
| 445 | if (initialized) | 446 | if (initialized) |
| 446 | return; | 447 | return; |
diff --git a/src/moves.h b/src/moves.h index 14ae087..61c5622 100644 --- a/src/moves.h +++ b/src/moves.h | |||
| @@ -25,6 +25,6 @@ Cube apply_alg_generic(Alg *alg, Cube c, PieceFilter f, bool a); | |||
| 25 | Cube apply_move(Move m, Cube cube); | 25 | Cube apply_move(Move m, Cube cube); |
| 26 | Alg * cleanup(Alg *alg); | 26 | Alg * cleanup(Alg *alg); |
| 27 | 27 | ||
| 28 | void init_moves(); | 28 | void init_moves(void); |
| 29 | 29 | ||
| 30 | #endif | 30 | #endif |
diff --git a/src/shell.c b/src/shell.c index 0001e0d..9c3173b 100644 --- a/src/shell.c +++ b/src/shell.c | |||
| @@ -4,7 +4,7 @@ static void cleanwhitespaces(char *line); | |||
| 4 | static int parseline(char *line, char **v); | 4 | static int parseline(char *line, char **v); |
| 5 | 5 | ||
| 6 | bool | 6 | bool |
| 7 | checkfiles() | 7 | checkfiles(void) |
| 8 | { | 8 | { |
| 9 | /* TODO: add more checks (other files, use checksum...) */ | 9 | /* TODO: add more checks (other files, use checksum...) */ |
| 10 | FILE *f; | 10 | FILE *f; |
diff --git a/src/shell.h b/src/shell.h index 7e4f785..0dc274c 100644 --- a/src/shell.h +++ b/src/shell.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #define MAXTOKENLEN 255 | 7 | #define MAXTOKENLEN 255 |
| 8 | #define MAXNTOKENS 255 | 8 | #define MAXNTOKENS 255 |
| 9 | 9 | ||
| 10 | bool checkfiles(); | 10 | bool checkfiles(void); |
| 11 | void exec_args(int c, char **v); | 11 | void exec_args(int c, char **v); |
| 12 | void launch(bool batchmode); | 12 | void launch(bool batchmode); |
| 13 | 13 | ||
diff --git a/src/symcoord.c b/src/symcoord.c index 20d7c28..8ea4dfd 100644 --- a/src/symcoord.c +++ b/src/symcoord.c | |||
| @@ -28,14 +28,14 @@ static uint64_t transform_drudfin_noE_sym16(Trans t, uint64_t ind); | |||
| 28 | static uint64_t transform_nxopt31(Trans t, uint64_t ind); | 28 | static uint64_t transform_nxopt31(Trans t, uint64_t ind); |
| 29 | 29 | ||
| 30 | static void gensym(SymData *sd); | 30 | static void gensym(SymData *sd); |
| 31 | static void init_symc_moves(); | 31 | static void init_symc_moves(void); |
| 32 | static void init_symc_trans(); | 32 | static void init_symc_trans(void); |
| 33 | static bool read_symdata_file(SymData *sd); | 33 | static bool read_symdata_file(SymData *sd); |
| 34 | static bool read_symc_moves_file(); | 34 | static bool read_symc_moves_file(void); |
| 35 | static bool read_symc_trans_file(); | 35 | static bool read_symc_trans_file(void); |
| 36 | static bool write_symdata_file(SymData *sd); | 36 | static bool write_symdata_file(SymData *sd); |
| 37 | static bool write_symc_moves_file(); | 37 | static bool write_symc_moves_file(void); |
| 38 | static bool write_symc_trans_file(); | 38 | static bool write_symc_trans_file(void); |
| 39 | 39 | ||
| 40 | /* Some tables ***************************************************************/ | 40 | /* Some tables ***************************************************************/ |
| 41 | 41 | ||
| @@ -428,7 +428,7 @@ read_symdata_file(SymData *sd) | |||
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | static bool | 430 | static bool |
| 431 | read_symc_moves_file() | 431 | read_symc_moves_file(void) |
| 432 | { | 432 | { |
| 433 | init_env(); | 433 | init_env(); |
| 434 | 434 | ||
| @@ -460,7 +460,7 @@ read_symc_moves_file() | |||
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | static bool | 462 | static bool |
| 463 | read_symc_trans_file() | 463 | read_symc_trans_file(void) |
| 464 | { | 464 | { |
| 465 | init_env(); | 465 | init_env(); |
| 466 | 466 | ||
| @@ -516,7 +516,7 @@ write_symdata_file(SymData *sd) | |||
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | static bool | 518 | static bool |
| 519 | write_symc_moves_file() | 519 | write_symc_moves_file(void) |
| 520 | { | 520 | { |
| 521 | init_env(); | 521 | init_env(); |
| 522 | 522 | ||
| @@ -548,7 +548,7 @@ write_symc_moves_file() | |||
| 548 | } | 548 | } |
| 549 | 549 | ||
| 550 | static bool | 550 | static bool |
| 551 | write_symc_trans_file() | 551 | write_symc_trans_file(void) |
| 552 | { | 552 | { |
| 553 | init_env(); | 553 | init_env(); |
| 554 | 554 | ||
| @@ -577,7 +577,7 @@ write_symc_trans_file() | |||
| 577 | } | 577 | } |
| 578 | 578 | ||
| 579 | static void | 579 | static void |
| 580 | init_symc_moves() | 580 | init_symc_moves(void) |
| 581 | { | 581 | { |
| 582 | uint64_t i, ii, coo; | 582 | uint64_t i, ii, coo; |
| 583 | Move j; | 583 | Move j; |
| @@ -609,7 +609,7 @@ init_symc_moves() | |||
| 609 | } | 609 | } |
| 610 | 610 | ||
| 611 | void | 611 | void |
| 612 | init_symc_trans() | 612 | init_symc_trans(void) |
| 613 | { | 613 | { |
| 614 | uint64_t i; | 614 | uint64_t i; |
| 615 | int j, cp; | 615 | int j, cp; |
| @@ -666,7 +666,7 @@ init_symc_trans() | |||
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | void | 668 | void |
| 669 | init_symcoord() | 669 | init_symcoord(void) |
| 670 | { | 670 | { |
| 671 | int i; | 671 | int i; |
| 672 | 672 | ||
diff --git a/src/symcoord.h b/src/symcoord.h index 0882bff..75e67b1 100644 --- a/src/symcoord.h +++ b/src/symcoord.h | |||
| @@ -12,6 +12,6 @@ extern Coordinate coord_nxopt31; | |||
| 12 | extern SymData *all_sd[]; | 12 | extern SymData *all_sd[]; |
| 13 | 13 | ||
| 14 | void free_sd(SymData *sd); | 14 | void free_sd(SymData *sd); |
| 15 | void init_symcoord(); | 15 | void init_symcoord(void); |
| 16 | 16 | ||
| 17 | #endif | 17 | #endif |
diff --git a/src/trans.c b/src/trans.c index e267a17..67056a6 100644 --- a/src/trans.c +++ b/src/trans.c | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | /* Local functions ***********************************************************/ | 3 | /* Local functions ***********************************************************/ |
| 4 | 4 | ||
| 5 | static bool read_ttables_file(); | 5 | static bool read_ttables_file(void); |
| 6 | static Cube rotate_via_compose(Trans r, Cube c, PieceFilter f); | 6 | static Cube rotate_via_compose(Trans r, Cube c, PieceFilter f); |
| 7 | static bool write_ttables_file(); | 7 | static bool write_ttables_file(void); |
| 8 | 8 | ||
| 9 | /* Tables and other data *****************************************************/ | 9 | /* Tables and other data *****************************************************/ |
| 10 | 10 | ||
| @@ -56,7 +56,7 @@ Move moves_ttable[NTRANS][NMOVES]; | |||
| 56 | /* Local functions implementation ********************************************/ | 56 | /* Local functions implementation ********************************************/ |
| 57 | 57 | ||
| 58 | static bool | 58 | static bool |
| 59 | read_ttables_file() | 59 | read_ttables_file(void) |
| 60 | { | 60 | { |
| 61 | init_env(); | 61 | init_env(); |
| 62 | 62 | ||
| @@ -135,7 +135,7 @@ rotate_via_compose(Trans r, Cube c, PieceFilter f) | |||
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static bool | 137 | static bool |
| 138 | write_ttables_file() | 138 | write_ttables_file(void) |
| 139 | { | 139 | { |
| 140 | init_env(); | 140 | init_env(); |
| 141 | 141 | ||
| @@ -262,7 +262,8 @@ transform_alg(Trans t, Alg *alg) | |||
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void | 264 | void |
| 265 | init_trans() { | 265 | init_trans(void) |
| 266 | { | ||
| 266 | static bool initialized = false; | 267 | static bool initialized = false; |
| 267 | if (initialized) | 268 | if (initialized) |
| 268 | return; | 269 | return; |
diff --git a/src/trans.h b/src/trans.h index 51df12f..8c5a8b8 100644 --- a/src/trans.h +++ b/src/trans.h | |||
| @@ -21,6 +21,6 @@ Trans inverse_trans(Trans t); | |||
| 21 | Alg * rotation_alg(Trans i); | 21 | Alg * rotation_alg(Trans i); |
| 22 | void transform_alg(Trans i, Alg *alg); | 22 | void transform_alg(Trans i, Alg *alg); |
| 23 | 23 | ||
| 24 | void init_trans(); | 24 | void init_trans(void); |
| 25 | 25 | ||
| 26 | #endif | 26 | #endif |
