LTCD_070816.ISO
This commit is contained in:
1 parent
d14bbc24f9
commit
0e9364ff4c
506 files changed
+157705
-41812
No files matched your search
@@ -0,0 +1,72 @@
|
||||
#help_index "Debugging;Utils"
|
||||
|
||||
void LinkChkLtf(Ltf *l,U8 *flags)
|
||||
{
|
||||
I1 *st,buf[4];
|
||||
Ltf *old_l=Fs->cur_ltf;
|
||||
LtfEntry *ll=l->dummy.next;
|
||||
BoolU4 found;
|
||||
|
||||
PrintF("File:%s\r\n",l->filename.name);
|
||||
while (ll!=l) {
|
||||
if (ScanKey) {
|
||||
Bts(flags,FUf_CANCEL);
|
||||
break;
|
||||
}
|
||||
if (ll->btype==LTFT_LINK) {
|
||||
if (ll->flags & LTFLF_AUX_STR)
|
||||
st=ll->aux_str;
|
||||
else
|
||||
st=ll->display;
|
||||
buf[0]=CH_CTRLQ;
|
||||
buf[1]=0;
|
||||
Auto(buf);
|
||||
Fs->cur_ltf=l;
|
||||
found=Edit(st);
|
||||
Fs->cur_ltf=old_l;
|
||||
if (!found) {
|
||||
PutFileLink(l->filename.name,ll->y);
|
||||
PutS("$$FG,RED$$");
|
||||
PrintF(" %04d:%s\r\n",ll->y,st);
|
||||
PutS("$$FG$$");
|
||||
}
|
||||
}
|
||||
ll=ll->next;
|
||||
}
|
||||
}
|
||||
|
||||
void LinkChkFile(I1 *filename,U8 *flags)
|
||||
{
|
||||
Ltf *l=LtfRead(filename,LTFF_NO_CURSOR);
|
||||
LinkChkLtf(l,flags);
|
||||
LtfDel(l);
|
||||
}
|
||||
|
||||
void LinkChkList(LTDirEntry *tempm1,U8 *flags)
|
||||
{
|
||||
LTDirEntry *tempm2;
|
||||
|
||||
while (tempm1 && !Bt(flags,FUf_CANCEL)) {
|
||||
tempm2=tempm1->next;
|
||||
if (tempm1->attr & LT_ATTR_DIR) {
|
||||
if (tempm1->sub) {
|
||||
PrintF("%S %s\r\n","ST_SCANNING_DIRECTORY",tempm1->full_name);
|
||||
LinkChkList(tempm1->sub,flags);
|
||||
}
|
||||
} else
|
||||
LinkChkFile(tempm1->full_name,flags);
|
||||
DelLTDirEntry(tempm1);
|
||||
tempm1=tempm2;
|
||||
}
|
||||
}
|
||||
|
||||
public void LinkChk(I1 *wild=TEXT_FILE_MASK,I1 *flags=NULL)
|
||||
//"+r"=recurse
|
||||
//Checks for broken file links.
|
||||
{
|
||||
U8 f=0;
|
||||
GetFFlags(&f,SysText("ST_FILE_UTIL_FLAGS"),"+r");
|
||||
GetFFlags(&f,SysText("ST_FILE_UTIL_FLAGS"),flags);
|
||||
LinkChkList(FindFiles(wild,f),&f);
|
||||
}
|
||||
#help_index ""
|
||||
Reference in new issue
Block a user