| 451 | } |
| 452 | |
| 453 | static int count_lines_thread(SceSize args, CountParams *params) { |
| 454 | TextEditorState *state = params->state; |
| 455 | |
| 456 | state->count_lines_running = 1; |
| 457 | state->n_lines = 0; |
| 458 | |
| 459 | int offset = 0; |
| 460 | |
| 461 | while (state->count_lines_running && offset < state->size && state->n_lines < MAX_LINES) { |
| 462 | offset += textReadLine(state->buffer, offset, state->size, NULL); |
| 463 | state->n_lines++; |
| 464 | |
| 465 | sceKernelDelayThread(1000); |
| 466 | } |
| 467 | |
| 468 | return sceKernelExitDeleteThread(0); |
| 469 | } |
| 470 | |
| 471 | static int search_thread(SceSize args, SearchParams *argp) { |
| 472 | TextEditorState *state = argp->state; |
nothing calls this directly
no test coverage detected