static int urlword_dlm[] = {'&', ';', 0}; static char *my_urlword(pool *p, const char **line) { char *res = NULL; const char *pos = *line; char ch; while ( (ch = *pos) != '\0' && ch != ';' && ch != '&') { ++pos; } res = ap_pstrndup(p, *line, pos - *line); while (ch == ';' || ch == '&') { ++pos; ch = *pos; } *line = pos; return res; }