=================================================================== RCS file: /cvs/texi2mdoc/main.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -p -r1.40 -r1.41 --- texi2mdoc/main.c 2015/02/23 22:50:11 1.40 +++ texi2mdoc/main.c 2015/02/24 14:35:40 1.41 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.40 2015/02/23 22:50:11 kristaps Exp $ */ +/* $Id: main.c,v 1.41 2015/02/24 14:35:40 kristaps Exp $ */ /* * Copyright (c) 2015 Kristaps Dzonsons * @@ -17,12 +17,8 @@ #if defined(__linux__) || defined(__MINT__) # define _GNU_SOURCE /* memmem */ #endif -#include -#include - #include #include -#include #include #include #include @@ -31,7 +27,6 @@ #include #include #include -#include #include "extern.h" @@ -674,16 +669,7 @@ doverbatim(struct texi *p, enum texicmd cmd, teximacro(p, "Bd -literal -offset indent"); assert(endpos <= sz); while (*pos < endpos) { - if (buf[*pos] == '\n') - 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'); + texiputchar(p, buf[*pos]); advance(p, buf, pos); } teximacro(p, "Ed"); @@ -1400,11 +1386,15 @@ dotop(struct texi *p, enum texicmd cmd, teximacro(p, "Os"); teximacro(p, "Sh NAME"); teximacroopen(p, "Nm"); - texiputchars(p, p->title); + for (cp = p->title; '\0' != *cp; cp++) + texiputchar(p, *cp); teximacroclose(p); teximacroopen(p, "Nd"); - texiputchars(p, NULL != p->subtitle ? - p->subtitle : "Unknown description"); + if (NULL != p->subtitle) + for (cp = p->subtitle; '\0' != *cp; cp++) + texiputchar(p, *cp); + else + texiputchars(p, "Unknown description"); teximacroclose(p); p->seenvs = 1; dosection(p, cmd, buf, sz, pos);