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

Diff for /mandoc/man.c between version 1.171 and 1.174

version 1.171, 2017/05/01 23:27:39 version 1.174, 2017/06/03 15:55:24
Line 89  man_ptext(struct roff_man *man, int line, char *buf, i
Line 89  man_ptext(struct roff_man *man, int line, char *buf, i
                 /* Skip leading whitespace. */ ;                  /* Skip leading whitespace. */ ;
   
         /*          /*
          * Blank lines are ignored right after headings           * Blank lines are ignored in next line scope and right
          * but add a single vertical space elsewhere.           * after headings but add a single vertical space elsewhere.
          */           */
   
         if (buf[i] == '\0') {          if (buf[i] == '\0') {
                 /* Allocate a blank entry. */                  if (man->flags & (MAN_ELINE | MAN_BLINE))
                 if (man->last->tok != MAN_SH &&                          mandoc_msg(MANDOCERR_BLK_BLANK, man->parse,
                               line, 0, NULL);
                   else if (man->last->tok != MAN_SH &&
                     man->last->tok != MAN_SS) {                      man->last->tok != MAN_SS) {
                         roff_elem_alloc(man, line, offs, MAN_sp);                          roff_elem_alloc(man, line, offs, ROFF_sp);
                         man->next = ROFF_NEXT_SIBLING;                          man->next = ROFF_NEXT_SIBLING;
                 }                  }
                 return 1;                  return 1;
Line 258  man_breakscope(struct roff_man *man, int tok)
Line 260  man_breakscope(struct roff_man *man, int tok)
          * Delete the element that is being broken.           * Delete the element that is being broken.
          */           */
   
         if (man->flags & MAN_ELINE && (tok == TOKEN_NONE ||          if (man->flags & MAN_ELINE && (tok < MAN_TH ||
             ! (man_macros[tok].flags & MAN_NSCOPED))) {              ! (man_macros[tok].flags & MAN_NSCOPED))) {
                 n = man->last;                  n = man->last;
                 assert(n->type != ROFFT_TEXT);                  assert(n->type != ROFFT_TEXT);
Line 267  man_breakscope(struct roff_man *man, int tok)
Line 269  man_breakscope(struct roff_man *man, int tok)
   
                 mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse,                  mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse,
                     n->line, n->pos, "%s breaks %s",                      n->line, n->pos, "%s breaks %s",
                     tok == TOKEN_NONE ? "TS" : roff_name[tok],                      roff_name[tok], roff_name[n->tok]);
                     roff_name[n->tok]);  
   
                 roff_node_delete(man, n);                  roff_node_delete(man, n);
                 man->flags &= ~MAN_ELINE;                  man->flags &= ~MAN_ELINE;
Line 294  man_breakscope(struct roff_man *man, int tok)
Line 295  man_breakscope(struct roff_man *man, int tok)
          * Delete the block that is being broken.           * Delete the block that is being broken.
          */           */
   
         if (man->flags & MAN_BLINE && (tok == TOKEN_NONE ||          if (man->flags & MAN_BLINE && (tok < MAN_TH ||
             man_macros[tok].flags & MAN_BSCOPE)) {              man_macros[tok].flags & MAN_BSCOPE)) {
                 n = man->last;                  n = man->last;
                 if (n->type == ROFFT_TEXT)                  if (n->type == ROFFT_TEXT)
Line 309  man_breakscope(struct roff_man *man, int tok)
Line 310  man_breakscope(struct roff_man *man, int tok)
   
                 mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse,                  mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse,
                     n->line, n->pos, "%s breaks %s",                      n->line, n->pos, "%s breaks %s",
                     tok == TOKEN_NONE ? "TS" : roff_name[tok],                      roff_name[tok], roff_name[n->tok]);
                     roff_name[n->tok]);  
   
                 roff_node_delete(man, n);                  roff_node_delete(man, n);
                 man->flags &= ~MAN_BLINE;                  man->flags &= ~MAN_BLINE;

Legend:
Removed from v.1.171  
changed lines
  Added in v.1.174

CVSweb