| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/lib/sh/shmbchar.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | const unsigned int is_basic_table [ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | (0x7f * 2 + 1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | / 32 + 1] = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 0x00001a00, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 0xffffffef, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 0xfffffffe, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 0x7ffffffe | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | extern int locale_utf8locale; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | static inline size_t | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | utf8_mbstrlen(s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | const char *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | size_t num = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | register unsigned char c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | while ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | ++ never executed: num;++num;never executed: ++num; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | return never executed: (num);return (num);never executed: return (num); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | static inline int | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | utf8_mblen (s, n) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | const char *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | int n; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | unsigned char c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | if (s == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | else if (n == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | c = (unsigned char) *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | if (c < 0x80
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | return never executed: (c != 0);return (c != 0);never executed: return (c != 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | else if (c < 0xc0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | goto never executed: return_error;goto return_error;never executed: goto return_error; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | const char *start = s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | size_t count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | int check_unsafe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | if (c < 0xe0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | count = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | if (c < 0xc2
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | goto never executed: return_error;goto return_error;never executed: goto return_error; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | check_unsafe = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | else if (c < 0xf0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | count = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | check_unsafe = (c == 0xe0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | else if (c < 0xf8
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | count = 3; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | check_unsafe = (c == 0xe0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | else if (c < 0xfc
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | count = 4; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | check_unsafe = (c == 0xf8); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | else if (c < 0xfe
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | count = 5; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | check_unsafe = (c == 0xfc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | goto never executed: return_error;goto return_error;never executed: goto return_error; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | if (n <= count
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | s++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | c = (unsigned char) *s++ ^ 0x80; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | if (c >= 0x40
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | goto never executed: return_error;goto return_error;never executed: goto return_error; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | if (--
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | if (check_unsafe
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | goto never executed: return_error;goto return_error;never executed: goto return_error; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | do | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | c = (unsigned char) *s++ ^ 0x80; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | if (c >= 0x40
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | goto never executed: return_error;goto return_error;never executed: goto return_error; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | while (--
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | return never executed: s - start;return s - start;never executed: return s - start; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | return_error: | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 84 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | size_t | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | mbstrlen (s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | const char *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | size_t clen, nc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | mbstate_t mbs = { 0 }, mbsbak = { 0 }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | int f, mb_cur_max; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | nc = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | mb_cur_max = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | (__ctype_get_mb_cur_max ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | while (*
| 0-7495 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | if (((
| 0-7495 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | clen = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | mbs = mbsbak; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | if (f == 0
| 321-7174 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | mbsbak = mbs; executed 321 times by 1 test: mbsbak = mbs;Executed by:
| 321 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | s += clen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | nc++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | } executed 7495 times by 1 test: end of blockExecuted by:
| 7495 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | return executed 650 times by 1 test: nc;return nc;Executed by:
executed 650 times by 1 test: return nc;Executed by:
| 650 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | static inline char * | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | utf8_mbsmbchar (str) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | const char *str; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | register char *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | for (s = (char *)str; *
| 98412726-678369198 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | if ((*
| 19-678369179 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | return executed 19 times by 1 test: s;return s;Executed by:
executed 19 times by 1 test: return s;Executed by:
| 19 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | return executed 98412726 times by 1 test: (0);return (0);Executed by:
executed 98412726 times by 1 test: return (0);Executed by:
| 98412726 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | char * | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | mbsmbchar (s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | const char *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | char *t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | size_t clen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | mbstate_t mbs = { 0 }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | int mb_cur_max; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | if (locale_utf8locale
| 4506-98412745 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | return executed 98412745 times by 1 test: (utf8_mbsmbchar (s));return (utf8_mbsmbchar (s));Executed by:
executed 98412745 times by 1 test: return (utf8_mbsmbchar (s));Executed by:
| 98412745 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | mb_cur_max = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | (__ctype_get_mb_cur_max ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | for (t = (char *)s; *
| 4506-40022 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | if (is_basic (*t)
| 226-39796 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | continue; executed 39796 times by 1 test: continue;Executed by:
| 39796 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | if (locale_utf8locale
| 0-226 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | clen = utf8_mblen (t, mb_cur_max); never executed: clen = utf8_mblen (t, mb_cur_max); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | clen = mbrlen (t, mb_cur_max, &mbs); executed 226 times by 1 test: clen = mbrlen (t, mb_cur_max, &mbs);Executed by:
| 226 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | if (clen == 0
| 0-226 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | if (((
| 0-226 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | if (clen > 1
| 0-226 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | return never executed: t;return t;never executed: return t; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | } executed 226 times by 1 test: end of blockExecuted by:
| 226 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | return executed 4506 times by 1 test: 0;return 0;Executed by:
executed 4506 times by 1 test: return 0;Executed by:
| 4506 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | static inline int | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | utf_mbsnlen(src, srclen, maxlen) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | const char *src; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | size_t srclen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | int maxlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | register int sind, count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | for (sind = count = 0; src[sind]
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | count++; never executed: count++; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | return never executed: (count);return (count);never executed: return (count); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | sh_mbsnlen(src, srclen, maxlen) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | const char *src; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | size_t srclen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | int maxlen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | int count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | int sind; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | for (sind = count = 0; src[sind]
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | count++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | do { if (locale_mb_cur_max > 1
never executed: else if (locale_utf8localemblength = 1;
never executed: else { state_bak = state; mblength = mbrlen ((src) + (sind), (srclen) - (sind), &state); }mblength = 1;never executed: if (mblength == (size_t)-2end of block
never executed: else if (mblength == 0end of block
never executed: sind)++;(sind)++;never executed: else ((sind)++;never executed: sind) += mblength;(sind) += mblength;never executed: } else ((sind) += mblength;never executed: sind)++;(sind)++;never executed: } while (0);(sind)++; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | if (sind > maxlen
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | return never executed: count;return count;never executed: return count; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |