| 957 | } |
| 958 | |
| 959 | int main(int ac, char **av) |
| 960 | { |
| 961 | char *mode; |
| 962 | int res; |
| 963 | |
| 964 | signal(SIGINT, sig_handler); |
| 965 | |
| 966 | if (ac > 1 && strcmp(av[1], "-s") == 0) { |
| 967 | silent = 1; |
| 968 | /* Silence conf_read() until the real callback is set up */ |
| 969 | conf_set_message_callback(NULL); |
| 970 | av++; |
| 971 | } |
| 972 | conf_parse(av[1]); |
| 973 | conf_read(NULL); |
| 974 | |
| 975 | mode = getenv("MENUCONFIG_MODE"); |
| 976 | if (mode) { |
| 977 | if (!strcasecmp(mode, "single_menu")) |
| 978 | single_menu_mode = 1; |
| 979 | } |
| 980 | |
| 981 | if (init_dialog(NULL)) { |
| 982 | fprintf(stderr, "Your display is too small to run Menuconfig!\n"); |
| 983 | fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); |
| 984 | return 1; |
| 985 | } |
| 986 | |
| 987 | set_config_filename(conf_get_configname()); |
| 988 | conf_set_message_callback(conf_message_callback); |
| 989 | do { |
| 990 | conf(&rootmenu, NULL); |
| 991 | res = handle_exit(); |
| 992 | } while (res == KEY_ESC); |
| 993 | |
| 994 | return res; |
| 995 | } |
nothing calls this directly
no test coverage detected