| 17 | }; |
| 18 | |
| 19 | size_t display_mode_esc_sequence_len(const char *s) |
| 20 | { |
| 21 | const char *p = s; |
| 22 | if (*p++ != '\033') |
| 23 | return 0; |
| 24 | if (*p++ != '[') |
| 25 | return 0; |
| 26 | while (isdigit(*p) || *p == ';') |
| 27 | p++; |
| 28 | if (*p++ != 'm') |
| 29 | return 0; |
| 30 | return p - s; |
| 31 | } |
| 32 | |
| 33 | /* auxiliary function for binary search in interval table */ |
| 34 | static int bisearch(ucs_char_t ucs, const struct interval *table, int max) |
no outgoing calls
no test coverage detected