
char	_OUT_OF_STRING_SPACE[24] = "Out of string space!";

/*************************************************************************
*	システムエクスクルーシブメッセージを作成する
*************************************************************************/

int		make_sysEx( char *buf, size_t siz, UCHAR *dat )
{
	int		i, len;
	char	*p, tmp[8];

	p = buf;
	strcpy( p, "@EXCL(");
	p += 6;
	for ( i = 1; i < siz - 1; ++i )
	{
		sprintf(tmp, "%d", dat[i] & 0xFF );
		strcpy(p,tmp);	p += strlen(tmp);
		if ( i < siz - 2 )
		{
			*p = ',';
			++p;
		}
	}
	*p = ')';	++p;
	*p = '\0';

	return (strlen(buf));
}
