[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.97 and 1.98

version 1.97, 2017/01/10 12:53:07 version 1.98, 2017/01/10 13:47:00
Line 582  print_node(DECL_ARGS)
Line 582  print_node(DECL_ARGS)
          * Break the line if we were parsed subsequent the current node.           * Break the line if we were parsed subsequent the current node.
          * This makes the page structure be more consistent.           * This makes the page structure be more consistent.
          */           */
         if (MMAN_spc & outflags && MDOC_LINE & n->flags)          if (MMAN_spc & outflags && NODE_LINE & n->flags)
                 outflags |= MMAN_nl;                  outflags |= MMAN_nl;
   
         act = NULL;          act = NULL;
         cond = 0;          cond = 0;
         do_sub = 1;          do_sub = 1;
         n->flags &= ~MDOC_ENDED;          n->flags &= ~NODE_ENDED;
   
         if (n->type == ROFFT_TEXT) {          if (n->type == ROFFT_TEXT) {
                 /*                  /*
Line 601  print_node(DECL_ARGS)
Line 601  print_node(DECL_ARGS)
                         printf("\\&");                          printf("\\&");
                         outflags &= ~MMAN_spc;                          outflags &= ~MMAN_spc;
                 }                  }
                 if (outflags & MMAN_Sm && ! (n->flags & MDOC_DELIMC))                  if (outflags & MMAN_Sm && ! (n->flags & NODE_DELIMC))
                         outflags |= MMAN_spc_force;                          outflags |= MMAN_spc_force;
                 print_word(n->string);                  print_word(n->string);
                 if (outflags & MMAN_Sm && ! (n->flags & MDOC_DELIMO))                  if (outflags & MMAN_Sm && ! (n->flags & NODE_DELIMO))
                         outflags |= MMAN_spc;                          outflags |= MMAN_spc;
         } else {          } else {
                 /*                  /*
Line 630  print_node(DECL_ARGS)
Line 630  print_node(DECL_ARGS)
         /*          /*
          * Lastly, conditionally run the post-node handler.           * Lastly, conditionally run the post-node handler.
          */           */
         if (MDOC_ENDED & n->flags)          if (NODE_ENDED & n->flags)
                 return;                  return;
   
         if (cond && act->post)          if (cond && act->post)
                 (*act->post)(meta, n);                  (*act->post)(meta, n);
   
         if (ENDBODY_NOT != n->end)          if (ENDBODY_NOT != n->end)
                 n->body->flags |= MDOC_ENDED;                  n->body->flags |= NODE_ENDED;
   
         if (ENDBODY_NOSPACE == n->end)          if (ENDBODY_NOSPACE == n->end)
                 outflags &= ~(MMAN_spc | MMAN_nl);                  outflags &= ~(MMAN_spc | MMAN_nl);
Line 808  static void
Line 808  static void
 pre_syn(const struct roff_node *n)  pre_syn(const struct roff_node *n)
 {  {
   
         if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags))          if (NULL == n->prev || ! (NODE_SYNPRETTY & n->flags))
                 return;                  return;
   
         if (n->prev->tok == n->tok &&          if (n->prev->tok == n->tok &&
Line 1176  pre_fa(DECL_ARGS)
Line 1176  pre_fa(DECL_ARGS)
   
         while (NULL != n) {          while (NULL != n) {
                 font_push('I');                  font_push('I');
                 if (am_Fa || MDOC_SYNPRETTY & n->flags)                  if (am_Fa || NODE_SYNPRETTY & n->flags)
                         outflags |= MMAN_nbrword;                          outflags |= MMAN_nbrword;
                 print_node(meta, n);                  print_node(meta, n);
                 font_pop();                  font_pop();
Line 1230  post_fl(DECL_ARGS)
Line 1230  post_fl(DECL_ARGS)
         if (!(n->child != NULL ||          if (!(n->child != NULL ||
             n->next == NULL ||              n->next == NULL ||
             n->next->type == ROFFT_TEXT ||              n->next->type == ROFFT_TEXT ||
             n->next->flags & MDOC_LINE))              n->next->flags & NODE_LINE))
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
 }  }
   
Line 1244  pre_fn(DECL_ARGS)
Line 1244  pre_fn(DECL_ARGS)
         if (NULL == n)          if (NULL == n)
                 return 0;                  return 0;
   
         if (MDOC_SYNPRETTY & n->flags)          if (NODE_SYNPRETTY & n->flags)
                 print_block(".HP 4n", MMAN_nl);                  print_block(".HP 4n", MMAN_nl);
   
         font_push('B');          font_push('B');
Line 1265  post_fn(DECL_ARGS)
Line 1265  post_fn(DECL_ARGS)
 {  {
   
         print_word(")");          print_word(")");
         if (MDOC_SYNPRETTY & n->flags) {          if (NODE_SYNPRETTY & n->flags) {
                 print_word(";");                  print_word(";");
                 outflags |= MMAN_PP;                  outflags |= MMAN_PP;
         }          }
Line 1282  pre_fo(DECL_ARGS)
Line 1282  pre_fo(DECL_ARGS)
         case ROFFT_HEAD:          case ROFFT_HEAD:
                 if (n->child == NULL)                  if (n->child == NULL)
                         return 0;                          return 0;
                 if (MDOC_SYNPRETTY & n->flags)                  if (NODE_SYNPRETTY & n->flags)
                         print_block(".HP 4n", MMAN_nl);                          print_block(".HP 4n", MMAN_nl);
                 font_push('B');                  font_push('B');
                 break;                  break;
Line 1327  static int
Line 1327  static int
 pre_in(DECL_ARGS)  pre_in(DECL_ARGS)
 {  {
   
         if (MDOC_SYNPRETTY & n->flags) {          if (NODE_SYNPRETTY & n->flags) {
                 pre_syn(n);                  pre_syn(n);
                 font_push('B');                  font_push('B');
                 print_word("#include <");                  print_word("#include <");
Line 1344  static void
Line 1344  static void
 post_in(DECL_ARGS)  post_in(DECL_ARGS)
 {  {
   
         if (MDOC_SYNPRETTY & n->flags) {          if (NODE_SYNPRETTY & n->flags) {
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
                 print_word(">");                  print_word(">");
                 font_pop();                  font_pop();
Line 1619  static void
Line 1619  static void
 post_pf(DECL_ARGS)  post_pf(DECL_ARGS)
 {  {
   
         if ( ! (n->next == NULL || n->next->flags & MDOC_LINE))          if ( ! (n->next == NULL || n->next->flags & NODE_LINE))
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
 }  }
   
Line 1751  static int
Line 1751  static int
 pre_vt(DECL_ARGS)  pre_vt(DECL_ARGS)
 {  {
   
         if (MDOC_SYNPRETTY & n->flags) {          if (NODE_SYNPRETTY & n->flags) {
                 switch (n->type) {                  switch (n->type) {
                 case ROFFT_BLOCK:                  case ROFFT_BLOCK:
                         pre_syn(n);                          pre_syn(n);
Line 1770  static void
Line 1770  static void
 post_vt(DECL_ARGS)  post_vt(DECL_ARGS)
 {  {
   
         if (n->flags & MDOC_SYNPRETTY && n->type != ROFFT_BODY)          if (n->flags & NODE_SYNPRETTY && n->type != ROFFT_BODY)
                 return;                  return;
         font_pop();          font_pop();
 }  }

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98

CVSweb