=================================================================== RCS file: /cvs/mandoc/Attic/mdocml.c,v retrieving revision 1.5 retrieving revision 1.8 diff -u -p -r1.5 -r1.8 --- mandoc/Attic/mdocml.c 2008/11/22 20:15:34 1.5 +++ mandoc/Attic/mdocml.c 2008/11/23 22:30:53 1.8 @@ -1,4 +1,4 @@ -/* $Id: mdocml.c,v 1.5 2008/11/22 20:15:34 kristaps Exp $ */ +/* $Id: mdocml.c,v 1.8 2008/11/23 22:30:53 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -71,7 +71,8 @@ main(int argc, char *argv[]) if (1 == argc) in = *argv++; - args.type = MD_DUMMY; + args.type = MD_HTML4_STRICT; + args.dbg = MD_DBG_TREE; return(begin_io(&args, out ? out : "-", in ? in : "-")); } @@ -165,6 +166,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);