summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.c3
-rw-r--r--term.c11
2 files changed, 10 insertions, 4 deletions
diff --git a/main.c b/main.c
index b8c5aa33..d5b57138 100644
--- a/main.c
+++ b/main.c
@@ -418,7 +418,8 @@ fdesc(struct buf *blk, struct buf *ln, struct curparse *curp)
/* NOTE a parser may not have been assigned, yet. */
if ( ! (man || mdoc)) {
- (void)fprintf(stderr, "%s: not a manual", curp->file);
+ (void)fprintf(stderr, "%s: not a manual\n",
+ curp->file);
return(0);
}
diff --git a/term.c b/term.c
index ea52fc11..04776e4f 100644
--- a/term.c
+++ b/term.c
@@ -392,7 +392,7 @@ do_special(struct termp *p, const char *word, size_t len)
rhs = term_a2ascii(p->symtab, word, len, &sz);
if (NULL == rhs) {
-#if 1
+#if 0
fputs("Unknown special character: ", stderr);
for (i = 0; i < (int)len; i++)
fputc(word[i], stderr);
@@ -436,10 +436,11 @@ do_reserved(struct termp *p, const char *word, size_t len)
static void
do_escaped(struct termp *p, const char **word)
{
- int j;
+ int j, type;
const char *wp;
wp = *word;
+ type = 1;
if (0 == *(++wp)) {
*word = wp;
@@ -475,6 +476,7 @@ do_escaped(struct termp *p, const char **word)
*word = ++wp;
return;
case ('['):
+ type = 0;
break;
default:
do_reserved(p, wp, 1);
@@ -522,7 +524,10 @@ do_escaped(struct termp *p, const char **word)
return;
}
- do_special(p, wp - j, (size_t)j);
+ if (type)
+ do_special(p, wp - j, (size_t)j);
+ else
+ do_reserved(p, wp - j, (size_t)j);
*word = wp;
}