/**********************************************************************
 
	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	<string.h>
#include	"version.h"


VERSION * version_list;


void
set_version(VERSION * v)
{
	v->next = version_list;
	version_list = v;
}


VERSION * 
get_version(char * layer)
{
VERSION * ret;
	if ( layer == 0 )
		return version_list;
	ret = version_list;
	for ( ; ret ; ret = ret->next ) {
		if ( strcmp(ret->layer,layer) == 0 )
			return ret;
	}
	return 0;
}