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

Diff for /src/usr.bin/mandoc/mdoc.c between version 1.5 and 1.6

version 1.5, 2009/06/15 18:41:13 version 1.6, 2009/06/18 22:16:56
Line 242 
Line 242 
 }  }
   
   
 void  
 mdoc_vmsg(struct mdoc *mdoc, int ln, int pos, const char *fmt, ...)  
 {  
         char              buf[256];  
         va_list           ap;  
   
         if (NULL == mdoc->cb.mdoc_msg)  
                 return;  
   
         va_start(ap, fmt);  
         (void)vsnprintf(buf, sizeof(buf) - 1, fmt, ap);  
         va_end(ap);  
         (*mdoc->cb.mdoc_msg)(mdoc->data, ln, pos, buf);  
 }  
   
   
 int  int
 mdoc_verr(struct mdoc *mdoc, int ln, int pos,  mdoc_verr(struct mdoc *mdoc, int ln, int pos,
                 const char *fmt, ...)                  const char *fmt, ...)
Line 293 
Line 277 
   
   
 int  int
 mdoc_nwarn(struct mdoc *mdoc, const struct mdoc_node *node, enum mdoc_warn type,  
                 const char *fmt, ...)  
 {  
         char             buf[256];  
         va_list          ap;  
   
         if (NULL == mdoc->cb.mdoc_warn)  
                 return(0);  
   
         va_start(ap, fmt);  
         (void)vsnprintf(buf, sizeof(buf) - 1, fmt, ap);  
         va_end(ap);  
         return((*mdoc->cb.mdoc_warn)(mdoc->data, node->line, node->pos, type,  
             buf));  
 }  
   
 int  
 mdoc_nerr(struct mdoc *mdoc, const struct mdoc_node *node, const char *fmt, ...)  mdoc_nerr(struct mdoc *mdoc, const struct mdoc_node *node, const char *fmt, ...)
 {  {
         char             buf[256];          char             buf[256];
Line 356 
Line 323 
         va_end(ap);          va_end(ap);
         return((*mdoc->cb.mdoc_err)(mdoc->data, mdoc->last->line,          return((*mdoc->cb.mdoc_err)(mdoc->data, mdoc->last->line,
             mdoc->last->pos, buf));              mdoc->last->pos, buf));
 }  
   
   
 void  
 mdoc_msg(struct mdoc *mdoc, const char *fmt, ...)  
 {  
         char              buf[256];  
         va_list           ap;  
   
         if (NULL == mdoc->cb.mdoc_msg)  
                 return;  
   
         va_start(ap, fmt);  
         (void)vsnprintf(buf, sizeof(buf) - 1, fmt, ap);  
         va_end(ap);  
         (*mdoc->cb.mdoc_msg)(mdoc->data, mdoc->last->line, mdoc->last->pos,  
             buf);  
 }  
   
   
 void  
 mdoc_pmsg(struct mdoc *mdoc, int line, int pos, const char *fmt, ...)  
 {  
         char              buf[256];  
         va_list           ap;  
   
         if (NULL == mdoc->cb.mdoc_msg)  
                 return;  
   
         va_start(ap, fmt);  
         (void)vsnprintf(buf, sizeof(buf) - 1, fmt, ap);  
         va_end(ap);  
         (*mdoc->cb.mdoc_msg)(mdoc->data, line, pos, buf);  
 }  }
   
   

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6