home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix Heaven Sunny 2
/
APPARE2.BIN
/
oh_towns
/
taropyon
/
edia
/
ccisrc
/
he386.c
< prev
next >
Wrap
Text File
|
1995-06-20
|
2KB
|
82 lines
/*************************************************************************
* "he386.c"
*************************************************************************/
char *_he386p_ = "he386p.exp";
char he386_option[256] = {0};
int he386_compile( char *pn )
{
int ret, drv;
char tmp[256], fn[256];
/* カレント変更 */
drv = toupper(pn[0]) - 'A';
FS_chdrv(drv);
FS_getDnamPath(tmp,pn);
FS_chdir(tmp);
/* DTA 領域の設定 */
AplDtaInit();
AplDtaSetStr( "$MainArg", "%s %s %s", _he386p_, he386_option, pn );
ret = AplPclExec( _he386p_, 4 );
FS_getFnam(fn,pn);
FS_appendSnam( fn, fn, ".mid" );
if ( FS_isFileExist(fn) > 0 )
MID_playStart( fn );
return (NORMAL);
}
int he386_menu( char *pn )
{
int ret;
char tmp[256];
char *dlg;
char *mnu;
char *obj;
char *p;
if ( pn[0] == '\0' )
return (NORMAL);
obj = MNU_alloc(3);
MNU_setObj(obj, 0, MNU_NOR, 'O', "Option" , NULL, 1, NULL, NULL);
MNU_setObj(obj, 1, MNU_BLK, 0 , NULL , NULL, 2, NULL, NULL);
MNU_setObj(obj, 2, MNU_NOR, 'C', "Compile (normal)", NULL, 3, NULL, NULL);
mnu = MNU_open( DLGPOS_MOS_SET_HOME, DLGPOS_MOS_SET_HOME, MNUATT_EXIT,
obj, "MML Compile" );
for(;;)
{
ret = MNU_start ( mnu );
switch ( ret )
{
case 1: /* option */
dlg = DLG_getsOpen( DLGPOS_MOS_SET_HOME, DLGPOS_MOS_SET_HOME, 320,
"HE386 のオプションパラメータを入力してください。");
DLG_getsSetTitle( dlg, "MML Compiler option parameter" );
strcpy( tmp, he386_option);
ret = DLG_getsStart( dlg, 255, tmp );
if ( ret >= 0 )
strcpy( he386_option, tmp );
DLG_getsClose(dlg);
break;
case 3: /* compile */
he386_compile( pn );
goto _RET;
default:
goto _RET;
}
}
_RET:
MNU_close(mnu);
MNU_free(obj);
return (NORMAL);
}