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

Diff for /mandoc/mdoc_macro.c between version 1.106 and 1.110

version 1.106, 2011/03/22 14:33:05 version 1.110, 2011/08/10 14:07:23
Line 74  const struct mdoc_macro __mdoc_macros[MDOC_MAX] = {
Line 74  const struct mdoc_macro __mdoc_macros[MDOC_MAX] = {
         { in_line_eoln, MDOC_PROLOGUE }, /* Dd */          { in_line_eoln, MDOC_PROLOGUE }, /* Dd */
         { in_line_eoln, MDOC_PROLOGUE }, /* Dt */          { in_line_eoln, MDOC_PROLOGUE }, /* Dt */
         { in_line_eoln, MDOC_PROLOGUE }, /* Os */          { in_line_eoln, MDOC_PROLOGUE }, /* Os */
         { blk_full, 0 }, /* Sh */          { blk_full, MDOC_PARSED }, /* Sh */
         { blk_full, 0 }, /* Ss */          { blk_full, MDOC_PARSED }, /* Ss */
         { in_line_eoln, 0 }, /* Pp */          { in_line_eoln, 0 }, /* Pp */
         { blk_part_imp, MDOC_PARSED }, /* D1 */          { blk_part_imp, MDOC_PARSED }, /* D1 */
         { blk_part_imp, MDOC_PARSED }, /* Dl */          { blk_part_imp, MDOC_PARSED }, /* Dl */
Line 600  dword(struct mdoc *m, int line, 
Line 600  dword(struct mdoc *m, int line, 
   
         if (DELIM_OPEN == d)          if (DELIM_OPEN == d)
                 m->last->flags |= MDOC_DELIMO;                  m->last->flags |= MDOC_DELIMO;
         else if (DELIM_CLOSE == d)  
           /*
            * Closing delimiters only suppress the preceding space
            * when they follow something, not when they start a new
            * block or element, and not when they follow `No'.
            *
            * XXX  Explicitly special-casing MDOC_No here feels
            *      like a layering violation.  Find a better way
            *      and solve this in the code related to `No'!
            */
   
           else if (DELIM_CLOSE == d && m->last->prev &&
                           m->last->prev->tok != MDOC_No)
                 m->last->flags |= MDOC_DELIMC;                  m->last->flags |= MDOC_DELIMC;
   
         return(1);          return(1);
Line 618  append_delims(struct mdoc *m, int line, int *pos, char
Line 630  append_delims(struct mdoc *m, int line, int *pos, char
   
         for (;;) {          for (;;) {
                 la = *pos;                  la = *pos;
                 ac = mdoc_zargs(m, line, pos, buf, ARGS_NOWARN, &p);                  ac = mdoc_zargs(m, line, pos, buf, &p);
   
                 if (ARGS_ERROR == ac)                  if (ARGS_ERROR == ac)
                         return(0);                          return(0);
Line 631  append_delims(struct mdoc *m, int line, int *pos, char
Line 643  append_delims(struct mdoc *m, int line, int *pos, char
                  * If we encounter end-of-sentence symbols, then trigger                   * If we encounter end-of-sentence symbols, then trigger
                  * the double-space.                   * the double-space.
                  *                   *
                  * XXX: it's easy to allow this to propogate outward to                   * XXX: it's easy to allow this to propagate outward to
                  * the last symbol, such that `. )' will cause the                   * the last symbol, such that `. )' will cause the
                  * correct double-spacing.  However, (1) groff isn't                   * correct double-spacing.  However, (1) groff isn't
                  * smart enough to do this and (2) it would require                   * smart enough to do this and (2) it would require
                  * knowing which symbols break this behaviour, for                   * knowing which symbols break this behaviour, for
                  * example, `.  ;' shouldn't propogate the double-space.                   * example, `.  ;' shouldn't propagate the double-space.
                  */                   */
                 if (mandoc_eos(p, strlen(p), 0))                  if (mandoc_eos(p, strlen(p), 0))
                         m->last->flags |= MDOC_EOS;                          m->last->flags |= MDOC_EOS;
Line 995  blk_full(MACRO_PROT_ARGS)
Line 1007  blk_full(MACRO_PROT_ARGS)
         }          }
   
         /*          /*
          * This routine accomodates implicitly- and explicitly-scoped           * This routine accommodates implicitly- and explicitly-scoped
          * macro openings.  Implicit ones first close out prior scope           * macro openings.  Implicit ones first close out prior scope
          * (seen above).  Delay opening the head until necessary to           * (seen above).  Delay opening the head until necessary to
          * allow leading punctuation to print.  Special consideration           * allow leading punctuation to print.  Special consideration
Line 1292  blk_part_imp(MACRO_PROT_ARGS)
Line 1304  blk_part_imp(MACRO_PROT_ARGS)
                 if (mandoc_eos(n->string, strlen(n->string), 1))                  if (mandoc_eos(n->string, strlen(n->string), 1))
                         n->flags |= MDOC_EOS;                          n->flags |= MDOC_EOS;
   
         /* Up-propogate the end-of-space flag. */          /* Up-propagate the end-of-space flag. */
   
         if (n && (MDOC_EOS & n->flags)) {          if (n && (MDOC_EOS & n->flags)) {
                 body->flags |= MDOC_EOS;                  body->flags |= MDOC_EOS;
Line 1717  phrase(struct mdoc *m, int line, int ppos, char *buf)
Line 1729  phrase(struct mdoc *m, int line, int ppos, char *buf)
         for (pos = ppos; ; ) {          for (pos = ppos; ; ) {
                 la = pos;                  la = pos;
   
                 ac = mdoc_zargs(m, line, &pos, buf, 0, &p);                  ac = mdoc_zargs(m, line, &pos, buf, &p);
   
                 if (ARGS_ERROR == ac)                  if (ARGS_ERROR == ac)
                         return(0);                          return(0);
Line 1762  phrase_ta(MACRO_PROT_ARGS)
Line 1774  phrase_ta(MACRO_PROT_ARGS)
   
         for (;;) {          for (;;) {
                 la = *pos;                  la = *pos;
                 ac = mdoc_zargs(m, line, pos, buf, 0, &p);                  ac = mdoc_zargs(m, line, pos, buf, &p);
   
                 if (ARGS_ERROR == ac)                  if (ARGS_ERROR == ac)
                         return(0);                          return(0);

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.110

CVSweb