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

Diff for /mandoc/man.c between version 1.80 and 1.85

version 1.80, 2010/06/27 16:18:13 version 1.85, 2010/08/07 20:57:33
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 21 
Line 21 
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  
 #include <stdarg.h>  #include <stdarg.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
   
 #include "mandoc.h"  #include "mandoc.h"
 #include "regs.h"  
 #include "libman.h"  #include "libman.h"
 #include "libmandoc.h"  #include "libmandoc.h"
   
Line 42  const char *const __man_macronames[MAN_MAX] = {   
Line 40  const char *const __man_macronames[MAN_MAX] = {   
         "nf",           "fi",           "r",            "RE",          "nf",           "fi",           "r",            "RE",
         "RS",           "DT",           "UC",           "PD",          "RS",           "DT",           "UC",           "PD",
         "Sp",           "Vb",           "Ve",           "AT",          "Sp",           "Vb",           "Ve",           "AT",
           "in"
         };          };
   
 const   char * const *man_macronames = __man_macronames;  const   char * const *man_macronames = __man_macronames;
Line 410  man_ptext(struct man *m, int line, char *buf, int offs
Line 409  man_ptext(struct man *m, int line, char *buf, int offs
          */           */
   
         assert(i);          assert(i);
         if (mandoc_eos(buf, (size_t)i))          if (mandoc_eos(buf, (size_t)i, 0))
                 m->last->flags |= MAN_EOS;                  m->last->flags |= MAN_EOS;
   
 descope:  descope:
Line 483  man_pmacro(struct man *m, int ln, char *buf, int offs)
Line 482  man_pmacro(struct man *m, int ln, char *buf, int offs)
   
         /* Copy the first word into a nil-terminated buffer. */          /* Copy the first word into a nil-terminated buffer. */
   
         for (j = 0; j < 4; j++, i++) {          for (j = 0; j < 4; j++, i++)
                 if ('\0' == (mac[j] = buf[i]))                  if ('\0' == (mac[j] = buf[i]))
                         break;                          break;
                 else if (' ' == buf[i])                  else if (' ' == buf[i])
                         break;                          break;
   
                 /* Check for invalid characters. */  
   
                 if (isgraph((u_char)buf[i]))  
                         continue;  
                 if ( ! man_pmsg(m, ln, i, MANDOCERR_BADCHAR))  
                         return(0);  
                 i--;  
         }  
   
         mac[j] = '\0';          mac[j] = '\0';
   

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.85

CVSweb