From b4c01f5c60dab8debad192bef6f9db1c465255b9 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 20 Jun 2014 23:02:31 +0000 Subject: As suggested by jmc@, only include line and column numbers into messages when they are meaningful, to avoid confusing stuff like this: $ mandoc /dev/null mandoc: /dev/null:0:1: FATAL: not a manual Instead, just say: mandoc: /dev/null: FATAL: not a manual Another example this applies to is documents having a prologue, but lacking a body. Do not throw a FATAL error for these; instead, issue a WARNING and show the empty document, in the man(7) case with the same amount of blank lines as groff does. Also downgrade mdoc(7) documents having content before the first .Sh from FATAL to WARNING. --- man.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'man.h') diff --git a/man.h b/man.h index 26c2747b..aa80b673 100644 --- a/man.h +++ b/man.h @@ -1,4 +1,4 @@ -/* $Id: man.h,v 1.64 2014/03/30 19:47:48 schwarze Exp $ */ +/* $Id: man.h,v 1.65 2014/06/20 23:02:31 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -79,6 +79,7 @@ struct man_meta { char *vol; /* `TH' volume */ char *title; /* `TH' title (e.g., FOO) */ char *source; /* `TH' source (e.g., GNU) */ + int hasbody; /* document is not empty */ }; struct man_node { -- cgit v1.2.3-56-ge451