Lines Matching defs:cp
4060 char *cp, *port;
4073 cp = strchr(s, '@');
4074 if (cp && cp < eos) {
4075 if (! userinfo_ok(s,cp))
4077 *cp++ = '\0';
4084 cp = s;
4087 for (port=eos-1; port >= cp && EVUTIL_ISDIGIT(*port); --port)
4089 if (port >= cp && *port == ':') {
4097 /* Now, cp..eos holds the "host" port, which can be an IPv4Address,
4099 EVUTIL_ASSERT(eos >= cp);
4100 if (*cp == '[' && eos >= cp+2 && *(eos-1) == ']') {
4102 if (! bracket_addr_ok(cp, eos))
4106 if (! regname_ok(cp,eos)) /* Match IPv4Address or reg-name */
4109 uri->host = mm_malloc(eos-cp+1);
4114 memcpy(uri->host, cp, eos-cp);
4115 uri->host[eos-cp] = '\0';
4121 end_of_authority(char *cp)
4123 while (*cp) {
4124 if (*cp == '?' || *cp == '#' || *cp == '/')
4125 return cp;
4126 ++cp;
4128 return cp;
4137 /* Return the character after the longest prefix of 'cp' that matches...
4142 end_of_path(char *cp, enum uri_part part, unsigned flags)
4152 while (*cp && *cp != '#' && *cp != '?')
4153 ++cp;
4156 while (*cp && *cp != '#')
4157 ++cp;
4160 cp += strlen(cp);
4163 return cp;
4166 while (*cp) {
4167 if (CHAR_IS_UNRESERVED(*cp) ||
4168 strchr(SUBDELIMS, *cp) ||
4169 *cp == ':' || *cp == '@' || *cp == '/')
4170 ++cp;
4171 else if (*cp == '%' && EVUTIL_ISXDIGIT(cp[1]) &&
4172 EVUTIL_ISXDIGIT(cp[2]))
4173 cp += 3;
4174 else if (*cp == '?' && part != PART_PATH)
4175 ++cp;
4177 return cp;
4179 return cp;
4183 path_matches_noscheme(const char *cp)
4185 while (*cp) {
4186 if (*cp == ':')
4188 else if (*cp == '/')
4190 ++cp;
4502 #define end_of_cpath(cp,p,f) \
4503 ((const char*)(end_of_path(((char*)(cp)), (p), (f))))