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

Diff for /pod2mdoc/pod2mdoc.c between version 1.33 and 1.34

version 1.33, 2014/07/18 23:56:57 version 1.34, 2014/07/19 00:42:22
Line 666  formatcode(struct state *st, const char *buf, size_t *
Line 666  formatcode(struct state *st, const char *buf, size_t *
                                 break;                                  break;
                         }                          }
                 }                  }
                 if (*start + 1 < end && '<' == buf[*start + 1]) {                  if (*start + 1 < end && '<' == buf[*start + 1] &&
                       'A' <= buf[*start] && 'Z' >= buf[*start]) {
                         formatcode(st, buf, start, end, nomacro, 1);                          formatcode(st, buf, start, end, nomacro, 1);
                         continue;                          continue;
                 }                  }
Line 746  formatcodeln(struct state *st, const char *linemac,
Line 747  formatcodeln(struct state *st, const char *linemac,
                         } while (*start < end && ' ' == buf[*start]);                          } while (*start < end && ' ' == buf[*start]);
                 }                  }
   
                 if (*start + 1 < end && '<' == buf[*start + 1]) {                  if (*start + 1 < end && '<' == buf[*start + 1] &&
                       'A' <= buf[*start] && 'Z' >= buf[*start]) {
                         st->wantws |= wantws;                          st->wantws |= wantws;
                         gotmacro = formatcode(st, buf,                          gotmacro = formatcode(st, buf,
                             start, end, nomacro, 1);                              start, end, nomacro, 1);
Line 1220  ordinary(struct state *st, const char *buf, size_t sta
Line 1222  ordinary(struct state *st, const char *buf, size_t sta
                  * Escape initial control characters.                   * Escape initial control characters.
                  */                   */
                 while (start < end) {                  while (start < end) {
                         if (start < end - 1 && '<' == buf[start + 1])                          if (start < end - 1 && '<' == buf[start + 1] &&
                               'A' <= buf[start] && 'Z' >= buf[start])
                                 break;                                  break;
                         else if ('\n' == buf[start])                          else if ('\n' == buf[start])
                                 break;                                  break;
Line 1256  ordinary(struct state *st, const char *buf, size_t sta
Line 1259  ordinary(struct state *st, const char *buf, size_t sta
                                 outbuf_addchar(st);                                  outbuf_addchar(st);
                 }                  }
   
                 if (start < end - 1 && '<' == buf[start + 1]) {                  if (start < end - 1 && '<' == buf[start + 1] &&
                       'A' <= buf[start] && 'Z' >= buf[start]) {
                         formatcode(st, buf, &start, end, 0, seq);                          formatcode(st, buf, &start, end, 0, seq);
                         if (OUST_MAC == st->oust) {                          if (OUST_MAC == st->oust) {
                                 /*                                  /*
Line 1294  ordinary(struct state *st, const char *buf, size_t sta
Line 1298  ordinary(struct state *st, const char *buf, size_t sta
                                  */                                   */
   
                                 if ( ! st->wantws && start < end &&                                  if ( ! st->wantws && start < end &&
                                     '<' != buf[start + 1]) {                                      ('<' != buf[start + 1] ||
                                        'A' > buf[start] ||
                                        'Z' < buf[start])) {
                                         printf(" Ns ");                                          printf(" Ns ");
                                         st->wantws = 1;                                          st->wantws = 1;
                                 }                                  }

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

CVSweb