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

Diff for /texi2mdoc/main.c between version 1.40 and 1.41

version 1.40, 2015/02/23 22:50:11 version 1.41, 2015/02/24 14:35:40
Line 17 
Line 17 
 #if defined(__linux__) || defined(__MINT__)  #if defined(__linux__) || defined(__MINT__)
 # define _GNU_SOURCE /* memmem */  # define _GNU_SOURCE /* memmem */
 #endif  #endif
 #include <sys/mman.h>  
 #include <sys/stat.h>  
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
 #include <fcntl.h>  
 #include <getopt.h>  #include <getopt.h>
 #include <libgen.h>  #include <libgen.h>
 #include <limits.h>  #include <limits.h>
Line 31 
Line 27 
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <time.h>  #include <time.h>
 #include <unistd.h>  
   
 #include "extern.h"  #include "extern.h"
   
Line 674  doverbatim(struct texi *p, enum texicmd cmd, 
Line 669  doverbatim(struct texi *p, enum texicmd cmd, 
         teximacro(p, "Bd -literal -offset indent");          teximacro(p, "Bd -literal -offset indent");
         assert(endpos <= sz);          assert(endpos <= sz);
         while (*pos < endpos) {          while (*pos < endpos) {
                 if (buf[*pos] == '\n')                  texiputchar(p, buf[*pos]);
                         p->outcol = 0;  
                 else  
                         p->outcol++;  
                 if (*pos > 0 && '.' == buf[*pos])  
                         if ('\n' == buf[*pos - 1])  
                                 fputs("\\&", stdout);  
                 putchar(buf[*pos]);  
                 if ('\\' == buf[*pos])  
                         putchar('e');  
                 advance(p, buf, pos);                  advance(p, buf, pos);
         }          }
         teximacro(p, "Ed");          teximacro(p, "Ed");
Line 1400  dotop(struct texi *p, enum texicmd cmd, 
Line 1386  dotop(struct texi *p, enum texicmd cmd, 
         teximacro(p, "Os");          teximacro(p, "Os");
         teximacro(p, "Sh NAME");          teximacro(p, "Sh NAME");
         teximacroopen(p, "Nm");          teximacroopen(p, "Nm");
         texiputchars(p, p->title);          for (cp = p->title; '\0' != *cp; cp++)
                   texiputchar(p, *cp);
         teximacroclose(p);          teximacroclose(p);
         teximacroopen(p, "Nd");          teximacroopen(p, "Nd");
         texiputchars(p, NULL != p->subtitle ?          if (NULL != p->subtitle)
                 p->subtitle : "Unknown description");                  for (cp = p->subtitle; '\0' != *cp; cp++)
                           texiputchar(p, *cp);
           else
                   texiputchars(p, "Unknown description");
         teximacroclose(p);          teximacroclose(p);
         p->seenvs = 1;          p->seenvs = 1;
         dosection(p, cmd, buf, sz, pos);          dosection(p, cmd, buf, sz, pos);

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

CVSweb