summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-10-15 23:19:41 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-10-15 23:19:41 +0000
commit980cb45f489c192f083e3bb5658bee53ddca1dcd (patch)
tree60e5723b3a3604fb784c1ea8a23c33947d6c54ae
parent6dc483976756885c0e37f520770a46a87a3055ce (diff)
Allow blank lines and ignore comments in tbl data.
This finally allows terminfo(5) to build. Now we can build all man(7)-tbl(1) in base without loss of information, though some still look ugly.
-rw-r--r--usr.bin/mandoc/tbl_data.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mandoc/tbl_data.c b/usr.bin/mandoc/tbl_data.c
index 6b87ae72583..09bfbebcda5 100644
--- a/usr.bin/mandoc/tbl_data.c
+++ b/usr.bin/mandoc/tbl_data.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_data.c,v 1.2 2010/10/15 21:33:47 schwarze Exp $ */
+/* $Id: tbl_data.c,v 1.3 2010/10/15 23:19:40 schwarze Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -79,10 +79,10 @@ tbl_data(struct tbl *tbl, const char *f, int ln, const char *p)
struct tbl_span *dp;
int i, j;
- if (0 == p[0])
- return(tbl_errx(tbl, ERR_SYNTAX, f, ln, 0));
-
if ('.' == p[0] && ! isdigit((u_char)p[1])) {
+ /* Comment lines end up here with just a dot. */
+ if ('\0' == p[1])
+ return(1);
/*
* XXX: departs from tbl convention in that we disallow
* macros in the data body.