| 267 | } |
| 268 | |
| 269 | void |
| 270 | clipbrd_save(void *data, int cnt, boolean append, boolean is_inv) |
| 271 | { |
| 272 | char path[MAX_PATH], *text, *crlf = "\r\n"; |
| 273 | long handle; |
| 274 | int i; |
| 275 | |
| 276 | if (data && cnt > 0 && scrp_path(path, "scrap.txt") |
| 277 | && (handle = append ? Fopen(path, 1) : Fcreate(path, 0)) > 0) { |
| 278 | if (append) |
| 279 | Fseek(0L, (int) handle, SEEK_END); |
| 280 | if (is_inv) { |
| 281 | Gem_menu_item *it = (Gem_menu_item *) data; |
| 282 | |
| 283 | for (; it; it = it->Gmi_next) { |
| 284 | text = it->Gmi_str; |
| 285 | Fwrite((int) handle, strlen(text), text); |
| 286 | Fwrite((int) handle, 2L, crlf); |
| 287 | } |
| 288 | } else { |
| 289 | for (i = 0; i < cnt; i++) { |
| 290 | text = ((char **) data)[i] + 1; |
| 291 | Fwrite((int) handle, strlen(text), text); |
| 292 | Fwrite((int) handle, 2L, crlf); |
| 293 | } |
| 294 | } |
| 295 | Fclose((int) handle); |
| 296 | |
| 297 | scrp_changed(SCF_TEXT, 0x2e545854l); /* .TXT */ |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | void |
| 302 | move_win(WIN *z_win) |
no outgoing calls
no test coverage detected