aboutsummaryrefslogtreecommitdiff
path: root/scripts/config/checklist.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/config/checklist.c')
-rw-r--r--scripts/config/checklist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/config/checklist.c b/scripts/config/checklist.c
index c4a9289b9..9744d798d 100644
--- a/scripts/config/checklist.c
+++ b/scripts/config/checklist.c
@@ -120,7 +120,7 @@ int
120dialog_checklist (const char *title, const char *prompt, int height, int width, 120dialog_checklist (const char *title, const char *prompt, int height, int width,
121 int list_height, int item_no, struct dialog_list_item ** items, 121 int list_height, int item_no, struct dialog_list_item ** items,
122 int flag) 122 int flag)
123 123
124{ 124{
125 int i, x, y, box_x, box_y; 125 int i, x, y, box_x, box_y;
126 int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status; 126 int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status;
@@ -195,7 +195,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
195 195
196 /* Find length of longest item in order to center checklist */ 196 /* Find length of longest item in order to center checklist */
197 check_x = 0; 197 check_x = 0;
198 for (i = 0; i < item_no; i++) 198 for (i = 0; i < item_no; i++)
199 check_x = MAX (check_x, + strlen (items[i]->name) + 4); 199 check_x = MAX (check_x, + strlen (items[i]->name) + 4);
200 200
201 check_x = (list_width - check_x) / 2; 201 check_x = (list_width - check_x) / 2;
@@ -229,7 +229,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
229 break; 229 break;
230 230
231 231
232 if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || 232 if ( i < max_choice || key == KEY_UP || key == KEY_DOWN ||
233 key == '+' || key == '-' ) { 233 key == '+' || key == '-' ) {
234 if (key == KEY_UP || key == '-') { 234 if (key == KEY_UP || key == '-') {
235 if (!choice) { 235 if (!choice) {
@@ -337,7 +337,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
337 } 337 }
338 wnoutrefresh (list); 338 wnoutrefresh (list);
339 wrefresh (dialog); 339 wrefresh (dialog);
340 340
341 for (i = 0; i < item_no; i++) { 341 for (i = 0; i < item_no; i++) {
342 items[i]->selected = status[i]; 342 items[i]->selected = status[i];
343 } 343 }
@@ -355,7 +355,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
355 /* Now, update everything... */ 355 /* Now, update everything... */
356 doupdate (); 356 doupdate ();
357 } 357 }
358 358
359 359
360 delwin (dialog); 360 delwin (dialog);
361 free (status); 361 free (status);