buildlist.c (251843) | buildlist.c (255852) |
---|---|
1/* | 1/* |
2 * $Id: buildlist.c,v 1.57 2013/03/17 13:46:30 tom Exp $ | 2 * $Id: buildlist.c,v 1.59 2013/09/02 17:01:02 tom Exp $ |
3 * 4 * buildlist.c -- implements the buildlist dialog 5 * 6 * Copyright 2012,2013 Thomas E. Dickey 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License, version 2.1 10 * as published by the Free Software Foundation. --- 1011 unchanged lines hidden (view full) --- 1022 int order_mode) 1023{ 1024 int result; 1025 int i, j; 1026 DIALOG_LISTITEM *listitems; 1027 bool separate_output = dialog_vars.separate_output; 1028 bool show_status = FALSE; 1029 int current = 0; | 3 * 4 * buildlist.c -- implements the buildlist dialog 5 * 6 * Copyright 2012,2013 Thomas E. Dickey 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License, version 2.1 10 * as published by the Free Software Foundation. --- 1011 unchanged lines hidden (view full) --- 1022 int order_mode) 1023{ 1024 int result; 1025 int i, j; 1026 DIALOG_LISTITEM *listitems; 1027 bool separate_output = dialog_vars.separate_output; 1028 bool show_status = FALSE; 1029 int current = 0; |
1030 char *help_result; |
|
1030 1031 listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1); 1032 assert_ptr(listitems, "dialog_buildlist"); 1033 1034 for (i = j = 0; i < item_no; ++i) { 1035 listitems[i].name = items[j++]; 1036 listitems[i].text = (dialog_vars.no_items 1037 ? dlg_strempty() --- 17 unchanged lines hidden (view full) --- 1055 ¤t); 1056 1057 switch (result) { 1058 case DLG_EXIT_OK: /* FALLTHRU */ 1059 case DLG_EXIT_EXTRA: 1060 show_status = TRUE; 1061 break; 1062 case DLG_EXIT_HELP: | 1031 1032 listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1); 1033 assert_ptr(listitems, "dialog_buildlist"); 1034 1035 for (i = j = 0; i < item_no; ++i) { 1036 listitems[i].name = items[j++]; 1037 listitems[i].text = (dialog_vars.no_items 1038 ? dlg_strempty() --- 17 unchanged lines hidden (view full) --- 1056 ¤t); 1057 1058 switch (result) { 1059 case DLG_EXIT_OK: /* FALLTHRU */ 1060 case DLG_EXIT_EXTRA: 1061 show_status = TRUE; 1062 break; 1063 case DLG_EXIT_HELP: |
1063 dlg_add_result("HELP "); 1064 show_status = dialog_vars.help_status; 1065 if (USE_ITEM_HELP(listitems[current].help)) { 1066 if (show_status) { 1067 if (separate_output) { 1068 dlg_add_string(listitems[current].help); 1069 dlg_add_separator(); 1070 } else { 1071 dlg_add_quoted(listitems[current].help); 1072 } | 1064 dlg_add_help_listitem(&result, &help_result, &listitems[current]); 1065 if ((show_status = dialog_vars.help_status)) { 1066 if (separate_output) { 1067 dlg_add_string(help_result); 1068 dlg_add_separator(); |
1073 } else { | 1069 } else { |
1074 dlg_add_string(listitems[current].help); | 1070 dlg_add_quoted(help_result); |
1075 } | 1071 } |
1076 result = DLG_EXIT_ITEM_HELP; | |
1077 } else { | 1072 } else { |
1078 if (show_status) { 1079 if (separate_output) { 1080 dlg_add_string(listitems[current].name); 1081 dlg_add_separator(); 1082 } else { 1083 dlg_add_quoted(listitems[current].name); 1084 } 1085 } else { 1086 dlg_add_string(listitems[current].name); 1087 } | 1073 dlg_add_string(help_result); |
1088 } 1089 break; 1090 } 1091 1092 if (show_status) { 1093 for (i = 0; i < item_no; i++) { 1094 if (listitems[i].state) { 1095 if (separate_output) { --- 16 unchanged lines hidden --- | 1074 } 1075 break; 1076 } 1077 1078 if (show_status) { 1079 for (i = 0; i < item_no; i++) { 1080 if (listitems[i].state) { 1081 if (separate_output) { --- 16 unchanged lines hidden --- |