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

Diff for /pod2mdoc/pod2mdoc.c between version 1.16 and 1.17

version 1.16, 2014/04/02 16:41:02 version 1.17, 2014/04/02 20:32:41
Line 866  dosynopsisop(const char *buf, int *last,
Line 866  dosynopsisop(const char *buf, int *last,
 }  }
   
 /*  /*
    * Format multiple "Nm" manpage names in the NAME section.
    */
   static void
   donamenm(struct state *st, const char *buf, size_t *start, size_t end)
   {
           size_t   word;
   
           while (*start < end && ' ' == buf[*start])
                   (*start)++;
   
           if (end == *start) {
                   puts(".Nm unknown");
                   return;
           }
   
           while (*start < end) {
                   fputs(".Nm ", stdout);
                   for (word = *start; word < end; word++)
                           if (',' == buf[word])
                                   break;
                   formatcodeln(st, buf, start, word, 1);
                   if (*start == end) {
                           putchar('\n');
                           continue;
                   }
                   assert(',' == buf[*start]);
                   puts(" ,");
                   (*start)++;
                   while (*start < end && ' ' == buf[*start])
                           (*start)++;
           }
   }
   
   /*
  * Ordinary paragraph.   * Ordinary paragraph.
  * Well, this is really the hardest--POD seems to assume that, for   * Well, this is really the hardest--POD seems to assume that, for
  * example, a leading space implies a newline, and so on.   * example, a leading space implies a newline, and so on.
Line 898  ordinary(struct state *st, const char *buf, size_t sta
Line 932  ordinary(struct state *st, const char *buf, size_t sta
                         for ( ; i > start; i--)                          for ( ; i > start; i--)
                                 if ('-' != buf[i])                                  if ('-' != buf[i])
                                         break;                                          break;
                         fputs(".Nm ", stdout);                          donamenm(st, buf, &start, i + 1);
                         formatcodeln(st, buf, &start, i + 1, 1);  
                         putchar('\n');  
                         start = j + 1;                          start = j + 1;
                           while (start < end && ' ' == buf[start])
                                   start++;
                         fputs(".Nd ", stdout);                          fputs(".Nd ", stdout);
                         formatcodeln(st, buf, &start, end, 1);                          formatcodeln(st, buf, &start, end, 1);
                         putchar('\n');                          putchar('\n');

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

CVSweb