Keeping the entries a bounded list can show, and ordering them for it: LOGS' order over the file manager's page keeping (fm_select.h).
More...
|
| static int | by_rank (const void *a, const void *b) |
| | The pages' order: log_name_rank() of two entries' names.
|
| static int | by_display_order (const void *a, const void *b) |
| | The order the browse list draws: directories first, then the pages' own order.
|
| int | log_select_keep (log_viewer_file_t *set, int count, int capacity, const log_viewer_file_t *cand) |
| | Offer cand to a set in log_name_rank() order.
|
| void | log_select_page_begin (log_select_page_t *sel, log_viewer_file_t *set, int capacity, const log_viewer_page_t *page) |
| | Start choosing page into set.
|
| void | log_select_page_offer (log_select_page_t *sel, const log_viewer_file_t *cand) |
| | Offer one directory entry; it is copied if it is kept.
|
| int | log_select_page_end (log_select_page_t *sel, log_viewer_page_t *page) |
| | End the walk: put the set into the order the browse list draws (log_select_sort()) and write page's ahead and held.
|
| void | log_select_sort (log_viewer_file_t *set, int count) |
| | Put count entries into the order the browse list draws them in: directories first, then log_name_rank() order – runs newest first, then the other names, case-insensitively.
|
| static bool | is_csv (const char *name) |
| | Whether name ends in ".csv", case folded, after a base name.
|
| bool | log_select_lists (const char *name) |
| | Whether the list holds a file of this name: a CSV file, or a report.
|
Keeping the entries a bounded list can show, and ordering them for it: LOGS' order over the file manager's page keeping (fm_select.h).
SPDX-License-Identifier: MIT
| bool log_select_lists |
( |
const char * | name | ) |
|
Whether the list holds a file of this name: a CSV file, or a report.
A report is a name log_report_number() takes, the same rule FILES labels a report by (fm_kind_of()): ATESTnnn.TXT beside its ATESTnnn.CSV or without it, LIMITnnn.TXT, which a LIMIT RUN writes with no CSV, and the SERVOnnn.TXT of firmware 0.21.0 and older. A run and its report are two rows, the run first (log_name_rank()); OPEN reads the CSV into the import and the report as text, and DELETE on the run takes its report along. Any other ".TXT" is not listed. One walk of a folder decides it name by name.
- Parameters
-
| name | a file's name in the folder; NULL is none |
- Returns
- true for a name ending in ".csv", any case, after a base name, and for a report; false for every other name and for NULL