summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2010-10-15 23:19:40 +0000
committerschwarze <schwarze@openbsd.org>2010-10-15 23:19:40 +0000
commit4ae97e2f3156d63ebb47694b34dbf66da47a05a0 (patch)
tree04929d951cdd0d09b5c351feade4c1bb9d3ea5c6
parentFor now, parse and ignore minimal column width specifications. (diff)
downloadwireguard-openbsd-4ae97e2f3156d63ebb47694b34dbf66da47a05a0.tar.xz
wireguard-openbsd-4ae97e2f3156d63ebb47694b34dbf66da47a05a0.zip
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.