/**********************************************************************
 
	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	"mlong_char.h"
#include	"utils.h"

void
copy_url(URL * a,URL * b)
{
	if ( b->proto ) {
		a->proto = ll_copy_str(b->proto,1542);
	}
	else	a->proto = 0;
	if ( b->server ) {
		a->server = ll_copy_str(b->server,1542);
	}
	else	a->server = 0;
	a->port = b->port;
	if ( b->db ) {
		a->db = ll_copy_str(b->db,1542);
	}
	else	a->db = 0;
	if ( b->user ) {
		a->user = ll_copy_str(b->user,1542);
	}
	else	a->user = 0;
	if ( b->passwd ) {
		a->passwd = ll_copy_str(b->passwd,1542);
	}
	else	a->passwd = 0;
	if ( b->resource ) {
		a->resource = ll_copy_str(b->resource,1542);
	}
	else	a->resource = 0;
}

void
mcopy_url(URL * a,URL * b)
{
	if ( b->proto ) {
		a->proto = ll_copy_mstr(b->proto);
	}
	else	a->proto = 0;
	if ( b->server ) {
		a->server = ll_copy_mstr(b->server);
	}
	else	a->server = 0;
	a->port = b->port;
	if ( b->db ) {
		a->db = ll_copy_mstr(b->db);
	}
	else	a->db = 0;
	if ( b->user ) {
		a->user = ll_copy_mstr(b->user);
	}
	else	a->user = 0;
	if ( b->passwd ) {
		a->passwd = ll_copy_mstr(b->passwd);
	}
	else	a->passwd = 0;
	if ( b->resource ) {
		a->resource = ll_copy_mstr(b->resource);
	}
	else	a->resource = 0;
}
