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,49 @@
|
||||
#help_index "Utils"
|
||||
|
||||
void DollarFile(LTDirEntry *m1)
|
||||
{
|
||||
BoolU4 changed;
|
||||
I1 *buf,*ptr,ch;
|
||||
while (m1) {
|
||||
if (m1->attr & LT_ATTR_DIR)
|
||||
DollarFile(m1->sub);
|
||||
else {
|
||||
coutln m1->full_name;
|
||||
Sleep(1000);
|
||||
if (buf=ReadTextFile(m1->full_name)) {
|
||||
ptr=buf;
|
||||
changed=FALSE;
|
||||
while (ch=*ptr++) {
|
||||
if (ch=='$$') {
|
||||
ptr--;
|
||||
*ptr++='.';
|
||||
changed=TRUE;
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
WriteTextFile(m1->full_name,buf);
|
||||
coutln "Updated";
|
||||
}
|
||||
Free(buf);
|
||||
}
|
||||
}
|
||||
m1=m1->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Dollar(I1 *src_mask,I1 *flags=NULL)
|
||||
//This is for importing non-"LT" text files.
|
||||
//$BK,1$WARNING:$BK,0$Do not use on files with dollar commands
|
||||
// or on binary files.
|
||||
//r=recurse
|
||||
{
|
||||
LTDirEntry *tempm1=NULL;
|
||||
U8 f=0;
|
||||
GetFFlags(&f,SysText("ST_FILE_UTIL_FLAGS"),"+r");
|
||||
GetFFlags(&f,SysText("ST_FILE_UTIL_FLAGS"),flags);
|
||||
tempm1=FindFiles(src_mask,f);
|
||||
DollarFile(tempm1);
|
||||
DelLTDirList(tempm1);
|
||||
}
|
||||
#help_index ""
|
||||
Reference in new issue
Block a user