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

Diff for /mandoc/mdoc_man.c between version 1.131 and 1.132

version 1.131, 2018/12/30 00:49:55 version 1.132, 2019/01/04 03:17:36
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2011-2018 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2011-2019 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * 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 104  static int   pre_lk(DECL_ARGS);
Line 104  static int   pre_lk(DECL_ARGS);
 static  int       pre_li(DECL_ARGS);  static  int       pre_li(DECL_ARGS);
 static  int       pre_nm(DECL_ARGS);  static  int       pre_nm(DECL_ARGS);
 static  int       pre_no(DECL_ARGS);  static  int       pre_no(DECL_ARGS);
   static  void      pre_noarg(DECL_ARGS);
 static  int       pre_ns(DECL_ARGS);  static  int       pre_ns(DECL_ARGS);
 static  void      pre_onearg(DECL_ARGS);  static  void      pre_onearg(DECL_ARGS);
 static  int       pre_pp(DECL_ARGS);  static  int       pre_pp(DECL_ARGS);
Line 128  static void   print_node(DECL_ARGS);
Line 129  static void   print_node(DECL_ARGS);
 static const void_fp roff_man_acts[ROFF_MAX] = {  static const void_fp roff_man_acts[ROFF_MAX] = {
         pre_br,         /* br */          pre_br,         /* br */
         pre_onearg,     /* ce */          pre_onearg,     /* ce */
           pre_noarg,      /* fi */
         pre_ft,         /* ft */          pre_ft,         /* ft */
         pre_onearg,     /* ll */          pre_onearg,     /* ll */
         pre_onearg,     /* mc */          pre_onearg,     /* mc */
           pre_noarg,      /* nf */
         pre_onearg,     /* po */          pre_onearg,     /* po */
         pre_onearg,     /* rj */          pre_onearg,     /* rj */
         pre_sp,         /* sp */          pre_sp,         /* sp */
Line 936  post_aq(DECL_ARGS)
Line 939  post_aq(DECL_ARGS)
 static int  static int
 pre_bd(DECL_ARGS)  pre_bd(DECL_ARGS)
 {  {
   
         outflags &= ~(MMAN_PP | MMAN_sp | MMAN_br);          outflags &= ~(MMAN_PP | MMAN_sp | MMAN_br);
   
         if (DISP_unfilled == n->norm->Bd.type ||          if (DISP_unfilled == n->norm->Bd.type ||
Line 951  pre_bd(DECL_ARGS)
Line 953  pre_bd(DECL_ARGS)
 static void  static void
 post_bd(DECL_ARGS)  post_bd(DECL_ARGS)
 {  {
           enum roff_tok    bef, now;
   
         /* Close out this display. */          /* Close out this display. */
         print_line(".RE", MMAN_nl);          print_line(".RE", MMAN_nl);
         if (DISP_unfilled == n->norm->Bd.type ||          bef = n->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi;
             DISP_literal  == n->norm->Bd.type)          if (n->last == NULL)
                 print_line(".fi", MMAN_nl);                  now = n->norm->Bd.type == DISP_unfilled ||
                       n->norm->Bd.type == DISP_literal ? ROFF_nf : ROFF_fi;
           else if (n->last->tok == ROFF_nf)
                   now = ROFF_nf;
           else if (n->last->tok == ROFF_fi)
                   now = ROFF_fi;
           else
                   now = n->last->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi;
           if (bef != now) {
                   outflags |= MMAN_nl;
                   print_word(".");
                   outflags &= ~MMAN_spc;
                   print_word(roff_name[bef]);
                   outflags |= MMAN_nl;
           }
   
         /* Maybe we are inside an enclosing list? */          /* Maybe we are inside an enclosing list? */
         if (NULL != n->parent->next)          if (NULL != n->parent->next)
Line 1607  pre_onearg(DECL_ARGS)
Line 1624  pre_onearg(DECL_ARGS)
 static int  static int
 pre_li(DECL_ARGS)  pre_li(DECL_ARGS)
 {  {
   
         font_push('R');          font_push('R');
         return 1;          return 1;
 }  }
Line 1640  pre_nm(DECL_ARGS)
Line 1656  pre_nm(DECL_ARGS)
 static void  static void
 post_nm(DECL_ARGS)  post_nm(DECL_ARGS)
 {  {
   
         switch (n->type) {          switch (n->type) {
         case ROFFT_BLOCK:          case ROFFT_BLOCK:
                 outflags &= ~MMAN_Bk;                  outflags &= ~MMAN_Bk;
Line 1658  post_nm(DECL_ARGS)
Line 1673  post_nm(DECL_ARGS)
 static int  static int
 pre_no(DECL_ARGS)  pre_no(DECL_ARGS)
 {  {
   
         outflags |= MMAN_spc_force;          outflags |= MMAN_spc_force;
         return 1;          return 1;
 }  }
   
   static void
   pre_noarg(DECL_ARGS)
   {
           outflags |= MMAN_nl;
           print_word(".");
           outflags &= ~MMAN_spc;
           print_word(roff_name[n->tok]);
           outflags |= MMAN_nl;
   }
   
 static int  static int
 pre_ns(DECL_ARGS)  pre_ns(DECL_ARGS)
 {  {
   
         outflags &= ~MMAN_spc;          outflags &= ~MMAN_spc;
         return 0;          return 0;
 }  }

Legend:
Removed from v.1.131  
changed lines
  Added in v.1.132

CVSweb