link-grammar-5.8.0/link-grammar/parse/prune.c
/**
 * Return \c true if a pass has not made any changes.
 * Also print pruning pass stats.
 */
Return \c true if a pass has not made any changes.
Also print pruning pass stats.
Return \ c true if a pass has not made any changes . Also print pruning pass stats .
static bool pruning_pass_end(prune_context *pc, const char *pass_dir,
                             int *prune_total)
{
	int total = pc->N_deleted[0] + pc->N_deleted[1];
	char xlink_found[32] = "";
	if (pc->N_xlink != 0)
		snprintf(xlink_found, sizeof(xlink_found), ", xlink=%d", pc->N_xlink);
	lgdebug(D_PRUNE, "Debug: %s pass changed %d and deleted %d (%d+%d)%s\n",
	        pass_dir, pc->N_changed, total, pc->N_deleted[0], pc->N_deleted[1],
	        xlink_found);
	bool pass_end = ((pc->N_changed == 0) && (total == 0));
	pc->N_changed = pc->N_deleted[0] = pc->N_deleted[1] = pc->N_xlink = 0;
	*prune_total += total;
	return pass_end;
}
static bool pruning_pass_end ( prune_context * pc , const char * pass_dir , int * prune_total ) { int total = pc -> N_deleted [ 0 ] + pc -> N_deleted [ 1 ] ; char xlink_found [ 32 ] = " " ; if ( pc -> N_xlink != 0 ) snprintf ( xlink_found , sizeof ( xlink_found ) , " " , pc -> N_xlink ) ; lgdebug ( D_PRUNE , " \n " , pass_dir , pc -> N_changed , total , pc -> N_deleted [ 0 ] , pc -> N_deleted [ 1 ] , xlink_found ) ; bool pass_end = ( ( pc -> N_changed == 0 ) && ( total == 0 ) ) ; pc -> N_changed = pc -> N_deleted [ 0 ] = pc -> N_deleted [ 1 ] = pc -> N_xlink = 0 ; * prune_total += total ; return pass_end ; }
Return \c true if a pass has not made any changes.
Return \ c true if a pass has not made any changes .