aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/nconf.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-06-01 11:55:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-06-01 11:55:52 -0400
commit1f73897861b8ef0be64ff4b801f8d6f830f683b5 (patch)
treeb4bae8f12e1422113910d8cb00a19d010dc4a52f /scripts/kconfig/nconf.h
parentb904d7131d116900524bd36ec170dcd97846bfd3 (diff)
parent64ffc9ff424c65adcffe7d590018cc75e2d5d42a (diff)
Merge branch 'for-35' of git://repo.or.cz/linux-kbuild
* 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits) kbuild: Revert part of e8d400a to resolve a conflict kbuild: Fix checking of scm-identifier variable gconfig: add support to show hidden options that have prompts menuconfig: add support to show hidden options which have prompts gconfig: remove show_debug option gconfig: remove dbg_print_ptype() and dbg_print_stype() kconfig: fix zconfdump() kconfig: some small fixes add random binaries to .gitignore kbuild: Include gen_initramfs_list.sh and the file list in the .d file kconfig: recalc symbol value before showing search results .gitignore: ignore *.lzo files headerdep: perlcritic warning scripts/Makefile.lib: Align the output of LZO kbuild: Generate modules.builtin in make modules_install Revert "kbuild: specify absolute paths for cscope" kbuild: Do not unnecessarily regenerate modules.builtin headers_install: use local file handles headers_check: fix perl warnings export_report: fix perl warnings ...
Diffstat (limited to 'scripts/kconfig/nconf.h')
-rw-r--r--scripts/kconfig/nconf.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/scripts/kconfig/nconf.h b/scripts/kconfig/nconf.h
new file mode 100644
index 000000000000..fb4296666004
--- /dev/null
+++ b/scripts/kconfig/nconf.h
@@ -0,0 +1,95 @@
1/*
2 * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
3 * Released under the terms of the GNU GPL v2.0.
4 *
5 * Derived from menuconfig.
6 *
7 */
8
9#include <ctype.h>
10#include <errno.h>
11#include <fcntl.h>
12#include <limits.h>
13#include <stdarg.h>
14#include <stdlib.h>
15#include <string.h>
16#include <unistd.h>
17#include <locale.h>
18#include <curses.h>
19#include <menu.h>
20#include <panel.h>
21#include <form.h>
22
23#include <stdio.h>
24#include <time.h>
25#include <sys/time.h>
26
27#include "ncurses.h"
28
29#define max(a, b) ({\
30 typeof(a) _a = a;\
31 typeof(b) _b = b;\
32 _a > _b ? _a : _b; })
33
34#define min(a, b) ({\
35 typeof(a) _a = a;\
36 typeof(b) _b = b;\
37 _a < _b ? _a : _b; })
38
39typedef enum {
40 NORMAL = 1,
41 MAIN_HEADING,
42 MAIN_MENU_BOX,
43 MAIN_MENU_FORE,
44 MAIN_MENU_BACK,
45 MAIN_MENU_GREY,
46 MAIN_MENU_HEADING,
47 SCROLLWIN_TEXT,
48 SCROLLWIN_HEADING,
49 SCROLLWIN_BOX,
50 DIALOG_TEXT,
51 DIALOG_MENU_FORE,
52 DIALOG_MENU_BACK,
53 DIALOG_BOX,
54 INPUT_BOX,
55 INPUT_HEADING,
56 INPUT_TEXT,
57 INPUT_FIELD,
58 FUNCTION_TEXT,
59 FUNCTION_HIGHLIGHT,
60 ATTR_MAX
61} attributes_t;
62extern attributes_t attributes[];
63
64typedef enum {
65 F_HELP = 1,
66 F_SYMBOL = 2,
67 F_INSTS = 3,
68 F_CONF = 4,
69 F_BACK = 5,
70 F_SAVE = 6,
71 F_LOAD = 7,
72 F_EXIT = 8
73} function_key;
74
75void set_colors(void);
76
77/* this changes the windows attributes !!! */
78void print_in_middle(WINDOW *win,
79 int starty,
80 int startx,
81 int width,
82 const char *string,
83 chtype color);
84int get_line_length(const char *line);
85int get_line_no(const char *text);
86const char *get_line(const char *text, int line_no);
87void fill_window(WINDOW *win, const char *text);
88int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...);
89int dialog_inputbox(WINDOW *main_window,
90 const char *title, const char *prompt,
91 const char *init, char *result, int result_len);
92void refresh_all_windows(WINDOW *main_window);
93void show_scroll_win(WINDOW *main_window,
94 const char *title,
95 const char *text);