Lines Matching defs:reg
2504 struct roffreg *reg;
2507 reg = r->regtab;
2509 while (reg && strcmp(name, reg->key.p))
2510 reg = reg->next;
2512 if (NULL == reg) {
2514 reg = mandoc_malloc(sizeof(struct roffreg));
2515 reg->key.p = mandoc_strdup(name);
2516 reg->key.sz = strlen(name);
2517 reg->val = 0;
2518 reg->next = r->regtab;
2519 r->regtab = reg;
2523 reg->val += val;
2525 reg->val -= val;
2527 reg->val = val;
2563 struct roffreg *reg;
2572 for (reg = r->regtab; reg; reg = reg->next)
2573 if (0 == strcmp(name, reg->key.p))
2574 return reg->val;
2582 struct roffreg *reg;
2591 for (reg = r->regtab; reg; reg = reg->next)
2592 if (len == reg->key.sz &&
2593 0 == strncmp(name, reg->key.p, len))
2594 return reg->val;
2602 struct roffreg *reg;
2611 for (reg = r->regtab; reg; reg = reg->next)
2612 if (len == reg->key.sz &&
2613 0 == strncmp(name, reg->key.p, len))
2620 roff_freereg(struct roffreg *reg)
2624 while (NULL != reg) {
2625 free(reg->key.p);
2626 old_reg = reg;
2627 reg = reg->next;
2662 struct roffreg *reg, **prev;
2674 reg = *prev;
2675 if (reg == NULL || !strcmp(name, reg->key.p))
2677 prev = ®->next;
2679 if (reg != NULL) {
2680 *prev = reg->next;
2681 free(reg->key.p);
2682 free(reg);