Skip to content

Commit

Permalink
kconfig: Lindent scripts/lxdialog
Browse files Browse the repository at this point in the history
The lxdialog code was not easy to read. So as first step the code
was run through Lindent.
Fix-ups will come in next patchset.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Sam Ravnborg committed Nov 19, 2005
1 parent b286e39 commit b1c5f1c
Show file tree
Hide file tree
Showing 10 changed files with 1,921 additions and 1,847 deletions.
656 changes: 344 additions & 312 deletions scripts/lxdialog/checklist.c

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion scripts/lxdialog/colors.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/


/*
* Default color definitions
*
Expand Down
59 changes: 28 additions & 31 deletions scripts/lxdialog/dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
#define OLD_NCURSES 1
#undef wbkgdset
#define wbkgdset(w,p) /*nothing*/
#define wbkgdset(w,p) /*nothing */
#else
#define OLD_NCURSES 0
#endif
Expand All @@ -56,7 +56,6 @@
#define MIN(x,y) (x < y ? x : y)
#define MAX(x,y) (x > y ? x : y)


#ifndef ACS_ULCORNER
#define ACS_ULCORNER '+'
#endif
Expand Down Expand Up @@ -137,35 +136,34 @@ extern const char *backtitle;
/*
* Function prototypes
*/
extern void create_rc (const char *filename);
extern int parse_rc (void);


void init_dialog (void);
void end_dialog (void);
void attr_clear (WINDOW * win, int height, int width, chtype attr);
void dialog_clear (void);
void color_setup (void);
void print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x);
void print_button (WINDOW * win, const char *label, int y, int x, int selected);
void draw_box (WINDOW * win, int y, int x, int height, int width, chtype box,
chtype border);
void draw_shadow (WINDOW * win, int y, int x, int height, int width);

int first_alpha (const char *string, const char *exempt);
int dialog_yesno (const char *title, const char *prompt, int height, int width);
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,
const char * const * items);
int dialog_checklist (const char *title, const char *prompt, int height,
int width, int list_height, int item_no,
const char * const * items, int flag);
extern void create_rc(const char *filename);
extern int parse_rc(void);

void init_dialog(void);
void end_dialog(void);
void attr_clear(WINDOW * win, int height, int width, chtype attr);
void dialog_clear(void);
void color_setup(void);
void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x);
void print_button(WINDOW * win, const char *label, int y, int x, int selected);
void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box,
chtype border);
void draw_shadow(WINDOW * win, int y, int x, int height, int width);

int first_alpha(const char *string, const char *exempt);
int dialog_yesno(const char *title, const char *prompt, int height, int width);
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,
const char *const *items);
int dialog_checklist(const char *title, const char *prompt, int height,
int width, int list_height, int item_no,
const char *const *items, int flag);
extern char dialog_input_result[];
int dialog_inputbox (const char *title, const char *prompt, int height,
int width, const char *init);
int dialog_inputbox(const char *title, const char *prompt, int height,
int width, const char *init);

/*
* This is the base for fictitious keys, which activate
Expand All @@ -178,7 +176,6 @@ int dialog_inputbox (const char *title, const char *prompt, int height,
*/
#define M_EVENT (KEY_MAX+1)


/*
* The `flag' parameter in checklist is used to select between
* radiolist and checklist
Expand Down
Loading

0 comments on commit b1c5f1c

Please sign in to comment.