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 d6c921d..edcf36d 100644 --- a/scripts/config/conf.c +++ b/scripts/config/conf.c @@ -528,7 +528,7 @@ int main(int ac, char **av) exit(0); } } - name = av[i]; + name = av[i]; if (!name) { printf("%s: configuration file missing\n", av[0]); } diff --git a/scripts/config/confdata.c b/scripts/config/confdata.c index 6fb92c9..c4087fd 100644 --- a/scripts/config/confdata.c +++ b/scripts/config/confdata.c @@ -264,7 +264,7 @@ struct menu *next_menu(struct menu *menu) break; } } while ((menu = menu->parent)); - + return menu; } diff --git a/scripts/config/expr.c b/scripts/config/expr.c index 30e4f9d..6f39e7a 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) default: ; } - return false; + return false; } 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 b877bb6..8e5e85e 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" ); */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; @@ -3091,7 +3091,7 @@ static int yy_get_next_buffer (void) static void zconf_load_buffer_state (void) { - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); @@ -3180,7 +3180,7 @@ static void zconf_load_buffer_state (void) */ void zconf_flush_buffer (YY_BUFFER_STATE b ) { - if ( ! b ) + if ( ! b ) return; b->yy_n_chars = 0; @@ -3209,7 +3209,7 @@ static void zconf_load_buffer_state (void) */ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) { - if (new_buffer == NULL) + if (new_buffer == NULL) return; zconfensure_buffer_stack(); @@ -3239,7 +3239,7 @@ void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) */ void zconfpop_buffer_state (void) { - if (!YY_CURRENT_BUFFER) + if (!YY_CURRENT_BUFFER) return; zconf_delete_buffer(YY_CURRENT_BUFFER ); @@ -3387,7 +3387,7 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) static void yy_fatal_error (yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -3514,7 +3514,7 @@ int zconflex_destroy (void) static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; - for ( i = 0; i < n; ++i ) + for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif @@ -3523,7 +3523,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) static int yy_flex_strlen (yyconst char * s ) { register int n; - for ( n = 0; s[n]; ++n ) + for ( n = 0; s[n]; ++n ) ; return n; diff --git a/scripts/config/lxdialog/checklist.c b/scripts/config/lxdialog/checklist.c index 71de4a1..7565b5d 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, wattrset (win, selected ? item_selected_attr : item_attr); waddstr (win, (char *)item+1); if (selected) { - wmove (win, choice, check_x+1); - wrefresh (win); + wmove (win, choice, check_x+1); + wrefresh (win); } } @@ -120,7 +120,7 @@ int dialog_checklist (const char *title, const char *prompt, int height, int width, int list_height, int item_no, struct dialog_list_item ** items, int flag) - + { int i, x, y, box_x, box_y; 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, for (i = 0; i < item_no; i++) { status[i] = (items[i]->selected == 1); /* ON */ if ((!choice && status[i]) || items[i]->selected == 2) /* SELECTED */ - choice = i + 1; + choice = i + 1; } if (choice) choice--; @@ -197,7 +197,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, /* Find length of longest item in order to center checklist */ check_x = 0; - for (i = 0; i < item_no; i++) + for (i = 0; i < item_no; i++) check_x = MAX (check_x, + strlen (items[i]->name) + 4); check_x = (list_width - check_x) / 2; @@ -226,12 +226,12 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, while (key != ESC) { key = wgetch (dialog); - for (i = 0; i < max_choice; i++) - if (toupper(key) == toupper(items[scroll + i]->name[0])) - break; + for (i = 0; i < max_choice; i++) + if (toupper(key) == toupper(items[scroll + i]->name[0])) + break; - if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || + if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || key == '+' || key == '-' ) { if (key == KEY_UP || key == '-') { if (!choice) { @@ -251,7 +251,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, status[scroll], 0, TRUE); wnoutrefresh (list); - print_arrows(dialog, choice, item_no, scroll, + print_arrows(dialog, choice, item_no, scroll, box_y, box_x + check_x + 5, list_height); wrefresh (dialog); @@ -279,7 +279,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, max_choice - 1, TRUE); wnoutrefresh (list); - print_arrows(dialog, choice, item_no, scroll, + print_arrows(dialog, choice, item_no, scroll, box_y, box_x + check_x + 5, list_height); wrefresh (dialog); @@ -342,11 +342,11 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, } wnoutrefresh (list); wrefresh (dialog); - + for (i = 0; i < item_no; i++) { items[i]->selected = status[i]; } - } else { + } else { for (i = 0; i < item_no; i++) items[i]->selected = 0; items[scroll + choice]->selected = 1; @@ -364,7 +364,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, /* Now, update everything... */ doupdate (); } - + delwin (dialog); free (status); diff --git a/scripts/config/lxdialog/dialog.h b/scripts/config/lxdialog/dialog.h index 7bab3ad..cb482a5 100644 --- a/scripts/config/lxdialog/dialog.h +++ b/scripts/config/lxdialog/dialog.h @@ -89,7 +89,7 @@ #define ACS_DARROW 'v' #endif -/* +/* * Attribute names */ #define screen_attr attributes[0] @@ -165,7 +165,7 @@ int dialog_msgbox (const char *title, const char *prompt, int height, int width, int pause); int dialog_textbox (const char *title, const char *file, int height, int width); int dialog_menu (const char *title, const char *prompt, int height, int width, - int menu_height, const char *choice, int item_no, + int menu_height, const char *choice, int item_no, struct dialog_list_item ** items); int dialog_checklist (const char *title, const char *prompt, int height, int width, int list_height, int item_no, diff --git a/scripts/config/lxdialog/menubox.c b/scripts/config/lxdialog/menubox.c index 873dc58..d0990c3 100644 --- a/scripts/config/lxdialog/menubox.c +++ b/scripts/config/lxdialog/menubox.c @@ -26,7 +26,7 @@ * * *) A bugfix for the Page-Down problem * - * *) Formerly when I used Page Down and Page Up, the cursor would be set + * *) Formerly when I used Page Down and Page Up, the cursor would be set * to the first position in the menu box. Now lxdialog is a bit * smarter and works more like other menu systems (just have a look at * it). @@ -78,8 +78,8 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey wmove (win, choice, 0); #if OLD_NCURSES { - int i; - for (i = 0; i < menu_width; i++) + int i; + for (i = 0; i < menu_width; i++) waddch (win, ' '); } #else @@ -88,8 +88,8 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey wattrset (win, selected ? item_selected_attr : item_attr); mvwaddstr (win, choice, item_x, menu_item); if (hotkey) { - wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); - mvwaddch(win, choice, item_x+j, menu_item[j]); + wattrset (win, selected ? tag_key_selected_attr : tag_key_attr); + mvwaddch(win, choice, item_x+j, menu_item[j]); } if (selected) { wmove (win, choice, item_x+1); @@ -225,7 +225,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width, /* * Find length of longest item in order to center menu. - * Set 'choice' to default item. + * Set 'choice' to default item. */ item_x = 0; for (i = 0; i < item_no; i++) { @@ -261,7 +261,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width, /* Print the menu */ for (i=0; i < max_choice; i++) { print_item (menu, items[first_item + i]->name, i, i == choice, - (items[first_item + i]->tag[0] != ':')); + (items[first_item + i]->tag[0] != ':')); } wnoutrefresh (menu); @@ -281,107 +281,107 @@ dialog_menu (const char *title, const char *prompt, int height, int width, if (strchr("ynmh", key)) i = max_choice; else { - for (i = choice+1; i < max_choice; i++) { + for (i = choice+1; i < max_choice; i++) { j = first_alpha(items[scroll + i]->name, "YyNnMmHh"); if (key == tolower(items[scroll + i]->name[j])) - break; + break; } if (i == max_choice) - for (i = 0; i < max_choice; i++) { + for (i = 0; i < max_choice; i++) { j = first_alpha(items[scroll + i]->name, "YyNnMmHh"); if (key == tolower(items[scroll + i]->name[j])) - break; + break; } } - if (i < max_choice || - key == KEY_UP || key == KEY_DOWN || - key == '-' || key == '+' || - key == KEY_PPAGE || key == KEY_NPAGE) { + if (i < max_choice || + key == KEY_UP || key == KEY_DOWN || + key == '-' || key == '+' || + key == KEY_PPAGE || key == KEY_NPAGE) { - print_item (menu, items[scroll + choice]->name, choice, FALSE, - (items[scroll + choice]->tag[0] != ':')); + print_item (menu, items[scroll + choice]->name, choice, FALSE, + (items[scroll + choice]->tag[0] != ':')); if (key == KEY_UP || key == '-') { - if (choice < 2 && scroll) { + if (choice < 2 && scroll) { /* Scroll menu down */ - scrollok (menu, TRUE); - wscrl (menu, -1); - scrollok (menu, FALSE); + scrollok (menu, TRUE); + wscrl (menu, -1); + scrollok (menu, FALSE); - scroll--; + scroll--; - print_item (menu, items[scroll]->name, 0, FALSE, - (items[scroll]->tag[0] != ':')); + print_item (menu, items[scroll]->name, 0, FALSE, + (items[scroll]->tag[0] != ':')); } else choice = MAX(choice - 1, 0); } else if (key == KEY_DOWN || key == '+') { print_item (menu, items[scroll + choice]->name, choice, FALSE, - (items[scroll + choice]->tag[0] != ':')); + (items[scroll + choice]->tag[0] != ':')); - if ((choice > max_choice-3) && - (scroll + max_choice < item_no) - ) { + if ((choice > max_choice-3) && + (scroll + max_choice < item_no) + ) { /* Scroll menu up */ scrollok (menu, TRUE); - scroll (menu); - scrollok (menu, FALSE); + scroll (menu); + scrollok (menu, FALSE); - scroll++; + scroll++; - print_item (menu, items[scroll + max_choice - 1]->name, - max_choice-1, FALSE, - (items[scroll + max_choice - 1]->tag[0] != ':')); - } else - choice = MIN(choice+1, max_choice-1); + print_item (menu, items[scroll + max_choice - 1]->name, + max_choice-1, FALSE, + (items[scroll + max_choice - 1]->tag[0] != ':')); + } else + choice = MIN(choice+1, max_choice-1); } else if (key == KEY_PPAGE) { scrollok (menu, TRUE); - for (i=0; (i < max_choice); i++) { - if (scroll > 0) { - wscrl (menu, -1); - scroll--; - print_item (menu, items[scroll]->name, 0, FALSE, - (items[scroll]->tag[0] != ':')); - } else { - if (choice > 0) - choice--; - } - } - scrollok (menu, FALSE); - - } else if (key == KEY_NPAGE) { - for (i=0; (i < max_choice); i++) { - if (scroll+max_choice < item_no) { + for (i=0; (i < max_choice); i++) { + if (scroll > 0) { + wscrl (menu, -1); + scroll--; + print_item (menu, items[scroll]->name, 0, FALSE, + (items[scroll]->tag[0] != ':')); + } else { + if (choice > 0) + choice--; + } + } + scrollok (menu, FALSE); + + } else if (key == KEY_NPAGE) { + for (i=0; (i < max_choice); i++) { + if (scroll+max_choice < item_no) { scrollok (menu, TRUE); scroll(menu); scrollok (menu, FALSE); - scroll++; - print_item (menu, items[scroll + max_choice - 1]->name, + scroll++; + print_item (menu, items[scroll + max_choice - 1]->name, max_choice-1, FALSE, (items[scroll + max_choice - 1]->tag[0] != ':')); } else { if (choice+1 < max_choice) choice++; } - } + } - } else - choice = i; + } else + choice = i; - print_item (menu, items[scroll + choice]->name, choice, TRUE, - (items[scroll + choice]->tag[0] != ':')); + print_item (menu, items[scroll + choice]->name, choice, TRUE, + (items[scroll + choice]->tag[0] != ':')); - print_arrows(dialog, item_no, scroll, - box_y, box_x+item_x+1, menu_height); + print_arrows(dialog, item_no, scroll, + box_y, box_x+item_x+1, menu_height); - wnoutrefresh (dialog); - wrefresh (menu); + wnoutrefresh (dialog); + wrefresh (menu); continue; /* wait for another key press */ - } + } switch (key) { case KEY_LEFT: @@ -405,15 +405,15 @@ dialog_menu (const char *title, const char *prompt, int height, int width, fclose(f); } delwin (dialog); - items[scroll + choice]->selected = 1; - switch (key) { - case 's': return 3; - case 'y': return 3; - case 'n': return 4; - case 'm': return 5; - case ' ': return 6; - case '/': return 7; - } + items[scroll + choice]->selected = 1; + switch (key) { + case 's': return 3; + case 'y': return 3; + case 'n': return 4; + case 'm': return 5; + case ' ': return 6; + case '/': return 7; + } return 0; case 'h': case '?': diff --git a/scripts/config/lxdialog/msgbox.c b/scripts/config/lxdialog/msgbox.c index 93692e1..de0f32b 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, wrefresh (dialog); while (key != ESC && key != '\n' && key != ' ' && - key != 'O' && key != 'o' && key != 'X' && key != 'x') + key != 'O' && key != 'o' && key != 'X' && key != 'x') key = wgetch (dialog); } else { key = '\n'; diff --git a/scripts/config/lxdialog/textbox.c b/scripts/config/lxdialog/textbox.c index a5a460b..b75e12a 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) /* Clear 'residue' of previous line */ #if OLD_NCURSES { - int i; - for (i = 0; i < width - x; i++) + int i; + for (i = 0; i < width - x; i++) waddch (win, ' '); } #else diff --git a/scripts/config/lxdialog/util.c b/scripts/config/lxdialog/util.c index 6f83951..47afa5e 100644 --- a/scripts/config/lxdialog/util.c +++ b/scripts/config/lxdialog/util.c @@ -29,7 +29,7 @@ const char *backtitle = NULL; const char *dialog_result; -/* +/* * Attribute values, default is for mono display */ chtype attributes[] = @@ -127,13 +127,13 @@ void dialog_clear (void) attr_clear (stdscr, LINES, COLS, screen_attr); /* Display background title if it exists ... - SLH */ if (backtitle != NULL) { - int i; + int i; - wattrset (stdscr, screen_attr); - mvwaddstr (stdscr, 0, 1, (char *)backtitle); - wmove (stdscr, 1, 1); - for (i = 1; i < COLS - 1; i++) - waddch (stdscr, ACS_HLINE); + wattrset (stdscr, screen_attr); + mvwaddstr (stdscr, 0, 1, (char *)backtitle); + wmove (stdscr, 1, 1); + for (i = 1; i < COLS - 1; i++) + waddch (stdscr, ACS_HLINE); } wnoutrefresh (stdscr); } @@ -204,7 +204,7 @@ print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x) strcpy (tempstr, prompt); prompt_len = strlen(tempstr); - + /* * Remove newlines */ @@ -350,7 +350,7 @@ first_alpha(const char *string, const char *exempt) if (strchr("<[(", c)) ++in_paren; if (strchr(">])", c) && in_paren > 0) --in_paren; - if ((! in_paren) && isalpha(c) && + if ((! in_paren) && isalpha(c) && strchr(exempt, c) == 0) return i; } diff --git a/scripts/config/zconf.tab.c_shipped b/scripts/config/zconf.tab.c_shipped index be6bd4c..0bf511e 100644 --- a/scripts/config/zconf.tab.c_shipped +++ b/scripts/config/zconf.tab.c_shipped @@ -333,7 +333,7 @@ union yyalloc #define YYUNDEFTOK 2 #define YYMAXUTOK 296 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ @@ -709,7 +709,7 @@ do \ goto yybackup; \ } \ else \ - { \ + { \ yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ @@ -762,7 +762,7 @@ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ + yysymprint (stderr, \ Token, Value); \ YYFPRINTF (stderr, "\n"); \ } \ |