TempleOSTS_131005.ISO
This commit is contained in:
1 parent
1343005a29
commit
2d2a65d572
547 files changed
+33608
-12549
No files matched your search
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
This uses DocPutS/DocPrintF because updates
|
||||
This uses $LK,"DocPrint","MN:DocPrint"$() because updates
|
||||
to within a tree while a tree is collapsed get
|
||||
messed-up if "live"(like using ordinary PrintF/PutS.)
|
||||
messed-up if "live" (like using ordinary Print.)
|
||||
The insert point is confused by hiding of
|
||||
data in collapsed trees. Therefore, the window main
|
||||
Doc is taken off-line by disabling preemption so there
|
||||
@@ -9,33 +9,33 @@ are no screen updates until all data has been inserted.
|
||||
|
||||
There is a special Doc function which is also
|
||||
available to take an Doc off-line. See $LK,"DocInsSafe","MN:DocInsSafe"$.
|
||||
For this example, however, I wanted to use DocPrintF
|
||||
For this example, however, I wanted to use DocPrint
|
||||
and disabled Preemption myself.
|
||||
*/
|
||||
|
||||
U0 TreeSub(CDoc *doc,CDirEntry *tempm)
|
||||
U0 TreeSub(CDoc *doc,CDirEntry *tempde)
|
||||
{
|
||||
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$$");
|
||||
CDirEntry *tempde1;
|
||||
while (tempde) {
|
||||
tempde1=tempde->next;
|
||||
if (tempde->attr & _ATTR_DIR) {
|
||||
DocPrint(doc,"$$TR,\"\"$$");
|
||||
DocPrint(doc,"$$MA+A,\"%s\",\"Cd(\\\"%s\\\");Dir;\n\"$$\n",
|
||||
tempde->name,tempde->full_name);
|
||||
if (tempde->sub) {
|
||||
DocPrint(doc,"$$ID,+2$$");
|
||||
TreeSub(doc,tempde->sub);
|
||||
DocPrint(doc,"$$ID,-2$$");
|
||||
}
|
||||
} else {
|
||||
DocPrintF(doc,"$$LK,\"%s\",\"FI:%s\"$$\n",
|
||||
tempm->name,tempm->full_name);
|
||||
DocPrint(doc,"$$LK,\"%s\",\"FI:%s\"$$\n",
|
||||
tempde->name,tempde->full_name);
|
||||
}
|
||||
//Note there is also a routine
|
||||
//to delete an entire CDirEntry tree.
|
||||
//See $LK,"CDirLstDel","MN:CDirLstDel"$().
|
||||
CDirEntryDel(tempm);
|
||||
tempm=tempm1;
|
||||
//See $LK,"DirLstDel","MN:DirLstDel"$().
|
||||
DirEntryDel(tempde);
|
||||
tempde=tempde1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,11 +43,11 @@ U0 TreeDemo()
|
||||
{
|
||||
I64 fuf_flags=0;
|
||||
CDoc *doc=DocNew;
|
||||
GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
|
||||
DocPutS(doc,"$$TR-C+AL,\"\"$$\n");
|
||||
DocPutS(doc,"$$ID,+2$$");
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
|
||||
DocPrint(doc,"$$TR-C+AL,\"\"$$\n");
|
||||
DocPrint(doc,"$$ID,+2$$");
|
||||
TreeSub(doc,FilesFind("/TempleOS/*",fuf_flags));
|
||||
DocPutS(doc,"$$ID,-2$$");
|
||||
DocPrint(doc,"$$ID,-2$$");
|
||||
DocInsDoc(DocPut,doc);
|
||||
DocDel(doc);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user