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

extern VERSION gb_proto_version,gb_code_version,ap_version;

void
init_gb()
{
char * buf;

	set_version(&gb_proto_version);
	set_version(&gb_code_version);

	buf = d_alloc(strlen(gb_code_version.name)
		+ strlen(gb_code_version.version) + 20);

	strcpy(buf,gb_code_version.name);
	strcpy(&buf[strlen(buf)],"/");
	strcpy(&buf[strlen(buf)],gb_code_version.version);
	set_setagent_msg(buf);

	d_f_ree(buf);
}

void
init_gbs()
{
char * buf;

	init_gb();
	set_version(&ap_version);

	buf = d_alloc(strlen(ap_version.name)
		+ strlen(ap_version.version) + 20);

	strcpy(buf,ap_version.name);
	strcpy(&buf[strlen(buf)],"/");
	strcpy(&buf[strlen(buf)],ap_version.version);
	set_setagent_msg(buf);

	d_f_ree(buf);
}

