| 1022 | } |
| 1023 | |
| 1024 | int main(int ac, char **av) |
| 1025 | { |
| 1026 | char *mode; |
| 1027 | int res; |
| 1028 | |
| 1029 | signal(SIGINT, sig_handler); |
| 1030 | |
| 1031 | if (ac > 1 && strcmp(av[1], "-s") == 0) { |
| 1032 | silent = 1; |
| 1033 | /* Silence conf_read() until the real callback is set up */ |
| 1034 | conf_set_message_callback(NULL); |
| 1035 | av++; |
| 1036 | } |
| 1037 | conf_parse(av[1]); |
| 1038 | conf_read(NULL); |
| 1039 | |
| 1040 | mode = getenv("MENUCONFIG_MODE"); |
| 1041 | if (mode) { |
| 1042 | if (!strcasecmp(mode, "single_menu")) |
| 1043 | single_menu_mode = 1; |
| 1044 | } |
| 1045 | |
| 1046 | if (init_dialog(NULL)) { |
| 1047 | fprintf(stderr, "Your display is too small to run Menuconfig!\n"); |
| 1048 | fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); |
| 1049 | return 1; |
| 1050 | } |
| 1051 | |
| 1052 | set_config_filename(conf_get_configname()); |
| 1053 | conf_set_message_callback(conf_message_callback); |
| 1054 | do { |
| 1055 | conf(&rootmenu, NULL); |
| 1056 | res = handle_exit(); |
| 1057 | } while (res == KEY_ESC); |
| 1058 | |
| 1059 | return res; |
| 1060 | } |
nothing calls this directly
no test coverage detected