| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/mbchar.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | - | |||||||||||||
| 9 | - | |||||||||||||
| 10 | - | |||||||||||||
| 11 | - | |||||||||||||
| 12 | - | |||||||||||||
| 13 | - | |||||||||||||
| 14 | - | |||||||||||||
| 15 | - | |||||||||||||
| 16 | - | |||||||||||||
| 17 | - | |||||||||||||
| 18 | struct mbchar | - | ||||||||||||
| 19 | { | - | ||||||||||||
| 20 | const char *ptr; | - | ||||||||||||
| 21 | size_t bytes; | - | ||||||||||||
| 22 | - | |||||||||||||
| 23 | _Bool | - | ||||||||||||
| 24 | wc_valid; | - | ||||||||||||
| 25 | wchar_t wc; | - | ||||||||||||
| 26 | char buf[24]; | - | ||||||||||||
| 27 | }; | - | ||||||||||||
| 28 | - | |||||||||||||
| 29 | - | |||||||||||||
| 30 | - | |||||||||||||
| 31 | - | |||||||||||||
| 32 | typedef struct mbchar mbchar_t; | - | ||||||||||||
| 33 | inline int | - | ||||||||||||
| 34 | mb_width_aux (wint_t wc) | - | ||||||||||||
| 35 | { | - | ||||||||||||
| 36 | int w = wcwidth (wc); | - | ||||||||||||
| 37 | - | |||||||||||||
| 38 | - | |||||||||||||
| 39 | return never executed: (w >= 0 ? w : iswcntrl (wc) ? 0 : 1);return (w >= 0 ? w : iswcntrl (wc) ? 0 : 1);never executed: return (w >= 0 ? w : iswcntrl (wc) ? 0 : 1); | 0 | ||||||||||||
| 40 | } | - | ||||||||||||
| 41 | inline void | - | ||||||||||||
| 42 | mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) | - | ||||||||||||
| 43 | { | - | ||||||||||||
| 44 | if (old_mbc->ptr == &old_mbc->buf[0]
| 0 | ||||||||||||
| 45 | { | - | ||||||||||||
| 46 | memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); | - | ||||||||||||
| 47 | new_mbc->ptr = &new_mbc->buf[0]; | - | ||||||||||||
| 48 | } never executed: end of block | 0 | ||||||||||||
| 49 | else | - | ||||||||||||
| 50 | new_mbc->ptr = old_mbc->ptr; never executed: new_mbc->ptr = old_mbc->ptr; | 0 | ||||||||||||
| 51 | new_mbc->bytes = old_mbc->bytes; | - | ||||||||||||
| 52 | if ((
| 0 | ||||||||||||
| 53 | new_mbc->wc = old_mbc->wc; never executed: new_mbc->wc = old_mbc->wc; | 0 | ||||||||||||
| 54 | } never executed: end of block | 0 | ||||||||||||
| 55 | extern const unsigned int is_basic_table[]; | - | ||||||||||||
| 56 | - | |||||||||||||
| 57 | inline | - | ||||||||||||
| 58 | _Bool | - | ||||||||||||
| 59 | - | |||||||||||||
| 60 | is_basic (char c) | - | ||||||||||||
| 61 | { | - | ||||||||||||
| 62 | return never executed: (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31))return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) & 1;never executed: return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) & 1; | 0 | ||||||||||||
| 63 | & 1; never executed: return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) & 1; | 0 | ||||||||||||
| 64 | } | - | ||||||||||||
| 65 | - | |||||||||||||
| Switch to Source code | Preprocessed file |