Lines Matching refs:cp
298 const char* cp = nullptr; in sniffTime() local
300 cp = now.strptime(buf, "[ %s.%q]"); // can index beyond buffer bounds in sniffTime()
301 if (cp && (cp > &buf[len - 1])) cp = nullptr; in sniffTime()
303 if (cp) { in sniffTime()
304 len -= cp - buf; in sniffTime()
305 if ((len > 0) && isspace(*cp)) { in sniffTime()
306 ++cp; in sniffTime()
309 buf = cp; in sniffTime()
312 if (((b = android::strnstr(cp, len, suspendStr))) && in sniffTime()
313 (((b += strlen(suspendStr)) - cp) < len)) { in sniffTime()
314 len -= b - cp; in sniffTime()
316 } else if (((b = android::strnstr(cp, len, resumeStr))) && in sniffTime()
317 (((b += strlen(resumeStr)) - cp) < len)) { in sniffTime()
318 len -= b - cp; in sniffTime()
320 } else if (((b = android::strnstr(cp, len, healthdStr))) && in sniffTime()
321 (((b += strlen(healthdStr)) - cp) < len) && in sniffTime()
322 ((b = android::strnstr(b, len -= b - cp, batteryStr))) && in sniffTime()
323 (((b += strlen(batteryStr)) - cp) < len)) { in sniffTime()
329 } else if (((b = android::strnstr(cp, len, suspendedStr))) && in sniffTime()
330 (((b += strlen(suspendStr)) - cp) < len)) { in sniffTime()
331 len -= b - cp; in sniffTime()
364 const char* cp = buf; in sniffPid() local
367 if (((ssize_t)strnlen(cp, len) == len) && cp[len]) { in sniffPid()
371 if ((len > 9) && (cp[0] == 'c') && isdigit(cp[1]) && in sniffPid()
372 (isdigit(cp[2]) || (cp[2] == ' ')) && (cp[3] == ' ')) { in sniffPid()
376 if (isdigit(cp[i])) { in sniffPid()
378 } else if (gotDigit || (cp[i] != ' ')) { in sniffPid()
382 if ((i == 9) && (cp[i] == ' ')) { in sniffPid()
385 if (sscanf(cp + 4, "%d%c", &pid, &placeholder) == 2) { in sniffPid()
386 buf = cp + 10; // skip-it-all in sniffPid()
393 if (*cp == '[') { in sniffPid()
396 if (sscanf(cp, "[%d:%*[a-z_./0-9:A-Z]]%c", &pid, &placeholder) == 2) { in sniffPid()
401 ++cp; in sniffPid()
410 const char* cp = buf; in parseKernelPrio() local
411 if ((len > 0) && (*cp == '<')) { in parseKernelPrio()
413 while (--len && isdigit(*++cp)) { in parseKernelPrio()
414 pri = (pri * 10) + *cp - '0'; in parseKernelPrio()
416 if ((len > 0) && (*cp == '>')) { in parseKernelPrio()
417 ++cp; in parseKernelPrio()
419 cp = buf; in parseKernelPrio()
422 buf = cp; in parseKernelPrio()
572 const char* cp; in log() local
573 for (cp = et; (taglen > 0) && isspace(*cp); ++cp, --taglen) { in log()
579 if (*cp == ':') { in log()
586 p = cp + 1; in log()
587 } else if ((taglen > size) && (tolower(*bt) == tolower(*cp))) { in log()
589 if (!fastcmp<strncasecmp>(bt + 1, cp + 1, size - 1)) { // no match in log()
595 const char* b = cp; in log()
596 cp += size; in log()
598 while ((--taglen > 0) && !isspace(*++cp) && (*cp != ':')) { in log()
601 for (e = cp; (taglen > 0) && isspace(*cp); ++cp, --taglen) { in log()
603 if ((taglen > 0) && (*cp == ':')) { in log()
606 p = cp + 1; in log()
614 !fastcmp<strncmp>(bt + 1, cp + 1, size - hostlen - 1)) { in log()
615 const char* b = cp; in log()
616 cp += size - hostlen; in log()
618 if (*cp == '.') { in log()
619 while ((--taglen > 0) && !isspace(*++cp) && in log()
620 (*cp != ':')) { in log()
623 for (e = cp; (taglen > 0) && isspace(*cp); in log()
624 ++cp, --taglen) { in log()
626 if ((taglen > 0) && (*cp == ':')) { in log()
629 p = cp + 1; in log()
639 while ((--taglen > 0) && !isspace(*++cp) && (*cp != ':')) { in log()
642 for (e = cp; (taglen > 0) && isspace(*cp); ++cp, --taglen) { in log()
645 if ((taglen > 0) && (*cp == ':')) { in log()
648 p = cp + 1; in log()