mirror of
https://github.com/tLDP/LDP.git
synced 2025-12-01 07:26:03 +07:00
Changes suggested after compiling with Clang.
queens.c: Changed function print's return type from int to void, since the function does not return a value. tt.c: Added a proper function prototype for create_test_string. menu_toggle.c: Add a constant format sttring to call of mvprintw, instead of passing the constructed string value as the format string.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
int *nqueens(int num);
|
int *nqueens(int num);
|
||||||
int place(int current, int *position);
|
int place(int current, int *position);
|
||||||
int print(int *positions, int num_queens);
|
void print(int *positions, int num_queens);
|
||||||
void board(WINDOW *win, int starty, int startx, int lines, int cols,
|
void board(WINDOW *win, int starty, int startx, int lines, int cols,
|
||||||
int tile_width, int tile_height);
|
int tile_width, int tile_height);
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ int place(int current, int *position)
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int print(int *positions, int num_queens)
|
void print(int *positions, int num_queens)
|
||||||
{ int count;
|
{ int count;
|
||||||
int y = 2, x = 2, w = 4, h = 2;
|
int y = 2, x = 2, w = 4, h = 2;
|
||||||
static int solution = 1;
|
static int solution = 1;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
int print_menu();
|
int print_menu();
|
||||||
void print_byebye();
|
void print_byebye();
|
||||||
void create_test_string();
|
void create_test_string(char *test_array, int choice);
|
||||||
void print_time(time_t startt, time_t endt, int mistakes);
|
void print_time(time_t startt, time_t endt, int mistakes);
|
||||||
void print_in_middle(int startx, int starty, int width, char *string, WINDOW *win);
|
void print_in_middle(int startx, int starty, int width, char *string, WINDOW *win);
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ int main()
|
|||||||
}
|
}
|
||||||
move(20, 0);
|
move(20, 0);
|
||||||
clrtoeol();
|
clrtoeol();
|
||||||
mvprintw(20, 0, temp);
|
mvprintw(20, 0, "%s", temp);
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user