| 1146 | } |
| 1147 | |
| 1148 | void |
| 1149 | topl_set_resp(char *resp, char def) |
| 1150 | { |
| 1151 | char *loc; |
| 1152 | Rect frame; |
| 1153 | int r_len, r_len1; |
| 1154 | |
| 1155 | if (!resp) { |
| 1156 | const char any_str[2] = { CHAR_ANY, '\0' }; |
| 1157 | resp = (char *) any_str; |
| 1158 | def = CHAR_ANY; |
| 1159 | } |
| 1160 | |
| 1161 | SetPortWindowPort(theWindows[WIN_MESSAGE].its_window); |
| 1162 | r_len1 = strlen(resp); |
| 1163 | r_len = strlen(topl_resp); |
| 1164 | if (r_len < r_len1) |
| 1165 | r_len = r_len1; |
| 1166 | topl_resp_rect(0, &frame); |
| 1167 | frame.right = (BTN_IND + BTN_W) * r_len; |
| 1168 | InvalWindowRect(theWindows[WIN_MESSAGE].its_window, &frame); |
| 1169 | |
| 1170 | strcpy(topl_resp, resp); |
| 1171 | loc = strchr(resp, def); |
| 1172 | topl_def_idx = loc ? loc - resp : -1; |
| 1173 | } |
| 1174 | |
| 1175 | static char |
| 1176 | topl_resp_key(char ch) |
no test coverage detected