37typedef enum : uint8_t {
76 return ((c >=
'A') && (c <=
'Z')) ? (char)(c + (
'a' -
'A')) : c;
97 const size_t n =
strlen(name);
98 const size_t e =
strlen(ext);
102 for (
size_t i = 0U; i < e; ++i) {
size_t strlen(const char *s)
Calculate string length.
static bool sh_ext_match(const char *name, const char *ext)
Case-insensitive test that name ends in the extension ext.
sh_book_fmt_t
Book container format behind a shelf entry / the open book.
@ k_sh_fmt_cbr
Comic archive: RAR of page images (.cbr).
@ k_sh_fmt_epub
EPUB parsed on-device by epub.
@ k_sh_fmt_cbt
Comic archive: tar of page images (.cbt).
@ k_sh_fmt_rabook
book RBKC container (demand-paged chunks).
@ k_sh_fmt_cbz
Comic archive: ZIP of page images (.cbz).
static char sh_ascii_lower(char c)
Fold one ASCII letter to lower case (non-letters returned unchanged).
static bool sh_book_classify(const char *name, sh_book_fmt_t *out_fmt)
Classify a root file name into a book format; true if it is a book.
static bool sh_fmt_is_comic(sh_book_fmt_t fmt)
True if fmt is a comic-archive container (CBZ, CBR, or CBT).