Lines Matching refs:sz

122 	size_t		 sz;  member
127 #define EQNSTREQ(x, p, sz) \ argument
128 STRNEQ((x)->name, (x)->sz, (p), (sz))
285 size_t sz; in eqn_read() local
312 sz = strlen(p + pos) + 1; in eqn_read()
313 ep->data = mandoc_realloc(ep->data, ep->sz + sz + 1); in eqn_read()
317 if (0 == ep->sz) in eqn_read()
320 ep->sz += sz; in eqn_read()
321 strlcat(ep->data, p + pos, ep->sz + 1); in eqn_read()
322 strlcat(ep->data, " ", ep->sz + 1); in eqn_read()
330 size_t sz; in eqn_alloc() local
336 sz = strlen(name); in eqn_alloc()
337 assert(sz); in eqn_alloc()
339 sz--; in eqn_alloc()
340 end = name + (int)sz; in eqn_alloc()
342 p->eqn.name = mandoc_strndup(name, sz + 1); in eqn_alloc()
368 if (0 == ep->sz) in eqn_end()
399 size_t sz; in eqn_matrix() local
405 if (NULL == (start = eqn_nexttok(ep, &sz))) { in eqn_matrix()
409 if ( ! STRNEQ(start, sz, "{", 1)) { in eqn_matrix()
434 start = eqn_nexttok(ep, &sz); in eqn_matrix()
436 if (STRNEQ(start, sz, "}", 1)) in eqn_matrix()
448 size_t sz; in eqn_list() local
454 if (NULL == (start = eqn_nexttok(ep, &sz))) { in eqn_list()
458 if ( ! STRNEQ(start, sz, "{", 1)) { in eqn_list()
465 start = eqn_nexttok(ep, &sz); in eqn_list()
467 if ( ! STRNEQ(start, sz, "above", 5)) in eqn_list()
478 start = eqn_nexttok(ep, &sz); in eqn_list()
480 if (STRNEQ(start, sz, "}", 1)) in eqn_list()
490 size_t sz; in eqn_box() local
498 if (NULL == (start = eqn_nexttok(ep, &sz))) in eqn_box()
501 if (STRNEQ(start, sz, "}", 1)) in eqn_box()
503 else if (STRNEQ(start, sz, "right", 5)) in eqn_box()
505 else if (STRNEQ(start, sz, "above", 5)) in eqn_box()
507 else if (STRNEQ(start, sz, "mark", 4)) in eqn_box()
509 else if (STRNEQ(start, sz, "lineup", 6)) in eqn_box()
513 if ( ! EQNSTREQ(&eqnparts[i].str, start, sz)) in eqn_box()
519 if (STRNEQ(start, sz, "{", 1)) { in eqn_box()
526 start = eqn_nexttok(ep, &sz); in eqn_box()
528 if (STRNEQ(start, sz, "}", 1)) in eqn_box()
535 if ( ! EQNSTREQ(&eqnpiles[i], start, sz)) in eqn_box()
542 if (STRNEQ(start, sz, "matrix", 6)) in eqn_box()
545 if (STRNEQ(start, sz, "left", 4)) { in eqn_box()
546 if (NULL == (start = eqn_nexttok(ep, &sz))) { in eqn_box()
550 left = mandoc_strndup(start, sz); in eqn_box()
560 start = eqn_nexttok(ep, &sz); in eqn_box()
562 if ( ! STRNEQ(start, sz, "right", 5)) in eqn_box()
564 if (NULL == (start = eqn_nexttok(ep, &sz))) { in eqn_box()
568 last->last->right = mandoc_strndup(start, sz); in eqn_box()
573 if ( ! EQNSTREQ(&eqnposs[i], start, sz)) in eqn_box()
588 if ( ! EQNSTREQ(&eqnmarks[i], start, sz)) in eqn_box()
603 if ( ! EQNSTREQ(&eqnfonts[i], start, sz)) in eqn_box()
613 if (STRNEQ(start, sz, "size", 4)) { in eqn_box()
614 if (NULL == (start = eqn_nexttok(ep, &sz))) { in eqn_box()
618 size = mandoc_strntoi(start, sz, 10); in eqn_box()
630 if (EQNSTREQ(&eqnsyms[i].str, start, sz)) { in eqn_box()
637 bp->text = mandoc_strndup(start, sz); in eqn_box()
693 eqn_nextrawtok(struct eqn_node *ep, size_t *sz) in eqn_nextrawtok() argument
696 return(eqn_next(ep, '"', sz, 0)); in eqn_nextrawtok()
700 eqn_nexttok(struct eqn_node *ep, size_t *sz) in eqn_nexttok() argument
703 return(eqn_next(ep, '"', sz, 1)); in eqn_nexttok()
714 eqn_next(struct eqn_node *ep, char quote, size_t *sz, int repl) in eqn_next() argument
721 if (NULL == sz) in eqn_next()
722 sz = &dummy; in eqn_next()
760 *sz = (size_t)(next - start); in eqn_next()
761 ep->cur += *sz; in eqn_next()
773 *sz = (size_t)(next - start); in eqn_next()
774 ep->cur += *sz; in eqn_next()
782 if (NULL != (def = eqn_def_find(ep, start, *sz))) { in eqn_next()
783 diff = def->valsz - *sz; in eqn_next()
785 if (def->valsz > *sz) { in eqn_next()
786 ep->sz += diff; in eqn_next()
787 ep->data = mandoc_realloc(ep->data, ep->sz + 1); in eqn_next()
788 ep->data[ep->sz] = '\0'; in eqn_next()
792 diff = def->valsz - *sz; in eqn_next()
793 memmove(start + *sz + diff, start + *sz, in eqn_next()
794 (strlen(start) - *sz) + 1); in eqn_next()
846 size_t sz; in eqn_do_define() local
850 if (NULL == (start = eqn_nextrawtok(ep, &sz))) { in eqn_do_define()
860 if (NULL == (def = eqn_def_find(ep, start, sz))) { in eqn_do_define()
874 ep->defs[i].keysz = sz; in eqn_do_define()
876 (ep->defs[i].key, sz + 1); in eqn_do_define()
878 memcpy(ep->defs[i].key, start, sz); in eqn_do_define()
879 ep->defs[i].key[(int)sz] = '\0'; in eqn_do_define()
883 start = eqn_next(ep, ep->data[(int)ep->cur], &sz, 0); in eqn_do_define()
890 def->valsz = sz; in eqn_do_define()
891 def->val = mandoc_realloc(def->val, sz + 1); in eqn_do_define()
892 memcpy(def->val, start, sz); in eqn_do_define()
893 def->val[(int)sz] = '\0'; in eqn_do_define()
912 size_t sz; in eqn_do_gsize() local
914 if (NULL == (start = eqn_nextrawtok(ep, &sz))) { in eqn_do_gsize()
918 ep->gsize = mandoc_strntoi(start, sz, 10); in eqn_do_gsize()
927 size_t sz; in eqn_do_undef() local
929 if (NULL == (start = eqn_nextrawtok(ep, &sz))) { in eqn_do_undef()
932 } else if (NULL != (def = eqn_def_find(ep, start, sz))) in eqn_do_undef()
939 eqn_def_find(struct eqn_node *ep, const char *key, size_t sz) in eqn_def_find() argument
945 ep->defs[i].keysz, key, sz)) in eqn_def_find()