/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/



#include	"memory_debug.h"
#include	"acrp.h"

MAP_PATH_TABLE *
new_mpt()
{
MAP_PATH_TABLE * m;
int i,j;
	m = d_alloc(sizeof(*m));
	for ( i = 0 ; i < ACRP_SUBID_NOS ; i ++ ) {
		m->ent[i].pri = 0;
		m->ent[i].sum = 0;
		for ( j = 0 ; j < ACRP_DIR_NOS ; j ++ ) {
			m->ent[i].dir[j].flags = 0;
			m->ent[i].dir[j].hops = -1;
			m->ent[i].dir[j].map = 0;
			m->ent[i].dir[j].crd = 0;
		}
	}
	m->level = 0;
	m->id = -1;
	m->next = 0;
	return m;
}
