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

Diff for /mandoc/Attic/mlg.c between version 1.17 and 1.18

version 1.17, 2008/12/07 14:38:57 version 1.18, 2008/12/07 16:41:04
Line 234  mlg_fmt(int tok)
Line 234  mlg_fmt(int tok)
                                 "is returned and the global variable "                                  "is returned and the global variable "
                                 "<span class=\"inline-Va\">errno</span> "                                  "<span class=\"inline-Va\">errno</span> "
                                 "is set to indicate the error.");                                  "is set to indicate the error.");
           case (ROFF_In):
                   return("#include &lt;%s&gt;");
         default:          default:
                 break;                  break;
         }          }
Line 614  mlg_roffspecial(void *arg, int tok, const char *start,
Line 616  mlg_roffspecial(void *arg, int tok, const char *start,
                 break;                  break;
         }          }
   
           /*
            * Handle macros put into different-token tags.
            */
   
           switch (tok) {
           case (ROFF_Fn):
                   assert(*more);
                   if ( ! mlg_begintag(p, MD_NS_INLINE, tok, NULL, more))
                           return(0);
                   if ( ! ml_putstring(p->mbuf, *more++, &p->pos))
                           return(0);
                   if ( ! mlg_endtag(p, MD_NS_INLINE, tok))
                           return(0);
                   if (*more) {
                           if ( ! ml_nputs(p->mbuf, "(", 1, &p->pos))
                                   return(0);
                           p->flags |= ML_OVERRIDE_ONE;
                           if ( ! mlg_begintag(p, MD_NS_INLINE,
                                                   ROFF_Fa, NULL, more))
                                   return(0);
                           if ( ! ml_putstring(p->mbuf, *more++, &p->pos))
                                   return(0);
                           if ( ! mlg_endtag(p, MD_NS_INLINE, ROFF_Fa))
                                   return(0);
                           while (*more) {
                                   if ( ! ml_nputs(p->mbuf, ", ", 2, &p->pos))
                                           return(0);
                                   if ( ! mlg_begintag(p, MD_NS_INLINE, ROFF_Fa, NULL, more))
                                           return(0);
                                   if ( ! ml_putstring(p->mbuf, *more++, &p->pos))
                                           return(0);
                                   if ( ! mlg_endtag(p, MD_NS_INLINE, ROFF_Fa))
                                           return(0);
                           }
                           if ( ! ml_nputs(p->mbuf, ")", 1, &p->pos))
                                   return(0);
                   }
                   return(1);
           default:
                   break;
           }
   
           /*
            * Now handle macros in their environments.
            */
   
         if ( ! mlg_begintag(p, MD_NS_INLINE, tok, NULL, more))          if ( ! mlg_begintag(p, MD_NS_INLINE, tok, NULL, more))
                 return(0);                  return(0);
   
Line 656  mlg_roffspecial(void *arg, int tok, const char *start,
Line 704  mlg_roffspecial(void *arg, int tok, const char *start,
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (ROFF_Nm):          case (ROFF_Nm):
                 assert(*more);                  assert(*more);
                 if ( ! ml_puts(p->mbuf, *more++, &p->pos))                  if ( ! ml_putstring(p->mbuf, *more++, &p->pos))
                         return(0);                          return(0);
                 assert(NULL == *more);                  assert(NULL == *more);
                 break;                  break;
   
           case (ROFF_In):
                   /* NOTREACHED */
         case (ROFF_Ex):          case (ROFF_Ex):
                 /* NOTREACHED */                  /* NOTREACHED */
         case (ROFF_Rv):          case (ROFF_Rv):
                 assert(*more);                  assert(*more);
                   /* FIXME: *more must be ml-filtered. */
                 (void)snprintf(buf, sizeof(buf),                  (void)snprintf(buf, sizeof(buf),
                                 mlg_fmt(tok), *more++);                                  mlg_fmt(tok), *more++);
                 if ( ! ml_puts(p->mbuf, buf, &p->pos))                  if ( ! ml_puts(p->mbuf, buf, &p->pos))

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

CVSweb