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

Diff for /mandoc/man_macro.c between version 1.75 and 1.80

version 1.75, 2012/11/17 00:26:33 version 1.80, 2013/12/31 23:23:10
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2012 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
    * Copyright (c) 2013 Franco Fichtner <franco@lastsummer.de>
  *   *
  * 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 88  const struct man_macro __man_macros[MAN_MAX] = {
Line 89  const struct man_macro __man_macros[MAN_MAX] = {
         { in_line_eoln, 0 }, /* OP */          { in_line_eoln, 0 }, /* OP */
         { in_line_eoln, MAN_BSCOPE }, /* EX */          { in_line_eoln, MAN_BSCOPE }, /* EX */
         { in_line_eoln, MAN_BSCOPE }, /* EE */          { in_line_eoln, MAN_BSCOPE }, /* EE */
           { blk_exp, MAN_BSCOPE | MAN_EXPLICIT }, /* UR */
           { blk_close, 0 }, /* UE */
 };  };
   
 const   struct man_macro * const man_macros = __man_macros;  const   struct man_macro * const man_macros = __man_macros;
Line 284  blk_close(MACRO_PROT_ARGS)
Line 287  blk_close(MACRO_PROT_ARGS)
         case (MAN_RE):          case (MAN_RE):
                 ntok = MAN_RS;                  ntok = MAN_RS;
                 break;                  break;
           case (MAN_UE):
                   ntok = MAN_UR;
                   break;
         default:          default:
                 abort();                  abort();
                 /* NOTREACHED */                  /* NOTREACHED */
Line 293  blk_close(MACRO_PROT_ARGS)
Line 299  blk_close(MACRO_PROT_ARGS)
                 if (ntok == nn->tok && MAN_BLOCK == nn->type)                  if (ntok == nn->tok && MAN_BLOCK == nn->type)
                         break;                          break;
   
         if (NULL != nn)          if (NULL == nn) {
                 man_unscope(man, nn, MANDOCERR_MAX);  
         else  
                 man_pmsg(man, line, ppos, MANDOCERR_NOSCOPE);                  man_pmsg(man, line, ppos, MANDOCERR_NOSCOPE);
                   if ( ! rew_scope(MAN_BLOCK, man, MAN_PP))
                           return(0);
           } else
                   man_unscope(man, nn, MANDOCERR_MAX);
   
         return(1);          return(1);
 }  }
Line 423  in_line_eoln(MACRO_PROT_ARGS)
Line 431  in_line_eoln(MACRO_PROT_ARGS)
                 if ( ! man_word_alloc(man, line, la, p))                  if ( ! man_word_alloc(man, line, la, p))
                         return(0);                          return(0);
         }          }
   
           /*
            * Append MAN_EOS in case the last snipped argument
            * ends with a dot, e.g. `.IR syslog (3).'
            */
   
           if (n != man->last &&
               mandoc_eos(man->last->string, strlen(man->last->string)))
                   man->last->flags |= MAN_EOS;
   
         /*          /*
          * If no arguments are specified and this is MAN_SCOPED (i.e.,           * If no arguments are specified and this is MAN_SCOPED (i.e.,

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

CVSweb