summaryrefslogtreecommitdiffstats
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
commitf095187c59066df4a733b3186d41bc6f83ad3069 (patch)
tree6de6604490b32f0140ccefda2a49e30a88d822f3 /mdocml.c
parent5d62a0caa37dd565a226a702645ccc3451560085 (diff)
downloadmandoc-f095187c59066df4a733b3186d41bc6f83ad3069.tar.gz
Considerable improvements across the board.
Diffstat (limited to 'mdocml.c')
-rw-r--r--mdocml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mdocml.c b/mdocml.c
index a9fe064a..6bd6d8cf 100644
--- a/mdocml.c
+++ b/mdocml.c
@@ -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);