#include <stdio.h>
#include <libmidi.h>
#include <libmpu.h>

putMpuCmd(fd, m)
	MpuCmd *m;
/*
** Write midi command 'm' to file descriptor 'fd'.
*/
{
	register int n = m->arg_cnt;
	register unsigned char *c = &m->mpu_cmd[1];

	write(fd,&(m->time_tag),1);
	if (m->time_tag == RT_TCIP) return;
	if (m->cmd_cont==0 || m->cmd_type == RT_TCWME) c--, n++;
	if (n) write(fd,c,n);
}

PutMpuCmd(f, m)
	FILE *f;
	MpuCmd *m;
/*
** Write the midi command 'm' to 'FILE *f'.
*/
{
	putMpuCmd(fileno(f),m);
}
