| 123 | // CScriptMassCompile message handlers |
| 124 | |
| 125 | void CScriptMassCompile::OnBuild() { |
| 126 | UpdateData(true); |
| 127 | |
| 128 | MassScriptEditContent = ""; |
| 129 | writeline("Starting Mass Build."); |
| 130 | |
| 131 | int i, list_size, listbox_size, index; |
| 132 | int *index_map = NULL; |
| 133 | CCheckListBox *list; |
| 134 | char tempbuffer[_MAX_PATH]; |
| 135 | CWnd *wnd; |
| 136 | |
| 137 | list = (CCheckListBox *)GetDlgItem(IDC_LIST); |
| 138 | listbox_size = list->GetCount(); |
| 139 | list_size = 0; |
| 140 | for (i = 0; i < listbox_size; i++) { |
| 141 | if (list->GetCheck(i)) { |
| 142 | list_size++; |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | if (list_size == 0) |
| 147 | return; |
| 148 | index_map = (int *)mem_malloc(list_size * sizeof(int)); |
| 149 | if (!index_map) |
| 150 | return; |
| 151 | |
| 152 | index = 0; |
| 153 | for (i = 0; i < listbox_size; i++) { |
| 154 | if (list->GetCheck(i)) { |
| 155 | index_map[index] = i; |
| 156 | index++; |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | wnd = (CWnd *)GetDlgItem(IDC_FILENAME); |
| 161 | bool ret1, ret2, ret3, ret4; |
| 162 | |
| 163 | for (i = 0; i < list_size; i++) { |
| 164 | index = index_map[i]; |
| 165 | |
| 166 | SetStepText(1, "-Not Done-"); |
| 167 | SetStepText(2, "-Not Done-"); |
| 168 | SetStepText(3, "-Not Done-"); |
| 169 | SetStepText(4, "-Not Done-"); |
| 170 | |
| 171 | list->GetText(index, tempbuffer); |
| 172 | wnd->SetWindowText(tempbuffer); |
| 173 | writeline("------------------------------- %s --------------------------", tempbuffer); |
| 174 | Descent->defer(); |
| 175 | |
| 176 | ret1 = Step1(tempbuffer); |
| 177 | Descent->defer(); |
| 178 | |
| 179 | ret2 = Step2(tempbuffer); |
| 180 | Descent->defer(); |
| 181 | |
| 182 | ret3 = Step3(tempbuffer, ret2); |
nothing calls this directly
no test coverage detected