TempleOSCDV4.06.ISO
This commit is contained in:
1 parent
6fe38d2d9d
commit
b632ab9a4f
261 files changed
+6282
-5801
No files matched your search
+14
-14
@@ -3,7 +3,7 @@
|
||||
I64 LineRep1(CDirEntry *tempde)
|
||||
{
|
||||
CDoc *doc;
|
||||
I64 result=0,i;
|
||||
I64 res=0,i;
|
||||
while (tempde) {
|
||||
i=0;
|
||||
if (tempde->attr&RS_ATTR_DIR)
|
||||
@@ -15,10 +15,10 @@ I64 LineRep1(CDirEntry *tempde)
|
||||
DocDel(doc);
|
||||
}
|
||||
tempde->user_data=i;
|
||||
result+=i;
|
||||
res+=i;
|
||||
tempde=tempde->next;
|
||||
}
|
||||
return result;
|
||||
return res;
|
||||
}
|
||||
U0 LineRep2(CDoc *doc,CDirEntry *tempde)
|
||||
{
|
||||
@@ -35,26 +35,26 @@ U0 LineRep2(CDoc *doc,CDirEntry *tempde)
|
||||
}
|
||||
public I64 LineRep(U8 *files_find_mask="/*",U8 *fu_flags=NULL)
|
||||
{//Source line-of-code count report.
|
||||
I64 fuf_flags=0,result=0;
|
||||
I64 fuf_flags=0,res=0;
|
||||
CDoc *doc=DocNew;
|
||||
CDirEntry *tempde1=NULL;
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+S");
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
|
||||
if (tempde1=FilesFind(files_find_mask,fuf_flags)) {
|
||||
result=LineRep1(tempde1);
|
||||
DocPrint(doc,"%8,d $$TR+C,\"%s\"$$\n$$ID,2$$",result,files_find_mask);
|
||||
res=LineRep1(tempde1);
|
||||
DocPrint(doc,"%8,d $$TR+C,\"%s\"$$\n$$ID,2$$",res,files_find_mask);
|
||||
LineRep2(doc,tempde1);
|
||||
DocPrint(doc,"$$ID,-2$$");
|
||||
DirTreeDel(tempde1);
|
||||
}
|
||||
DocInsDoc(DocPut,doc);
|
||||
DocDel(doc);
|
||||
return result;
|
||||
return res;
|
||||
}
|
||||
|
||||
I64 SizeRep1(CDirEntry *tempde,I64 *_fuf_flags)
|
||||
{
|
||||
I64 result=0,i;
|
||||
I64 res=0,i;
|
||||
U8 buf[BLK_SIZE];
|
||||
CDrv *dv;
|
||||
while (tempde) {
|
||||
@@ -67,10 +67,10 @@ I64 SizeRep1(CDirEntry *tempde,I64 *_fuf_flags)
|
||||
i=(&buf)(CArcCompress *)->expanded_size;
|
||||
}
|
||||
tempde->user_data=i;
|
||||
result+=i;
|
||||
res+=i;
|
||||
tempde=tempde->next;
|
||||
}
|
||||
return result;
|
||||
return res;
|
||||
}
|
||||
U0 SizeRep2(CDoc *doc,CDirEntry *tempde)
|
||||
{
|
||||
@@ -90,20 +90,20 @@ U0 SizeRep2(CDoc *doc,CDirEntry *tempde)
|
||||
}
|
||||
public I64 SizeRep(U8 *files_find_mask="/*",U8 *fu_flags=NULL)
|
||||
{//Report file sizes. "+x" for expanded size of compressed files.
|
||||
I64 fuf_flags=0,result=0;
|
||||
I64 fuf_flags=0,res=0;
|
||||
CDoc *doc=DocNew;
|
||||
CDirEntry *tempde1=NULL;
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
|
||||
if (tempde1=FilesFind(files_find_mask,fuf_flags&FUG_FILES_FIND)) {
|
||||
fuf_flags&=FUF_EXPAND;
|
||||
result=SizeRep1(tempde1,&fuf_flags);
|
||||
DocPrint(doc,"%10,d $$TR+C,\"%s\"$$\n$$ID,2$$",result,files_find_mask);
|
||||
res=SizeRep1(tempde1,&fuf_flags);
|
||||
DocPrint(doc,"%10,d $$TR+C,\"%s\"$$\n$$ID,2$$",res,files_find_mask);
|
||||
SizeRep2(doc,tempde1);
|
||||
DocPrint(doc,"$$ID,-2$$");
|
||||
DirTreeDel(tempde1);
|
||||
}
|
||||
DocInsDoc(DocPut,doc);
|
||||
DocDel(doc);
|
||||
return result;
|
||||
return res;
|
||||
}
|
||||
Reference in new issue
Block a user