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

Diff for /mandoc/mdoc_term.c between version 1.338 and 1.339

version 1.338, 2017/01/10 13:47:00 version 1.339, 2017/01/10 21:59:47
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) 2010, 2012-2016 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2013 Franco Fichtner <franco@lastsummer.de>   * 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
Line 80  static void   termp_pf_post(DECL_ARGS);
Line 80  static void   termp_pf_post(DECL_ARGS);
 static  void      termp_quote_post(DECL_ARGS);  static  void      termp_quote_post(DECL_ARGS);
 static  void      termp_sh_post(DECL_ARGS);  static  void      termp_sh_post(DECL_ARGS);
 static  void      termp_ss_post(DECL_ARGS);  static  void      termp_ss_post(DECL_ARGS);
   static  void      termp_xx_post(DECL_ARGS);
   
 static  int       termp__a_pre(DECL_ARGS);  static  int       termp__a_pre(DECL_ARGS);
 static  int       termp__t_pre(DECL_ARGS);  static  int       termp__t_pre(DECL_ARGS);
Line 189  static const struct termact termacts[MDOC_MAX] = {
Line 190  static const struct termact termacts[MDOC_MAX] = {
         { termp_bf_pre, NULL }, /* Bf */          { termp_bf_pre, NULL }, /* Bf */
         { termp_quote_pre, termp_quote_post }, /* Bo */          { termp_quote_pre, termp_quote_post }, /* Bo */
         { termp_quote_pre, termp_quote_post }, /* Bq */          { termp_quote_pre, termp_quote_post }, /* Bq */
         { termp_xx_pre, NULL }, /* Bsx */          { termp_xx_pre, termp_xx_post }, /* Bsx */
         { termp_bx_pre, NULL }, /* Bx */          { termp_bx_pre, NULL }, /* Bx */
         { termp_skip_pre, NULL }, /* Db */          { termp_skip_pre, NULL }, /* Db */
         { NULL, NULL }, /* Dc */          { NULL, NULL }, /* Dc */
Line 199  static const struct termact termacts[MDOC_MAX] = {
Line 200  static const struct termact termacts[MDOC_MAX] = {
         { NULL, NULL }, /* Ef */          { NULL, NULL }, /* Ef */
         { termp_em_pre, NULL }, /* Em */          { termp_em_pre, NULL }, /* Em */
         { termp_eo_pre, termp_eo_post }, /* Eo */          { termp_eo_pre, termp_eo_post }, /* Eo */
         { termp_xx_pre, NULL }, /* Fx */          { termp_xx_pre, termp_xx_post }, /* Fx */
         { termp_bold_pre, NULL }, /* Ms */          { termp_bold_pre, NULL }, /* Ms */
         { termp_li_pre, NULL }, /* No */          { termp_li_pre, NULL }, /* No */
         { termp_ns_pre, NULL }, /* Ns */          { termp_ns_pre, NULL }, /* Ns */
         { termp_xx_pre, NULL }, /* Nx */          { termp_xx_pre, termp_xx_post }, /* Nx */
         { termp_xx_pre, NULL }, /* Ox */          { termp_xx_pre, termp_xx_post }, /* Ox */
         { NULL, NULL }, /* Pc */          { NULL, NULL }, /* Pc */
         { NULL, termp_pf_post }, /* Pf */          { NULL, termp_pf_post }, /* Pf */
         { termp_quote_pre, termp_quote_post }, /* Po */          { termp_quote_pre, termp_quote_post }, /* Po */
Line 222  static const struct termact termacts[MDOC_MAX] = {
Line 223  static const struct termact termacts[MDOC_MAX] = {
         { termp_under_pre, NULL }, /* Sx */          { termp_under_pre, NULL }, /* Sx */
         { termp_sy_pre, NULL }, /* Sy */          { termp_sy_pre, NULL }, /* Sy */
         { NULL, NULL }, /* Tn */          { NULL, NULL }, /* Tn */
         { termp_xx_pre, NULL }, /* Ux */          { termp_xx_pre, termp_xx_post }, /* Ux */
         { NULL, NULL }, /* Xc */          { NULL, NULL }, /* Xc */
         { NULL, NULL }, /* Xo */          { NULL, NULL }, /* Xo */
         { termp_fo_pre, termp_fo_post }, /* Fo */          { termp_fo_pre, termp_fo_post }, /* Fo */
Line 245  static const struct termact termacts[MDOC_MAX] = {
Line 246  static const struct termact termacts[MDOC_MAX] = {
         { NULL, termp____post }, /* %C */          { NULL, termp____post }, /* %C */
         { termp_skip_pre, NULL }, /* Es */          { termp_skip_pre, NULL }, /* Es */
         { termp_quote_pre, termp_quote_post }, /* En */          { termp_quote_pre, termp_quote_post }, /* En */
         { termp_xx_pre, NULL }, /* Dx */          { termp_xx_pre, termp_xx_post }, /* Dx */
         { NULL, termp____post }, /* %Q */          { NULL, termp____post }, /* %Q */
         { termp_sp_pre, NULL }, /* br */          { termp_sp_pre, NULL }, /* br */
         { termp_sp_pre, NULL }, /* sp */          { termp_sp_pre, NULL }, /* sp */
Line 1677  termp_bx_pre(DECL_ARGS)
Line 1678  termp_bx_pre(DECL_ARGS)
 static int  static int
 termp_xx_pre(DECL_ARGS)  termp_xx_pre(DECL_ARGS)
 {  {
         const char      *pp;          if ((n->aux = p->flags & TERMP_PREKEEP) == 0)
         int              flags;                  p->flags |= TERMP_PREKEEP;
           return 1;
   }
   
         pp = NULL;  static void
         switch (n->tok) {  termp_xx_post(DECL_ARGS)
         case MDOC_Bsx:  {
                 pp = "BSD/OS";          if (n->aux == 0)
                 break;                  p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
         case MDOC_Dx:  
                 pp = "DragonFly";  
                 break;  
         case MDOC_Fx:  
                 pp = "FreeBSD";  
                 break;  
         case MDOC_Nx:  
                 pp = "NetBSD";  
                 break;  
         case MDOC_Ox:  
                 pp = "OpenBSD";  
                 break;  
         case MDOC_Ux:  
                 pp = "UNIX";  
                 break;  
         default:  
                 abort();  
         }  
   
         term_word(p, pp);  
         if (n->child) {  
                 flags = p->flags;  
                 p->flags |= TERMP_KEEP;  
                 term_word(p, n->child->string);  
                 p->flags = flags;  
         }  
         return 0;  
 }  }
   
 static void  static void

Legend:
Removed from v.1.338  
changed lines
  Added in v.1.339

CVSweb