[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.75 and 1.80

version 1.75, 2014/11/27 16:20:31 version 1.80, 2014/12/23 13:48:57
Line 85  static int   pre_en(DECL_ARGS);
Line 85  static int   pre_en(DECL_ARGS);
 static  int       pre_enc(DECL_ARGS);  static  int       pre_enc(DECL_ARGS);
 static  int       pre_em(DECL_ARGS);  static  int       pre_em(DECL_ARGS);
 static  int       pre_skip(DECL_ARGS);  static  int       pre_skip(DECL_ARGS);
   static  int       pre_eo(DECL_ARGS);
 static  int       pre_ex(DECL_ARGS);  static  int       pre_ex(DECL_ARGS);
 static  int       pre_fa(DECL_ARGS);  static  int       pre_fa(DECL_ARGS);
 static  int       pre_fd(DECL_ARGS);  static  int       pre_fd(DECL_ARGS);
Line 190  static const struct manact manacts[MDOC_MAX + 1] = {
Line 191  static const struct manact manacts[MDOC_MAX + 1] = {
         { NULL, NULL, NULL, NULL, NULL }, /* Ec */          { NULL, NULL, NULL, NULL, NULL }, /* Ec */
         { NULL, NULL, NULL, NULL, NULL }, /* Ef */          { NULL, NULL, NULL, NULL, NULL }, /* Ef */
         { NULL, pre_em, post_font, NULL, NULL }, /* Em */          { NULL, pre_em, post_font, NULL, NULL }, /* Em */
         { NULL, NULL, post_eo, NULL, NULL }, /* Eo */          { cond_body, pre_eo, post_eo, NULL, NULL }, /* Eo */
         { NULL, pre_ux, NULL, "FreeBSD", NULL }, /* Fx */          { NULL, pre_ux, NULL, "FreeBSD", NULL }, /* Fx */
         { NULL, pre_sy, post_font, NULL, NULL }, /* Ms */          { NULL, pre_sy, post_font, NULL, NULL }, /* Ms */
         { NULL, pre_no, NULL, NULL, NULL }, /* No */          { NULL, pre_no, NULL, NULL, NULL }, /* No */
Line 433  print_offs(const char *v, int keywords)
Line 434  print_offs(const char *v, int keywords)
                 sz = 6;                  sz = 6;
         else if (keywords && !strcmp(v, "indent-two"))          else if (keywords && !strcmp(v, "indent-two"))
                 sz = 12;                  sz = 12;
         else if (a2roffsu(v, &su, SCALE_MAX)) {          else if (a2roffsu(v, &su, SCALE_EN) > 1) {
                   if (su.scale < 0.0)
                           su.scale = 0.0;
                 if (SCALE_EN == su.unit)                  if (SCALE_EN == su.unit)
                         sz = su.scale;                          sz = su.scale;
                 else {                  else {
Line 480  print_width(const char *v, const struct mdoc_node *chi
Line 483  print_width(const char *v, const struct mdoc_node *chi
         /* Convert v into a number (of characters). */          /* Convert v into a number (of characters). */
         if (NULL == v)          if (NULL == v)
                 sz = defsz;                  sz = defsz;
         else if (a2roffsu(v, &su, SCALE_MAX)) {          else if (a2roffsu(v, &su, SCALE_MAX) > 1) {
                   if (su.scale < 0.0)
                           su.scale = 0.0;
                 if (SCALE_EN == su.unit)                  if (SCALE_EN == su.unit)
                         sz = su.scale;                          sz = su.scale;
                 else {                  else {
Line 607  print_node(DECL_ARGS)
Line 612  print_node(DECL_ARGS)
                  * node.                   * node.
                  */                   */
                 act = manacts + n->tok;                  act = manacts + n->tok;
                 cond = NULL == act->cond || (*act->cond)(meta, n);                  cond = act->cond == NULL || (*act->cond)(meta, n);
                 if (cond && act->pre && ENDBODY_NOT == n->end)                  if (cond && act->pre && (n->end == ENDBODY_NOT || n->nchild))
                         do_sub = (*act->pre)(meta, n);                          do_sub = (*act->pre)(meta, n);
         }          }
   
Line 1123  post_en(DECL_ARGS)
Line 1128  post_en(DECL_ARGS)
         return;          return;
 }  }
   
   static int
   pre_eo(DECL_ARGS)
   {
   
           outflags &= ~(MMAN_spc | MMAN_nl);
           return(1);
   }
   
 static void  static void
 post_eo(DECL_ARGS)  post_eo(DECL_ARGS)
 {  {
   
         if (MDOC_HEAD == n->type || MDOC_BODY == n->type)          if (n->end != ENDBODY_SPACE)
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
 }  }
   
Line 1593  static void
Line 1606  static void
 post_pf(DECL_ARGS)  post_pf(DECL_ARGS)
 {  {
   
         outflags &= ~MMAN_spc;          if ( ! (n->next == NULL || n->next->flags & MDOC_LINE))
                   outflags &= ~MMAN_spc;
 }  }
   
 static int  static int

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

CVSweb