aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-16 00:04:46 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-16 00:04:46 +0000
commit56769575b59463282f2527c0dccc339862efdf04 (patch)
tree0899065e5d420c864dadcf8b923647754dc30eb5
parentd231ab40d54aff1a0d68b8894330621f91bcce4a (diff)
downloadmandoc-56769575b59463282f2527c0dccc339862efdf04.tar.gz
mandoc-56769575b59463282f2527c0dccc339862efdf04.tar.zst
mandoc-56769575b59463282f2527c0dccc339862efdf04.zip
Fix allowing silly '\'' control character.
-rw-r--r--main.c4
-rw-r--r--man.c4
-rw-r--r--mdoc.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/main.c b/main.c
index 90960915..730d4397 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.74 2010/05/15 22:28:22 kristaps Exp $ */
+/* $Id: main.c,v 1.75 2010/05/16 00:04:46 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -574,7 +574,7 @@ pset(const char *buf, int pos, struct curparse *curp,
* default to -man, which is more lenient.
*/
- if (buf[0] == '.') {
+ if ('.' == buf[0] || '\'' == buf[0]) {
for (i = 1; buf[i]; i++)
if (' ' != buf[i] && '\t' != buf[i])
break;
diff --git a/man.c b/man.c
index 07b02369..a1a0ecd4 100644
--- a/man.c
+++ b/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.70 2010/05/15 22:44:04 kristaps Exp $ */
+/* $Id: man.c,v 1.71 2010/05/16 00:04:46 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -151,7 +151,7 @@ int
man_parseln(struct man *m, int ln, char *buf)
{
- return('.' == *buf || '\'' == *buf ?
+ return(('.' == *buf || '\'' == *buf) ?
man_pmacro(m, ln, buf) :
man_ptext(m, ln, buf));
}
diff --git a/mdoc.c b/mdoc.c
index 9ef84d58..e521e27b 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.133 2010/05/15 16:24:37 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.134 2010/05/16 00:04:46 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -291,7 +291,7 @@ mdoc_parseln(struct mdoc *m, int ln, char *buf)
return(0);
m->flags |= MDOC_NEWLINE;
- return('.' == *buf ?
+ return(('.' == *buf || '\'' == *buf) ?
mdoc_pmacro(m, ln, buf) :
mdoc_ptext(m, ln, buf));
}