TempleOSTS_130707.ISO
This commit is contained in:
1 parent
17b71f1a2d
commit
1343005a29
617 files changed
+14399
-25130
No files matched your search
@@ -13,7 +13,31 @@ For this example, however, I wanted to use DocPrintF
|
||||
and disabled Preemption myself.
|
||||
*/
|
||||
|
||||
#include "/TempleOS/Demo/Shared/TreeDemoJoin"
|
||||
U0 TreeSub(CDoc *doc,CDirEntry *tempm)
|
||||
{
|
||||
CDirEntry *tempm1;
|
||||
while (tempm) {
|
||||
tempm1=tempm->next;
|
||||
if (tempm->attr & _ATTR_DIR) {
|
||||
DocPutS(doc,"$$TR,\"\"$$");
|
||||
DocPrintF(doc,"$$MA+A,\"%s\",\"Cd(\\\"%s\\\");Dir;\n\"$$\n",
|
||||
tempm->name,tempm->full_name);
|
||||
if (tempm->sub) {
|
||||
DocPutS(doc,"$$ID,+2$$");
|
||||
TreeSub(doc,tempm->sub);
|
||||
DocPutS(doc,"$$ID,-2$$");
|
||||
}
|
||||
} else {
|
||||
DocPrintF(doc,"$$LK,\"%s\",\"FI:%s\"$$\n",
|
||||
tempm->name,tempm->full_name);
|
||||
}
|
||||
//Note there is also a routine
|
||||
//to delete an entire CDirEntry tree.
|
||||
//See $LK,"CDirLstDel","MN:CDirLstDel"$().
|
||||
CDirEntryDel(tempm);
|
||||
tempm=tempm1;
|
||||
}
|
||||
}
|
||||
|
||||
U0 TreeDemo()
|
||||
{
|
||||
@@ -24,7 +48,7 @@ U0 TreeDemo()
|
||||
DocPutS(doc,"$$ID,+2$$");
|
||||
TreeSub(doc,FilesFind("/TempleOS/*",fuf_flags));
|
||||
DocPutS(doc,"$$ID,-2$$");
|
||||
DocInsDoc(DocCur,doc);
|
||||
DocInsDoc(DocPut,doc);
|
||||
DocDel(doc);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user