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

Diff for /pod2mdoc/pod2mdoc.c between version 1.37 and 1.38

version 1.37, 2015/02/13 00:44:16 version 1.38, 2015/02/13 12:40:54
Line 615  formatcode(struct state *st, const char *buf, size_t *
Line 615  formatcode(struct state *st, const char *buf, size_t *
                         }                          }
                         if (0 == strncmp(buf + *start, "NULL", 4) &&                          if (0 == strncmp(buf + *start, "NULL", 4) &&
                             ('=' == buf[*start + 4] ||                              ('=' == buf[*start + 4] ||
                              '>' == buf[*start + 4]))                               '>' == buf[*start + 4])) {
                                 printf("Dv ");                                  printf("Dv ");
                                   break;
                           }
                           i = 0;
                           while (isalnum((unsigned char)buf[*start + i]) ||
                               '_' == buf[*start + i])
                                   i++;
                           if (i && MDOC_Fa == dict_get(buf + *start, i))
                                   printf("Fa ");
                         else                          else
                                 printf("Sy ");                                  printf("Sy ");
                         break;                          break;
Line 1014  static void
Line 1022  static void
 verbatim(struct state *st, char *buf, size_t start, size_t end)  verbatim(struct state *st, char *buf, size_t start, size_t end)
 {  {
         size_t           i, ift, ifo, ifa, ifc, inl;          size_t           i, ift, ifo, ifa, ifc, inl;
         char            *cp;          char            *cp, *cp2;
         int              nopen;          int              nopen;
   
         if ( ! st->parsing || st->paused || start == end)          if ( ! st->parsing || st->paused || start == end)
Line 1114  again:
Line 1122  again:
                         buf[ifc++] = '\0';                          buf[ifc++] = '\0';
                         for (;;) {                          for (;;) {
                                 cp = strchr(buf + ifa, ',');                                  cp = strchr(buf + ifa, ',');
                                 if (cp != NULL)                                  if (cp != NULL) {
                                           cp2 = cp;
                                         *cp++ = '\0';                                          *cp++ = '\0';
                                   } else
                                           cp2 = strchr(buf + ifa, '\0');
                                   while (isalnum((unsigned char)cp2[-1]) ||
                                       '_' == cp2[-1])
                                           cp2--;
                                   if ('\0' != *cp2)
                                           dict_put(cp2, MDOC_Fa);
                                 printf(".Fa \"%s\"\n", buf + ifa);                                  printf(".Fa \"%s\"\n", buf + ifa);
                                 if (cp == NULL)                                  if (cp == NULL)
                                         break;                                          break;

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

CVSweb