[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.374 and 1.376

version 1.374, 2019/06/27 12:20:18 version 1.376, 2020/01/20 10:37:15
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-2019 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010, 2012-2020 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 119  static int   termp_pp_pre(DECL_ARGS);
Line 119  static int   termp_pp_pre(DECL_ARGS);
 static  int       termp_ss_pre(DECL_ARGS);  static  int       termp_ss_pre(DECL_ARGS);
 static  int       termp_sy_pre(DECL_ARGS);  static  int       termp_sy_pre(DECL_ARGS);
 static  int       termp_tag_pre(DECL_ARGS);  static  int       termp_tag_pre(DECL_ARGS);
   static  int       termp_tg_pre(DECL_ARGS);
 static  int       termp_under_pre(DECL_ARGS);  static  int       termp_under_pre(DECL_ARGS);
 static  int       termp_vt_pre(DECL_ARGS);  static  int       termp_vt_pre(DECL_ARGS);
 static  int       termp_xr_pre(DECL_ARGS);  static  int       termp_xr_pre(DECL_ARGS);
Line 245  static const struct mdoc_term_act mdoc_term_acts[MDOC_
Line 246  static const struct mdoc_term_act mdoc_term_acts[MDOC_
         { NULL, termp____post }, /* %Q */          { NULL, termp____post }, /* %Q */
         { NULL, termp____post }, /* %U */          { NULL, termp____post }, /* %U */
         { NULL, NULL }, /* Ta */          { NULL, NULL }, /* Ta */
           { termp_tg_pre, NULL }, /* Tg */
 };  };
   
 static  int      fn_prio;  static  int      fn_prio = TAG_STRONG;
   
   
 void  void
Line 1292  termp_sh_pre(DECL_ARGS)
Line 1294  termp_sh_pre(DECL_ARGS)
                 term_tab_set(p, ".5i");                  term_tab_set(p, ".5i");
                 switch (n->sec) {                  switch (n->sec) {
                 case SEC_DESCRIPTION:                  case SEC_DESCRIPTION:
                         fn_prio = 0;                          fn_prio = TAG_STRONG;
                         break;                          break;
                 case SEC_AUTHORS:                  case SEC_AUTHORS:
                         p->flags &= ~(TERMP_SPLIT|TERMP_NOSPLIT);                          p->flags &= ~(TERMP_SPLIT|TERMP_NOSPLIT);
Line 1381  termp_fn_pre(DECL_ARGS)
Line 1383  termp_fn_pre(DECL_ARGS)
         term_fontpop(p);          term_fontpop(p);
   
         if (n->sec == SEC_DESCRIPTION || n->sec == SEC_CUSTOM)          if (n->sec == SEC_DESCRIPTION || n->sec == SEC_CUSTOM)
                 tag_put(n->string, ++fn_prio, p->line);                  tag_put(n->string, fn_prio++, p->line);
   
         if (pretty) {          if (pretty) {
                 term_flushln(p);                  term_flushln(p);
Line 1612  termp_in_post(DECL_ARGS)
Line 1614  termp_in_post(DECL_ARGS)
 static int  static int
 termp_pp_pre(DECL_ARGS)  termp_pp_pre(DECL_ARGS)
 {  {
         fn_prio = 0;          fn_prio = TAG_STRONG;
         term_vspace(p);          term_vspace(p);
         return 0;          return 0;
 }  }
Line 2037  termp_em_pre(DECL_ARGS)
Line 2039  termp_em_pre(DECL_ARGS)
 {  {
         if (n->child != NULL &&          if (n->child != NULL &&
             n->child->type == ROFFT_TEXT)              n->child->type == ROFFT_TEXT)
                 tag_put(n->child->string, 0, p->line);                  tag_put(n->child->string, TAG_FALLBACK, p->line);
         term_fontpush(p, TERMFONT_UNDER);          term_fontpush(p, TERMFONT_UNDER);
         return 1;          return 1;
 }  }
Line 2047  termp_sy_pre(DECL_ARGS)
Line 2049  termp_sy_pre(DECL_ARGS)
 {  {
         if (n->child != NULL &&          if (n->child != NULL &&
             n->child->type == ROFFT_TEXT)              n->child->type == ROFFT_TEXT)
                 tag_put(n->child->string, 0, p->line);                  tag_put(n->child->string, TAG_FALLBACK, p->line);
         term_fontpush(p, TERMFONT_BOLD);          term_fontpush(p, TERMFONT_BOLD);
         return 1;          return 1;
 }  }
Line 2060  termp_er_pre(DECL_ARGS)
Line 2062  termp_er_pre(DECL_ARGS)
             (n->parent->tok == MDOC_It ||              (n->parent->tok == MDOC_It ||
              (n->parent->tok == MDOC_Bq &&               (n->parent->tok == MDOC_Bq &&
               n->parent->parent->parent->tok == MDOC_It)))                n->parent->parent->parent->tok == MDOC_It)))
                 tag_put(n->child->string, 1, p->line);                  tag_put(n->child->string, TAG_STRONG, p->line);
         return 1;          return 1;
 }  }
   
Line 2077  termp_tag_pre(DECL_ARGS)
Line 2079  termp_tag_pre(DECL_ARGS)
              (n->parent->tok == MDOC_Xo &&               (n->parent->tok == MDOC_Xo &&
               n->parent->parent->prev == NULL &&                n->parent->parent->prev == NULL &&
               n->parent->parent->parent->tok == MDOC_It)))                n->parent->parent->parent->tok == MDOC_It)))
                 tag_put(n->child->string, 1, p->line);                  tag_put(n->child->string, TAG_STRONG, p->line);
         return 1;          return 1;
   }
   
   static int
   termp_tg_pre(DECL_ARGS)
   {
           tag_put(n->child->string, TAG_MANUAL, p->line);
           return 0;
 }  }
   
 static int  static int

Legend:
Removed from v.1.374  
changed lines
  Added in v.1.376

CVSweb