Lines Matching refs:cp

206 http_date2time_t(char *cp, char *ep)  in http_date2time_t()  argument
208 char *scp = cp; in http_date2time_t()
228 while (cp < ep) { in http_date2time_t()
229 c = *cp++; in http_date2time_t()
234 cp = scp; in http_date2time_t()
241 if (cp == NULL) { in http_date2time_t()
243 while (cp < ep) { in http_date2time_t()
244 c = *cp; in http_date2time_t()
246 cp++; in http_date2time_t()
259 if (cp == ep) in http_date2time_t()
261 c = *cp++; in http_date2time_t()
265 if (cp == ep) in http_date2time_t()
267 c = *cp++; in http_date2time_t()
271 if (cp == ep) in http_date2time_t()
273 c = *cp++; in http_date2time_t()
280 if (cp == ep) in http_date2time_t()
282 sc = *cp++; in http_date2time_t()
288 scp = cp; in http_date2time_t()
290 while (cp < ep) { in http_date2time_t()
291 c = *cp; in http_date2time_t()
293 cp++; in http_date2time_t()
300 cp = scp; in http_date2time_t()
304 cp++; in http_date2time_t()
307 if (cp == NULL) in http_date2time_t()
311 if (cp == ep) in http_date2time_t()
313 c = *cp++; in http_date2time_t()
317 if (cp == ep) in http_date2time_t()
319 c = *cp++; in http_date2time_t()
324 if (cp == ep) in http_date2time_t()
326 c = *cp++; in http_date2time_t()
333 if (cp == ep) in http_date2time_t()
335 c = *cp++; in http_date2time_t()
341 if (cp == ep) in http_date2time_t()
343 c = *cp; in http_date2time_t()
346 cp++; in http_date2time_t()
364 if (cp == ep) in http_date2time_t()
366 c = *cp++; in http_date2time_t()
370 if (cp == ep) in http_date2time_t()
372 c = *cp++; in http_date2time_t()
378 if (cp == ep) in http_date2time_t()
380 c = *cp++; in http_date2time_t()
383 if (cp == ep) in http_date2time_t()
385 c = *cp++; in http_date2time_t()
389 if (cp == ep) in http_date2time_t()
391 c = *cp++; in http_date2time_t()
397 if (cp == ep) in http_date2time_t()
399 c = *cp++; in http_date2time_t()
402 if (cp == ep) in http_date2time_t()
404 c = *cp++; in http_date2time_t()
408 if (cp == ep) in http_date2time_t()
410 c = *cp++; in http_date2time_t()
416 if (cp == ep) in http_date2time_t()
418 c = *cp++; in http_date2time_t()
421 if (cp == ep) in http_date2time_t()
423 c = *cp++; in http_date2time_t()
426 if (cp == ep) in http_date2time_t()
428 c = *cp++; in http_date2time_t()
431 if (cp == ep) in http_date2time_t()
433 c = *cp++; in http_date2time_t()
441 scp = cp; in http_date2time_t()
443 while (cp < ep) { in http_date2time_t()
444 c = *cp; in http_date2time_t()
446 cp++; in http_date2time_t()
453 cp = scp; in http_date2time_t()
457 cp++; in http_date2time_t()
460 if (cp == NULL) in http_date2time_t()
464 if (cp == ep) in http_date2time_t()
466 c = *cp++; in http_date2time_t()
470 if (cp == ep) in http_date2time_t()
472 c = *cp++; in http_date2time_t()
479 if (cp == ep) in http_date2time_t()
481 c = *cp++; in http_date2time_t()
485 if (cp == ep) in http_date2time_t()
487 c = *cp++; in http_date2time_t()
491 if (cp == ep) in http_date2time_t()
493 c = *cp++; in http_date2time_t()
499 if (cp == ep) in http_date2time_t()
501 c = *cp++; in http_date2time_t()
504 if (cp == ep) in http_date2time_t()
506 c = *cp++; in http_date2time_t()
510 if (cp == ep) in http_date2time_t()
512 c = *cp++; in http_date2time_t()
518 if (cp == ep) in http_date2time_t()
520 c = *cp++; in http_date2time_t()
523 if (cp == ep) in http_date2time_t()
525 c = *cp++; in http_date2time_t()
529 if (cp == ep) in http_date2time_t()
531 c = *cp++; in http_date2time_t()
538 if (cp == ep) in http_date2time_t()
540 c = *cp++; in http_date2time_t()
544 if (cp == ep) in http_date2time_t()
546 c = *cp++; in http_date2time_t()
550 if (cp == ep) in http_date2time_t()
552 c = *cp++; in http_date2time_t()
557 if (cp == ep) in http_date2time_t()
559 c = *cp++; in http_date2time_t()
564 if (cp == ep) in http_date2time_t()
566 c = *cp++; in http_date2time_t()
593 http_today(char *cp) in http_today() argument
646 *cp++ = *fp++; in http_today()
647 *cp++ = *fp++; in http_today()
648 *cp++ = *fp++; in http_today()
649 *cp++ = ','; in http_today()
650 *cp++ = ' '; in http_today()
653 *cp++ = '0' + i; in http_today()
654 *cp++ = '0' + (day - i * 10); in http_today()
655 *cp++ = ' '; in http_today()
658 *cp++ = *fp++; in http_today()
659 *cp++ = *fp++; in http_today()
660 *cp++ = *fp++; in http_today()
661 *cp++ = ' '; in http_today()
664 *cp++ = '0' + i; in http_today()
667 *cp++ = '0' + i; in http_today()
670 *cp++ = '0' + i; in http_today()
672 *cp++ = '0' + year; in http_today()
673 *cp++ = ' '; in http_today()
676 *cp++ = '0' + i; in http_today()
677 *cp++ = '0' + (hour - i * 10); in http_today()
678 *cp++ = ':'; in http_today()
681 *cp++ = '0' + i; in http_today()
682 *cp++ = '0' + (min - i * 10); in http_today()
683 *cp++ = ':'; in http_today()
686 *cp++ = '0' + i; in http_today()
687 *cp++ = '0' + (sec - i * 10); in http_today()
688 *cp++ = ' '; in http_today()
690 *cp++ = 'G'; in http_today()
691 *cp++ = 'M'; in http_today()
692 *cp = 'T'; in http_today()
721 char *cp = *cpp; in ttree_line_parse() local
725 char *sp = cp; /* saved *cp */ in ttree_line_parse()
735 if (cp < ep) { in ttree_line_parse()
736 ca = *cp; in ttree_line_parse()
739 *cpp = ++cp; in ttree_line_parse()
743 cp++; in ttree_line_parse()
744 if (cp < ep) { in ttree_line_parse()
745 ca = *cp; in ttree_line_parse()
748 *cpp = ++cp; in ttree_line_parse()
753 cp = *cpp; in ttree_line_parse()
756 while (cp < ep) { in ttree_line_parse()
761 ca = *cp++; in ttree_line_parse()
791 cp = sp; in ttree_line_parse()
804 *hpp = cp; in ttree_line_parse()
812 while (cp < ep) { in ttree_line_parse()
813 ca = *cp; in ttree_line_parse()
815 *epp = cp; in ttree_line_parse()
818 *epp = cp; in ttree_line_parse()
832 cp++; in ttree_line_parse()
846 *cpp = cp; in ttree_line_parse()
930 a->m.cp && b->m.cp && \
931 ((a->m.ep - a->m.cp) != (b->m.ep - b->m.cp) || \
932 strncmp(a->m.cp, b->m.cp, (b->m.ep - b->m.cp))))
935 a->m.cp && ! b->m.cp || \
936 b->m.cp && ! a->m.cp || \
977 char *cp; in http_mkresponse() local
985 if (shttp->etag.cp != NULL) { in http_mkresponse()
988 (shttp->etag.ep - shttp->etag.cp) + 2; in http_mkresponse()
1007 cp = alloc; in http_mkresponse()
1017 *cp++ = *proto++; in http_mkresponse()
1022 *cp++ = '0' + qhttp->major; in http_mkresponse()
1027 *cp++ = *proto++; in http_mkresponse()
1030 *cp++ = '0' + qhttp->minor; in http_mkresponse()
1037 *cp++ = *proto++; in http_mkresponse()
1042 http_today(cp); in http_mkresponse()
1048 cp++; in http_mkresponse()
1056 *cp++ = *proto++; in http_mkresponse()
1061 *cp++ = '0' + nca_major_version; in http_mkresponse()
1066 *cp++ = *proto++; in http_mkresponse()
1069 *cp++ = '0' + nca_minor_version; in http_mkresponse()
1074 *cp++ = *proto++; in http_mkresponse()
1080 if (shttp->etag.cp != NULL) { in http_mkresponse()
1083 bcopy(hdr_etag, cp, cnt); in http_mkresponse()
1084 cp += cnt; in http_mkresponse()
1085 cnt = (shttp->etag.ep - shttp->etag.cp); in http_mkresponse()
1086 bcopy(shttp->etag.cp, cp, cnt); in http_mkresponse()
1087 cp += cnt; in http_mkresponse()
1088 *cp++ = '\r'; in http_mkresponse()
1089 *cp++ = '\n'; in http_mkresponse()
1092 uri->eoh = cp; in http_mkresponse()
1093 *cp++ = '\r'; in http_mkresponse()
1094 *cp = '\n'; in http_mkresponse()
1191 char *cp = *cpp; in nl7c_http_request() local
1198 ASSERT(cp <= ep); in nl7c_http_request()
1200 if (cp == ep) { in nl7c_http_request()
1207 uri->auth.cp = NULL; in nl7c_http_request()
1215 http->accept.cp = NULL; in nl7c_http_request()
1216 http->acceptchar.cp = NULL; in nl7c_http_request()
1217 http->acceptenco.cp = NULL; in nl7c_http_request()
1218 http->acceptlang.cp = NULL; in nl7c_http_request()
1219 http->etag.cp = NULL; in nl7c_http_request()
1220 http->uagent.cp = NULL; in nl7c_http_request()
1224 if (*cp == '\r') { in nl7c_http_request()
1236 if (*cp++ != ' ') in nl7c_http_request()
1243 while (cp < ep && *HTTP == *cp) { in nl7c_http_request()
1245 cp++; in nl7c_http_request()
1248 if (cp == ep) in nl7c_http_request()
1252 if (cp == ep) in nl7c_http_request()
1254 if (*cp < '0' || *cp > '9') in nl7c_http_request()
1256 http->major = *cp++ - '0'; in nl7c_http_request()
1257 if (cp == ep) in nl7c_http_request()
1259 if (*cp++ != '.') in nl7c_http_request()
1261 if (cp == ep) in nl7c_http_request()
1263 if (*cp < '0' || *cp > '9') in nl7c_http_request()
1265 http->minor = *cp++ - '0'; in nl7c_http_request()
1266 if (cp == ep) in nl7c_http_request()
1271 if (*cp++ != '\r') in nl7c_http_request()
1273 if (cp == ep) in nl7c_http_request()
1275 if (*cp++ != '\n') in nl7c_http_request()
1299 for (sep = ep; cp < ep; ep = sep) { in nl7c_http_request()
1301 scp = cp; in nl7c_http_request()
1302 match = ttree_line_parse(req_tree, &cp, &ep, &hp, &uri->hvalue); in nl7c_http_request()
1330 http->acceptchar.cp = hp; in nl7c_http_request()
1335 http->acceptenco.cp = hp; in nl7c_http_request()
1340 http->acceptlang.cp = hp; in nl7c_http_request()
1345 http->accept.cp = hp; in nl7c_http_request()
1365 http->etag.cp = hp; in nl7c_http_request()
1370 uri->auth.cp = hp; in nl7c_http_request()
1386 http->uagent.cp = hp; in nl7c_http_request()
1451 *cpp = cp; in nl7c_http_request()
1469 char *cp = *cpp; in nl7c_http_response() local
1498 while (cp < ep && *HTTP == *cp) { in nl7c_http_response()
1500 cp++; in nl7c_http_response()
1503 if (cp == ep) in nl7c_http_response()
1507 if (cp == ep) in nl7c_http_response()
1510 if (*cp < '0' || *cp > '9') in nl7c_http_response()
1513 major = *cp++ - '0'; in nl7c_http_response()
1515 cp++; in nl7c_http_response()
1518 if (cp == ep) in nl7c_http_response()
1520 if (*cp++ != '.') in nl7c_http_response()
1522 if (cp == ep) in nl7c_http_response()
1524 if (*cp < '0' || *cp > '9') in nl7c_http_response()
1527 minor = *cp++ - '0'; in nl7c_http_response()
1529 cp++; in nl7c_http_response()
1532 if (cp == ep) in nl7c_http_response()
1540 if (*cp++ != ' ') in nl7c_http_response()
1542 if (cp == ep) in nl7c_http_response()
1546 if (*cp == ' ') in nl7c_http_response()
1548 if (*cp < '0' || *cp > '9') in nl7c_http_response()
1552 status += *cp++ - '0'; in nl7c_http_response()
1553 } while (cp < ep); in nl7c_http_response()
1611 for (sep = ep; cp < ep; ep = sep) { in nl7c_http_response()
1613 scp = cp; in nl7c_http_response()
1614 match = ttree_line_parse(res_tree, &cp, &ep, &hp, NULL); in nl7c_http_response()
1682 http->etag.cp = hp; in nl7c_http_response()
1745 http->headlen = (cp - *cpp); in nl7c_http_response()
1815 scp = cp; in nl7c_http_response()
1816 while (uri->respclen != URI_LEN_NOVALUE && cp < sep) { in nl7c_http_response()
1819 if (cp == sep) in nl7c_http_response()
1821 if (*cp++ != '\r') in nl7c_http_response()
1823 if (cp == sep) in nl7c_http_response()
1825 if (*cp++ != '\n') in nl7c_http_response()
1834 if (cp == sep) in nl7c_http_response()
1837 while (cp < sep && (c = *cp++) != '\r') { in nl7c_http_response()
1842 if (cp == sep) in nl7c_http_response()
1844 if (*cp++ != '\n') in nl7c_http_response()
1849 if (cp == sep) in nl7c_http_response()
1851 if (*cp++ != '\r') in nl7c_http_response()
1853 if (cp == sep) in nl7c_http_response()
1855 if (*cp++ != '\n') in nl7c_http_response()
1863 uint32_t sz = (sep - cp); in nl7c_http_response()
1868 cp += sz; in nl7c_http_response()
1871 if (cp == sep) { in nl7c_http_response()
1875 if (*cp++ != '\r') in nl7c_http_response()
1877 if (cp == sep) in nl7c_http_response()
1879 if (*cp++ != '\n') in nl7c_http_response()
1881 if (cp == sep) in nl7c_http_response()
1886 uri->resplen += (cp - scp); in nl7c_http_response()
1889 *cpp = cp; in nl7c_http_response()
1901 uri->resplen += (cp - scp); in nl7c_http_response()
1902 *cpp = cp; in nl7c_http_response()
1914 if (qhttp->uagent.cp != NULL) { in nl7c_http_log()
1915 sz = (qhttp->uagent.ep - qhttp->uagent.cp); in nl7c_http_log()
1917 bcopy(qhttp->uagent.cp, *wp, sz); in nl7c_http_log()