summaryrefslogtreecommitdiffstats
path: root/man2html/man2html.c
diff options
context:
space:
mode:
Diffstat (limited to 'man2html/man2html.c')
-rw-r--r--man2html/man2html.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/man2html/man2html.c b/man2html/man2html.c
index 1a9309e..642847c 100644
--- a/man2html/man2html.c
+++ b/man2html/man2html.c
@@ -2854,19 +2854,19 @@ scan_request(char *c) {
int oldnargs;
int deflen;
int onff;
- sl=fill_words(c+j, wordlist, SIZE(wordlist), &words, '\n');
- c=sl+1;
- *sl=0;
+ char *h=NULL;
+
+ /* expand first, then break into words. */
+ trans_char(c+j,'"','\b');
+ if (mandoc_command)
+ c=scan_troff_mandoc(c+j,1,&h);
+ else
+ c=scan_troff(c+j,1,&h);
+ trans_char(h,'"','\a');
+ trans_char(h,'\b','"');
+ fill_words(h, wordlist, SIZE(wordlist), &words, '\n');
for (i=1; i<words; i++)
wordlist[i][-1]=0;
- for (i=0; i<words; i++) {
- char *h=NULL;
- if (mandoc_command)
- scan_troff_mandoc(wordlist[i],1,&h);
- else
- scan_troff(wordlist[i],1,&h);
- wordlist[i]=h;
- }
for (i=words; i<SIZE(wordlist); i++)
wordlist[i]=NULL;
deflen = strlen(owndef->st);
@@ -2884,8 +2884,7 @@ scan_request(char *c) {
newline_for_fun=onff;
argument=oldargument;
nargs=oldnargs;
- for (i=0; i<words; i++) if (wordlist[i]) free(wordlist[i]);
- *sl='\n';
+ free(h);
} else if (mandoc_command &&
((isupper(*c) && islower(c[1]))
|| (islower(*c) && isupper(c[1])))) {
@@ -2954,6 +2953,9 @@ scan_troff(char *c, int san, char **result) { /* san : stop at newline */
h++;
FLUSHIBP;
h = scan_escape(h);
+ } else if (*h == '\b') {
+ intbuff[ibp++]=*h++;
+ if (ibp>480) { FLUSHIBP; }
} else if (*h == controlsym && h[-1] == '\n') {
h++;
FLUSHIBP;