예제 #1
0
static void
mparse_end(struct mparse *curp)
{

	if (MANDOCLEVEL_FATAL <= curp->file_status)
		return;

	if (curp->mdoc && ! mdoc_endparse(curp->mdoc)) {
		assert(MANDOCLEVEL_FATAL <= curp->file_status);
		return;
	}

	if (curp->man && ! man_endparse(curp->man)) {
		assert(MANDOCLEVEL_FATAL <= curp->file_status);
		return;
	}

	if ( ! (curp->man || curp->mdoc)) {
		mandoc_msg(MANDOCERR_NOTMANUAL, curp, 1, 0, NULL);
		curp->file_status = MANDOCLEVEL_FATAL;
		return;
	}

	roff_endparse(curp->roff);
}
예제 #2
0
static void
mparse_end(struct mparse *curp)
{

	if (MANDOCLEVEL_FATAL <= curp->file_status)
		return;

	if (curp->mdoc == NULL &&
	    curp->man == NULL &&
	    curp->sodest == NULL) {
		if (curp->options & MPARSE_MDOC)
			curp->mdoc = curp->pmdoc;
		else {
			if (curp->pman == NULL)
				curp->pman = man_alloc(curp->roff, curp,
				    curp->options & MPARSE_QUICK ? 1 : 0);
			curp->man = curp->pman;
		}
	}

	if (curp->mdoc && ! mdoc_endparse(curp->mdoc)) {
		assert(MANDOCLEVEL_FATAL <= curp->file_status);
		return;
	}

	if (curp->man && ! man_endparse(curp->man)) {
		assert(MANDOCLEVEL_FATAL <= curp->file_status);
		return;
	}

	roff_endparse(curp->roff);
}
예제 #3
0
파일: read.c 프로젝트: Hooman3/freebsd
static void
mparse_end(struct mparse *curp)
{

	if (curp->man == NULL && curp->sodest == NULL)
		curp->man = roff_man_alloc(curp->roff, curp, curp->defos,
		    curp->options & MPARSE_QUICK ? 1 : 0);
	if (curp->man->macroset == MACROSET_NONE)
		curp->man->macroset = MACROSET_MAN;
	if (curp->man->macroset == MACROSET_MDOC)
		mdoc_endparse(curp->man);
	else
		man_endparse(curp->man);
	roff_endparse(curp->roff);
}