Lines Matching refs:cp
498 { "cp", roff_line_ignore, NULL, NULL, 0, NULL },
1219 char *cp;
1230 cp = n->string;
1231 while (*cp != '\0') {
1232 if ('\\' == *cp) {
1233 cp++;
1234 mandoc_escape((const char **)&cp, NULL, NULL);
1235 } else if (isspace((unsigned char)*cp))
1236 cp++;
1243 for (sz = strlen(cp); sz; sz--)
1244 if ( ! isspace((unsigned char)cp[sz-1]))
1253 *dest = mandoc_strndup(cp, sz);
1257 mandoc_asprintf(&cp, "%s %*s", *dest, (int)sz, cp);
1259 *dest = cp;
1276 const char *cp; /* end of the name, e.g. before ']' */
1300 for (cp = stesc - 1; cp >= start; cp--)
1301 if (*cp != '\\')
1304 if ((stesc - cp) % 2 == 0) {
1305 stesc = (char *)cp;
1312 cp = stesc + 1;
1313 switch (*cp) {
1319 term = cp[1];
1325 esc = mandoc_escape(&cp, &stnam, &inaml);
1331 "%.*s", (int)(cp - stesc), stesc);
1348 switch (*++cp) {
1353 cp++;
1357 cp++;
1366 cp += 2;
1369 stnam = cp;
1376 if (*cp == '\0') {
1382 if (maxl == 0 && *cp == term) {
1383 cp++;
1386 if (*cp++ != '\\' || stesc[1] != 'w') {
1390 switch (mandoc_escape(&cp, NULL, NULL)) {
1417 stnam + npos + 1 == cp ? '1' : '0';
1449 buf->buf, res, cp) + 1;
1658 char *cp;
1663 cp = buf + *pos;
1665 if ('\0' == *cp || '"' == *cp || '\t' == *cp || ' ' == *cp)
1668 mac = cp;
1669 maclen = roff_getname(r, &cp, ln, ppos);
1675 *pos = cp - buf;
1769 char *iname, *cp;
1785 cp = buf->buf + pos;
1790 iname = cp;
1791 namesz = roff_getname(r, &cp, ln, ppos);
1825 if (*cp == '\0')
1830 iname = cp;
1831 namesz = roff_getname(r, &cp, ln, ppos);
1849 if (*cp != '\0')
1851 ln, pos, ".%s ... %s", roffs[tok].name, cp);
2110 char *cp, *name;
2135 cp = name = v + ++*pos;
2136 sz = roff_getname(r, &cp, ln, *pos);
2137 *pos = cp - v;
2663 char *name, *cp;
2666 name = cp = buf->buf + pos;
2669 namesz = roff_getname(r, &cp, ln, pos);
2693 char *cp;
2696 cp = buf->buf + pos;
2697 while (*cp != '\0') {
2698 name = cp;
2699 namesz = roff_getname(r, &cp, ln, (int)(cp - buf->buf));
2739 const char *const *cp;
2742 for (cp = __mdoc_reserved; *cp; cp++)
2743 roff_setstr(r, *cp, NULL, 0);
2754 const char *const *cp;
2757 for (cp = __man_reserved; *cp; cp++)
2758 roff_setstr(r, *cp, NULL, 0);
3006 char *name, *cp;
3021 buf->sz = mandoc_asprintf(&cp,
3024 buf->buf = cp;
3039 char *cp, *n1, *n2;
3049 cp = buf->buf + pos;
3051 if (*cp == '\0')
3054 arg[i] = mandoc_getarg(r->parse, &cp, ln, &pos);
3064 n1 = cp = mandoc_malloc(buf->sz);
3066 while (*cp != '\0') {
3070 if (*cp++ != '\\')
3072 if (*cp++ != '$')
3074 if (*cp == '*') { /* \\$* inserts all arguments */
3078 ib = ie = *cp - '1';
3082 cp -= 2;
3104 rsz = buf->sz - (cp - n1) - 3;
3112 memmove(cp + asz, cp + 3, rsz);
3121 cp = n2 + (cp - n1);
3130 memmove(cp + asz, cp + 3, rsz);
3135 n2 = cp;
3165 char *name, *cp;
3173 for (cp = name; 1; cp++) {
3174 if ('\0' == *cp || ' ' == *cp) {
3175 namesz = cp - name;
3178 if ('\\' != *cp)
3180 namesz = cp - name;
3181 if ('{' == cp[1] || '}' == cp[1])
3183 cp++;
3184 if ('\\' == *cp)
3187 "%.*s", (int)(cp - name + 1), name);
3188 mandoc_escape((const char **)&cp, NULL, NULL);
3193 while (' ' == *cp)
3194 cp++;
3196 *cpp = cp;
3344 const struct roffkv *cp;
3381 for (cp = r->xmbtab; cp; cp = cp->next)
3382 if (0 == strncmp(p, cp->key.p, cp->key.sz))
3385 if (NULL != cp) {
3392 ssz + cp->val.sz + 1);
3393 memcpy(res + ssz, cp->val.p, cp->val.sz);
3394 ssz += cp->val.sz;
3395 p += (int)cp->key.sz;
3446 roff_getcontrol(const struct roff *r, const char *cp, int *ppos)
3452 if (0 != r->control && cp[pos] == r->control)
3456 else if ('\\' == cp[pos] && '.' == cp[pos + 1])
3458 else if ('.' == cp[pos] || '\'' == cp[pos])
3463 while (' ' == cp[pos] || '\t' == cp[pos])