Files
TempleOS-Rijn/SparrowOS/Apps/AfterEgypt/Comics.CPP
T
2018-09-08 21:45:28 +02:00

28 lines
516 B
C++

U0 ViewComics()
{
I64 i=0;
U8 *st;
CDirEntry *tempm,*tempm1;
CDoc *doc=DocNew;
tempm=FilesFind("Comics/*.TXT.Z");
tempm1=tempm;
while (tempm1) {
if (!(i++&3))
DocPutS(doc,"\n");
st=StrNew(tempm1->name);
FileExtRem(st);
tempm1->user_data=DocPrintF(doc,"$$MU-UL,\"%-10ts\",%d$$ ",st,tempm1);
Free(st);
tempm1=tempm1->next;
}
while (TRUE) {
if ((tempm1=PopUpMenu(doc))>0)
Ed(tempm1->full_name);
else
break;
}
DocDel(doc);
CDirListDel(tempm);
}