aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdocml.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-11-23 22:30:53 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-11-23 22:30:53 +0000
commitce7f70a4bc4254e9ddb802c4dddb96c1e1a5061a (patch)
treeb85b6c1ed507b52dbdc2d85f51969f9bb11c2f2c /mdocml.c
parentf112f081ce6342cac8aaa76066abd437028e89ae (diff)
downloadmandoc-ce7f70a4bc4254e9ddb802c4dddb96c1e1a5061a.tar.gz
mandoc-ce7f70a4bc4254e9ddb802c4dddb96c1e1a5061a.tar.zst
mandoc-ce7f70a4bc4254e9ddb802c4dddb96c1e1a5061a.zip
Considerable improvements across the board.
Diffstat (limited to 'mdocml.c')
-rw-r--r--mdocml.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mdocml.c b/mdocml.c
index e27748f0..df834d90 100644
--- a/mdocml.c
+++ b/mdocml.c
@@ -1,4 +1,4 @@
-/* $Id: mdocml.c,v 1.7 2008/11/23 19:10:03 kristaps Exp $ */
+/* $Id: mdocml.c,v 1.8 2008/11/23 22:30:53 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -167,6 +167,9 @@ begin_bufs(const struct md_args *args,
if (-1 == fstat(in->fd, &stin)) {
warn("%s", in->name);
return(1);
+ } else if (0 == stin.st_size) {
+ warnx("%s: empty file", in->name);
+ return(1);
} else if (-1 == fstat(out->fd, &stout)) {
warn("%s", out->name);
return(1);