(mu_is_proto): New function.
Showing
2 changed files
with
12 additions
and
0 deletions
... | @@ -139,6 +139,8 @@ extern int mu_decode_filter (mu_stream_t *pfilter, mu_stream_t input, | ... | @@ -139,6 +139,8 @@ extern int mu_decode_filter (mu_stream_t *pfilter, mu_stream_t input, |
139 | 139 | ||
140 | extern enum mu_iconv_fallback_mode mu_default_fallback_mode; | 140 | extern enum mu_iconv_fallback_mode mu_default_fallback_mode; |
141 | extern int mu_set_default_fallback (const char *str); | 141 | extern int mu_set_default_fallback (const char *str); |
142 | |||
143 | extern int mu_is_proto (const char *p); | ||
142 | 144 | ||
143 | #ifdef __cplusplus | 145 | #ifdef __cplusplus |
144 | } | 146 | } | ... | ... |
... | @@ -1293,3 +1293,13 @@ mu_decode_filter (mu_stream_t *pfilter, mu_stream_t input, | ... | @@ -1293,3 +1293,13 @@ mu_decode_filter (mu_stream_t *pfilter, mu_stream_t input, |
1293 | *pfilter = filter; | 1293 | *pfilter = filter; |
1294 | return 0; | 1294 | return 0; |
1295 | } | 1295 | } |
1296 | |||
1297 | int | ||
1298 | mu_is_proto (const char *p) | ||
1299 | { | ||
1300 | for (; *p && *p != '/'; p++) | ||
1301 | if (*p == ':') | ||
1302 | return 1; | ||
1303 | return 0; | ||
1304 | } | ||
1305 | ... | ... |
-
Please register or sign in to post a comment