A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

sudoku: make local functions static and add missing #include

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31631 a1c6a512-1295-4272-9138-f99709370657

+17 -14
+4 -1
apps/plugins/sudoku/generator.c
··· 34 34 35 35 #include "sudoku.h" 36 36 #include "templates.h" 37 + #include "generator.h" 37 38 38 39 #define assert(x) 39 40 ··· 618 619 } 619 620 620 621 /* Helper: sort based on index */ 622 + #if 0 /* unused function */ 621 623 static 622 624 int 623 625 cmpindex( const void * a, const void * b ) ··· 629 631 * 'easy' moves first, and if none are possible, then try for more 630 632 * cryptic moves. 631 633 */ 632 - int 634 + static int 633 635 findhints( void ) 634 636 { 635 637 int i, n, mutated = 0; ··· 695 697 696 698 return n; 697 699 } 700 + #endif /* unused function */ 698 701 699 702 /* Deterministic solver; return 0 on success, else -1 on error. 700 703 */
+13 -13
apps/plugins/sudoku/sudoku.c
··· 284 284 #define BLOCK 3 285 285 #define SIZE (BLOCK*BLOCK) 286 286 287 - void sudoku_solve(struct sudoku_state_t* state) 287 + static void sudoku_solve(struct sudoku_state_t* state) 288 288 { 289 289 bool ret = sudoku_solve_board(state); 290 290 ··· 317 317 #endif 318 318 } 319 319 320 - void default_state(struct sudoku_state_t* state) 320 + static void default_state(struct sudoku_state_t* state) 321 321 { 322 322 int r,c; 323 323 ··· 340 340 state->editmode=0; 341 341 } 342 342 343 - void clear_state(struct sudoku_state_t* state) 343 + static void clear_state(struct sudoku_state_t* state) 344 344 { 345 345 int r,c; 346 346 ··· 361 361 } 362 362 363 363 /* Check the status of the board, assuming a change at the cursor location */ 364 - bool check_status(struct sudoku_state_t* state) 364 + static bool check_status(struct sudoku_state_t* state) 365 365 { 366 366 int check[9]; 367 367 int r,c; ··· 422 422 /* Load game - only ".ss" is officially supported, but any sensible 423 423 text representation (one line per row) may load. 424 424 */ 425 - bool load_sudoku(struct sudoku_state_t* state, char* filename) 425 + static bool load_sudoku(struct sudoku_state_t* state, char* filename) 426 426 { 427 427 int fd; 428 428 size_t n; ··· 520 520 return(true); 521 521 } 522 522 523 - bool save_sudoku(struct sudoku_state_t* state) 523 + static bool save_sudoku(struct sudoku_state_t* state) 524 524 { 525 525 int fd; 526 526 int r,c; ··· 583 583 } 584 584 } 585 585 586 - void clear_board(struct sudoku_state_t* state) 586 + static void clear_board(struct sudoku_state_t* state) 587 587 { 588 588 int r,c; 589 589 ··· 596 596 state->y=0; 597 597 } 598 598 599 - void update_cell(struct sudoku_state_t* state, int r, int c) 599 + static void update_cell(struct sudoku_state_t* state, int r, int c) 600 600 { 601 601 /* We have four types of cell: 602 602 1) User-entered number ··· 630 630 } 631 631 632 632 633 - void display_board(struct sudoku_state_t* state) 633 + static void display_board(struct sudoku_state_t* state) 634 634 { 635 635 int r,c; 636 636 #ifdef SUDOKU_BUTTON_POSSIBLE ··· 823 823 rb->lcd_update(); 824 824 } 825 825 826 - bool sudoku_generate(struct sudoku_state_t* state) 826 + static bool sudoku_generate(struct sudoku_state_t* state) 827 827 { 828 828 char* difficulty; 829 829 char str[80]; ··· 902 902 SM_QUIT, 903 903 }; 904 904 905 - int sudoku_menu(struct sudoku_state_t* state) 905 + static int sudoku_menu(struct sudoku_state_t* state) 906 906 { 907 907 int result; 908 908 ··· 972 972 } 973 973 974 974 /* Menu used when user is in edit mode - i.e. creating a new game manually */ 975 - int sudoku_edit_menu(struct sudoku_state_t* state) 975 + static int sudoku_edit_menu(struct sudoku_state_t* state) 976 976 { 977 977 int result; 978 978 ··· 1001 1001 return result; 1002 1002 } 1003 1003 1004 - void move_cursor(struct sudoku_state_t* state, int newx, int newy) 1004 + static void move_cursor(struct sudoku_state_t* state, int newx, int newy) 1005 1005 { 1006 1006 int oldx, oldy; 1007 1007