home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FreeWare Collection 3
/
FreeSoftwareCollection3pd199x-jp.img
/
pao
/
ms_dos
/
cdplay
/
src
/
cdp.c
< prev
next >
Wrap
Text File
|
1980-01-02
|
2KB
|
76 lines
/** << MSC V5.1 >> ************************************************************
**
** 簡易CD演奏プログラム
**
** ----- HISTORY -----
** 1990.02.22 : CREATE
** 1990.05.12 : リピート回数のバグ修正。==> CDR.C
** 1990.07.03 : CDドライブのデバイスが登録されていない時のメッセージ追加。
** ==> CDPLAY.C
**
** Programed by Y.Hirata ( Nifty ID : NAB03321 )
**
******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "cdr.h"
#include <dos.h>
extern CDplay() ;
void main( int ac, char *av[] )
{
int st, end, rep ;
char key ;
printf("簡易CD演奏プログラム (C)パオパオ 1990. ") ;
printf("<< Copyright (C) Y.Hirata 1990. >>\n") ;
printf("\nCD-PLAY Version 1.11\n") ;
if ( ac>1 ) {
st = atoi( av[1] ) ;
if ( ac>2 ) {
end = atoi( av[2] ) ;
if ( ac>3 )
rep = atoi( av[3] ) ;
else
rep = 1 ;
} else {
end = 99 ;
rep = 1 ;
}
} else {
st = 1 ;
end = 99 ;
rep = 1 ;
}
if ( st > end )
printf("\x1b[31mParameter error !!!\x1b[m\n") ;
else {
if ( st < 0 ) {
printf("\x1b[36mCD演奏をSTOPします。\x1b[m\n") ;
CDR_mstop( 0 ) ;
goto close ;
}
if ( st < 1 || end > 99 )
printf("\x1b[33mWarning!! : PLAY No.( 1 ~ 99 )\x1b[m\n") ;
if ( rep < 1 ) {
printf("\x1b[33mWarning!! : ") ;
printf("( REPEAT = 1 ~ 255 ) : Set repeat = 1") ;
printf("\x1b[m\n") ;
rep = 1 ;
}
if ( rep > 255 ) {
printf("\x1b[33mWarning!! : ") ;
printf("( REPEAT = 1 ~ 255 ) : Set repeat = 255") ;
printf("\x1b[m\n") ;
rep = 255 ;
}
CDplay( 1,st,end,(unsigned char)rep ) ;
}
close: ;
}