mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
Remove all DocOpt methods, add AutoComplete link in EdPullDown menu.
This commit is contained in:
parent
4cea112eb4
commit
c95266c667
5 changed files with 8 additions and 111 deletions
|
@ -86,7 +86,7 @@ U0 DistroPrep()
|
|||
CursorRemove("/*");
|
||||
DelTree("/Demo/*.BI*");
|
||||
S2T("/*", "+r+S");
|
||||
DocOpt("/*", "+R");
|
||||
// DocOpt("/*", "+R");
|
||||
// Move(ACD_DEF_FILENAME, ACD_DEF_FILENAME_Z);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
$WW,1$$FG,5$$TX+CX,"ChangeLog"$$FG$
|
||||
$IV,1$----03/25/22 12:55:27----$IV,0$
|
||||
* Raised version number to 1.12.
|
||||
* Removed DocOpt, DocOptList, DocOptFile, DocOptDoc, and DocOptEntry.
|
||||
* Added $LK+PU,"AutoComplete",A="FF:::/Doc/EdPullDown.DD,AutoComplete"$ to EdPullDown menu, under Help section.
|
||||
|
||||
$IV,1$----02/13/22 21:44:55----$IV,0$
|
||||
* Raised version number to 1.11.
|
||||
* Updated $LK+PU,"WallPaper",A="FF:::/System/WallPaper.ZC,k = TaskCaller"$ to print full task caller report.
|
||||
|
|
|
@ -73,6 +73,7 @@ View
|
|||
Help
|
||||
{
|
||||
Menu(,CH_CTRLM,0x43200000432);
|
||||
AutoComplete(,'a',0x281E0000281E);
|
||||
Help(,,0x3B0000003B);
|
||||
About(,,0x23B0000023B);
|
||||
}
|
||||
|
|
|
@ -135,8 +135,6 @@ $FG,2$Merge("C:/","D:/","+r+d");$FG$ to check your changes.
|
|||
|
||||
* You can use $FG,2$<CTRL-SHIFT-L>$FG$ to do a check for compile errors.
|
||||
|
||||
* You can use $LK,"DocOpt",A="MN:DocOpt"$() to optimize links.
|
||||
|
||||
* With $FG,2$start$FG$/$FG,2$end$FG$, common trailing code is fast. Common leading code is slow.$FG$
|
||||
|
||||
* The first line of the $MA-X+PU,"Psalmody",LM="#include \"::/Apps/Psalmody/Run\"\n"$ $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.ZC,JukeBox"$(). The categories are $FG,2$"no nothing"$FG$, $FG,2$"has words"$FG$, $FG,2$"has graphics"$FG$, or $FG,2$"special"$FG$. The third character in the song comment is a digit rating number, shown in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.ZC,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.ZC,JukeBox"$() by pressing $FG,2$0$FG$-$FG,2$9$FG$. You can press $FG,2$<DEL>$FG$ to delete songs.
|
||||
|
|
|
@ -50,111 +50,4 @@ public U0 Collapse(U8 *files_find_mask="*", Bool collapse=TRUE, U8 *fu_flags=NUL
|
|||
tmpde = tmpde->next;
|
||||
}
|
||||
DirTreeDel(tmpde1);
|
||||
}
|
||||
|
||||
I64 DocOptEntry(CDoc *,CDocEntry *doc_e)
|
||||
{
|
||||
U8 **_dst;
|
||||
I64 res = 0;
|
||||
|
||||
if (doc_e->de_flags & DOCEF_LINK && doc_e->de_flags & (DOCEF_AUX_STR | DOCEF_TAG))
|
||||
{
|
||||
if (doc_e->de_flags & DOCEF_AUX_STR && doc_e->de_flags & DOCEF_TAG &&
|
||||
!MemCompare(doc_e->aux_str, "FI:", 3) &&
|
||||
!StrCompare(doc_e->aux_str + 3, doc_e->tag))
|
||||
{
|
||||
Free(doc_e->aux_str);
|
||||
doc_e->aux_str = NULL;
|
||||
doc_e->de_flags &= ~DOCEF_AUX_STR;
|
||||
res++;
|
||||
}
|
||||
if (doc_e->de_flags & DOCEF_AUX_STR)
|
||||
_dst = &doc_e->aux_str;
|
||||
else
|
||||
_dst = &doc_e->tag;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
I64 DocOptDoc(CDoc *doc)
|
||||
{//Optimize Doc.
|
||||
Bool unlock = DocLock(doc);
|
||||
I64 res = 0;
|
||||
CDocEntry *doc_e, *doc_e1, *doc_e_last;
|
||||
|
||||
DocRecalc(doc);
|
||||
doc_e_last = NULL;
|
||||
doc_e = doc->head.next;
|
||||
while (doc_e != doc)
|
||||
{
|
||||
doc_e1 = doc_e->next;
|
||||
if (res += DocOptEntry(doc, doc_e))
|
||||
res += DocOptEntry(doc, doc_e);
|
||||
if (doc_e_last && doc_e_last->type & ~0xFF00 == doc_e->type & ~0xFF00 && doc_e_last->de_flags == doc_e->de_flags &&
|
||||
Bt(doldoc.type_flags_chk_dup, doc_e->type_u8) && doc_e_last->attr == doc_e->attr)
|
||||
{
|
||||
DocEntryDel(doc, doc_e);
|
||||
res++;
|
||||
}
|
||||
else
|
||||
doc_e_last = doc_e;
|
||||
doc_e = doc_e1;
|
||||
}
|
||||
DocRecalc(doc);
|
||||
if (unlock)
|
||||
DocUnlock(doc);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
I64 DocOptFile(U8 *filename)
|
||||
{//Optimize file.
|
||||
I64 res;
|
||||
CDoc *doc = DocRead(filename);
|
||||
|
||||
if (res = DocOptDoc(doc))
|
||||
{
|
||||
"-%d:%s\n", res, doc->filename.name;
|
||||
DocWrite(doc);
|
||||
}
|
||||
DocDel(doc);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
I64 DocOptList(CDirEntry *tmpde)
|
||||
{
|
||||
I64 res = 0;
|
||||
CDirEntry *tmpde1;
|
||||
|
||||
while (tmpde)
|
||||
{
|
||||
tmpde1 = tmpde->next;
|
||||
if (tmpde->attr & RS_ATTR_DIR)
|
||||
{
|
||||
if (tmpde->sub)
|
||||
{
|
||||
"Scanning Directory: %s\n", tmpde->full_name;
|
||||
res += DocOptList(tmpde->sub);
|
||||
}
|
||||
}
|
||||
else
|
||||
res += DocOptFile(tmpde->full_name);
|
||||
DirEntryDel(tmpde);
|
||||
tmpde = tmpde1;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public I64 DocOpt(U8 *files_find_mask="*", U8 *fu_flags=NULL)
|
||||
{//Optimize $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ files, eliminating aux_str's and .Z's.
|
||||
//+R flag for aggressively risky.
|
||||
I64 fuf_flags = 0;
|
||||
|
||||
FlagsScan(&fuf_flags, Define("ST_FILE_UTIL_FLAGS"), "+r+$$");
|
||||
FlagsScan(&fuf_flags, Define("ST_FILE_UTIL_FLAGS"), fu_flags);
|
||||
|
||||
return DocOptList(FilesFind(files_find_mask, fuf_flags & FUG_FILES_FIND));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue