- if ('\0' == arg->value[0][0])
- return(0);
- else if (0 == strcmp(arg->value[0], "left"))
- return(0);
- else if (0 == strcmp(arg->value[0], "indent"))
- return(INDENT + 1);
- else if (0 == strcmp(arg->value[0], "indent-two"))
- return((INDENT + 1) * 2);
- else if ( ! a2roffsu(arg->value[0], &su, SCALE_MAX))
- SCALE_HS_INIT(&su, strlen(arg->value[0]));
-
- return(term_hspan(&su));
-}
-
-
-/*
- * Return 1 if an argument has a particular argument value or 0 if it
- * does not. See arg_getattr().
- */
-static int
-arg_hasattr(int arg, const struct mdoc_node *n)
-{
-
- return(-1 != arg_getattr(arg, n));
-}
-
-
-/*
- * Get the index of an argument in a node's argument list or -1 if it
- * does not exist. See arg_getattrs().
- */
-static int
-arg_getattr(int v, const struct mdoc_node *n)
-{
- int val;
-
- return(arg_getattrs(&v, &val, 1, n) ? val : -1);
-}
-
-
-/*
- * Walk through the argument list for a node and fill an array "vals"
- * with the positions of the argument structures listed in "keys".
- * Return the number of elements that were written into "vals", which
- * can be zero.
- */
-static int
-arg_getattrs(const int *keys, int *vals,
- size_t sz, const struct mdoc_node *n)
-{
- int i, j, k;
-
- if (NULL == n->args)
- return(0);
-
- for (k = i = 0; i < (int)n->args->argc; i++)
- for (j = 0; j < (int)sz; j++)
- if (n->args->argv[i].arg == keys[j]) {
- vals[j] = i;
- k++;
- }
- return(k);
+ end = a2roffsu(v, &su, SCALE_MAX);
+ if (end == NULL || *end != '\0') {
+ SCALE_HS_INIT(&su, term_strlen(p, v));
+ su.scale /= term_strlen(p, "0");
+ }
+ return term_hen(p, &su);