| 156 | } |
| 157 | |
| 158 | static bool c_is_url(const char *t, size_t n) { |
| 159 | size_t i = 0; |
| 160 | while (i < n && (isalnum((unsigned char)t[i]) || t[i] == '+' || t[i] == '.' || t[i] == '-')) { |
| 161 | i++; |
| 162 | } |
| 163 | if (i > 0 && i + CBM_SZ_3 <= n && memcmp(t + i, "://", CBM_SZ_3) == 0) { |
| 164 | return true; |
| 165 | } |
| 166 | return (n > CBM_SZ_4 && strncmp(t, "www.", CBM_SZ_4) == 0) || |
| 167 | (n > CBM_SZ_7 && strncmp(t, "mailto:", CBM_SZ_7) == 0); |
| 168 | } |
| 169 | |
| 170 | static void c_push(const c_emit_t *em, const char *ref, size_t n, int syntax, uint32_t line) { |
| 171 | if (n == 0) { |
no outgoing calls
no test coverage detected