/****************************************************************
 *								*
 * Copyright (c) 2001-2024 Fidelity National Information	*
 * Services, Inc. and/or its subsidiaries. All rights reserved.	*
 *								*
 *	This source code contains the intellectual property	*
 *	of its copyright holder(s), and is made available	*
 *	under a license.  If you do not know the terms of	*
 *	the license, please stop and do not read further.	*
 *								*
 ****************************************************************/

#include "mdef.h"
#include "compiler.h"

void walktree(mtreenode *node, void (*f)(mtreenode *, void *), void *arg)
{
	while (TRUE)
	{
		if (node->var.lson)
			walktree(node->links.lson, f, arg);
		(*f)(node, arg);
		if (node->var.rson)
			node = node->links.rson;
		else
			break;
	}
	return;
}
