diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/config/conf.c | 2 | ||||
-rw-r--r-- | scripts/config/confdata.c | 2 | ||||
-rw-r--r-- | scripts/config/expr.c | 2 | ||||
-rw-r--r-- | scripts/config/lex.zconf.c_shipped | 16 | ||||
-rw-r--r-- | scripts/config/lxdialog/checklist.c | 28 | ||||
-rw-r--r-- | scripts/config/lxdialog/dialog.h | 4 | ||||
-rw-r--r-- | scripts/config/lxdialog/menubox.c | 146 | ||||
-rw-r--r-- | scripts/config/lxdialog/msgbox.c | 2 | ||||
-rw-r--r-- | scripts/config/lxdialog/textbox.c | 4 | ||||
-rw-r--r-- | scripts/config/lxdialog/util.c | 18 | ||||
-rw-r--r-- | scripts/config/zconf.tab.c_shipped | 6 |
11 files changed, 115 insertions, 115 deletions
diff --git a/scripts/config/conf.c b/scripts/config/conf.c index d6c921d98..edcf36d69 100644 --- a/scripts/config/conf.c +++ b/scripts/config/conf.c | |||
@@ -528,7 +528,7 @@ int main(int ac, char **av) | |||
528 | exit(0); | 528 | exit(0); |
529 | } | 529 | } |
530 | } | 530 | } |
531 | name = av[i]; | 531 | name = av[i]; |
532 | if (!name) { | 532 | if (!name) { |
533 | printf("%s: configuration file missing\n", av[0]); | 533 | printf("%s: configuration file missing\n", av[0]); |
534 | } | 534 | } |
diff --git a/scripts/config/confdata.c b/scripts/config/confdata.c index 6fb92c9f3..c4087fd73 100644 --- a/scripts/config/confdata.c +++ b/scripts/config/confdata.c | |||
@@ -264,7 +264,7 @@ struct menu *next_menu(struct menu *menu) | |||
264 | break; | 264 | break; |
265 | } | 265 | } |
266 | } while ((menu = menu->parent)); | 266 | } while ((menu = menu->parent)); |
267 | 267 | ||
268 | return menu; | 268 | return menu; |
269 | } | 269 | } |
270 | 270 | ||
diff --git a/scripts/config/expr.c b/scripts/config/expr.c index 30e4f9d69..6f39e7a25 100644 --- a/scripts/config/expr.c +++ b/scripts/config/expr.c | |||
@@ -824,7 +824,7 @@ bool expr_depends_symbol(struct expr *dep, struct symbol *sym) | |||
824 | default: | 824 | default: |
825 | ; | 825 | ; |
826 | } | 826 | } |
827 | return false; | 827 | return false; |
828 | } | 828 | } |
829 | 829 | ||
830 | struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) | 830 | struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) |
diff --git a/scripts/config/lex.zconf.c_shipped b/scripts/config/lex.zconf.c_shipped index b877bb6b3..8e5e85e4c 100644 --- a/scripts/config/lex.zconf.c_shipped +++ b/scripts/config/lex.zconf.c_shipped | |||
@@ -2771,7 +2771,7 @@ YY_FATAL_ERROR( "flex scanner jammed" ); | |||
2771 | */ | 2771 | */ |
2772 | static int yy_get_next_buffer (void) | 2772 | static int yy_get_next_buffer (void) |
2773 | { | 2773 | { |
2774 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; | 2774 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
2775 | register char *source = (yytext_ptr); | 2775 | register char *source = (yytext_ptr); |
2776 | register int number_to_move, i; | 2776 | register int number_to_move, i; |
2777 | int ret_val; | 2777 | int ret_val; |
@@ -3091,7 +3091,7 @@ static int yy_get_next_buffer (void) | |||
3091 | 3091 | ||
3092 | static void zconf_load_buffer_state (void) | 3092 | static void zconf_load_buffer_state (void) |
3093 | { | 3093 | { |
3094 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; | 3094 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
3095 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; | 3095 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
3096 | zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; | 3096 | zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
3097 | (yy_hold_char) = *(yy_c_buf_p); | 3097 | (yy_hold_char) = *(yy_c_buf_p); |
@@ -3180,7 +3180,7 @@ static void zconf_load_buffer_state (void) | |||
3180 | */ | 3180 | */ |
3181 | void zconf_flush_buffer (YY_BUFFER_STATE b ) | 3181 | void zconf_flush_buffer (YY_BUFFER_STATE b ) |
3182 | { | 3182 | { |
3183 | if ( ! b ) | 3183 | if ( ! b ) |
3184 | return; | 3184 | return; |
3185 | 3185 | ||
3186 | b->yy_n_chars = 0; | 3186 | b->yy_n_chars = 0; |
@@ -3209,7 +3209,7 @@ static void zconf_load_buffer_state (void) | |||
3209 | */ | 3209 | */ |
3210 | void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) | 3210 | void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) |
3211 | { | 3211 | { |
3212 | if (new_buffer == NULL) | 3212 | if (new_buffer == NULL) |
3213 | return; | 3213 | return; |
3214 | 3214 | ||
3215 | zconfensure_buffer_stack(); | 3215 | zconfensure_buffer_stack(); |
@@ -3239,7 +3239,7 @@ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) | |||
3239 | */ | 3239 | */ |
3240 | void zconfpop_buffer_state (void) | 3240 | void zconfpop_buffer_state (void) |
3241 | { | 3241 | { |
3242 | if (!YY_CURRENT_BUFFER) | 3242 | if (!YY_CURRENT_BUFFER) |
3243 | return; | 3243 | return; |
3244 | 3244 | ||
3245 | zconf_delete_buffer(YY_CURRENT_BUFFER ); | 3245 | zconf_delete_buffer(YY_CURRENT_BUFFER ); |
@@ -3387,7 +3387,7 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) | |||
3387 | 3387 | ||
3388 | static void yy_fatal_error (yyconst char* msg ) | 3388 | static void yy_fatal_error (yyconst char* msg ) |
3389 | { | 3389 | { |
3390 | (void) fprintf( stderr, "%s\n", msg ); | 3390 | (void) fprintf( stderr, "%s\n", msg ); |
3391 | exit( YY_EXIT_FAILURE ); | 3391 | exit( YY_EXIT_FAILURE ); |
3392 | } | 3392 | } |
3393 | 3393 | ||
@@ -3514,7 +3514,7 @@ int zconflex_destroy (void) | |||
3514 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) | 3514 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) |
3515 | { | 3515 | { |
3516 | register int i; | 3516 | register int i; |
3517 | for ( i = 0; i < n; ++i ) | 3517 | for ( i = 0; i < n; ++i ) |
3518 | s1[i] = s2[i]; | 3518 | s1[i] = s2[i]; |
3519 | } | 3519 | } |
3520 | #endif | 3520 | #endif |
@@ -3523,7 +3523,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) | |||
3523 | static int yy_flex_strlen (yyconst char * s ) | 3523 | static int yy_flex_strlen (yyconst char * s ) |
3524 | { | 3524 | { |
3525 | register int n; | 3525 | register int n; |
3526 | for ( n = 0; s[n]; ++n ) | 3526 | for ( n = 0; s[n]; ++n ) |
3527 | ; | 3527 | ; |
3528 | 3528 | ||
3529 | return n; | 3529 | return n; |
diff --git a/scripts/config/lxdialog/checklist.c b/scripts/config/lxdialog/checklist.c index 71de4a191..7565b5db1 100644 --- a/scripts/config/lxdialog/checklist.c +++ b/scripts/config/lxdialog/checklist.c | |||
@@ -52,8 +52,8 @@ print_item (WINDOW * win, const char *item, int status, | |||
52 | wattrset (win, selected ? item_selected_attr : item_attr); | 52 | wattrset (win, selected ? item_selected_attr : item_attr); |
53 | waddstr (win, (char *)item+1); | 53 | waddstr (win, (char *)item+1); |
54 | if (selected) { | 54 | if (selected) { |
55 | wmove (win, choice, check_x+1); | 55 | wmove (win, choice, check_x+1); |
56 | wrefresh (win); | 56 | wrefresh (win); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | 59 | ||
@@ -120,7 +120,7 @@ int | |||
120 | dialog_checklist (const char *title, const char *prompt, int height, int width, | 120 | dialog_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; |
@@ -140,7 +140,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, | |||
140 | for (i = 0; i < item_no; i++) { | 140 | for (i = 0; i < item_no; i++) { |
141 | status[i] = (items[i]->selected == 1); /* ON */ | 141 | status[i] = (items[i]->selected == 1); /* ON */ |
142 | if ((!choice && status[i]) || items[i]->selected == 2) /* SELECTED */ | 142 | if ((!choice && status[i]) || items[i]->selected == 2) /* SELECTED */ |
143 | choice = i + 1; | 143 | choice = i + 1; |
144 | } | 144 | } |
145 | if (choice) | 145 | if (choice) |
146 | choice--; | 146 | choice--; |
@@ -197,7 +197,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, | |||
197 | 197 | ||
198 | /* Find length of longest item in order to center checklist */ | 198 | /* Find length of longest item in order to center checklist */ |
199 | check_x = 0; | 199 | check_x = 0; |
200 | for (i = 0; i < item_no; i++) | 200 | for (i = 0; i < item_no; i++) |
201 | check_x = MAX (check_x, + strlen (items[i]->name) + 4); | 201 | check_x = MAX (check_x, + strlen (items[i]->name) + 4); |
202 | 202 | ||
203 | check_x = (list_width - check_x) / 2; | 203 | check_x = (list_width - check_x) / 2; |
@@ -226,12 +226,12 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, | |||
226 | while (key != ESC) { | 226 | while (key != ESC) { |
227 | key = wgetch (dialog); | 227 | key = wgetch (dialog); |
228 | 228 | ||
229 | for (i = 0; i < max_choice; i++) | 229 | for (i = 0; i < max_choice; i++) |
230 | if (toupper(key) == toupper(items[scroll + i]->name[0])) | 230 | if (toupper(key) == toupper(items[scroll + i]->name[0])) |
231 | break; | 231 | break; |
232 | 232 | ||
233 | 233 | ||
234 | if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || | 234 | if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || |
235 | key == '+' || key == '-' ) { | 235 | key == '+' || key == '-' ) { |
236 | if (key == KEY_UP || key == '-') { | 236 | if (key == KEY_UP || key == '-') { |
237 | if (!choice) { | 237 | if (!choice) { |
@@ -251,7 +251,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, | |||
251 | status[scroll], 0, TRUE); | 251 | status[scroll], 0, TRUE); |
252 | wnoutrefresh (list); | 252 | wnoutrefresh (list); |
253 | 253 | ||
254 | print_arrows(dialog, choice, item_no, scroll, | 254 | print_arrows(dialog, choice, item_no, scroll, |
255 | box_y, box_x + check_x + 5, list_height); | 255 | box_y, box_x + check_x + 5, list_height); |
256 | 256 | ||
257 | wrefresh (dialog); | 257 | wrefresh (dialog); |
@@ -279,7 +279,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, | |||
279 | max_choice - 1, TRUE); | 279 | max_choice - 1, TRUE); |
280 | wnoutrefresh (list); | 280 | wnoutrefresh (list); |
281 | 281 | ||
282 | print_arrows(dialog, choice, item_no, scroll, | 282 | print_arrows(dialog, choice, item_no, scroll, |
283 | box_y, box_x + check_x + 5, list_height); | 283 | box_y, box_x + check_x + 5, list_height); |
284 | 284 | ||
285 | wrefresh (dialog); | 285 | wrefresh (dialog); |
@@ -342,11 +342,11 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, | |||
342 | } | 342 | } |
343 | wnoutrefresh (list); | 343 | wnoutrefresh (list); |
344 | wrefresh (dialog); | 344 | wrefresh (dialog); |
345 | 345 | ||
346 | for (i = 0; i < item_no; i++) { | 346 | for (i = 0; i < item_no; i++) { |
347 | items[i]->selected = status[i]; | 347 | items[i]->selected = status[i]; |
348 | } | 348 | } |
349 | } else { | 349 | } else { |
350 | for (i = 0; i < item_no; i++) | 350 | for (i = 0; i < item_no; i++) |
351 | items[i]->selected = 0; | 351 | items[i]->selected = 0; |
352 | items[scroll + choice]->selected = 1; | 352 | items[scroll + choice]->selected = 1; |
@@ -364,7 +364,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, | |||
364 | /* Now, update everything... */ | 364 | /* Now, update everything... */ |
365 | doupdate (); | 365 | doupdate (); |
366 | } | 366 | } |
367 | 367 | ||
368 | 368 | ||
369 | delwin (dialog); | 369 | delwin (dialog); |
370 | free (status); | 370 | free (status); |
diff --git a/scripts/config/lxdialog/dialog.h b/scripts/config/lxdialog/dialog.h index 7bab3ad0e..cb482a5ab 100644 --- a/scripts/config/lxdialog/dialog.h +++ b/scripts/config/lxdialog/dialog.h | |||
@@ -89,7 +89,7 @@ | |||
89 | #define ACS_DARROW 'v' | 89 | #define ACS_DARROW 'v' |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * Attribute names | 93 | * Attribute names |
94 | */ | 94 | */ |
95 | #define screen_attr attributes[0] | 95 | #define screen_attr attributes[0] |
@@ -165,7 +165,7 @@ int dialog_msgbox (const char *title, const char *prompt, int height, | |||
165 | int width, int pause); | 165 | int width, int pause); |
166 | int dialog_textbox (const char *title, const char *file, int height, int width); | 166 | int dialog_textbox (const char *title, const char *file, int height, int width); |
167 | int dialog_menu (const char *title, const char *prompt, int height, int width, | 167 | int dialog_menu (const char *title, const char *prompt, int height, int width, |
168 | int menu_height, const char *choice, int item_no, | 168 | int menu_height, const char *choice, int item_no, |
169 | struct dialog_list_item ** items); | 169 | struct dialog_list_item ** items); |
170 | int dialog_checklist (const char *title, const char *prompt, int height, | 170 | int dialog_checklist (const char *title, const char *prompt, int height, |
171 | int width, int list_height, int item_no, | 171 | int width, int list_height, int item_no, |
diff --git a/scripts/config/lxdialog/menubox.c b/scripts/config/lxdialog/menubox.c index 873dc587b..d0990c34e 100644 --- a/scripts/config/lxdialog/menubox.c +++ b/scripts/config/lxdialog/menubox.c | |||
@@ -26,7 +26,7 @@ | |||
26 | * | 26 | * |
27 | * *) A bugfix for the Page-Down problem | 27 | * *) A bugfix for the Page-Down problem |
28 | * | 28 | * |
29 | * *) Formerly when I used Page Down and Page Up, the cursor would be set | 29 | * *) Formerly when I used Page Down and Page Up, the cursor would be set |
30 | * to the first position in the menu box. Now lxdialog is a bit | 30 | * to the first position in the menu box. Now lxdialog is a bit |
31 | * smarter and works more like other menu systems (just have a look at | 31 | * smarter and works more like other menu systems (just have a look at |
32 | * it). | 32 | * it). |
@@ -78,8 +78,8 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey | |||
78 | wmove (win, choice, 0); | 78 | wmove (win, choice, 0); |
79 | #if OLD_NCURSES | 79 | #if OLD_NCURSES |
80 | { | 80 | { |
81 | int i; | 81 | int i; |
82 | for (i = 0; i < menu_width; i++) | 82 | for (i = 0; i < menu_width; i++) |
83 | waddch (win, ' '); | 83 | waddch (win, ' '); |
84 | } | 84 | } |
85 | #else | 85 | #else |
@@ -88,8 +88,8 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey | |||
88 | wattrset (win, selected ? item_selected_attr : item_attr); | 88 | wattrset (win, selected ? item_selected_attr : item_attr); |
89 | mvwaddstr (win, choice, item_x, menu_item); | 89 | mvwaddstr (win, choice, item_x, menu_item); |
90 | if (hotkey) { | 90 | if (hotkey) { |
91 | wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); | 91 | wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); |
92 | mvwaddch(win, choice, item_x+j, menu_item[j]); | 92 | mvwaddch(win, choice, item_x+j, menu_item[j]); |
93 | } | 93 | } |
94 | if (selected) { | 94 | if (selected) { |
95 | wmove (win, choice, item_x+1); | 95 | wmove (win, choice, item_x+1); |
@@ -225,7 +225,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width, | |||
225 | 225 | ||
226 | /* | 226 | /* |
227 | * Find length of longest item in order to center menu. | 227 | * Find length of longest item in order to center menu. |
228 | * Set 'choice' to default item. | 228 | * Set 'choice' to default item. |
229 | */ | 229 | */ |
230 | item_x = 0; | 230 | item_x = 0; |
231 | for (i = 0; i < item_no; i++) { | 231 | for (i = 0; i < item_no; i++) { |
@@ -261,7 +261,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width, | |||
261 | /* Print the menu */ | 261 | /* Print the menu */ |
262 | for (i=0; i < max_choice; i++) { | 262 | for (i=0; i < max_choice; i++) { |
263 | print_item (menu, items[first_item + i]->name, i, i == choice, | 263 | print_item (menu, items[first_item + i]->name, i, i == choice, |
264 | (items[first_item + i]->tag[0] != ':')); | 264 | (items[first_item + i]->tag[0] != ':')); |
265 | } | 265 | } |
266 | 266 | ||
267 | wnoutrefresh (menu); | 267 | wnoutrefresh (menu); |
@@ -281,107 +281,107 @@ dialog_menu (const char *title, const char *prompt, int height, int width, | |||
281 | if (strchr("ynmh", key)) | 281 | if (strchr("ynmh", key)) |
282 | i = max_choice; | 282 | i = max_choice; |
283 | else { | 283 | else { |
284 | for (i = choice+1; i < max_choice; i++) { | 284 | for (i = choice+1; i < max_choice; i++) { |
285 | j = first_alpha(items[scroll + i]->name, "YyNnMmHh"); | 285 | j = first_alpha(items[scroll + i]->name, "YyNnMmHh"); |
286 | if (key == tolower(items[scroll + i]->name[j])) | 286 | if (key == tolower(items[scroll + i]->name[j])) |
287 | break; | 287 | break; |
288 | } | 288 | } |
289 | if (i == max_choice) | 289 | if (i == max_choice) |
290 | for (i = 0; i < max_choice; i++) { | 290 | for (i = 0; i < max_choice; i++) { |
291 | j = first_alpha(items[scroll + i]->name, "YyNnMmHh"); | 291 | j = first_alpha(items[scroll + i]->name, "YyNnMmHh"); |
292 | if (key == tolower(items[scroll + i]->name[j])) | 292 | if (key == tolower(items[scroll + i]->name[j])) |
293 | break; | 293 | break; |
294 | } | 294 | } |
295 | } | 295 | } |
296 | 296 | ||
297 | if (i < max_choice || | 297 | if (i < max_choice || |
298 | key == KEY_UP || key == KEY_DOWN || | 298 | key == KEY_UP || key == KEY_DOWN || |
299 | key == '-' || key == '+' || | 299 | key == '-' || key == '+' || |
300 | key == KEY_PPAGE || key == KEY_NPAGE) { | 300 | key == KEY_PPAGE || key == KEY_NPAGE) { |
301 | 301 | ||
302 | print_item (menu, items[scroll + choice]->name, choice, FALSE, | 302 | print_item (menu, items[scroll + choice]->name, choice, FALSE, |
303 | (items[scroll + choice]->tag[0] != ':')); | 303 | (items[scroll + choice]->tag[0] != ':')); |
304 | 304 | ||
305 | if (key == KEY_UP || key == '-') { | 305 | if (key == KEY_UP || key == '-') { |
306 | if (choice < 2 && scroll) { | 306 | if (choice < 2 && scroll) { |
307 | /* Scroll menu down */ | 307 | /* Scroll menu down */ |
308 | scrollok (menu, TRUE); | 308 | scrollok (menu, TRUE); |
309 | wscrl (menu, -1); | 309 | wscrl (menu, -1); |
310 | scrollok (menu, FALSE); | 310 | scrollok (menu, FALSE); |
311 | 311 | ||
312 | scroll--; | 312 | scroll--; |
313 | 313 | ||
314 | print_item (menu, items[scroll]->name, 0, FALSE, | 314 | print_item (menu, items[scroll]->name, 0, FALSE, |
315 | (items[scroll]->tag[0] != ':')); | 315 | (items[scroll]->tag[0] != ':')); |
316 | } else | 316 | } else |
317 | choice = MAX(choice - 1, 0); | 317 | choice = MAX(choice - 1, 0); |
318 | 318 | ||
319 | } else if (key == KEY_DOWN || key == '+') { | 319 | } else if (key == KEY_DOWN || key == '+') { |
320 | 320 | ||
321 | print_item (menu, items[scroll + choice]->name, choice, FALSE, | 321 | print_item (menu, items[scroll + choice]->name, choice, FALSE, |
322 | (items[scroll + choice]->tag[0] != ':')); | 322 | (items[scroll + choice]->tag[0] != ':')); |
323 | 323 | ||
324 | if ((choice > max_choice-3) && | 324 | if ((choice > max_choice-3) && |
325 | (scroll + max_choice < item_no) | 325 | (scroll + max_choice < item_no) |
326 | ) { | 326 | ) { |
327 | /* Scroll menu up */ | 327 | /* Scroll menu up */ |
328 | scrollok (menu, TRUE); | 328 | scrollok (menu, TRUE); |
329 | scroll (menu); | 329 | scroll (menu); |
330 | scrollok (menu, FALSE); | 330 | scrollok (menu, FALSE); |
331 | 331 | ||
332 | scroll++; | 332 | scroll++; |
333 | 333 | ||
334 | print_item (menu, items[scroll + max_choice - 1]->name, | 334 | print_item (menu, items[scroll + max_choice - 1]->name, |
335 | max_choice-1, FALSE, | 335 | max_choice-1, FALSE, |
336 | (items[scroll + max_choice - 1]->tag[0] != ':')); | 336 | (items[scroll + max_choice - 1]->tag[0] != ':')); |
337 | } else | 337 | } else |
338 | choice = MIN(choice+1, max_choice-1); | 338 | choice = MIN(choice+1, max_choice-1); |
339 | 339 | ||
340 | } else if (key == KEY_PPAGE) { | 340 | } else if (key == KEY_PPAGE) { |
341 | scrollok (menu, TRUE); | 341 | scrollok (menu, TRUE); |
342 | for (i=0; (i < max_choice); i++) { | 342 | for (i=0; (i < max_choice); i++) { |
343 | if (scroll > 0) { | 343 | if (scroll > 0) { |
344 | wscrl (menu, -1); | 344 | wscrl (menu, -1); |
345 | scroll--; | 345 | scroll--; |
346 | print_item (menu, items[scroll]->name, 0, FALSE, | 346 | print_item (menu, items[scroll]->name, 0, FALSE, |
347 | (items[scroll]->tag[0] != ':')); | 347 | (items[scroll]->tag[0] != ':')); |
348 | } else { | 348 | } else { |
349 | if (choice > 0) | 349 | if (choice > 0) |
350 | choice--; | 350 | choice--; |
351 | } | 351 | } |
352 | } | 352 | } |
353 | scrollok (menu, FALSE); | 353 | scrollok (menu, FALSE); |
354 | 354 | ||
355 | } else if (key == KEY_NPAGE) { | 355 | } else if (key == KEY_NPAGE) { |
356 | for (i=0; (i < max_choice); i++) { | 356 | for (i=0; (i < max_choice); i++) { |
357 | if (scroll+max_choice < item_no) { | 357 | if (scroll+max_choice < item_no) { |
358 | scrollok (menu, TRUE); | 358 | scrollok (menu, TRUE); |
359 | scroll(menu); | 359 | scroll(menu); |
360 | scrollok (menu, FALSE); | 360 | scrollok (menu, FALSE); |
361 | scroll++; | 361 | scroll++; |
362 | print_item (menu, items[scroll + max_choice - 1]->name, | 362 | print_item (menu, items[scroll + max_choice - 1]->name, |
363 | max_choice-1, FALSE, | 363 | max_choice-1, FALSE, |
364 | (items[scroll + max_choice - 1]->tag[0] != ':')); | 364 | (items[scroll + max_choice - 1]->tag[0] != ':')); |
365 | } else { | 365 | } else { |
366 | if (choice+1 < max_choice) | 366 | if (choice+1 < max_choice) |
367 | choice++; | 367 | choice++; |
368 | } | 368 | } |
369 | } | 369 | } |
370 | 370 | ||
371 | } else | 371 | } else |
372 | choice = i; | 372 | choice = i; |
373 | 373 | ||
374 | print_item (menu, items[scroll + choice]->name, choice, TRUE, | 374 | print_item (menu, items[scroll + choice]->name, choice, TRUE, |
375 | (items[scroll + choice]->tag[0] != ':')); | 375 | (items[scroll + choice]->tag[0] != ':')); |
376 | 376 | ||
377 | print_arrows(dialog, item_no, scroll, | 377 | print_arrows(dialog, item_no, scroll, |
378 | box_y, box_x+item_x+1, menu_height); | 378 | box_y, box_x+item_x+1, menu_height); |
379 | 379 | ||
380 | wnoutrefresh (dialog); | 380 | wnoutrefresh (dialog); |
381 | wrefresh (menu); | 381 | wrefresh (menu); |
382 | 382 | ||
383 | continue; /* wait for another key press */ | 383 | continue; /* wait for another key press */ |
384 | } | 384 | } |
385 | 385 | ||
386 | switch (key) { | 386 | switch (key) { |
387 | case KEY_LEFT: | 387 | case KEY_LEFT: |
@@ -405,15 +405,15 @@ dialog_menu (const char *title, const char *prompt, int height, int width, | |||
405 | fclose(f); | 405 | fclose(f); |
406 | } | 406 | } |
407 | delwin (dialog); | 407 | delwin (dialog); |
408 | items[scroll + choice]->selected = 1; | 408 | items[scroll + choice]->selected = 1; |
409 | switch (key) { | 409 | switch (key) { |
410 | case 's': return 3; | 410 | case 's': return 3; |
411 | case 'y': return 3; | 411 | case 'y': return 3; |
412 | case 'n': return 4; | 412 | case 'n': return 4; |
413 | case 'm': return 5; | 413 | case 'm': return 5; |
414 | case ' ': return 6; | 414 | case ' ': return 6; |
415 | case '/': return 7; | 415 | case '/': return 7; |
416 | } | 416 | } |
417 | return 0; | 417 | return 0; |
418 | case 'h': | 418 | case 'h': |
419 | case '?': | 419 | case '?': |
diff --git a/scripts/config/lxdialog/msgbox.c b/scripts/config/lxdialog/msgbox.c index 93692e1fb..de0f32bf0 100644 --- a/scripts/config/lxdialog/msgbox.c +++ b/scripts/config/lxdialog/msgbox.c | |||
@@ -73,7 +73,7 @@ dialog_msgbox (const char *title, const char *prompt, int height, int width, | |||
73 | 73 | ||
74 | wrefresh (dialog); | 74 | wrefresh (dialog); |
75 | while (key != ESC && key != '\n' && key != ' ' && | 75 | while (key != ESC && key != '\n' && key != ' ' && |
76 | key != 'O' && key != 'o' && key != 'X' && key != 'x') | 76 | key != 'O' && key != 'o' && key != 'X' && key != 'x') |
77 | key = wgetch (dialog); | 77 | key = wgetch (dialog); |
78 | } else { | 78 | } else { |
79 | key = '\n'; | 79 | key = '\n'; |
diff --git a/scripts/config/lxdialog/textbox.c b/scripts/config/lxdialog/textbox.c index a5a460b5c..b75e12a3e 100644 --- a/scripts/config/lxdialog/textbox.c +++ b/scripts/config/lxdialog/textbox.c | |||
@@ -472,8 +472,8 @@ print_line (WINDOW * win, int row, int width) | |||
472 | /* Clear 'residue' of previous line */ | 472 | /* Clear 'residue' of previous line */ |
473 | #if OLD_NCURSES | 473 | #if OLD_NCURSES |
474 | { | 474 | { |
475 | int i; | 475 | int i; |
476 | for (i = 0; i < width - x; i++) | 476 | for (i = 0; i < width - x; i++) |
477 | waddch (win, ' '); | 477 | waddch (win, ' '); |
478 | } | 478 | } |
479 | #else | 479 | #else |
diff --git a/scripts/config/lxdialog/util.c b/scripts/config/lxdialog/util.c index 6f83951b9..47afa5e6a 100644 --- a/scripts/config/lxdialog/util.c +++ b/scripts/config/lxdialog/util.c | |||
@@ -29,7 +29,7 @@ const char *backtitle = NULL; | |||
29 | 29 | ||
30 | const char *dialog_result; | 30 | const char *dialog_result; |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Attribute values, default is for mono display | 33 | * Attribute values, default is for mono display |
34 | */ | 34 | */ |
35 | chtype attributes[] = | 35 | chtype attributes[] = |
@@ -127,13 +127,13 @@ void dialog_clear (void) | |||
127 | attr_clear (stdscr, LINES, COLS, screen_attr); | 127 | attr_clear (stdscr, LINES, COLS, screen_attr); |
128 | /* Display background title if it exists ... - SLH */ | 128 | /* Display background title if it exists ... - SLH */ |
129 | if (backtitle != NULL) { | 129 | if (backtitle != NULL) { |
130 | int i; | 130 | int i; |
131 | 131 | ||
132 | wattrset (stdscr, screen_attr); | 132 | wattrset (stdscr, screen_attr); |
133 | mvwaddstr (stdscr, 0, 1, (char *)backtitle); | 133 | mvwaddstr (stdscr, 0, 1, (char *)backtitle); |
134 | wmove (stdscr, 1, 1); | 134 | wmove (stdscr, 1, 1); |
135 | for (i = 1; i < COLS - 1; i++) | 135 | for (i = 1; i < COLS - 1; i++) |
136 | waddch (stdscr, ACS_HLINE); | 136 | waddch (stdscr, ACS_HLINE); |
137 | } | 137 | } |
138 | wnoutrefresh (stdscr); | 138 | wnoutrefresh (stdscr); |
139 | } | 139 | } |
@@ -204,7 +204,7 @@ print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x) | |||
204 | strcpy (tempstr, prompt); | 204 | strcpy (tempstr, prompt); |
205 | 205 | ||
206 | prompt_len = strlen(tempstr); | 206 | prompt_len = strlen(tempstr); |
207 | 207 | ||
208 | /* | 208 | /* |
209 | * Remove newlines | 209 | * Remove newlines |
210 | */ | 210 | */ |
@@ -350,7 +350,7 @@ first_alpha(const char *string, const char *exempt) | |||
350 | if (strchr("<[(", c)) ++in_paren; | 350 | if (strchr("<[(", c)) ++in_paren; |
351 | if (strchr(">])", c) && in_paren > 0) --in_paren; | 351 | if (strchr(">])", c) && in_paren > 0) --in_paren; |
352 | 352 | ||
353 | if ((! in_paren) && isalpha(c) && | 353 | if ((! in_paren) && isalpha(c) && |
354 | strchr(exempt, c) == 0) | 354 | strchr(exempt, c) == 0) |
355 | return i; | 355 | return i; |
356 | } | 356 | } |
diff --git a/scripts/config/zconf.tab.c_shipped b/scripts/config/zconf.tab.c_shipped index be6bd4c0d..0bf511e30 100644 --- a/scripts/config/zconf.tab.c_shipped +++ b/scripts/config/zconf.tab.c_shipped | |||
@@ -333,7 +333,7 @@ union yyalloc | |||
333 | #define YYUNDEFTOK 2 | 333 | #define YYUNDEFTOK 2 |
334 | #define YYMAXUTOK 296 | 334 | #define YYMAXUTOK 296 |
335 | 335 | ||
336 | #define YYTRANSLATE(YYX) \ | 336 | #define YYTRANSLATE(YYX) \ |
337 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | 337 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
338 | 338 | ||
339 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | 339 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
@@ -709,7 +709,7 @@ do \ | |||
709 | goto yybackup; \ | 709 | goto yybackup; \ |
710 | } \ | 710 | } \ |
711 | else \ | 711 | else \ |
712 | { \ | 712 | { \ |
713 | yyerror ("syntax error: cannot back up");\ | 713 | yyerror ("syntax error: cannot back up");\ |
714 | YYERROR; \ | 714 | YYERROR; \ |
715 | } \ | 715 | } \ |
@@ -762,7 +762,7 @@ do { \ | |||
762 | if (yydebug) \ | 762 | if (yydebug) \ |
763 | { \ | 763 | { \ |
764 | YYFPRINTF (stderr, "%s ", Title); \ | 764 | YYFPRINTF (stderr, "%s ", Title); \ |
765 | yysymprint (stderr, \ | 765 | yysymprint (stderr, \ |
766 | Token, Value); \ | 766 | Token, Value); \ |
767 | YYFPRINTF (stderr, "\n"); \ | 767 | YYFPRINTF (stderr, "\n"); \ |
768 | } \ | 768 | } \ |