TempleOSTS_140317.ISO
This commit is contained in:
1 parent
2d2a65d572
commit
7ef616a20e
1416 files changed
+223873
-53917
No files matched your search
@@ -0,0 +1,78 @@
|
||||
U8 *tSCB(CDoc *,CDocEntry *,CTask *mem_task)
|
||||
{
|
||||
//This routine is called by the window
|
||||
//mgr things would get corrupted
|
||||
//if the window mgr used it's own
|
||||
//heap, so we use the owning task's heap.
|
||||
U8 *st=MAlloc(64,mem_task);
|
||||
CDate cdt=tS*CDATE_FREQ;
|
||||
//Doesn't have to be fixed width!!
|
||||
SPrint(st,"%d=%T",cdt,cdt);
|
||||
return st;
|
||||
}
|
||||
|
||||
U8 *CurTimeCB(CDoc *,CDocEntry *,CTask *mem_task)
|
||||
{
|
||||
U8 *st=MAlloc(64,mem_task);
|
||||
CDate cdt=Now;
|
||||
SPrint(st,"%D %T",cdt,cdt);
|
||||
return st;
|
||||
}
|
||||
|
||||
U0 DoIt()
|
||||
{
|
||||
CDoc *bdoc=DocBorder,
|
||||
*pdoc=DocPut;
|
||||
CDocEntry *doc_e;
|
||||
|
||||
//We don't want an update between
|
||||
//creating the CDocEntry and defining the
|
||||
//callback, so we turn-off preemption.
|
||||
|
||||
Bool old_preempt=Preempt(OFF);
|
||||
|
||||
DocBottom(bdoc); //Ins at the bottom
|
||||
DocPrint(bdoc,"$$RED$$$$CM+BY+LX,5,-3$$");
|
||||
|
||||
//The $LK,"DocPrint",A="MN:DocPrint"$() routine returns the addr of the last entry.
|
||||
doc_e=DocPrint(bdoc,"$$TX+TC,\" \"$$");
|
||||
//The TC flag is "has tag callback".
|
||||
|
||||
//Flags are explained here:
|
||||
// $LK,"::/Doc/Widget.TXT"$
|
||||
// $LK,"::/Doc/Dollar.TXT"$
|
||||
// $LK,"Dollar Flags",A="MN:DOCEf1_TAG"$
|
||||
// $LK,"ST_DOC_FLAGS",A="FF:::/Adam/Doc/DocInit.CPP,ST_DOC_FLAGS"$
|
||||
|
||||
doc_e->tag_cb=&tSCB;
|
||||
DocPrint(bdoc,"$$FG$$");
|
||||
|
||||
//$BK,1$WARNING:$BK,0$ If you use the put_doc you
|
||||
//run the risk of the user pressing
|
||||
//<CTRL-T> or using the clipboard, both
|
||||
//of which will crash. So, you might want
|
||||
//to use the border_doc.
|
||||
|
||||
DocPrint(pdoc,"$$LTRED$$");
|
||||
doc_e=DocPrint(pdoc,"$$TX+TC,\" \"$$");
|
||||
doc_e->tag_cb=&CurTimeCB;
|
||||
DocPrint(pdoc,"$$FG$$");
|
||||
|
||||
Preempt(old_preempt);
|
||||
|
||||
//Send carriage return, new line, so
|
||||
//that the timer string is not part
|
||||
//of the next cmd on the cmd line.
|
||||
NewLine;
|
||||
}
|
||||
|
||||
|
||||
|
||||
U0 UndoIt()
|
||||
{
|
||||
//Clear-out entries without a +H hold flag.
|
||||
DocClear(Fs->border_doc);
|
||||
}
|
||||
|
||||
|
||||
DoIt;
|
||||
@@ -0,0 +1,38 @@
|
||||
U0 CursorMovementDemo()
|
||||
{
|
||||
I64 i;
|
||||
for (i=0;i<100;i++) {
|
||||
"%03d ",i;
|
||||
"$$CM,-4,1$$";
|
||||
if (i%10==9)
|
||||
"$$CM,4,-10$$";
|
||||
}
|
||||
|
||||
//+LX is relative to left side.
|
||||
//See <CTRL-L> with cursor-movement for all the flags.
|
||||
//Check "Quote" to set-up a cmd for in quotes.
|
||||
"$$CM+LX,0,+10$$\n";
|
||||
}
|
||||
|
||||
CursorMovementDemo;
|
||||
|
||||
//The word-wrap Off and On cmds are
|
||||
//$$WW,0$$ and $$WW,1$$.
|
||||
|
||||
//You might need $LK,"DocMax",A="MN:DocMax"$() to adjust
|
||||
//the cmd line window buf size.
|
||||
//It counts cmds, not lines.
|
||||
|
||||
//The +H flag will hold-onto an entry
|
||||
//so it doesn't get pushed-out of the document.
|
||||
//This is useful for a $$WW+H,1$$ cmd.
|
||||
|
||||
//See $LK,"::/Doc/Dollar.TXT"$ for documentation on
|
||||
//all flags and cmds.
|
||||
|
||||
|
||||
//Note: the default page length is 66 lines
|
||||
//and branching back more than the page length
|
||||
//will rst the column to 1. So, set page
|
||||
//length to a large number if you want to
|
||||
//branch back a long distance.
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
$$DA is the data widget.
|
||||
-TRM flag is for var
|
||||
width fields with a terminator
|
||||
character.
|
||||
+RD refreshes the data.
|
||||
+UD updates the val when you edit it.
|
||||
+U32 means the val is 4 bytes.
|
||||
-U64 U64 is the default so we might
|
||||
want to turn-it-off. Strings
|
||||
use U64.
|
||||
,32 sets the tag string width.
|
||||
See $LK,"Data Tag Width",A="FA:::/Adam/Doc/DocPlain.CPP,DataTagWidth"$.
|
||||
-P Means it is a string var, basically.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
I32 i;
|
||||
U8 buf[8];
|
||||
|
||||
U0 UpdateGlblTask(I64)
|
||||
{
|
||||
while (TRUE) {
|
||||
i++;
|
||||
Sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
U0 DataDemo()
|
||||
{
|
||||
CDocEntry *doc_e;
|
||||
|
||||
//This is the command line document.
|
||||
CDoc *doc=DocPut;
|
||||
|
||||
//We do this to prevent access to
|
||||
//doc_e->data before it is set.
|
||||
Bool unlock=DocLock(doc);
|
||||
|
||||
//You might set the $LK,"DOCF_FORM",A="MN:DOCF_FORM"$ flag.
|
||||
// doc->flags|=DOCF_FORM
|
||||
//if you wish.
|
||||
|
||||
Spawn(&UpdateGlblTask,NULL,"Update Glbl",,Fs);
|
||||
|
||||
"Enter editor overstrike mode\n"
|
||||
"and you can modify the val.\n"
|
||||
"However, changes happen immediately,\n"
|
||||
"so it's tricky.\n\n";
|
||||
//Use <CTRL-L> for the $$DA,$$ format.
|
||||
doc_e=DocPrint(doc,"$$DA-TRM+RD+UD-U64+U32,32,A=\"%%12d\"$$\n");
|
||||
doc_e->data=&i;
|
||||
|
||||
StrCpy(buf,"Terry");
|
||||
doc_e=DocPrint(doc,"$$DA-P+RD+UD,7,A=\"Str:%%s\"$$\n");
|
||||
doc_e->data=buf;
|
||||
|
||||
if (unlock)
|
||||
DocUnlock(doc);
|
||||
}
|
||||
|
||||
DataDemo;
|
||||
|
||||
//See $LK,"PopUpExtents",A="MN:PopUpExtents"$().
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
The +D flag causes a define-string
|
||||
look-up and substitution.
|
||||
|
||||
It is available in the <CTRL-L> text-widget
|
||||
menu under text entries for use in
|
||||
documentation.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
DefineLoad("COMPANY","Trivial Solutions");
|
||||
"Company: $$TX,\"\",D=\"COMPANY\"$$\n";
|
||||
|
||||
DefinePrint("COMPANY_TIME","%T",Now);
|
||||
|
||||
#exe {
|
||||
StreamPrint(
|
||||
"#define COMPANY_AGE %0.1f\n",
|
||||
(Now-A2Date("8/1/2003"))/ToF64(1<<32)/CDATE_YEAR_DAYS);
|
||||
};
|
||||
|
||||
|
||||
"Age : $$TX,\"\",D=\"COMPANY_AGE\"$$ years\n";
|
||||
"Time: $$TX,\"\",D=\"COMPANY_TIME\"$$\n";
|
||||
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
public U0 DocProfile(U8 *filename,I64 flags)
|
||||
{
|
||||
I64 i,*cmd_stats=CAlloc(sizeof(I64)*DOCT_NUM_TYPES),
|
||||
*flags_stats=CAlloc(sizeof(I64)*64),
|
||||
*type_flags_stats=CAlloc(sizeof(I64)*64);
|
||||
//Note, word wrap is determined by
|
||||
//doc->win_task when a $LK,"CDoc",A="MN:CDoc"$ is recalculated
|
||||
//use $LK,"DocRecalc",A="MN:DocRecalc"$().
|
||||
CDoc *doc=DocRead(filename,flags);
|
||||
|
||||
//doc->root which is equal to doc is the
|
||||
//header of the CQue and represents the end-of-file marker.
|
||||
CDocEntry *doc_e=doc->root.next;
|
||||
while (doc_e!=doc) {
|
||||
cmd_stats[doc_e->type_u8]++;
|
||||
for (i=0;i<64;i++)
|
||||
if (Bt(&doc_e->flags1,i))
|
||||
flags_stats[i]++;
|
||||
for (i=16;i<32;i++)
|
||||
if (Bt(&doc_e->type,i))
|
||||
type_flags_stats[i]++;
|
||||
doc_e=doc_e->next;
|
||||
}
|
||||
DocDel(doc);
|
||||
|
||||
"$$PURPLE$$-------%s-------\n",filename;
|
||||
"$$GREEN$$The lowest byte of the 32-bit 'doc_e->type', '$$PURPLE$$doc_e->type.u8[0]$$GREEN$$', is cmd and accessed with the union '$$PURPLE$$doc_e->type_u8$$GREEN$$'. "
|
||||
"See $$LK,\"CDocEntry\",A=\"MN:CDocEntry\"$$, "
|
||||
"$$LK,\"Doc Type Defines\",A=\"MN:DOCT_TEXT\"$$ and $$LK,\"Doc Type Codes\",A=\"FF:::/Adam/Doc/DocInit.CPP,ST_DOC_CMDS\"$$.\n$$FG$$";
|
||||
for (i=0;i<DOCT_NUM_TYPES;i++)
|
||||
if (cmd_stats[i])
|
||||
"%4Z:%d\n",i,"ST_DOC_CMDS",cmd_stats[i];
|
||||
|
||||
"\n$$GREEN$$'$$PURPLE$$doc_e->type.u8[1]$$GREEN$$' is the screen color attr of the entry. "
|
||||
"'$$PURPLE$$doc_e->type.u16[1]$$GREEN$$' is some flags for blinking and stuff. "
|
||||
"See $$LK,\"Doc Type Flag Defines\",A=\"MN:DOCET_BLINK\"$$.\n$$FG$$";
|
||||
|
||||
for (i=16;i<32;i++)
|
||||
if (type_flags_stats[i])
|
||||
"%4d:%d\n",i,type_flags_stats[i];
|
||||
|
||||
"$$GREEN$$\n'$$PURPLE$$doc_e->flags1$$GREEN$$' is 64-bit. "
|
||||
"See $$LK,\"Doc Flag Defines\",A=\"MN:DOCEf1_TAG\"$$ and $$LK,\"Doc Flag Codes\",A=\"FF:::/Adam/Doc/DocInit.CPP,ST_DOC_FLAGS\"$$.\n$$FG$$";
|
||||
for (i=0;i<64;i++)
|
||||
if (flags_stats[i])
|
||||
"%4Z:%d\n",i,"ST_DOC_FLAGS",flags_stats[i];
|
||||
|
||||
Free(cmd_stats);
|
||||
Free(flags_stats);
|
||||
PressAKey;
|
||||
NewLine;
|
||||
}
|
||||
|
||||
|
||||
//See $LK,"TipOfDay",A="MN:TipOfDay"$.
|
||||
|
||||
//Note: Not all $LK,"CDocEntry",A="MN:CDocEntry"$'s are full-sized nodes.
|
||||
//Some are $LK,"MAlloc",A="MN:MAlloc"$ed with a smaller size to save
|
||||
//mem. They all have at least the size $LK,"CDocEntryBase",A="MN:CDocEntryBase"$.
|
||||
|
||||
//Note: $LK,"CDocEntry",A="MN:CDocEntry"$'s should be allocated from the
|
||||
//heap of the owning task, doc->mem_task.
|
||||
|
||||
//The flag arrays $LK,"doc_type_flags_form",A="MN:doc_type_flags_form"$, etc
|
||||
//are useful.
|
||||
|
||||
DocProfile("::/Doc/ChangeLog.TXT",0);
|
||||
DocProfile("::/Doc/ChangeLog.TXT",DOCF_PLAIN_TEXT);
|
||||
@@ -0,0 +1,44 @@
|
||||
class FDStruct
|
||||
{
|
||||
//Use <CTRL-L> and select "Data" to generate the fmtstrs
|
||||
|
||||
//The number is the field from after the ':' to the end.
|
||||
// See $LK,"Data Tag Width",A="FA:::/Adam/Doc/DocPlain.CPP,DataTagWidth"$.
|
||||
|
||||
F64 num1 fmtstr "$$DA-TRM,32,A=\"F64 1:%12.8f\"$$\n";
|
||||
F64 num2 fmtstr "$$DA-TRM,32,A=\"F64 2:%12e\"$$\n";
|
||||
I64 num3 fmtstr "$$DA-TRM,32,A=\"I64 1:0x%016X\"$$\n";
|
||||
I64 num4 fmtstr "$$DA-TRM,32,A=\"I64 2:%12d\"$$\n";
|
||||
U8 name[32] fmtstr "$$DA-P,31,A=\"Name :%s\"$$\n";
|
||||
CDate datetime fmtstr "$$DA-TRM,32,A=\"Date :%8D\"$$\n";
|
||||
};
|
||||
|
||||
U0 FormDemo()
|
||||
{
|
||||
FDStruct fds;
|
||||
CDate cdt;
|
||||
|
||||
fds.num1=12.3e-4; //Set defaults
|
||||
fds.num2=4.5e3;
|
||||
fds.num3=0x1234;
|
||||
fds.num4=-567;
|
||||
StrCpy(&fds.name,"John");
|
||||
cdt=Now;
|
||||
fds.datetime=cdt;
|
||||
if (DocFormDo(&fds)) {
|
||||
"#1=%e\n",fds.num1;
|
||||
"#2=%e\n",fds.num2;
|
||||
"#3=%d\n",fds.num3;
|
||||
"#4=%d\n",fds.num4;
|
||||
"Name=%s\n",fds.name;
|
||||
"Date=%D\n",fds.datetime;
|
||||
} else
|
||||
"Cancel\n";
|
||||
|
||||
"\n\nClassRep Example\n";
|
||||
ClassRep(&fds);
|
||||
|
||||
//See also $LK,"ClassRepD",A="MN:ClassRepD"$().
|
||||
}
|
||||
|
||||
FormDemo;
|
||||
@@ -0,0 +1,76 @@
|
||||
//This example shows buttons. Buttons return a menu val
|
||||
//unless you rig them to send macros. Menu entries are
|
||||
//about the same as buttons, but don't have a border.
|
||||
|
||||
|
||||
I64 PopUpFreq()
|
||||
{ //See also $LK,"PopUpRangeI64",A="MN:PopUpRangeI64"$()
|
||||
I64 i;
|
||||
CDoc *doc=DocNew;
|
||||
DocPrint(doc,"$$TX+CX,\"Set Freq\"$$\n" //Centered text
|
||||
"$$CM+LX,2,4$$$$BT,\"100 Hz\",LE=100$$"
|
||||
"$$CM+LX,18,0$$$$BT,\"200 Hz\",LE=200$$"
|
||||
"$$CM+LX,2,4$$$$BT,\"400 Hz\",LE=400$$"
|
||||
"$$CM+LX,18,0$$$$BT,\"800 Hz\",LE=800$$\n");
|
||||
i=PopUpMenu(doc);
|
||||
if (i<0) i=0; // <SHIFT-ESC>
|
||||
DocDel(doc);
|
||||
return i;
|
||||
}
|
||||
|
||||
#define MU_NOTHING 0
|
||||
#define MU_SET_FREQ 1
|
||||
#define MU_SND_ON 2
|
||||
#define MU_SND_OFF 3
|
||||
|
||||
U0 MenuButton()
|
||||
{
|
||||
Bool done=FALSE;
|
||||
I64 i,j=0,freq=100;
|
||||
I64 old_flags=DocPut->flags;
|
||||
//This allows keyboard navigation to skip nonselectible entries.
|
||||
DocPut->flags|=DOCF_FORM;
|
||||
do {
|
||||
DocClear;
|
||||
//Use <CTRL-L> to generate cursor movement expressions and check "Quote".
|
||||
"$$CM+CX-RE,-4$$Menu Demo\n\n";
|
||||
"$$LM,8$$"; //Set left margin
|
||||
//These are buttons that return a val from a menu selection.
|
||||
if (!j)
|
||||
"\n$$BT,\"Snd On\",LE=MU_SND_ON$$\n\n\n";
|
||||
else
|
||||
"\n$$BT,\"Snd Off\",LE=MU_SND_OFF$$\n\n\n";
|
||||
"\n$$BT,\"Set Freq\",LE=MU_SET_FREQ$$\n\n\n"
|
||||
"\n$$BT,\"Nothing\",LE=MU_NOTHING$$\n\n\n"
|
||||
"\n$$BT,\"Done\",LE=DOCM_CANCEL$$\n\n\n";
|
||||
i=DocMenuDo(DocPut);
|
||||
DocBottom;
|
||||
switch (i) {
|
||||
case MU_NOTHING:
|
||||
break;
|
||||
case MU_SND_ON:
|
||||
j=freq;
|
||||
Snd(j);
|
||||
break;
|
||||
case MU_SND_OFF:
|
||||
j=0;
|
||||
Snd(j);
|
||||
break;
|
||||
case MU_SET_FREQ:
|
||||
freq=PopUpFreq;
|
||||
if (j) {
|
||||
j=freq;
|
||||
Snd(j);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
done=TRUE;
|
||||
}
|
||||
} while (!done);
|
||||
DocPut->flags=DocPut->flags&~DOCF_FORM |
|
||||
old_flags & DOCF_FORM;
|
||||
DocClear;
|
||||
Snd(0);
|
||||
}
|
||||
|
||||
MenuButton;
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
"\nSuper : 3$$SY,-3$$2$$SY,0$$=9\n\n"
|
||||
"Sub : H$$SY,3$$2$$SY,0$$O\n\n"
|
||||
"Color : $$RED$$Test$$FG$$\n\n"
|
||||
"Blink : $$BK,1$$Test$$BK,0$$\n\n"
|
||||
"Invert : $$IV,1$$Test$$IV,0$$\n\n"
|
||||
"UnderLine: $$UL,1$$Test$$UL,0$$\n\n"
|
||||
"Link : $$LK,\"Genesis,1:1\",\"BF:Genesis,1:1\"$$\n\n\n"
|
||||
|
||||
|
||||
"Button : $$BT-X,\"OKAY\",LE=1$$\n\n\n\n";
|
||||
|
||||
//You can do it this way if you like.
|
||||
"\nSuper : 3$SY,-3$2$SY,0$=9\n\n"
|
||||
"Sub : H$SY,3$2$SY,0$O\n\n"
|
||||
//Can't see color because of syntax highlighting. Press <CTRL-T>
|
||||
"Color : $FG,4$Test$FG$\n\n"
|
||||
"Blink : $BK,1$Test$BK,0$\n\n"
|
||||
"Invert : $IV,1$Test$IV,0$\n\n"
|
||||
"UnderLine: $UL,1$Test$UL,0$\n\n"
|
||||
//<CTRL-SHIFT-T> on this link to toggle individual commands.
|
||||
"Link : $LK,"Genesis,1:1",A="BF:Genesis,1:1"$\n\n\n"
|
||||
|
||||
|
||||
"Button : $BT,"OKAY",LE=1$\n\n\n\n";
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
This uses $LK,"DocPrint",A="MN:DocPrint"$() because updates
|
||||
to within a tree while a tree is collapsed get
|
||||
messed-up if "live" (like using ordinary Print.)
|
||||
The insert point is confused by hiding of
|
||||
data in collapsed trees. Therefore, the window main
|
||||
Doc is taken off-line by disabling preemption so there
|
||||
are no screen updates until all data has been inserted.
|
||||
|
||||
There is a special Doc function which is also
|
||||
available to take an Doc off-line. See $LK,"DocPrintWhole",A="MN:DocPrintWhole"$.
|
||||
For this example, however, I wanted to use DocPrint
|
||||
and disabled Preemption myself.
|
||||
*/
|
||||
|
||||
U0 TreeSub(CDoc *doc,CDirEntry *tempde)
|
||||
{
|
||||
CDirEntry *tempde1;
|
||||
while (tempde) {
|
||||
tempde1=tempde->next;
|
||||
if (tempde->attr & _ATTR_DIR) {
|
||||
DocPrint(doc,"$$TR,\"\"$$");
|
||||
DocPrint(doc,"$$MA,T=\"%s\",LM=\"Cd(\\\"%s\\\");Dir;\n\"$$\n",
|
||||
tempde->name,tempde->full_name);
|
||||
if (tempde->sub) {
|
||||
DocPrint(doc,"$$ID,+2$$");
|
||||
TreeSub(doc,tempde->sub);
|
||||
DocPrint(doc,"$$ID,-2$$");
|
||||
}
|
||||
} else
|
||||
DocPrint(doc,"$$LK,\"%s\",A=\"FI:%s\"$$\n",
|
||||
tempde->name,tempde->full_name);
|
||||
//Note there is also a routine
|
||||
//to delete an entire CDirEntry tree.
|
||||
//See $LK,"DirLstDel",A="MN:DirLstDel"$().
|
||||
DirEntryDel(tempde);
|
||||
tempde=tempde1;
|
||||
}
|
||||
}
|
||||
|
||||
U0 TreeDemo()
|
||||
{
|
||||
I64 fuf_flags=0;
|
||||
CDoc *doc=DocNew;
|
||||
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
|
||||
DocPrint(doc,"$$TR-C,\"\"$$\n");
|
||||
DocPrint(doc,"$$ID,+2$$");
|
||||
TreeSub(doc,FilesFind("/*",fuf_flags));
|
||||
DocPrint(doc,"$$ID,-2$$");
|
||||
DocInsDoc(DocPut,doc);
|
||||
DocDel(doc);
|
||||
}
|
||||
|
||||
TreeDemo;
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
This scans the sym table and checks
|
||||
each $LK,"HTT_DEFINE_STR",A="MN:HTT_DEFINE_STR"$ entry to see if
|
||||
it only occurs once in files.
|
||||
|
||||
It's a brute force solution, but
|
||||
gets the job done... slowly.
|
||||
|
||||
$LK,"Grep",A="MN:Grep"$() returns a count of matches.
|
||||
|
||||
$LK,"FileOcc",A="MN:FileOcc"$() is $LK,"Grep",A="MN:Grep"$() with
|
||||
output $LK,"Silent",A="MN:Silent"$().
|
||||
|
||||
*/
|
||||
|
||||
U0 UnusedDefineScan()
|
||||
{
|
||||
CDoc *old_put_doc,*old_display_doc,*doc;
|
||||
I64 cnt=0;
|
||||
CHashTable *tempht;
|
||||
CHash *temph;
|
||||
CDocEntry *doc_e,*doc_e2;
|
||||
Bool old_silent=IsSilent;
|
||||
|
||||
//Technically, we might want to
|
||||
//turn-off preemption in case the
|
||||
//table was modified.
|
||||
|
||||
try {
|
||||
tempht=Fs->hash_table;
|
||||
while (tempht) {
|
||||
temph=tempht->next_added;
|
||||
while (temph!=tempht) {
|
||||
if (temph->type&HTT_DEFINE_STR)
|
||||
cnt++;
|
||||
temph=temph->next_added;
|
||||
}
|
||||
tempht=tempht->next;
|
||||
}
|
||||
|
||||
progress1=0;
|
||||
progress1_max=cnt;
|
||||
StrCpy(progress1_desc,"Define Scan");
|
||||
|
||||
tempht=Fs->hash_table;
|
||||
while (tempht) {
|
||||
temph=tempht->next_added;
|
||||
while (temph!=tempht) {
|
||||
if (temph->type&HTT_DEFINE_STR) {
|
||||
progress1++;
|
||||
if (FileOcc(temph->str,"/*","+l-i+T")==1) {
|
||||
doc=DocNew;
|
||||
old_put_doc=DocPut;
|
||||
old_display_doc=DocDisplay;
|
||||
Fs->put_doc=Fs->display_doc=doc;
|
||||
Grep(temph->str,"/*","+l-i+T");
|
||||
Fs->put_doc=old_put_doc;
|
||||
Fs->display_doc=old_display_doc;
|
||||
doc_e=doc->root.next;
|
||||
while (doc_e!=doc) {
|
||||
if (doc_e->type_u8==DOCT_LINK) {
|
||||
"%s ",temph->str;
|
||||
doc_e2=DocEntryCopy(doc,doc_e);
|
||||
DocInsEntry(old_put_doc,doc_e2);
|
||||
NewLine;
|
||||
}
|
||||
doc_e=doc_e->next;
|
||||
}
|
||||
DocDel(doc);
|
||||
}
|
||||
}
|
||||
temph=temph->next_added;
|
||||
}
|
||||
tempht=tempht->next;
|
||||
}
|
||||
} catch
|
||||
PutExcept;
|
||||
|
||||
Silent(old_silent);
|
||||
NewLine;
|
||||
ProgressBarsRst;
|
||||
}
|
||||
|
||||
UnusedDefineScan;
|
||||
Reference in new issue
Block a user