scripts/config: sync with linux upstream
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43873
This commit is contained in:
		| @@ -42,7 +42,7 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected) | ||||
|  * Display a dialog box for inputing a string | ||||
|  */ | ||||
| int dialog_inputbox(const char *title, const char *prompt, int height, int width, | ||||
|                     const char *init) | ||||
| 		    const char *init) | ||||
| { | ||||
| 	int i, x, y, box_y, box_x, box_width; | ||||
| 	int input_x = 0, key = 0, button = -1; | ||||
| @@ -56,14 +56,14 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width | ||||
| 		strcpy(instr, init); | ||||
|  | ||||
| do_resize: | ||||
| 	if (getmaxy(stdscr) <= (height - 2)) | ||||
| 	if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN)) | ||||
| 		return -ERRDISPLAYTOOSMALL; | ||||
| 	if (getmaxx(stdscr) <= (width - 2)) | ||||
| 	if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) | ||||
| 		return -ERRDISPLAYTOOSMALL; | ||||
|  | ||||
| 	/* center dialog box on screen */ | ||||
| 	x = (COLS - width) / 2; | ||||
| 	y = (LINES - height) / 2; | ||||
| 	x = (getmaxx(stdscr) - width) / 2; | ||||
| 	y = (getmaxy(stdscr) - height) / 2; | ||||
|  | ||||
| 	draw_shadow(stdscr, y, x, height, width); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau