diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-22 10:35:26 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-22 10:35:26 +0000 |
commit | cb427bff4aa7e8472e783055bf9902d03165cf39 (patch) | |
tree | 4fd5f60d1596d75c8f3606b5d43e8a6de10e4637 /read.c | |
parent | bb36e84564dae22baa749ca71a03efc77e2ce5f0 (diff) | |
download | mandoc-cb427bff4aa7e8472e783055bf9902d03165cf39.tar.gz mandoc-cb427bff4aa7e8472e783055bf9902d03165cf39.tar.zst mandoc-cb427bff4aa7e8472e783055bf9902d03165cf39.zip |
Add a FATAL error for when no manual type was assigned (you can repeat
this for yourself by having a file consisting only of comments).
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.5 2011/03/22 09:50:11 kristaps Exp $ */ +/* $Id: read.c,v 1.6 2011/03/22 10:35:26 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -496,16 +496,11 @@ mparse_end(struct mparse *curp) return; } -#if 0 - /* FIXME: NOTE a parser may not have been assigned, yet. */ - if ( ! (curp->man || curp->mdoc)) { - /* FIXME: make into an mandoc.h error. */ - fprintf(stderr, "%s: Not a manual\n", curp->file); + mandoc_msg(MANDOCERR_NOTMANUAL, curp, 1, 0, NULL); curp->file_status = MANDOCLEVEL_FATAL; - goto cleanup; + return; } -#endif roff_endparse(curp->roff); } |