home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 3
/
FREEWARE.BIN
/
towns_os
/
pon_tool
/
eupplay.c
< prev
next >
Wrap
Text File
|
1980-01-02
|
969b
|
52 lines
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#define MAX_BUF (1024*256)
void play_misc(char *buf);
static char eup_buf[MAX_BUF];
void dsp_msg(form,...)
char *form;
{
va_list arg;
va_start(arg,form);
vfprintf(stderr,form,arg);
}
void main(argc,argv)
int argc;
char *argv[];
{
FILE *fp;
char *eupfile;
char *p;
char tmp[80];
dsp_msg("Euphony Music Play Program Version 1.00\n");
dsp_msg("Copyleft (c) 1990 Nifty TOWNS Forum YAMA&Ken\n");
while ( --argc > 0 ) {
eupfile = *(++argv);
if ( (p = strrchr(eupfile,'\\')) == NULL ) p = eupfile;
if ( strrchr(p,'.') == NULL ) {
sprintf(tmp,"%s.EUP",eupfile);
eupfile = tmp;
}
if ( (fp = fopen(eupfile,"rb")) == NULL ) {
dsp_msg("Can't open '%s'\n",eupfile);
break;
}
fread(eup_buf,1,MAX_BUF,fp);
fclose(fp);
play_misc(eup_buf);
}
}