/**********************************************************************
 
	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"

void
print_cid(int * cid)
{
int i;
	printf("(cid ");
	for ( i = 1 ; i <= cid[0] ; i ++ )
		printf("%i ",cid[i]);
	printf(")");
}

char *
s_print_cid(int * target)
{
int len;
char * ret;
int i;
char * ptr;
	len = target[0];
	ret = d_alloc(len*10+10);
	sprintf(ret,"[");
	ptr = ret + strlen(ret);
	for ( i = 1 ; i <= len ; i ++ ) {
		sprintf(ptr,"%i ",target[i]);
		ptr = ptr + strlen(ptr);
	}
	sprintf(ptr,"]");
	set_buffer(ret);
	return ret;
}

