+/*
+ * Parse one word.
+ * If it is a macro, call it and return 1.
+ * Otherwise, allocate it and return 0.
+ */
+static int
+macro_or_word(MACRO_PROT_ARGS, int parsed)
+{
+ char *p;
+ enum mdoct ntok;
+
+ p = buf + ppos;
+ ntok = MDOC_MAX;
+ if (*p == '"')
+ p++;
+ else if (parsed && ! (mdoc->flags & MDOC_PHRASELIT))
+ ntok = lookup(mdoc, tok, line, ppos, p);
+
+ if (ntok == MDOC_MAX) {
+ dword(mdoc, line, ppos, p, DELIM_MAX, tok == MDOC_MAX ||
+ mdoc_macros[tok].flags & MDOC_JOIN);
+ return(0);
+ } else {
+ if (mdoc_macros[tok].fp == in_line_eoln)
+ rew_elem(mdoc, tok);
+ mdoc_macro(mdoc, ntok, line, ppos, pos, buf);
+ if (tok == MDOC_MAX)
+ append_delims(mdoc, line, pos, buf);
+ return(1);
+ }
+}
+