* mdocml: Fix allowing silly '\'' control character.
@ 2010-05-16 0:04 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-05-16 0:04 UTC (permalink / raw)
To: source
Log Message:
-----------
Fix allowing silly '\'' control character.
Modified Files:
--------------
mdocml:
mdoc.c
main.c
man.c
Revision Data
-------------
Index: man.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -Lman.c -Lman.c -u -p -r1.70 -r1.71
--- man.c
+++ man.c
@@ -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));
}
Index: mdoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -Lmdoc.c -Lmdoc.c -u -p -r1.133 -r1.134
--- mdoc.c
+++ mdoc.c
@@ -291,7 +291,7 @@ mdoc_parseln(struct mdoc *m, int ln, cha
return(0);
m->flags |= MDOC_NEWLINE;
- return('.' == *buf ?
+ return(('.' == *buf || '\'' == *buf) ?
mdoc_pmacro(m, ln, buf) :
mdoc_ptext(m, ln, buf));
}
Index: main.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/main.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -Lmain.c -Lmain.c -u -p -r1.74 -r1.75
--- main.c
+++ main.c
@@ -574,7 +574,7 @@ pset(const char *buf, int pos, struct cu
* 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;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-16 0:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-16 0:04 mdocml: Fix allowing silly '\'' control character kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).