Lines Matching refs:sz
288 size_t sz;
316 sz = strlen(p + pos) + 1;
317 ep->data = mandoc_realloc(ep->data, ep->sz + sz + 1);
321 if (0 == ep->sz)
324 ep->sz += sz;
325 strlcat(ep->data, p + pos, ep->sz + 1);
326 strlcat(ep->data, " ", ep->sz + 1);
349 eqn_def_find(struct eqn_node *ep, const char *key, size_t sz)
355 ep->defs[i].keysz, key, sz))
367 eqn_next(struct eqn_node *ep, char quote, size_t *sz, int repl)
374 if (NULL == sz)
375 sz = &dummy;
414 *sz = (size_t)(next - start);
415 ep->cur += *sz;
428 *sz = (size_t)(next - start);
429 ep->cur += *sz;
437 if (NULL != (def = eqn_def_find(ep, start, *sz))) {
438 diff = def->valsz - *sz;
440 if (def->valsz > *sz) {
441 ep->sz += diff;
442 ep->data = mandoc_realloc(ep->data, ep->sz + 1);
443 ep->data[ep->sz] = '\0';
447 diff = def->valsz - *sz;
448 memmove(start + *sz + diff, start + *sz,
449 (strlen(start) - *sz) + 1);
462 eqn_nexttok(struct eqn_node *ep, size_t *sz)
465 return(eqn_next(ep, '"', sz, 1));
472 eqn_nextrawtok(struct eqn_node *ep, size_t *sz)
475 return(eqn_next(ep, '"', sz, 0));
492 size_t i, sz;
500 if (NULL == (start = eqn_nexttok(ep, &sz)))
505 *p = mandoc_strndup(start, sz);
512 if (STRNEQ(start, sz, eqn_toks[i], strlen(eqn_toks[i])))
517 *p = mandoc_strndup(start, sz);
600 size_t sz;
602 if ((start = eqn_nextrawtok(ep, &sz)) == NULL)
625 size_t sz;
627 if ((start = eqn_nextrawtok(ep, &sz)) == NULL) {
632 if ((def = eqn_def_find(ep, start, sz)) == NULL)
644 size_t sz;
648 if ((start = eqn_nextrawtok(ep, &sz)) == NULL) {
658 if (NULL == (def = eqn_def_find(ep, start, sz))) {
673 def->key = mandoc_strndup(start, sz);
674 def->keysz = sz;
677 start = eqn_next(ep, ep->data[(int)ep->cur], &sz, 0);
688 def->val = mandoc_strndup(start, sz);
689 def->valsz = sz;
702 size_t i, sz;
858 if (NULL == (start = eqn_nexttok(ep, &sz))) {
863 size = mandoc_strntoi(start, sz, 10);
972 if (NULL == (start = eqn_nexttok(ep, &sz))) {
979 if (STRNEQ(start, sz, "ceiling", 7)) {
982 } else if (STRNEQ(start, sz, "floor", 5)) {
986 parent->right = mandoc_strndup(start, sz);
1008 (start = eqn_nexttok(ep, &sz)) == NULL) {
1016 if (STRNEQ(start, sz, "ceiling", 7)) {
1019 } else if (STRNEQ(start, sz, "floor", 5)) {
1023 parent->left = mandoc_strndup(start, sz);