this for yourself by having a file consisting only of comments).
-/* $Id: main.c,v 1.157 2011/03/21 12:04:26 kristaps Exp $ */
+/* $Id: main.c,v 1.158 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>
"generic fatal error",
+ "not a manual",
"column syntax is inconsistent",
"NOT IMPLEMENTED: .Bd -file",
"line scope broken, syntax violated",
-/* $Id: mandoc.h,v 1.65 2011/03/22 09:48:13 kristaps Exp $ */
+/* $Id: mandoc.h,v 1.66 2011/03/22 10:35:26 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
MANDOCERR_FATAL, /* ===== start of fatal errors ===== */
+ MANDOCERR_NOTMANUAL, /* manual isn't really a manual */
MANDOCERR_COLUMNS, /* column syntax is inconsistent */
MANDOCERR_BADDISP, /* NOT IMPLEMENTED: .Bd -file */
MANDOCERR_SYNTLINESCOPE, /* line scope broken, syntax violated */
-/* $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>
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);
}