TempleOSTS_131005.ISO
This commit is contained in:
1 parent
1343005a29
commit
2d2a65d572
547 files changed
+33608
-12549
No files matched your search
@@ -28,7 +28,7 @@ U0 WriteAcct()
|
||||
acctnum=PmtI64("Acct #",-1);
|
||||
if (0<=acctnum<DB_MAX_ACCT) {
|
||||
MemSet(&a,0,BLK_SIZE);
|
||||
if (DocFormDo(&a,"Acct")) {
|
||||
if (DocFormDo(&a)) {
|
||||
f=FOpen(DB_FILENAME,"w+");
|
||||
FWBlks(f,&a,acctnum*DB_ACCT_BLKS,DB_ACCT_BLKS);
|
||||
FClose(f);
|
||||
@@ -47,7 +47,7 @@ U0 ReadAcct()
|
||||
f=FOpen(DB_FILENAME,"r");
|
||||
FRBlks(f,&a,acctnum*DB_ACCT_BLKS,DB_ACCT_BLKS);
|
||||
FClose(f);
|
||||
ClassRep("Acct",&a);
|
||||
ClassRep(&a);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ U0 RawAccess(I64 drv_let=0)
|
||||
PrtRep;
|
||||
PressAKey;
|
||||
|
||||
ClassRep("CPrt",p);
|
||||
ClassRep(p);
|
||||
PressAKey;
|
||||
|
||||
ClassRep("CBlkDev",bdev);
|
||||
ClassRep(bdev);
|
||||
PressAKey;
|
||||
|
||||
//Temporarily change partition range to full device.
|
||||
@@ -4,29 +4,29 @@ hold the file until you are done. The $LK,"CDoc","MN:CDoc"$
|
||||
framework is convenient for this.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,11 +34,11 @@ U0 FPrintFDemo(U8 *output_filename=NULL)
|
||||
{
|
||||
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$$");
|
||||
DocRecalc(doc);
|
||||
if (output_filename) {
|
||||
StrCpy(doc->filename.name,output_filename);
|
||||
|
||||
@@ -5,11 +5,11 @@ $WW,0$*/
|
||||
U0 Main()
|
||||
{
|
||||
I64 i,cnt=0;
|
||||
CDirEntry *tempm=FilesFind("::/TempleOS/*",FUF_RECURSE),
|
||||
**a=FilesOrder(tempm,&cnt);
|
||||
CDirEntry *tempde=FilesFind("::/TempleOS/*",FUF_RECURSE),
|
||||
**a=FilesOrder(tempde,&cnt);
|
||||
for (i=0;i<cnt;i++) {
|
||||
"%08X %s\n",a[i]->cluster,a[i]->full_name;
|
||||
CDirEntryDel(a[i]);
|
||||
DirEntryDel(a[i]);
|
||||
}
|
||||
Free(a);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user