TempleOSCD_150720.ISO
This commit is contained in:
1 parent
401601816c
commit
f8c05f98f4
554 files changed
+26046
-24853
No files matched your search
+32
-29
@@ -3,8 +3,8 @@
|
||||
public U8 *DBlk(I64 blk,Bool write=FALSE)
|
||||
{//Dump disk block. Optionally, write.
|
||||
//If you set write to TRUE, the block will
|
||||
//be written when you press <ESC>.
|
||||
//See $LK,"::/Demo/Dsk/DskRaw.CPP"$.
|
||||
//be written when you press <ESC>.
|
||||
//See $LK,"::/Demo/Dsk/DskRaw.CPP"$.
|
||||
U8 *buf=MAlloc(BLK_SIZE);
|
||||
|
||||
RBlks(Fs->cur_dv,buf,blk,1);
|
||||
@@ -22,9 +22,9 @@ public U8 *DBlk(I64 blk,Bool write=FALSE)
|
||||
public U8 *DCluster(I64 c,Bool write=FALSE,I64 num=0)
|
||||
{//Dump disk cluster. Optionally, write.
|
||||
//If you set write to TRUE, the cluster will
|
||||
//be written when you press <ESC>.
|
||||
//See $LK,"::/Demo/Dsk/DskRaw.CPP"$.
|
||||
//Do $LK,"Dir",A="MN:Dir"$("*",TRUE); to get cluster numbers of files.
|
||||
//be written when you press <ESC>.
|
||||
//See $LK,"::/Demo/Dsk/DskRaw.CPP"$.
|
||||
//Do $LK,"Dir",A="MN:Dir"$("*",TRUE); to get cluster numbers of files.
|
||||
U8 *buf=MAlloc(Fs->cur_dv->spc<<BLK_SIZE_BITS);
|
||||
c=ClusterNumNext(Fs->cur_dv,c,num);
|
||||
RClusters(Fs->cur_dv,buf,c,1);
|
||||
@@ -43,7 +43,7 @@ public U8 *DCluster(I64 c,Bool write=FALSE,I64 num=0)
|
||||
public U8 *Dump(U8 *filename,Bool write=FALSE)
|
||||
{//Dump file. Optionally, write.
|
||||
//If you set write to TRUE, the file will
|
||||
//be written when you press <ESC>.
|
||||
//be written when you press <ESC>.
|
||||
U8 *buf;
|
||||
I64 size;
|
||||
if (buf=FileRead(filename,&size)) {
|
||||
@@ -95,16 +95,16 @@ public I64 FileCnt(CDirEntry *tempde)
|
||||
public Bool Copy(U8 *src_files_find_mask,U8 *dst_files_find_mask=".")
|
||||
{//Copy files.
|
||||
//If the name ends in ".Z", it will
|
||||
//be stored compressed. If not ".Z"
|
||||
//it will be stored uncompressed.
|
||||
//be stored compressed. If not ".Z"
|
||||
//it will be stored uncompressed.
|
||||
Bool result=TRUE;
|
||||
CFileAccess *fa;
|
||||
CDirContext *dirc;
|
||||
CDirEntry *tempde,*tempde1;
|
||||
U8 *st;
|
||||
if (!(tempde=FilesFind(src_files_find_mask,FUF_CLUSTER_ORDER)))
|
||||
return FALSE;
|
||||
if (IsDir(dst_files_find_mask)) {
|
||||
if (fa=FileAccessNew(dst_files_find_mask,TRUE)) {
|
||||
if (dirc=DirContextNew(dst_files_find_mask,TRUE)) {
|
||||
while (tempde) {
|
||||
tempde1=tempde->next;
|
||||
if (!(tempde->attr & RS_ATTR_DIR)) {
|
||||
@@ -116,7 +116,7 @@ public Bool Copy(U8 *src_files_find_mask,U8 *dst_files_find_mask=".")
|
||||
DirEntryDel(tempde);
|
||||
tempde=tempde1;
|
||||
}
|
||||
FileAccessDel(fa);
|
||||
DirContextDel(dirc);
|
||||
}
|
||||
return result;
|
||||
} else
|
||||
@@ -151,10 +151,11 @@ I64 CopyTree2(CDirEntry *tempde,I64 src_dir_len,I64 dst_dir_len,U8 *dst_dir)
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public I64 CopyTree(U8 *src_files_find_mask,U8 *dst_files_find_mask,Bool no_mask=TRUE)
|
||||
public I64 CopyTree(U8 *src_files_find_mask,U8 *dst_files_find_mask,
|
||||
Bool no_mask=TRUE)
|
||||
{//Copy directory tree.
|
||||
//Returns the count of copied files (not dirs).
|
||||
CFileAccess *fa;
|
||||
CDirContext *dirc;
|
||||
CDirEntry *tempde=NULL;
|
||||
I64 result=0,i1,i2;
|
||||
U8 *st1,*st2;
|
||||
@@ -169,18 +170,18 @@ public I64 CopyTree(U8 *src_files_find_mask,U8 *dst_files_find_mask,Bool no_mask
|
||||
}
|
||||
Free(st1);
|
||||
Free(st2);
|
||||
if (fa=FileAccessNew(src_files_find_mask,TRUE,,no_mask)) {
|
||||
tempde=SysFilesFind(fa->mask,FUF_RECURSE);
|
||||
if (dirc=DirContextNew(src_files_find_mask,TRUE,,no_mask)) {
|
||||
tempde=FilesFind(dirc->mask,FUF_RECURSE);
|
||||
st1=CurDir;
|
||||
FileAccessDel(fa);
|
||||
DirContextDel(dirc);
|
||||
i1=StrLen(st1);
|
||||
if (i1==3) i1--;
|
||||
if (fa=FileAccessNew(dst_files_find_mask,TRUE,TRUE)) {
|
||||
if (dirc=DirContextNew(dst_files_find_mask,TRUE,TRUE)) {
|
||||
st2=CurDir;
|
||||
i2=StrLen(st2);
|
||||
if (i2==3) i2--;
|
||||
result=CopyTree2(tempde,i1,i2,st2);
|
||||
FileAccessDel(fa);
|
||||
DirContextDel(dirc);
|
||||
Free(st2);
|
||||
}
|
||||
DirTreeDel(tempde);
|
||||
@@ -198,7 +199,7 @@ I64 DelTreeDirs(CDirEntry *tempde1)
|
||||
if (tempde1->attr & RS_ATTR_DIR) {
|
||||
if (tempde1->sub)
|
||||
result+=DelTreeDirs(tempde1->sub);
|
||||
result+=SysDel(tempde1->full_name,TRUE);
|
||||
result+=Del(tempde1->full_name,TRUE,TRUE);
|
||||
}
|
||||
DirEntryDel(tempde1);
|
||||
tempde1=tempde2;
|
||||
@@ -215,7 +216,7 @@ I64 DelTreeFiles(CDirEntry *tempde1)
|
||||
if (tempde1->sub)
|
||||
result+=DelTreeFiles(tempde1->sub);
|
||||
} else
|
||||
result+=SysDel(tempde1->full_name,FALSE);
|
||||
result+=Del(tempde1->full_name,FALSE,TRUE);
|
||||
DirEntryDel(tempde1);
|
||||
tempde1=tempde2;
|
||||
}
|
||||
@@ -228,8 +229,8 @@ public I64 DelTree(U8 *files_find_mask,U8 *fu_flags=NULL)
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
|
||||
if (IsDir(files_find_mask)) {
|
||||
result=DelTreeDirs(FilesFind(files_find_mask,fuf_flags));
|
||||
result+=SysDel(files_find_mask,TRUE);
|
||||
result+=SysDel(files_find_mask,FALSE);
|
||||
result+=Del(files_find_mask,TRUE,TRUE);
|
||||
result+=Del(files_find_mask,FALSE,TRUE);
|
||||
} else
|
||||
result=DelTreeFiles(FilesFind(files_find_mask,fuf_flags));
|
||||
return result;
|
||||
@@ -240,7 +241,7 @@ U0 TouchFile(U8 *filename,U8 *attr,CDate cdt=MIN_I64)
|
||||
CDrv *dv=Let2Drv(*filename);
|
||||
CDirEntry de;
|
||||
U8 *cur_dir=StrNew(filename),
|
||||
buf[136];
|
||||
buf[STR_LEN];
|
||||
if (FileFind(filename,&de,FUF_JUST_FILES)) {
|
||||
Free(de.full_name);
|
||||
if (!StrCmp(attr,"+?"))
|
||||
@@ -260,14 +261,15 @@ U0 TouchFile(U8 *filename,U8 *attr,CDate cdt=MIN_I64)
|
||||
} else
|
||||
PrintErr("File not found.\n");
|
||||
}
|
||||
public U0 Touch(U8 *files_find_mask,U8 *attr="+?",U8 *fu_flags=NULL,CDate cdt=MIN_I64)
|
||||
public U0 Touch(U8 *files_find_mask,U8 *attr="+?",
|
||||
U8 *fu_flags=NULL,CDate cdt=MIN_I64)
|
||||
{/*Touch file attributes and DateTime.
|
||||
Default lists attributes.
|
||||
attr: "+?" =show current
|
||||
"+T" =resident
|
||||
$LK,"RS_ATTR_READ_ONLY",A="MN:RS_ATTR_READ_ONLY"$ $LK,"ST_FILE_ATTRS",A="MN:ST_FILE_ATTRS"$
|
||||
"+T" =resident
|
||||
$LK,"RS_ATTR_READ_ONLY",A="MN:RS_ATTR_READ_ONLY"$ $LK,"ST_FILE_ATTRS",A="MN:ST_FILE_ATTRS"$
|
||||
To Set DateL:
|
||||
Touch(filename,"",,datetime);
|
||||
Touch(filename,"",,datetime);
|
||||
*/
|
||||
I64 fuf_flags=0;
|
||||
CDirEntry *tempde,*tempde1;
|
||||
@@ -374,7 +376,8 @@ I64 Size1(CDirEntry *tempde,I64 *_fuf_flags,I64 round_to)
|
||||
CDrv *dv;
|
||||
while (tempde) {
|
||||
if ((i=tempde->size) && Bt(_fuf_flags,FUf_EXPAND) &&
|
||||
!(tempde->attr&RS_ATTR_DIR) && FileAttr(tempde->name)&RS_ATTR_COMPRESSED) {
|
||||
!(tempde->attr&RS_ATTR_DIR) &&
|
||||
FileAttr(tempde->name)&RS_ATTR_COMPRESSED) {
|
||||
dv=Let2Drv(*tempde->full_name);
|
||||
RBlks(dv,buf,Cluster2Blk(dv,tempde->cluster),1);
|
||||
i=(&buf)(CArcCompress *)->expanded_size;
|
||||
@@ -392,7 +395,7 @@ I64 Size1(CDirEntry *tempde,I64 *_fuf_flags,I64 round_to)
|
||||
public I64 Size(U8 *files_find_mask="/*",U8 *fu_flags=NULL,I64 round_to=0)
|
||||
{//Total size of files in mask. "+x" for expanded size.
|
||||
//Does not include directory size of base directory, but
|
||||
//does include size of sub directories.
|
||||
//does include size of sub directories.
|
||||
I64 fuf_flags=0,result=0;
|
||||
CDirEntry *tempde1=NULL;
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
|
||||
|
||||
+34
-32
@@ -78,28 +78,28 @@ I64 drv_dsk_dsk_size;
|
||||
public U0 PrtDsk(U8 drv_let=0)
|
||||
{//Partition the disk containing partition drv_let.
|
||||
//drv_let=0 means add new drive that
|
||||
//is not already mounted.
|
||||
//is not already mounted.
|
||||
CBlkDev *bd;
|
||||
CPlannedDrv root,*temppp;
|
||||
CMasterBoot mbr;
|
||||
Bool pri=TRUE;
|
||||
I64 ext_base,drv_let2,pri_cnt=0,
|
||||
i,start_offset,offset,remaining;
|
||||
"This command does not play well\n"
|
||||
"with other operating systems.\n"
|
||||
"You really should use another\n"
|
||||
"operating system's partitioner.\n"
|
||||
"If you use this, it may, in fact,\n"
|
||||
"make your hard drive impossible\n"
|
||||
"to repartition with other operating\n"
|
||||
"until you set block zero to zero\n"
|
||||
"with $$LK,\"MasterBootZero\",\"MN:MasterBootZero\"$$()\n\n\n"
|
||||
"Continue";
|
||||
i,start_offset,offset,remaining;
|
||||
"This command does not play well\n"
|
||||
"with other operating systems.\n"
|
||||
"You really should use another\n"
|
||||
"operating system's partitioner.\n"
|
||||
"If you use this, it may, in fact,\n"
|
||||
"make your hard drive impossible\n"
|
||||
"to repartition with other operating\n"
|
||||
"until you set block zero to zero\n"
|
||||
"with $$LK,\"MasterBootZero\",\"MN:MasterBootZero\"$$()\n\n\n"
|
||||
"Continue";
|
||||
if (!YorN) return;
|
||||
|
||||
if (drv_let)
|
||||
try
|
||||
Let2BlkDev(drv_let);
|
||||
Let2BlkDev(drv_let);
|
||||
catch {
|
||||
drv_let=0;
|
||||
Fs->catch_except=TRUE;
|
||||
@@ -136,9 +136,9 @@ public U0 PrtDsk(U8 drv_let=0)
|
||||
pri=FALSE;
|
||||
}
|
||||
"Blocks Remaining:%d (0x%X)\n",
|
||||
remaining-DRV_HEADER,remaining-DRV_HEADER;
|
||||
remaining-DRV_HEADER,remaining-DRV_HEADER;
|
||||
temppp->size=CeilU64(GetI64("Size in Blocks :",
|
||||
remaining-DRV_HEADER)+DRV_HEADER,ROUND_DRV_TO);
|
||||
remaining-DRV_HEADER)+DRV_HEADER,ROUND_DRV_TO);
|
||||
} while (!(ROUND_DRV_TO<=temppp->size<=FloorU64(remaining,ROUND_DRV_TO)));
|
||||
QueIns(temppp,root.last);
|
||||
remaining-=temppp->size;
|
||||
@@ -225,7 +225,7 @@ public U0 PrtDsk(U8 drv_let=0)
|
||||
for (i=bd->first_drv_let;i<drv_let2;i++)
|
||||
Fmt(i,,FALSE);
|
||||
|
||||
pd_done:
|
||||
pd_done:
|
||||
while (root.next!=&root) {
|
||||
temppp=root.next;
|
||||
QueRem(temppp);
|
||||
@@ -243,7 +243,7 @@ U0 RedSeaDrvView(U8 drv_let=0)
|
||||
CDC *dc=DCAlias;
|
||||
|
||||
l=(GR_HEIGHT-3*FONT_HEIGHT)*(GR_WIDTH-FONT_WIDTH<<1),
|
||||
s=(dv->size+dv->spc-1)/dv->spc;
|
||||
s=(dv->size+dv->spc-1)/dv->spc;
|
||||
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
WinMax;
|
||||
@@ -273,7 +273,7 @@ U0 RedSeaDrvView(U8 drv_let=0)
|
||||
} catch
|
||||
DrvUnlock(dv);
|
||||
GetChar;
|
||||
|
||||
|
||||
SettingsPop;
|
||||
DCFill;
|
||||
DCDel(dc);
|
||||
@@ -285,8 +285,8 @@ U0 FAT32DrvView(U8 drv_let=0)
|
||||
U32 *bitmap;
|
||||
CDC *dc=DCAlias;
|
||||
l=(GR_HEIGHT-3*FONT_HEIGHT)*(GR_WIDTH-FONT_WIDTH<<1),
|
||||
s=(dv->size+dv->spc-1)/dv->spc;
|
||||
|
||||
s=(dv->size+dv->spc-1)/dv->spc;
|
||||
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
WinMax;
|
||||
DocCursor;
|
||||
@@ -315,7 +315,7 @@ U0 FAT32DrvView(U8 drv_let=0)
|
||||
} catch
|
||||
DrvUnlock(dv);
|
||||
GetChar;
|
||||
|
||||
|
||||
SettingsPop;
|
||||
DCFill;
|
||||
DCDel(dc);
|
||||
@@ -340,9 +340,9 @@ public U0 DrvView(U8 drv_let=0)
|
||||
public U0 DskView(U8 drv_let=0)
|
||||
{//Disk view. Pie chart of partition sizes.
|
||||
I64 i,j,
|
||||
h=Fs->pix_width,
|
||||
v=Fs->pix_height,
|
||||
radius;
|
||||
h=Fs->pix_width,
|
||||
v=Fs->pix_height,
|
||||
radius;
|
||||
CDrv *dv;
|
||||
CBlkDev *bd=Let2BlkDev(drv_let);
|
||||
CDC *dc=DCAlias;
|
||||
@@ -367,18 +367,18 @@ public U0 DskView(U8 drv_let=0)
|
||||
sect_end =-((dv->base_offset+dv->size)*2*ã/(bd->max_blk+1));
|
||||
dc->color=BLACK;
|
||||
GrLine(dc,h>>1,v>>1,
|
||||
h>>1+radius*Cos(sect_start),
|
||||
v>>1+radius*Sin(sect_start));
|
||||
h>>1+radius*Cos(sect_start),
|
||||
v>>1+radius*Sin(sect_start));
|
||||
GrLine(dc,h>>1,v>>1,
|
||||
h>>1+radius*Cos(sect_end),
|
||||
v>>1+radius*Sin(sect_end));
|
||||
h>>1+radius*Cos(sect_end),
|
||||
v>>1+radius*Sin(sect_end));
|
||||
|
||||
dc->color=j;
|
||||
GrPrint(dc,0,v-FONT_HEIGHT*j,"%C %-8Z",Drv2Let(dv),
|
||||
dv->type.u16[0],"ST_DRV_TYPES");
|
||||
dv->type.u16[0],"ST_DRV_TYPES");
|
||||
GrFloodFill(dc,
|
||||
h>>1+(radius-4)*Cos((sect_start+sect_end)/2),
|
||||
v>>1+(radius-4)*Sin((sect_start+sect_end)/2),FALSE);
|
||||
h>>1+(radius-4)*Cos((sect_start+sect_end)/2),
|
||||
v>>1+(radius-4)*Sin((sect_start+sect_end)/2),FALSE);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
@@ -389,6 +389,8 @@ public U0 DskView(U8 drv_let=0)
|
||||
DCDel(dc);
|
||||
}
|
||||
|
||||
#help_index "File/Cmd Line (Typically);Cmd Line (Typically)"
|
||||
|
||||
public I64 Zip(U8 *files_find_mask="*",U8 *fu_flags=NULL)
|
||||
{//Compress files by moving to .Z filename.
|
||||
U8 *st;
|
||||
@@ -412,7 +414,7 @@ public I64 Zip(U8 *files_find_mask="*",U8 *fu_flags=NULL)
|
||||
public I64 Unzip(U8 *files_find_mask="*.Z",U8 *fu_flags=NULL)
|
||||
{//Uncompress files by moving to not .Z filename.
|
||||
//You don't have to do this for normal operation.
|
||||
//It automatically unzips ".Z" files.
|
||||
//It automatically unzips ".Z" files.
|
||||
U8 *st;
|
||||
CDirEntry *tempde,*tempde1;
|
||||
I64 result=0,fuf_flags=0;
|
||||
|
||||
+17
-13
@@ -11,7 +11,8 @@ Bool ChkDskConfirm(Bool *_fix,Bool *_confirm)
|
||||
return *_fix;
|
||||
}
|
||||
|
||||
I64 RedSeaChkDskLst(CDrv *dv,CDirEntry *tempde1,U8 *bits,U8 *bits2,I64 size,I64 bpc)
|
||||
I64 RedSeaChkDskLst(CDrv *dv,CDirEntry *tempde1,
|
||||
U8 *bits,U8 *bits2,I64 size,I64 bpc)
|
||||
{
|
||||
CDirEntry *tempde2;
|
||||
I64 i,j,errs=0;
|
||||
@@ -23,18 +24,18 @@ I64 RedSeaChkDskLst(CDrv *dv,CDirEntry *tempde1,U8 *bits,U8 *bits2,I64 size,I64
|
||||
for (i=0;i<j;i++) {
|
||||
if (i+tempde1->cluster-dv->data_area>size) {
|
||||
PrintErr("Invalid Cluster:%s Cluster:%X\n",tempde1->full_name,
|
||||
i+tempde1->cluster);
|
||||
i+tempde1->cluster);
|
||||
errs++;
|
||||
break;
|
||||
}
|
||||
if (LBts(bits,i+tempde1->cluster-dv->data_area)) {
|
||||
PrintErr("Dbl Alloc:%s Cluster:%X\n",tempde1->full_name,
|
||||
i+tempde1->cluster);
|
||||
i+tempde1->cluster);
|
||||
errs++;
|
||||
}
|
||||
if (!LBtr(bits2,i+tempde1->cluster-dv->data_area)) {
|
||||
PrintErr("UnAlloc:%s Cluster:%X\n",tempde1->full_name,
|
||||
i+tempde1->cluster);
|
||||
i+tempde1->cluster);
|
||||
errs++;
|
||||
}
|
||||
}
|
||||
@@ -49,8 +50,8 @@ I64 RedSeaChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
|
||||
I64 i,j,bpc,size,errs=0;
|
||||
CDrv *dv=Let2Drv(drv_let),*old_dv=Fs->cur_dv;
|
||||
U8 *files_find_mask=MStrPrint("%c:/*",Drv2Let(dv)),
|
||||
*old_dir=StrNew(Fs->cur_dir),
|
||||
*bits,*bits2;
|
||||
*old_dir=StrNew(Fs->cur_dir),
|
||||
*bits,*bits2;
|
||||
CDirEntry *ptr,*ptr2;
|
||||
|
||||
Drv(drv_let);
|
||||
@@ -84,7 +85,8 @@ I64 RedSeaChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
|
||||
}
|
||||
}
|
||||
|
||||
errs+=RedSeaChkDskLst(dv,FilesFind(files_find_mask,FUF_RECURSE),bits,bits2,size,bpc);
|
||||
errs+=RedSeaChkDskLst(dv,FilesFind(files_find_mask,FUF_RECURSE),
|
||||
bits,bits2,size,bpc);
|
||||
for (i=1;i<size;i++)
|
||||
if (Bt(bits2,i)) {
|
||||
PrintWarn("Shouldn't Alloc Cluster:%0X\n",i+dv->data_area);
|
||||
@@ -102,7 +104,8 @@ I64 RedSeaChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
|
||||
return errs;
|
||||
}
|
||||
|
||||
I64 FAT32ChkDskLst(CDrv *dv,CDirEntry *tempde1,U8 *bits,U32 *bits2,I64 size,I64 bpc)
|
||||
I64 FAT32ChkDskLst(CDrv *dv,CDirEntry *tempde1,
|
||||
U8 *bits,U32 *bits2,I64 size,I64 bpc)
|
||||
{
|
||||
CDirEntry *tempde2;
|
||||
I64 i,c,errs=0;
|
||||
@@ -152,8 +155,8 @@ I64 FAT32ChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
|
||||
I64 i,bpc,size,c,errs=0;
|
||||
CDrv *dv=Let2Drv(drv_let),*old_dv=Fs->cur_dv;
|
||||
U8 *files_find_mask=MStrPrint("%c:/*",Drv2Let(dv)),
|
||||
*old_dir=StrNew(Fs->cur_dir),
|
||||
*bits;
|
||||
*old_dir=StrNew(Fs->cur_dir),
|
||||
*bits;
|
||||
U32 *bits2;
|
||||
Drv(drv_let);
|
||||
"Scanning...\n";
|
||||
@@ -182,7 +185,8 @@ I64 FAT32ChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
|
||||
c=ClusterNumNext(dv,c);
|
||||
}
|
||||
|
||||
errs+=FAT32ChkDskLst(dv,FilesFind(files_find_mask,FUF_RECURSE),bits,bits2,size,bpc);
|
||||
errs+=FAT32ChkDskLst(dv,FilesFind(files_find_mask,FUF_RECURSE),
|
||||
bits,bits2,size,bpc);
|
||||
|
||||
bits2[1]=0; //See $LK,"FAT32Fmt",A="MN:FAT32Fmt"$()
|
||||
for (i=1;i<size;i++)
|
||||
@@ -220,8 +224,8 @@ public I64 ChkDsk(U8 drv_let=0,Bool fix=FALSE,Bool confirm=TRUE)
|
||||
if (fix)
|
||||
"It might be a little better. ";
|
||||
"Copy files to another partition or CD-ROM, "
|
||||
"reformat, and copy back. "
|
||||
"Or, copy from a back-up.\n";
|
||||
"reformat, and copy back. "
|
||||
"Or, copy from a back-up.\n";
|
||||
}
|
||||
return errs;
|
||||
}
|
||||
+19
-12
@@ -1,4 +1,4 @@
|
||||
#help_index "DolDoc/Output"
|
||||
#help_index "DolDoc/Output;StdOut/DolDoc"
|
||||
U0 DirFileDoc(CDoc *doc,CDirEntry *tempde)
|
||||
{
|
||||
while (tempde) {
|
||||
@@ -49,7 +49,8 @@ CFMUncollapsedLst *FMCollectUncollapsedLst(CDoc *doc)
|
||||
return result;
|
||||
}
|
||||
|
||||
U0 FMMarkUncollapsed(CDoc *doc,CFMUncollapsedLst *tempc,U8 *cur_entry,U8 *next_entry)
|
||||
U0 FMMarkUncollapsed(CDoc *doc,CFMUncollapsedLst *tempc,
|
||||
U8 *cur_entry,U8 *next_entry)
|
||||
{
|
||||
CDocEntry *doc_e=doc->root.next;
|
||||
CFMUncollapsedLst *tempc1;
|
||||
@@ -71,7 +72,8 @@ U0 FMMarkUncollapsed(CDoc *doc,CFMUncollapsedLst *tempc,U8 *cur_entry,U8 *next_e
|
||||
if (StrLen(tempde->full_name)==StrLen(cur_entry))
|
||||
cur_entry=NULL;
|
||||
} else if (next_entry) {
|
||||
if (!StrNCmp(next_entry,tempde->full_name,StrLen(tempde->full_name))) {
|
||||
if (!StrNCmp(next_entry,
|
||||
tempde->full_name,StrLen(tempde->full_name))) {
|
||||
doc->cur_entry=doc_e;
|
||||
if (StrLen(tempde->full_name)==StrLen(next_entry))
|
||||
cur_entry=NULL;
|
||||
@@ -86,7 +88,8 @@ U0 FMMarkUncollapsed(CDoc *doc,CFMUncollapsedLst *tempc,U8 *cur_entry,U8 *next_e
|
||||
if (StrLen(tempde->full_name)==StrLen(cur_entry))
|
||||
cur_entry=NULL;
|
||||
} else if (next_entry) {
|
||||
if (!StrNCmp(next_entry,tempde->full_name,StrLen(tempde->full_name))) {
|
||||
if (!StrNCmp(next_entry,
|
||||
tempde->full_name,StrLen(tempde->full_name))) {
|
||||
doc->cur_entry=doc_e;
|
||||
if (StrLen(tempde->full_name)==StrLen(next_entry))
|
||||
cur_entry=NULL;
|
||||
@@ -199,7 +202,8 @@ U0 FMRebuildDoc(CDoc **_doc,CDirEntry **_root,I64 mode)
|
||||
doc->flags|=DOCF_FORM;
|
||||
switch (mode) {
|
||||
case FM_NORMAL:
|
||||
DocPrint(doc,"$$PURPLE$$File Manager\n\n$$LK,\"Click for Help\",A=\"FI:::/Doc/FileMgr.TXT\"$$\n\n");
|
||||
DocPrint(doc,"$$PURPLE$$File Manager\n\n"
|
||||
"$$LK,\"Click for Help\",A=\"FI:::/Doc/FileMgr.TXT\"$$\n\n");
|
||||
break;
|
||||
case FM_PICK_FILE:
|
||||
DocPrint(doc,"$$PURPLE$$Pick file and press <ESC>\n\n");
|
||||
@@ -247,7 +251,7 @@ U0 FMRename(CDoc *doc)
|
||||
if (parent=tempde->parent) {
|
||||
Cd(parent->full_name);
|
||||
StrCpy(fn.name,tempde->name);
|
||||
if (DocFormDo(&fn)) {
|
||||
if (DocForm(&fn)) {
|
||||
Silent;
|
||||
Move(tempde->name,fn.name);
|
||||
Silent(OFF);
|
||||
@@ -258,7 +262,7 @@ U0 FMRename(CDoc *doc)
|
||||
if (parent=tempde->parent) {
|
||||
Cd(parent->full_name);
|
||||
StrCpy(fn.name,tempde->name);
|
||||
if (DocFormDo(&fn)) {
|
||||
if (DocForm(&fn)) {
|
||||
if (StrCmp(tempde->name,fn.name)) {
|
||||
Silent;
|
||||
if (CopyTree(tempde->name,fn.name))
|
||||
@@ -280,7 +284,7 @@ U0 FMMkDir(CDoc *doc)
|
||||
tempde=doc_e->user_data;
|
||||
if (parent=tempde->parent) {
|
||||
Cd(parent->full_name);
|
||||
if (DocFormDo(&fn)) {
|
||||
if (DocForm(&fn)) {
|
||||
Silent;
|
||||
MkDir(fn.name);
|
||||
Silent(OFF);
|
||||
@@ -289,7 +293,7 @@ U0 FMMkDir(CDoc *doc)
|
||||
} else if (doc_e->type_u8==DOCT_TREE) {
|
||||
tempde=doc_e->user_data;
|
||||
Cd(tempde->full_name);
|
||||
if (DocFormDo(&fn)) {
|
||||
if (DocForm(&fn)) {
|
||||
Silent;
|
||||
MkDir(fn.name);
|
||||
Silent(OFF);
|
||||
@@ -378,7 +382,7 @@ U0 FMMakeISO(CDoc *doc)
|
||||
st=MStrPrint("%s*",tempde->full_name);
|
||||
else
|
||||
st=MStrPrint("%s/*",tempde->full_name);
|
||||
CDFileCreate(,st);
|
||||
ISOFileCreate(,st);
|
||||
Free(st);
|
||||
Silent(OFF);
|
||||
}
|
||||
@@ -581,7 +585,9 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
|
||||
case MSG_IP_L_UP:
|
||||
if (doc_ce) {
|
||||
gr.fp_final_screen_update=fp_old_final_screen_update;
|
||||
if (WinCursorPosSet(Fs,a1/FONT_WIDTH+Fs->win_left+Fs->scroll_x/FONT_WIDTH,a2/FONT_HEIGHT+Fs->win_top+Fs->scroll_y/FONT_HEIGHT,TRUE)) {
|
||||
if (WinCursorPosSet(Fs,
|
||||
a1/FONT_WIDTH+Fs->win_left+Fs->scroll_x/FONT_WIDTH,
|
||||
a2/FONT_HEIGHT+Fs->win_top+Fs->scroll_y/FONT_HEIGHT,TRUE)) {
|
||||
doc_e=doc->cur_entry;
|
||||
if (doc_e!=doc_ce) {
|
||||
st2=NULL;
|
||||
@@ -705,7 +711,8 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
|
||||
else if (mode==FM_PICK_DIR) {
|
||||
if (doc_ce->type_u8==DOCT_TREE)
|
||||
result=StrNew(tempde->full_name,mem_task);
|
||||
else if (doc_ce->type_u8==DOCT_MENU_VAL && (tempde=tempde->parent))
|
||||
else if (doc_ce->type_u8==DOCT_MENU_VAL &&
|
||||
(tempde=tempde->parent))
|
||||
result=StrNew(tempde->full_name,mem_task);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user