TempleOSTS_131005.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:52 +02:00
1 parent 1343005a29
commit 2d2a65d572
547 files changed
+33608 -12549

No files matched your search

+40 -40
View File
@@ -20,20 +20,20 @@ CTask *SingleSong(U8 *msg,U8 *name)
Bool JBPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
{ //ch=ASCII; sc=scancode
CDocEntry *doc_ce=doc->cur_entry,*doc_e;
CDirEntry *tempm;
CDirEntry *tempde;
CDoc *s;
if (!(sc&(SCF_ALT|SCF_CTRL|SCF_SHIFT))
&& doc_ce->type_u8==DOCT_MENU_VAL && doc_ce->left_exp>=0) {
tempm=doc_ce->left_exp;
tempde=doc_ce->left_exp;
if (sc.u8[0]==SC_DELETE ) {
Beep;
Silent(ON);
Del(tempm->full_name);
Del(tempde->full_name);
Silent(OFF);
} else if ('0'<=ch<='9') {
if (StrLen(doc_ce->tag)>1)
doc_ce->tag[0]=ch;
s=DocRead(tempm->full_name);
s=DocRead(tempde->full_name);
doc_e=s->root.next;
while (doc_e!=s && doc_e->type_u8!=DOCT_TEXT)
doc_e=doc_e->next;
@@ -44,7 +44,7 @@ Bool JBPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
DocDel(s);
return TRUE;
} else if (ch==CH_SPACE||ch==CH_ESC)
tempm->user_data++; //JB_RUN_LEVEL++
tempde->user_data++; //JB_RUN_LEVEL++
//<SPACE BAR> is followed by <ESC> --> JB_RUN_LEVEL_TWO
//Actual <ESC> just exits --> JB_RUN_LEVEL_ONE
}
@@ -56,7 +56,7 @@ public U0 JukeBox(U8 *dirname=NULL,U8 **_filename=NULL)
//_filename is for using this as a song-chooser program.
I64 i=0,rating;
U8 *st,*st2;
CDirEntry *tempm,*tempm1;
CDirEntry *tempde,*tempde1;
CDoc *doc=DocNew,*s;
CDocEntry *doc_e;
StrCpy(doc->desc,"JukeBox");
@@ -67,24 +67,24 @@ public U0 JukeBox(U8 *dirname=NULL,U8 **_filename=NULL)
dirname=StrNew("HOME/MusicOrgan");
else
dirname=StrNew(dirname);
st=MSPrintF("%s/*.CPP.Z",dirname);
tempm=FilesFind(st);
st=MPrint("%s/*.CPP.Z",dirname);
tempde=FilesFind(st);
Free(st);
Free(dirname);
doc->user_put_key=&JBPutKey;
tempm1=tempm;
DocPutS(doc,
tempde1=tempde;
DocPrint(doc,
"Key: $$FG,GREEN$$Graphics $$FG,BLUE$$Words $$FG,RED$$No Nothing "
"$$FG,BLACK$$Incomplete $$FG,CYAN$$Special$$FG$$\n\n"
"$$FG,GREEN$$<DELETE>$$FG$$ to delete a song.\n"
"Press a number to rate a song.\n");
while (tempm1) {
while (tempde1) {
if (!(i++%5))
DocPutS(doc,"\n");
if (FileOcc("Play(",tempm1->full_name,"")) {
st=StrNew(tempm1->name);
DocPrint(doc,"\n");
if (FileOcc("Play(",tempde1->full_name,"")) {
st=StrNew(tempde1->name);
FileExtRem(st);
s=DocRead(tempm1->full_name);
s=DocRead(tempde1->full_name);
doc_e=s->root.next;
while (doc_e!=s && doc_e->type_u8!=DOCT_TEXT)
doc_e=doc_e->next;
@@ -92,55 +92,55 @@ public U0 JukeBox(U8 *dirname=NULL,U8 **_filename=NULL)
if (doc_e!=s && doc_e->type_u8==DOCT_TEXT) {
if ('0'<=doc_e->tag[2]<='9')
rating=doc_e->tag[2];
if (StrStr(doc_e->tag,"incomplete"))
DocPutS(doc,"$$FG,BLACK$$");
else if (StrStr(doc_e->tag,"has graphics"))
DocPutS(doc,"$$FG,GREEN$$");
else if (StrStr(doc_e->tag,"has words"))
DocPutS(doc,"$$FG,BLUE$$");
else if (StrStr(doc_e->tag,"special"))
DocPutS(doc,"$$FG,CYAN$$");
else if (StrStr(doc_e->tag,"no nothing")) {
DocPutS(doc,"$$FG,RED$$");
if (FileOcc("\\0",tempm1->full_name,"")) {
if (StrMatch("incomplete",doc_e->tag))
DocPrint(doc,"$$FG,BLACK$$");
else if (StrMatch("has graphics",doc_e->tag))
DocPrint(doc,"$$FG,GREEN$$");
else if (StrMatch("has words",doc_e->tag))
DocPrint(doc,"$$FG,BLUE$$");
else if (StrMatch("special",doc_e->tag))
DocPrint(doc,"$$FG,CYAN$$");
else if (StrMatch("no nothing",doc_e->tag)) {
DocPrint(doc,"$$FG,RED$$");
if (FileOcc("\\0",tempde1->full_name,"")) {
s->cur_entry=doc_e->next;
s->cur_data_col=0;
DocEntryDel(s,doc_e);
DocPutS(s,"//0 has words\n");
DocPrint(s,"//0 has words\n");
DocWrite(s);
}
}
DocPrintF(doc,"$$MU-UL,\"%c%-8ts\",%d$$ ",rating,st,tempm1);
tempm1->user_data=JB_RUN_LEVEL_NULL;
DocPrint(doc,"$$MU-UL,\"%c%-8ts\",%d$$ ",rating,st,tempde1);
tempde1->user_data=JB_RUN_LEVEL_NULL;
}
DocDel(s);
Free(st);
}
tempm1=tempm1->next;
tempde1=tempde1->next;
}
DocPrintF(doc,"\n$$FG,CYAN$$$$MU-UL,\"DONE\",%d$$\n",DOCM_CANCEL);
DocPrint(doc,"\n$$FG,CYAN$$$$MU-UL,\"DONE\",%d$$\n",DOCM_CANCEL);
while (TRUE) {
if (_filename)
tempm1=PopUpMenu(doc,DOF_INTERCEPT_TASK_END);
tempde1=PopUpMenu(doc,DOF_INTERCEPT_TASK_END);
else
tempm1=PopUpMenu(doc);
tempde1=PopUpMenu(doc);
if (task)
Kill(task);
if (tempm1<0) break;
st2=StrNew(tempm1->name);
if (tempde1<0) break;
st2=StrNew(tempde1->name);
if (_filename) {
Free(*_filename);
*_filename=StrNew(tempm1->full_name);
*_filename=StrNew(tempde1->full_name);
}
if (tempm1->user_data==JB_RUN_LEVEL_ONE) break; //<ESC>
tempm1->user_data=JB_RUN_LEVEL_NULL; //Rst from <SPACE BAR>
if (tempde1->user_data==JB_RUN_LEVEL_ONE) break; //<ESC>
tempde1->user_data=JB_RUN_LEVEL_NULL; //Rst from <SPACE BAR>
FileExtRem(st2);
st=MSPrintF("ExeFile(\"%s\");",tempm1->full_name);
st=MPrint("ExeFile(\"%s\");",tempde1->full_name);
MusicSettingsRst;
task=SingleSong(st,st2);
Free(st2);
Free(st);
}
DocDel(doc);
CDirLstDel(tempm);
DirLstDel(tempde);
}