Lines Matching refs:cp
159 char *cp, *cp2; in gethfield() local
167 for (cp = linebuf; isprint((unsigned char)*cp) && *cp != ' ' && *cp != ':'; in gethfield()
168 cp++) in gethfield()
170 if (*cp != ':' || cp == linebuf) in gethfield()
176 *colon = cp; in gethfield()
177 cp = linebuf + c; in gethfield()
179 while (--cp >= linebuf && (*cp == ' ' || *cp == '\t')) in gethfield()
181 cp++; in gethfield()
193 if (cp + c >= linebuf + LINESIZE - 2) in gethfield()
195 *cp++ = ' '; in gethfield()
196 bcopy(cp2, cp, c); in gethfield()
197 cp += c; in gethfield()
199 *cp = 0; in gethfield()
213 char *cp = colon; in ishfield() local
215 *cp = 0; in ishfield()
217 *cp = ':'; in ishfield()
220 *cp = ':'; in ishfield()
221 for (cp++; *cp == ' ' || *cp == '\t'; cp++) in ishfield()
223 return (cp); in ishfield()
264 char *cp; in source() local
266 if ((cp = expand(*arglist)) == NULL) in source()
268 if ((fi = Fopen(cp, "r")) == NULL) { in source()
269 warn("%s", cp); in source()
336 char *cp, *cp2; in nameof() local
338 cp = skin(name1(mp, reptype)); in nameof()
339 if (reptype != 0 || charcount(cp, '!') < 2) in nameof()
340 return (cp); in nameof()
341 cp2 = strrchr(cp, '!'); in nameof()
343 while (cp2 > cp && *cp2 != '!') in nameof()
347 return (cp); in nameof()
355 skip_comment(char *cp) in skip_comment() argument
359 for (; nesting > 0 && *cp; cp++) { in skip_comment()
360 switch (*cp) { in skip_comment()
362 if (cp[1]) in skip_comment()
363 cp++; in skip_comment()
373 return (cp); in skip_comment()
383 char *nbuf, *bufend, *cp, *cp2; in skin() local
398 for (cp = name, cp2 = bufend; (c = *cp++) != '\0'; ) { in skin()
401 cp = skip_comment(cp); in skin()
410 while ((c = *cp) != '\0') { in skin()
411 cp++; in skin()
416 else if ((c = *cp) != '\0') { in skin()
418 cp++; in skin()
425 if (cp[0] == 'a' && cp[1] == 't' && cp[2] == ' ') in skin()
426 cp += 3, *cp2++ = '@'; in skin()
428 if (cp[0] == '@' && cp[1] == ' ') in skin()
429 cp += 2, *cp2++ = '@'; in skin()
443 while ((c = *cp) != '\0' && c != ',') { in skin()
444 cp++; in skin()
446 cp = skip_comment(cp); in skin()
448 while ((c = *cp) != '\0') { in skin()
449 cp++; in skin()
452 if (c == '\\' && *cp != '\0') in skin()
453 cp++; in skin()
468 (*cp == ' ' || *cp == '"' || *cp == '<')) { in skin()
470 while (*cp == ' ') in skin()
471 cp++; in skin()
479 if ((cp = realloc(nbuf, strlen(nbuf) + 1)) != NULL) in skin()
480 nbuf = cp; in skin()
496 char *cp, *cp2; in name1() local
500 if ((cp = hfield("from", mp)) != NULL) in name1()
501 return (cp); in name1()
502 if (reptype == 0 && (cp = hfield("sender", mp)) != NULL) in name1()
503 return (cp); in name1()
509 for (cp = linebuf; *cp != '\0' && *cp != ' '; cp++) in name1()
511 for (; *cp == ' ' || *cp == '\t'; cp++) in name1()
514 *cp != '\0' && *cp != ' ' && *cp != '\t' && in name1()
516 *cp2++ = *cp++; in name1()
520 if ((cp = strchr(linebuf, 'F')) == NULL) in name1()
522 if (strncmp(cp, "From", 4) != 0) in name1()
524 while ((cp = strchr(cp, 'r')) != NULL) { in name1()
525 if (strncmp(cp, "remote", 6) == 0) { in name1()
526 if ((cp = strchr(cp, 'f')) == NULL) in name1()
528 if (strncmp(cp, "from", 4) != 0) in name1()
530 if ((cp = strchr(cp, ' ')) == NULL) in name1()
532 cp++; in name1()
538 strlcpy(cp2, cp, sizeof(namebuf) - (cp2 - namebuf) - 1); in name1()
542 cp++; in name1()
553 char *cp; in charcount() local
556 for (i = 0, cp = str; *cp != '\0'; cp++) in charcount()
557 if (*cp == c) in charcount()