[BACK]Return to term.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/term.c between version 1.51 and 1.52

version 1.51, 2009/03/09 14:19:59 version 1.52, 2009/03/10 11:16:43
Line 733  termp_st_pre(DECL_ARGS)
Line 733  termp_st_pre(DECL_ARGS)
 {  {
         const char      *cp;          const char      *cp;
   
         if (node->child) {          if (node->child && (cp = mdoc_a2st(node->child->string)))
                 if (MDOC_TEXT != node->child->type)                  word(p, cp);
                         errx(1, "expected text line arguments");  
                 if ((cp = mdoc_a2st(node->child->string)))  
                         word(p, cp);  
         }  
         return(0);          return(0);
 }  }
   
Line 847  termp_xr_pre(DECL_ARGS)
Line 843  termp_xr_pre(DECL_ARGS)
   
         if (NULL == (n = node->child))          if (NULL == (n = node->child))
                 errx(1, "expected text line argument");                  errx(1, "expected text line argument");
         if (MDOC_TEXT != n->type)  
                 errx(1, "expected text line argument");  
   
         word(p, n->string);          word(p, n->string);
   
         if (NULL == (n = n->next))          if (NULL == (n = n->next))
                 return(0);                  return(0);
         if (MDOC_TEXT != n->type)  
                 errx(1, "expected text line argument");  
   
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
         word(p, "(");          word(p, "(");
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
         word(p, n->string);          word(p, n->string);
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
         word(p, ")");          word(p, ")");
   
         return(0);          return(0);
 }  }
   
Line 990  termp_lb_pre(DECL_ARGS)
Line 978  termp_lb_pre(DECL_ARGS)
   
         if (NULL == node->child)          if (NULL == node->child)
                 errx(1, "expected text line argument");                  errx(1, "expected text line argument");
         if (MDOC_TEXT != node->child->type)  
                 errx(1, "expected text line argument");  
   
         if ((lb = mdoc_a2lib(node->child->string))) {          if ((lb = mdoc_a2lib(node->child->string))) {
                 word(p, lb);                  word(p, lb);
                 return(0);                  return(0);
         }          }
   
         word(p, "library");          word(p, "library");
         return(1);          return(1);
 }  }
Line 1103  termp_fn_pre(DECL_ARGS)
Line 1087  termp_fn_pre(DECL_ARGS)
   
         if (NULL == node->child)          if (NULL == node->child)
                 errx(1, "expected text line arguments");                  errx(1, "expected text line arguments");
         if (MDOC_TEXT != node->child->type)  
                 errx(1, "expected text line arguments");  
   
         /* FIXME: can be "type funcname" "type varname"... */          /* FIXME: can be "type funcname" "type varname"... */
   
Line 1116  termp_fn_pre(DECL_ARGS)
Line 1098  termp_fn_pre(DECL_ARGS)
   
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
         for (n = node->child->next; n; n = n->next) {          for (n = node->child->next; n; n = n->next) {
                 if (MDOC_TEXT != n->type)  
                         errx(1, "expected text line arguments");  
                 p->flags |= ttypes[TTYPE_FUNC_ARG];                  p->flags |= ttypes[TTYPE_FUNC_ARG];
                 word(p, n->string);                  word(p, n->string);
                 p->flags &= ~ttypes[TTYPE_FUNC_ARG];                  p->flags &= ~ttypes[TTYPE_FUNC_ARG];
Line 1167  termp_fa_pre(DECL_ARGS)
Line 1147  termp_fa_pre(DECL_ARGS)
         }          }
   
         for (n = node->child; n; n = n->next) {          for (n = node->child; n; n = n->next) {
                 if (MDOC_TEXT != n->type)  
                         errx(1, "expected text line arguments");  
   
                 p->flags |= ttypes[TTYPE_FUNC_ARG];                  p->flags |= ttypes[TTYPE_FUNC_ARG];
                 word(p, n->string);                  word(p, n->string);
                 p->flags &= ~ttypes[TTYPE_FUNC_ARG];                  p->flags &= ~ttypes[TTYPE_FUNC_ARG];
   
                 if (n->next)                  if (n->next)
                         word(p, ",");                          word(p, ",");
         }          }
Line 1536  termp_at_pre(DECL_ARGS)
Line 1512  termp_at_pre(DECL_ARGS)
   
         att = NULL;          att = NULL;
   
         if (node->child) {          if (node->child)
                 if (MDOC_TEXT != node->child->type)  
                         errx(1, "expected text line argument");  
                 att = mdoc_a2att(node->child->string);                  att = mdoc_a2att(node->child->string);
         }  
   
         if (NULL == att)          if (NULL == att)
                 att = "AT&T UNIX";                  att = "AT&T UNIX";
   
Line 1764  termp_lk_pre(DECL_ARGS)
Line 1736  termp_lk_pre(DECL_ARGS)
         const struct mdoc_node *n;          const struct mdoc_node *n;
   
         if (NULL == (n = node->child))          if (NULL == (n = node->child))
                 errx(1, "expected text line argument");                  errx(1, "expected line argument");
         if (MDOC_TEXT != n->type)  
                 errx(1, "expected text line argument");  
   
         p->flags |= ttypes[TTYPE_LINK_ANCHOR];          p->flags |= ttypes[TTYPE_LINK_ANCHOR];
         word(p, n->string);          word(p, n->string);
Line 1776  termp_lk_pre(DECL_ARGS)
Line 1746  termp_lk_pre(DECL_ARGS)
   
         p->flags |= ttypes[TTYPE_LINK_TEXT];          p->flags |= ttypes[TTYPE_LINK_TEXT];
         for ( ; n; n = n->next) {          for ( ; n; n = n->next) {
                 if (MDOC_TEXT != n->type)  
                         errx(1, "expected text line argument");  
                 word(p, n->string);                  word(p, n->string);
         }          }
         p->flags &= ~ttypes[TTYPE_LINK_TEXT];          p->flags &= ~ttypes[TTYPE_LINK_TEXT];

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

CVSweb