[BACK]Return to mdoc_term.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mdoc_term.c between version 1.9 and 1.10

version 1.9, 2009/06/18 21:45:31 version 1.10, 2009/06/18 21:50:45
Line 583 
Line 583 
                         break;                          break;
                 }                  }
   
           /* FIXME: mandated by parser. */
   
         errx(1, "list type not supported");          errx(1, "list type not supported");
         /* NOTREACHED */          /* NOTREACHED */
 }  }
Line 599 
Line 601 
                 return(INDENT);                  return(INDENT);
         if (0 == strcmp(*arg->value, "indent-two"))          if (0 == strcmp(*arg->value, "indent-two"))
                 return(INDENT * 2);                  return(INDENT * 2);
   
           /* FIXME: needs to support field-widths (10n, etc.). */
   
         return(strlen(*arg->value));          return(strlen(*arg->value));
 }  }
   
Line 1060 
Line 1065 
 {  {
         int              i;          int              i;
   
           /* FIXME: mandated by parser. */
   
         if (-1 == (i = arg_getattr(MDOC_Std, node)))          if (-1 == (i = arg_getattr(MDOC_Std, node)))
                 errx(1, "expected -std argument");                  errx(1, "expected -std argument");
         if (1 != node->args->argv[i].sz)          if (1 != node->args->argv[i].sz)
Line 1093 
Line 1100 
 {  {
         int              i;          int              i;
   
           /* FIXME: mandated by parser? */
   
         if (-1 == (i = arg_getattr(MDOC_Std, node)))          if (-1 == (i = arg_getattr(MDOC_Std, node)))
                 errx(1, "expected -std argument");                  errx(1, "expected -std argument");
         if (1 != node->args->argv[i].sz)          if (1 != node->args->argv[i].sz)
Line 1146 
Line 1155 
 {  {
         const struct mdoc_node *n;          const struct mdoc_node *n;
   
         if (NULL == (n = node->child))          assert(node->child && MDOC_TEXT == node->child->type);
                 errx(1, "expected text line argument");          n = node->child;
   
         term_word(p, n->string);          term_word(p, n->string);
         if (NULL == (n = n->next))          if (NULL == (n = n->next))
                 return(0);                  return(0);
Line 1281 
Line 1291 
 {  {
         const char      *lb;          const char      *lb;
   
         if (NULL == node->child)          assert(node->child && 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))) {
                 term_word(p, lb);                  term_word(p, lb);
                 return(0);                  return(0);
Line 1390 
Line 1399 
 {  {
         const struct mdoc_node *n;          const struct mdoc_node *n;
   
         if (NULL == node->child)          assert(node->child && 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 1498 
Line 1506 
         else if (MDOC_BODY != node->type)          else if (MDOC_BODY != node->type)
                 return(1);                  return(1);
   
           /* FIXME: display type should be mandated by parser. */
   
         if (NULL == node->parent->args)          if (NULL == node->parent->args)
                 errx(1, "missing display type");                  errx(1, "missing display type");
   
Line 1623 
Line 1633 
 }  }
   
   
 /* FIXME: consolidate the following into termp_system. */  
   
   
 /* ARGSUSED */  /* ARGSUSED */
 static int  static int
 termp_ox_pre(DECL_ARGS)  termp_ox_pre(DECL_ARGS)
Line 1949 
Line 1956 
   
         p->flags |= ttypes[TTYPE_FUNC_NAME];          p->flags |= ttypes[TTYPE_FUNC_NAME];
         for (n = node->child; n; n = n->next) {          for (n = node->child; n; n = n->next) {
                 if (MDOC_TEXT != n->type)                  assert(MDOC_TEXT == n->type);
                         errx(1, "expected text line argument");  
                 term_word(p, n->string);                  term_word(p, n->string);
         }          }
         p->flags &= ~ttypes[TTYPE_FUNC_NAME];          p->flags &= ~ttypes[TTYPE_FUNC_NAME];
Line 1994 
Line 2000 
                 return(1);                  return(1);
         }          }
   
         if (MDOC_TEXT != n->type)          assert(MDOC_TEXT == n->type);
                 errx(1, "expected text line arguments");  
   
         if (0 == strcmp("Em", n->string))          if (0 == strcmp("Em", n->string))
                 TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_EMPH]);                  TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_EMPH]);
         else if (0 == strcmp("Sy", n->string))          else if (0 == strcmp("Sy", n->string))
Line 2032 
Line 2036 
 termp_sm_pre(DECL_ARGS)  termp_sm_pre(DECL_ARGS)
 {  {
   
         if (NULL == node->child || MDOC_TEXT != node->child->type)          assert(node->child && MDOC_TEXT == node->child->type);
                 errx(1, "expected boolean line argument");  
   
         if (0 == strcmp("on", node->child->string)) {          if (0 == strcmp("on", node->child->string)) {
                 p->flags &= ~TERMP_NONOSPACE;                  p->flags &= ~TERMP_NONOSPACE;
                 p->flags &= ~TERMP_NOSPACE;                  p->flags &= ~TERMP_NOSPACE;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10