return each comma separated token, one at a time */
| 807 | |
| 808 | /* return each comma separated token, one at a time */ |
| 809 | CACHE_DECLARE(const char *)ap_cache_tokstr(apr_pool_t *p, const char *list, |
| 810 | const char **str) |
| 811 | { |
| 812 | apr_size_t i; |
| 813 | const char *s; |
| 814 | |
| 815 | s = ap_strchr_c(list, ','); |
| 816 | if (s != NULL) { |
| 817 | i = s - list; |
| 818 | do |
| 819 | s++; |
| 820 | while (apr_isspace(*s)) |
| 821 | ; /* noop */ |
| 822 | } |
| 823 | else |
| 824 | i = strlen(list); |
| 825 | |
| 826 | while (i > 0 && apr_isspace(list[i - 1])) |
| 827 | i--; |
| 828 | |
| 829 | *str = s; |
| 830 | if (i) |
| 831 | return apr_pstrmemdup(p, list, i); |
| 832 | else |
| 833 | return NULL; |
| 834 | } |
| 835 | |
| 836 | /* |
| 837 | * Converts apr_time_t expressed as hex digits to |
nothing calls this directly
no test coverage detected