Browse Source

TempleOSCDV3.11.ISO

v6
Terry A. Davis 7 years ago committed by minexew
parent
commit
ed64d7e3b8
  1. BIN
      0000Boot/0000Kernel.BIN.C
  2. 106
      Adam.CPP
  3. 4
      Adam/ABlkDev/ADskA.CPP
  4. 6
      Adam/ABlkDev/ADskB.CPP
  5. 6
      Adam/ABlkDev/ChkDsk.CPP
  6. 13
      Adam/ABlkDev/FileMgr.CPP
  7. 2
      Adam/ABlkDev/MakeABlkDev.CPP
  8. 24
      Adam/ADbg.CPP
  9. 6
      Adam/ADefine.CPP
  10. 7
      Adam/AExts.CPP
  11. 8
      Adam/AHash.CPP
  12. BIN
      Adam/AInputPointer.CPP
  13. 35
      Adam/AMem.CPP
  14. 78
      Adam/AutoComplete/ACFill.CPP
  15. 168
      Adam/AutoComplete/ACInit.CPP
  16. 347
      Adam/AutoComplete/ACMain.CPP
  17. 282
      Adam/AutoComplete/ACTask.CPP
  18. 67
      Adam/AutoComplete/AutoComplete.CPP
  19. 6
      Adam/AutoComplete/MakeAC.CPP
  20. 164
      Adam/Boot/BootCD.CPP
  21. 19
      Adam/Ctrls/CtrlsA.CPP
  22. 7
      Adam/Ctrls/CtrlsButton.CPP
  23. 5
      Adam/Ctrls/CtrlsSlider.CPP
  24. 4
      Adam/Ctrls/MakeCtrls.CPP
  25. 103
      Adam/DolDoc/Doc.CPP
  26. 142
      Adam/DolDoc/DocBin.CPP
  27. 124
      Adam/DolDoc/DocChar.CPP
  28. 123
      Adam/DolDoc/DocClipBoard.CPP
  29. 108
      Adam/DolDoc/DocDblBuf.CPP
  30. 249
      Adam/DolDoc/DocEd.CPP
  31. 980
      Adam/DolDoc/DocEdB.CPP
  32. 13
      Adam/DolDoc/DocExt.CPP
  33. 125
      Adam/DolDoc/DocFile.CPP
  34. 30
      Adam/DolDoc/DocFind.CPP
  35. 284
      Adam/DolDoc/DocForm.CPP
  36. 224
      Adam/DolDoc/DocGet.CPP
  37. 161
      Adam/DolDoc/DocGr.CPP
  38. 2
      Adam/DolDoc/DocHighlight.CPP
  39. 344
      Adam/DolDoc/DocLink.CPP
  40. 7
      Adam/DolDoc/DocMacro.CPP
  41. 602
      Adam/DolDoc/DocMain.CPP
  42. 495
      Adam/DolDoc/DocNew.CPP
  43. 24
      Adam/DolDoc/DocOpt.CPP
  44. 355
      Adam/DolDoc/DocPlain.CPP
  45. 612
      Adam/DolDoc/DocPopUp.CPP
  46. 729
      Adam/DolDoc/DocPutKey.CPP
  47. 358
      Adam/DolDoc/DocPutS.CPP
  48. 2
      Adam/DolDoc/DocRecalc.CPP
  49. 89
      Adam/DolDoc/DocRecalcLib.CPP
  50. 103
      Adam/DolDoc/DocRun.CPP
  51. 192
      Adam/DolDoc/DocTerm.CPP
  52. 91
      Adam/DolDoc/DocWidgetWiz.CPP
  53. 69
      Adam/DolDoc/MakeDoc.CPP
  54. 15
      Adam/God/GodBible.CPP
  55. 4
      Adam/God/GodDoodle.CPP
  56. 4
      Adam/God/GodExt.CPP
  57. 1
      Adam/God/HSNotes.TXT
  58. 3
      Adam/God/MakeGod.CPP
  59. 53
      Adam/Gr/Gr.HPP
  60. 2
      Adam/Gr/GrBitMap.CPP
  61. 4
      Adam/Gr/GrComposites.CPP
  62. 28
      Adam/Gr/GrDC.CPP
  63. 5
      Adam/Gr/GrEnd.CPP
  64. 5
      Adam/Gr/GrExt.CPP
  65. 4
      Adam/Gr/GrGlbls.CPP
  66. 21
      Adam/Gr/GrInitA.CPP
  67. 3
      Adam/Gr/GrInitB.CPP
  68. 20
      Adam/Gr/GrMath.CPP
  69. 4
      Adam/Gr/GrScreen.CPP
  70. 31
      Adam/Gr/MakeGr.CPP
  71. 14
      Adam/Gr/SpriteEd.CPP
  72. 1
      Adam/Gr/SpriteMesh.CPP
  73. 29
      Adam/MakeAdam.CPP
  74. 164
      Adam/Opt/Boot/BootDVD.CPP
  75. 0
      Adam/Opt/Boot/BootHD.CPP
  76. 21
      Adam/Opt/Boot/BootIns.CPP
  77. 2
      Adam/Opt/Boot/BootMHD.CPP
  78. 2
      Adam/Opt/Boot/BootMHD2.CPP
  79. 128
      Adam/Opt/Boot/DskISOFile.CPP
  80. 9
      Adam/Opt/Boot/MakeBoot.CPP
  81. 7
      Adam/Opt/Boot/Reboot.CPP
  82. 0
      Adam/Opt/Utils/Diff.CPP
  83. 0
      Adam/Opt/Utils/FileBMP.CPP
  84. 0
      Adam/Opt/Utils/Find.CPP
  85. 0
      Adam/Opt/Utils/HeapLog.CPP
  86. 0
      Adam/Opt/Utils/LineRep.CPP
  87. 0
      Adam/Opt/Utils/LinkChk.CPP
  88. 15
      Adam/Opt/Utils/MakeUtils.CPP
  89. 16
      Adam/Opt/Utils/MemRep.CPP
  90. 0
      Adam/Opt/Utils/Merge.CPP
  91. 2
      Adam/Opt/Utils/Profiler.CPP
  92. 0
      Adam/Opt/Utils/StrUtils.CPP
  93. 4
      Adam/Opt/Utils/ToDolDoc.CPP
  94. 0
      Adam/Opt/Utils/ToHtml.CPP
  95. 0
      Adam/Opt/Utils/ToTXT.CPP
  96. 4
      Adam/Snd/MakeSnd.CPP
  97. 4
      Adam/Snd/SndMusic.CPP
  98. 34
      Adam/TaskRep.CPP
  99. 11
      Adam/TaskSettings.CPP
  100. 275
      Adam/Training.CPP
  101. Some files were not shown because too many files have changed in this diff Show More

BIN
0000Boot/0000Kernel.BIN.C

Binary file not shown.

106
Adam.CPP

@ -1,106 +0,0 @@
//This is executed by the Adam task at boot.
//See $LK,"Adam Start-up",A="FF:::/Kernel/KEnd.CPP,\"Adam:2"$.
//You do not place this file in /Home. (It would be ignored.)
//but look at the bottom of this file to see
//files you do customize.
extern I8i OptEqu(I64i num,I8i val);
OptEqu(0,0); //(0,0)=EchoOff (0,1)=EchoOn
#include "/Kernel/KernelA.HPP"
#include "/Compiler/CompilerA.HPP"
#include "/Kernel/KernelB.HPP"
#include "/Kernel/KernelC.HPP"
#include "/Compiler/CompilerB.HPP"
Cd("/Adam");;
#exe {OptOn(OPTf_WARN_PAREN);};
#exe {OptOn(OPTf_WARN_DUP_TYPES);};
HashTablePurge(adam_task->hash_table);
#help_index "Misc"
//Use Dbg("Type 'G;'"); to debug before window mgr is running.
public F64 os_version=3.07;//Operating system version.
#include "AExts.HPP"
#include "AMath"
#include "Training"
#include "AUtils"
#include "AMathODE"
Cd("::/Adam/Gr");;
#include "Gr"
Cd("::/Adam/Snd");;
#include "Snd"
Cd("::/Adam/Dsk");;
#include "ADsk"
Cd("::/Adam");;
#include "Menu"
#include "WinA"
#include "WinB"
#include "ADbg"
#include "::/Adam/God/GodExt"
Cd("::/Adam/DolDoc");;
#include "Doc"
LBts(&sys_run_level,RLf_DOC);
Cd("::/Adam/Ctrls");;
#include "Ctrls"
Cd("::/Adam");;
#include "AutoFile"
#include "ARegistry"
Cd("::/Adam/AutoComplete");;
#include "AutoComplete"
Cd("::/Adam/God");;
#include "God"
Cd("::/Adam");;
#include "AHash"
#include "TaskSettings"
#include "DevInfo"
#include "ADefine"
//Dbg("Type 'G;'");
DocTermNew;
WinVert(2,10);
sys_winmgr_task=Spawn(&WinMgrTask,NULL,"Window Mgr");
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_BORDER
-WIF_SELF_GRAB_SCROLL-WIF_SELF_CTRLS;
LBts(&Fs->display_flags,DISPLAYf_CHILDREN_NOT_ON_TOP);
LBts(&Fs->display_flags,DISPLAYf_SHOW);
RegInit;
LBts(&sys_run_level,RLf_REGISTRY);
Cd("::/Adam");;
#include "WallPaper"
if (DrvIsWritable)
MkDir("/Temp"); //Good to have a Temp
#exe {OptOff(OPTf_WARN_PAREN);};
#exe {OptOff(OPTf_WARN_DUP_TYPES);};
LBts(&sys_run_level,RLf_HOME);
#help_index ""
Cd("::/Home");;
//If these are not present in /Home, it uses the version in the root dir.
//You should make your own version of these files in you /Home directory.
#include "::/Home/AdamLocalize"
#include "::/Home/AdamPkgs"
#include "::/Home/AdamKeyPlugIns"
#include "::/Home/AdamWrappers"
#include "::/Home/AdamSys"
//After this file, the Adam task enters $LK,"server mode",A="HI:Task/Srv"$.

4
Adam/Dsk/ADskA.CPP → Adam/ABlkDev/ADskA.CPP

@ -319,7 +319,7 @@ I64 RedSeaUnusedDrvSpace(U8 drv_let=0)
l=(dv->size+dv->spc-1)/dv->spc;
i=((l+7)>>3+BLK_SIZE-1)>>BLK_SIZE_BITS;
bitmap=MAlloc(i<<BLK_SIZE_BITS);
RBlks(dv,bitmap,dv->map1,i);
RBlks(dv,bitmap,dv->fat1,i);
for (i=0;i<l;i++)
if (!Bt(bitmap,i))
result++;
@ -337,7 +337,7 @@ I64 FAT32UnusedDrvSpace(U8 drv_let=0)
l=(dv->size+dv->spc-1)/dv->spc;
i=(l*4+BLK_SIZE-1)>>BLK_SIZE_BITS;
bitmap=MAlloc(i<<BLK_SIZE_BITS);
RBlks(dv,bitmap,dv->map1,i);
RBlks(dv,bitmap,dv->fat1,i);
for (i=0;i<l;i++)
if (!bitmap[i])
result++;

6
Adam/Dsk/ADskB.CPP → Adam/ABlkDev/ADskB.CPP

@ -253,7 +253,7 @@ U0 RedSeaDrvView(U8 drv_let=0)
try {
i=((s+7)>>3+BLK_SIZE-1)>>BLK_SIZE_BITS;
bitmap=MAlloc(i<<BLK_SIZE_BITS);
RBlks(dv,bitmap,dv->map1,i);
RBlks(dv,bitmap,dv->fat1,i);
i=0;
for (y=0;y<GR_HEIGHT-3*FONT_HEIGHT;y++) {
if (ScanKey)
@ -295,7 +295,7 @@ U0 FAT32DrvView(U8 drv_let=0)
try {
i=(s*4+BLK_SIZE-1)>>BLK_SIZE_BITS;
bitmap=MAlloc(i<<BLK_SIZE_BITS);
RBlks(dv,bitmap,dv->map1,i);
RBlks(dv,bitmap,dv->fat1,i);
i=0;
for (y=0;y<GR_HEIGHT-3*FONT_HEIGHT;y++) {
if (ScanKey)
@ -361,7 +361,7 @@ public U0 DskView(U8 drv_let=0)
j=1;
for (i=0;i<NUM_DRVS;i++) {
dv=&dsk.drvs[i];
dv=&blkdev.drvs[i];
if (bd==dv->bd && dv->type) {
sect_start=-(dv->base_offset*2*ã/(bd->max_blk+1));
sect_end =-((dv->base_offset+dv->size)*2*ã/(bd->max_blk+1));

6
Adam/Dsk/ChkDsk.CPP → Adam/ABlkDev/ChkDsk.CPP

@ -60,7 +60,7 @@ I64 RedSeaChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
bpc=dv->spc<<BLK_SIZE_BITS;
bits=CAlloc((size+7)>>3);
bits2=CAlloc((size+7)>>3+BLK_SIZE);
RBlks(dv,bits2,dv->map1,((size+7)>>3+BLK_SIZE-1)>>BLK_SIZE_BITS);
RBlks(dv,bits2,dv->fat1,((size+7)>>3+BLK_SIZE-1)>>BLK_SIZE_BITS);
//Get Root Dir size
ptr2=MAlloc(bpc);
@ -164,7 +164,7 @@ I64 FAT32ChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
bpc=dv->spc<<BLK_SIZE_BITS;
bits=CAlloc((size+7)>>3);
bits2=CAlloc(size*4+BLK_SIZE);
RBlks(dv,bits2,dv->map1,(size*4+BLK_SIZE-1)>>BLK_SIZE_BITS);
RBlks(dv,bits2,dv->fat1,(size*4+BLK_SIZE-1)>>BLK_SIZE_BITS);
c=dv->root_cluster;
while (0<c<0x0FFFFFF8) {
@ -223,7 +223,7 @@ public I64 ChkDsk(U8 drv_let=0,Bool fix=FALSE,Bool confirm=TRUE)
if (errs) {
if (fix)
"It might be a little better. ";
"Copy files to another partition or CD-ROM, "
"Copy files to another partition or CD/DVD, "
"reformat, and copy back. "
"Or, copy from a back-up.\n";
}

13
Adam/Dsk/FileMgr.CPP → Adam/ABlkDev/FileMgr.CPP

@ -216,7 +216,7 @@ U0 FMRebuildDoc(CDoc **_doc,CDirEntry **_root,I64 mode)
}
DocPrint(doc,"$$LTBLUE$$");
for (i=0;i<NUM_DRVS;i++) {
dv=&dsk.drvs[i];
dv=&blkdev.drvs[i];
if (dv->type==DVT_REDSEA||dv->type==DVT_FAT32)
FMRebuildDocDrv(Drv2Let(dv),doc,_root,TRUE);
else if (dv->type==DVT_ISO9660) {
@ -401,7 +401,7 @@ U0 FMBurnISO(CDoc *doc)
while (tempde->parent)
tempde=tempde->parent;
Silent;
CDImageWrite(*tempde->full_name);
DVDImageWrite(*tempde->full_name);
Silent(OFF);
}
}
@ -480,8 +480,8 @@ I64 PopUpFMRight(U8 *header=NULL,U8 *footer=NULL)
"$$CM+LX,1,3 $$$$BT,\"PASTE CLIPBOARD FILES \",LE=FMR_PASTE$$"
"$$CM+LX,27,0$$$$BT,\"CHANGE DISK(MOUNT IT) \",LE=FMR_CHG_DSK$$"
"$$CM+LX,1,3 $$$$BT,\"FORMAT \",LE=FMR_FORMAT$$"
"$$CM+LX,1,3 $$$$BT,\"MAKE ISO (CD-ROM) FILE\",LE=FMR_MAKE_ISO$$"
"$$CM+LX,27,0$$$$BT,\"BURN ISO (CD-ROM) FILE\",LE=FMR_BURN_ISO$$"
"$$CM+LX,1,3 $$$$BT,\"MAKE ISO (CD/DVD) FILE\",LE=FMR_MAKE_ISO$$"
"$$CM+LX,27,0$$$$BT,\"BURN ISO (CD/DVD) FILE\",LE=FMR_BURN_ISO$$"
"$$CM+LX,1,3 $$$$BT,\"HELP \",LE=FMR_HELP$$"
"$$CM+LX,27,0$$$$BT,\"CANCEL \",LE=DOCM_CANCEL$$\n");
if (footer) DocPrint(doc,"%s",footer);
@ -585,9 +585,8 @@ 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+Fs->pix_left+Fs->scroll_x,
a2+Fs->pix_top+Fs->scroll_y,TRUE)) {
doc_e=doc->cur_entry;
if (doc_e!=doc_ce) {
st2=NULL;

2
Adam/Dsk/ADsk.CPP → Adam/ABlkDev/MakeABlkDev.CPP

@ -1,4 +1,6 @@
Cd(__DIR__);;
#include "ADskA"
#include "ADskB"
#include "ChkDsk"
#include "FileMgr"
Cd("..");;

24
Adam/ADbg.CPP

@ -21,7 +21,7 @@ Bool ClassRep2(CDoc *doc,U8 *_d,U8 *class_name=lastclass,
return FALSE;
unlock=DocLock(doc);
DocPrint(doc,"Class:\"%s\"\n",class_name);
ml=tempc->member_lst;
ml=tempc->member_lst_and_root;
while (ml) {
tempc2=ml->member_class;
ptr=_d(U8 *)+ml->offset;
@ -155,12 +155,10 @@ public U0 ClassRep(U8 *_d,U8 *class_name=lastclass,
I64 max_depth=2,Bool fun=FALSE,I64 offset=0)
{//Displays members of a record by using the compiler's info.
CDoc *doc;
Bool old_preempt;
if (IsRaw) {
if (IsRaw)
doc=DocNew;
} else {
else {
DocMax;
old_preempt=Preempt;
doc=DocPut;
}
if (fun)
@ -172,20 +170,17 @@ public U0 ClassRep(U8 *_d,U8 *class_name=lastclass,
if (IsRaw) {
DocDump(doc,100000);
DocDel(doc);
} else
Preempt(old_preempt);
}
}
public U0 ClassRepD(U8 *_d,U8 *class_name=lastclass,
I64 max_depth=2,Bool fun=FALSE,I64 offset=0)
{//Dynamic ClassRep. Uses hex_ed widgit for live changes.
CDoc *doc;
Bool old_preempt;
if (IsRaw) {
if (IsRaw)
doc=DocNew;
} else {
else {
DocMax;
old_preempt=Preempt;
doc=DocPut;
}
if (fun)
@ -197,15 +192,14 @@ public U0 ClassRepD(U8 *_d,U8 *class_name=lastclass,
if (IsRaw) {
DocDump(doc,100000);
DocDel(doc);
} else
Preempt(old_preempt);
}
}
U0 UpdateRegVarImg(CHashFun *tempf,U8 *_b,CTask *task)
{
CMemberLst *ml;
CHashClass *tempc;
ml=tempf->member_lst;
ml=tempf->member_lst_and_root;
while (ml) {
if (ml->reg!=REG_NONE) {
tempc=OptClassFwd(ml->member_class);
@ -236,7 +230,7 @@ public U0 FunRep(U8 *st,U8 *rbp=NULL,I64 max_depth=2,CTask *task=NULL)
} else
ClassRep(rbp,st,max_depth,TRUE);
} else {
tempm=tempf->member_lst;
tempm=tempf->member_lst_and_root;
while (tempm) {
if (0<=tempm->reg<NUM_REGS)
"%08Z %s\n",tempm->reg,"ST_U64_REGS",tempm->str;

6
Adam/ADefine.CPP

@ -11,15 +11,15 @@ U0 LoadDocDefines()
//This is cut and replaced when I generate a distro.
//See $LK,"DD_TEMPLEOS_LOC",A="FF:::/Demo/AcctExample/TOSDistro.CPP,DD_TEMPLEOS_LOC"$.
$TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","122,918");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","80,950");
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","118,728");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","80,899");
$ID,-4$
DefinePrint("DD_KERNEL","%08X",bfh);
bfh(I64)+=bfh->file_size-1;
DefinePrint("DD_KERNEL_END","%08X",bfh);
DefinePrint("DD_PROTECTED_LOW","%08X",MEM_PROTECTED_LOW_LIMIT);
//$LK,"DD_BOOT_HIGH_LOC_CD",A="FF:::/Adam/Boot/BootCD.CPP,DD_BOOT_HIGH_LOC_CD"$
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,DD_BOOT_HIGH_LOC_DVD"$
DefinePrint("DD_MP_VECT","%08X",MP_VECT_ADDR);
DefinePrint("DD_MP_VECT_END","%08X",

7
Adam/AExts.HPP → Adam/AExts.CPP

@ -30,7 +30,6 @@ extern Bool DocForm(U8 *_d,U8 *class_name=lastclass,
extern U0 DocHelpIndex(CDoc *doc,U8 *index);
extern U0 DocInsDoc(CDoc *doc,CDoc *doc2);
extern U0 DocInsEntry(CDoc *doc,CDocEntry *doc_e);
extern U8 *DocLinkFile(U8 *link_st,CTask *mem_task=NULL);
extern Bool DocLock(CDoc *doc);
extern U0 DocMax(I64 i=MAX_I32);
extern CDoc *DocNew(U8 *filename=NULL,CTask *task=NULL);
@ -46,9 +45,6 @@ extern U0 DocUpdateTaskDocs(CTask *task);
extern U0 DrawCtrls(CTask *task);
extern Bool Ed(U8 *link_st,I64 edf_dof_flags=0);
extern U0 EdCodeTools(CDoc *doc);
extern I64 EdCurU8(CDoc *doc);
extern U0 EdCursorLeft(CDoc *doc,I64 sc=MIN_I64);
extern U0 EdCursorRight(CDoc *doc,I64 sc=MIN_I64);
extern U8 *EdSprite(I64 bin_num);
extern I64 FindWiz();
extern I64 GetI64(U8 *msg,I64 dft,I64 lo=MIN_I64,I64 hi=MAX_I64);
@ -85,8 +81,7 @@ extern Bool View();
extern U0 ViewAnglesDel(CTask *task=NULL);
extern CCtrl *ViewAnglesNew(CTask *task=NULL);
extern Bool WinBorder(Bool val,CTask *task=NULL);
extern CDoc *WinCursorPosSet(
CTask *task,I64 ip_text_x,I64 ip_text_y,Bool set_cursor=TRUE);
extern CDoc *WinCursorPosSet(CTask *task,I64 ipx,I64 ipy,Bool set_cursor=TRUE);
extern Bool WinHorz(I64 left,I64 right,CTask *task=NULL);
extern U0 WinMax(CTask *task=NULL);
extern U0 WinMgrSync(I64 cnt=1,Bool force=FALSE);

8
Adam/AHash.CPP

@ -158,7 +158,7 @@ U8 *index=NULL,CDoc *doc=NULL)
CWho *lst;
I64 cnt,i,j,k,f=0;
U8 buf[512],*st,*last_index=StrNew(""),*cur_index,*comment;
Bool recurse,publics,map,old_preempt=Preempt;
Bool recurse,publics,map;
CTask *task;
ScanFlags(&f,Define("ST_FILE_UTIL_FLAGS"),"+r");
@ -226,7 +226,6 @@ U8 *index=NULL,CDoc *doc=NULL)
else
break;
}
Preempt(old_preempt);
if (map)
QSort(lst,cnt,sizeof(CWho),&HashEntriesCompare2);
@ -314,8 +313,7 @@ U8 *index=NULL,CDoc *doc=NULL)
if (index)
progress1=progress1_max=0;
wh_done:
Preempt(old_preempt);
wh_done:
if (doc) {
if (doc->root.next==doc)
DocPrint(doc,"No Match");
@ -403,7 +401,7 @@ public U0 MapFileLoad(U8 *filename)
ptr=temph->src_link;
if (ptr[0] && ptr[1] && ptr[2]==':' && ptr[3]==':')
ptr[3]=dsk.boot_drv_let;
ptr[3]=blkdev.boot_drv_let;
doc_e->aux_str=NULL;
}

BIN
Adam/AInputPointer.CPP

Binary file not shown.

35
Adam/AUtils.CPP → Adam/AMem.CPP

@ -177,38 +177,3 @@ public Bool HeapWalk(CTask *task=NULL)
else
return TRUE;
}
#help_index "Info;Task"
U0 TaskRepTask(CTask *task,I64 indent)
{
CTask *task1;
U8 *st,*desc=MStrUtil(task->task_title,SUF_SAFE_DOLLAR);
st=MStrPrint("$$MA,T=\"%08X\",LM=\"Kill(0x%X);\n\",$$",task,task,task);
"%h*c%s $$TX,\"%Q...\",SCX=16$$ Mem:%08X\n",indent,CH_SPACE,
st,desc,TaskMemAlloced(task);
"%h*cFlags:%04X:%04X Time:%0.2fm\n",indent+2,CH_SPACE,
task->task_flags,task->display_flags,
task->total_time/60.0/cnts.time_stamp_freq_initial;
Free(st);
Free(desc);
task1=task->next_child_task;
while (task1!=(&task->next_child_task)(U8 *)
-offset(CTask.next_sibling_task)) {
TaskRepTask(task1,indent+2);
task1=task1->next_sibling_task;
}
}
public U0 TaskRep()
{//Report current tasks on all cores.
I64 i;
CCPU *c;
PUSHFD
CLI
for (i=0;i<mp_cnt;i++) {
c=&cpu_structs[i];
"$$RED$$CPU:%d$$FG$$\n",i;
TaskRepTask(c->seth_task,2);
}
POPFD
}

78
Adam/AutoComplete/ACDict.CPP → Adam/AutoComplete/ACFill.CPP

@ -1,43 +1,4 @@
#help_index "AutoComplete/Dictionary"
public U0 ACDWordsLoad()
{//Put words from word list into hash table.
I64 size;
CHashGeneric *temph;
U8 *in_ptr,*in_start,*st2;
U16 *d;
acd.num_words=0;
if (in_ptr=FileRead(ACD_WORD_FILENAME,&size)) {
in_start=in_ptr;
Free(acd.word_lst);
acd.word_lst=AMAlloc(size);
MemCpy(acd.word_lst,in_start,size);
acd.word_lst_size=size;
while (in_ptr<in_start+size) {
if (*in_ptr==ACD_WORD_CHAR)
in_ptr++;
if (*in_ptr) {
st2=MStrUtil(in_ptr,SUF_TO_UPPER);
temph=ACAlloc(sizeof(CHashGeneric)+StrLen(st2)+1);
StrCpy(temph+1,st2);
Free(st2);
in_ptr+=StrLen(in_ptr)+1;
temph->str=temph+1;
temph->use_cnt=1;
temph->type=HTT_DICT_WORD;
d=in_ptr;
temph->user_data0=*d;
in_ptr+=2;
HashAdd(temph,ac.hash_table);
acd.num_words++;
} else
in_ptr+=3;
}
Free(in_start);
}
}
public U8 *ACDDefGet(U8 *st,I64 def_num=1)
{//MAlloc str holding single dict definition of word.
CFile *f;
@ -174,24 +135,6 @@ public U8 *ACDWordPtAt(U8 *st)
return acd.word_lst;
}
U0 ACDDictWordsAdd(CDoc *doc,U8 *st)
{
I64 i;
U8 *ptr;
if (st && *st && (ptr=ACDWordPtAt(st))) {
for (i=0;i<ACD_MAX_FILLINS;i++) {
if (*ptr++!=ACD_WORD_CHAR)
break;
if (i)
DocPrint(doc,"\n");
acd.fillins[i]=ptr-1;
DocPrint(doc,"$$GREEN$$'%d'$$FG$$ %-23ts",i,ptr);
ptr+=StrLen(ptr)+3;
}
acd.num_fillins=i;
}
}
U0 ACDFillin(I64 n)
{
U8 *s;
@ -295,3 +238,24 @@ fm_done:
if (unlock)
DocUnlock(doc);
}
#help_index "AutoComplete"
U0 ACFillIn(I64 n)
{
U8 *s;
if (0<=--n<ac.num_fillins) {
s=ac.fillin_matches[n]->str;
if (StrLen(s)>ac.partial_len)
Auto(s+ac.partial_len);
}
}
U0 ACMan(I64 n,CTask *parent_task=NULL)
{
CHashAC *tempw;
CHashSrcSym *temph;
if (0<=--n<ac.num_fillins && (tempw=ac.fillin_matches[n]) &&
(temph=HashFind(tempw->str,Fs->hash_table,HTG_SRC_SYM)) &&
temph->src_link)
PopUpEd(temph->src_link,parent_task);
}

168
Adam/AutoComplete/ACInit.CPP

@ -0,0 +1,168 @@
#help_index "AutoComplete/Dictionary"
acd.has_words=FileFind(ACD_WORD_FILENAME);
acd.has_defs =FileFind(ACD_DEF_FILENAME)||FileFind(ACD_DEF_FILENAME_Z);
public U0 ACDWordsLoad()
{//Put words from word list into hash table.
I64 size;
CHashGeneric *temph;
U8 *in_ptr,*in_start,*st2;
U16 *d;
acd.num_words=0;
if (in_ptr=FileRead(ACD_WORD_FILENAME,&size)) {
in_start=in_ptr;
Free(acd.word_lst);
acd.word_lst=AMAlloc(size);
MemCpy(acd.word_lst,in_start,size);
acd.word_lst_size=size;
while (in_ptr<in_start+size) {
if (*in_ptr==ACD_WORD_CHAR)
in_ptr++;
if (*in_ptr) {
st2=MStrUtil(in_ptr,SUF_TO_UPPER);
temph=ACAlloc(sizeof(CHashGeneric)+StrLen(st2)+1);
StrCpy(temph+1,st2);
Free(st2);
in_ptr+=StrLen(in_ptr)+1;
temph->str=temph+1;
temph->use_cnt=1;
temph->type=HTT_DICT_WORD;
d=in_ptr;
temph->user_data0=*d;
in_ptr+=2;
HashAdd(temph,ac.hash_table);
acd.num_words++;
} else
in_ptr+=3;
}
Free(in_start);
}
}
#help_index "AutoComplete"
CHashAC *ACHashAdd(U8 *w)
{
CHashAC *tempw=HashFind(w,ac.hash_table,HTT_WORD);
if (tempw) {
tempw->hits++;
return tempw;
}
tempw=ACAlloc(sizeof(CHashAC));
tempw->str=AStrNew(w);
tempw->type=HTT_WORD;
tempw->use_cnt=1;
tempw->hits=1;
HashAdd(tempw,ac.hash_table);
ac.num_words++;
return tempw;
}
U0 ACSingleFileAdd(U8 *buf)
{
I64 ch;
U8 *ptr=buf,*ptr2,*ptr3;
while (TRUE) {
while (TRUE) {
if (ch=*ptr++) {
if (Bt(chars_bmp_alpha_numeric,ch))
break;
} else
return;
}
ptr3=ptr;
ptr2=ptr;
ptr--;
while (TRUE) {
if (ch=*ptr2++) {
if (Bt(chars_bmp_alpha_numeric,ch))
*ptr3++=ch;
else if (ch!=CH_CURSOR)
break;
} else {
ptr2--;
break;
}
}
*ptr3=0;
ACHashAdd(ptr);
ptr=ptr2;
}
}
U0 ACMainFileLstTraverse(U8 *files_find_mask)
{
U8 *buf;
CDirEntry *tempde,*tempde1;
try {
tempde=tempde1=FilesFind(files_find_mask,
FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES|FUF_CLUSTER_ORDER);
while (tempde) {
"%s\n",tempde->full_name;
buf=FileRead(tempde->full_name);
ACSingleFileAdd(buf);
Free(buf);
tempde=tempde->next;
}
} catch
Fs->catch_except=TRUE;
DirTreeDel(tempde1);
}
U0 ACProgressTask(Bool *_start_flag)
{
I64 start=blkdev.write_cnt;
progress1=0;
progress1_max=(Size(ACD_DEF_FILENAME_Z,"+x+s")+BLK_SIZE-1)>>BLK_SIZE_BITS;
StrCpy(progress1_desc,"Uncompressing Dictionary");
start=blkdev.write_cnt;
*_start_flag=TRUE;
while (progress1<progress1_max) {
progress1=blkdev.write_cnt-start;
Sleep(10);
}
*progress1_desc=progress1=progress1_max=0;
}
public U0 ACInit(U8 *mask=NULL)
{//Read files and build AutoComplete statistics.
Bool start_flag;
CBlkDev *bd=Let2BlkDev;
while (LBts(&ac.flags,ACf_INIT_IN_PROGRESS))
Yield;
AutoComplete;
if (DrvIsWritable && FileFind(ACD_DEF_FILENAME_Z) &&
!FileFind(ACD_DEF_FILENAME)) {
if (bd->type!=BDT_RAM) {
start_flag=FALSE;
Spawn(&ACProgressTask,&start_flag);
while (!start_flag)
Yield;
}
Move(ACD_DEF_FILENAME_Z,ACD_DEF_FILENAME);
}
HashTableDel(ac.hash_table);
ac.hash_table=HashTableNew(2048,adam_task);
ac.num_words=0;
Free(ac.cur_word);
ac.cur_word=NULL;
if (mask)
ACMainFileLstTraverse(mask);
ACDWordsLoad;
LBtr(&ac.flags,ACf_INIT_IN_PROGRESS);
AutoComplete(ON);
}
I64 AutoCompleteSize()
{
if (ac.hash_table)
return HashTableSize2(ac.hash_table)+MSize2(acd.word_lst);
else
return 0;
}

347
Adam/AutoComplete/ACMain.CPP

@ -1,347 +0,0 @@
#help_index "AutoComplete"
CHashAC *ACHashAdd(U8 *w)
{
CHashAC *tempw=HashFind(w,ac.hash_table,HTT_WORD);
if (tempw) {
tempw->hits++;
return tempw;
}
tempw=ACAlloc(sizeof(CHashAC));
tempw->str=AStrNew(w);
tempw->type=HTT_WORD;
tempw->use_cnt=1;
tempw->hits=1;
HashAdd(tempw,ac.hash_table);
ac.num_words++;
return tempw;
}
U0 ACSingleFileAdd(U8 *buf)
{
I64 ch;
U8 *ptr=buf,*ptr2,*ptr3;
while (TRUE) {
while (TRUE) {
if (ch=*ptr++) {
if (Bt(chars_bmp_alpha_numeric,ch))
break;
} else
return;
}
ptr3=ptr;
ptr2=ptr;
ptr--;
while (TRUE) {
if (ch=*ptr2++) {
if (Bt(chars_bmp_alpha_numeric,ch))
*ptr3++=ch;
else if (ch!=CH_CURSOR)
break;
} else {
ptr2--;
break;
}
}
*ptr3=0;
ACHashAdd(ptr);
ptr=ptr2;
}
}
I64 ACSkipCrap(U8 *src,I64 len)
{
I64 j;
j=len-1;
while (j>=0) {
if (Bt(chars_bmp_alpha_numeric,src[j]))
break;
else
j--;
}
return j+1;
}
I64 ACPriorWordInStr(U8 *src,U8 *dst,I64 len,I64 buf_size)
{
I64 i,j=0,k;
i=len-1;
while (i>=0)
if (!Bt(chars_bmp_alpha_numeric,src[i]))
break;
else
i--;
if (i>=-1 && len>0)
for (k=i+1;k<len && j<buf_size-1;k++)
dst[j++]=src[k];
dst[j]=0;
return i+1;
}
U0 ACFillIn(I64 n)
{
U8 *s;
if (0<=--n<ac.num_fillins) {
s=ac.fillin_matches[n]->str;
if (StrLen(s)>ac.partial_len)
Auto(s+ac.partial_len);
}
}
U0 ACMan(I64 n,CTask *parent_task=NULL)
{
CHashAC *tempw;
CHashSrcSym *temph;
Bool old_preempt=Preempt;
if (0<=--n<ac.num_fillins && (tempw=ac.fillin_matches[n]) &&
(temph=HashFind(tempw->str,Fs->hash_table,HTG_SRC_SYM)) &&
temph->src_link) {
Preempt(old_preempt);
PopUpEd(temph->src_link,parent_task);
}
Preempt(old_preempt);
}
U0 ACFillInAdd(CHashAC *tempw)
{
I64 k;
if (ac.num_fillins<AC_MAX_FILLINS ||
tempw->hits>ac.fillin_hits[ac.num_fillins-1]) {
for (k=ac.num_fillins-1;k>=0;k--) {
if (tempw->hits<=ac.fillin_hits[k])
break;
else {
ac.fillin_matches[k+1]=ac.fillin_matches[k];
ac.fillin_hits[k+1] =ac.fillin_hits[k];
}
}
ac.fillin_matches[k+1]=tempw;
ac.fillin_hits[k+1] =tempw->hits;
if (ac.num_fillins<AC_MAX_FILLINS)
ac.num_fillins++;
}
}
U0 ACPutChoices(CDoc *focus_l,CDocEntry *doc_e,CTask *focus_task)
{
I64 i,data_col;
U8 *buf,*buf1,*src=NULL,*st;
CHashAC *tempw;
F64 timeout_time=tS+0.5;
CHashSrcSym *temph;
CDoc *doc=DocPut;
src=DocScanLine(focus_l,doc_e,&data_col);
DocUnlock(focus_l);
i=StrLen(src);
buf =MAlloc(MaxI64(i+1,256));
buf1=MAlloc(MaxI64(i+1,256));
if (data_col==-1)
data_col=0;
data_col=ACPriorWordInStr(src,buf,data_col,256);
ac.partial_len=StrLen(buf);
data_col=ACSkipCrap(src,data_col);
data_col=ACPriorWordInStr(src,buf1,data_col,256);
if (!ac.cur_word || StrCmp(ac.cur_word,buf)) {
st=ac.cur_word;
ac.cur_word=AStrNew(buf);
Free(st);
ac.num_fillins=0;
if (*ac.cur_word) {
Preempt(ON);
for (i=0;i<=ac.hash_table->mask && tS<timeout_time;i++) {
tempw=ac.hash_table->body[i];
while (tempw) {
if (!MemCmp(ac.cur_word,tempw->str,StrLen(ac.cur_word)))
ACFillInAdd(tempw);
tempw=tempw->next;
}
}
Preempt;
}
DocRst(doc,TRUE);
doc->flags|=DOCF_MIN_SIZE;
DocCursor;
Fs->border_src=BDS_CONST;
Fs->text_attr =Fs->border_attr=LTGRAY<<4+BLUE;
if (ac.cur_word && *ac.cur_word) {
DocPrint(doc,"$$PURPLE$$Word:%s$$FG$$\n",ac.cur_word);
for (i=0;i<ac.num_fillins;i++) {
st=ac.fillin_matches[i]->str;
DocPrint(doc,"$$GREEN$$F%02d$$FG$$ ",i+1);
if (TaskValidate(focus_task) &&
(temph=HashFind(st,focus_task->hash_table,HTG_SRC_SYM)) &&
temph->src_link) {
if (temph->type&HTF_PUBLIC)
DocPrint(doc,"$$RED$$");
DocPrint(doc,"$$TX+UL+L+PU,\"%Q\",A=\"%s\"$$$$FG$$\n",st,temph->src_link);
} else
DocPrint(doc,"%s\n",st);
}
if (acd.has_words)
ACDDictWordsAdd(doc,ac.cur_word);
} else if (FileFind("::/Doc/StandBy.TXT.Z"))
DocType(doc,"::/Doc/StandBy.TXT.Z",0);
DocRecalc(doc);
}
if (!LBts(&Fs->display_flags,DISPLAYf_SHOW))
WinZBufUpdate;
Free(src);
Free(buf);
Free(buf1);
}
U0 ACTask(I64)
{
CTask *focus_task,*original_focus_task;
CDoc *doc;
CDocEntry *doc_e;
I64 ch;
DocTermNew;
WinHorz(51,Fs->win_right);
LBts(&Fs->display_flags,DISPLAYf_WIN_ON_TOP);
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_BORDER
-WIF_SELF_IP_L-WIF_SELF_IP_R-WIG_DBL_CLICK;
Free(ac.cur_word);
ac.cur_word=NULL;
while (TRUE) {
original_focus_task=focus_task=sys_focus_task;
while (TaskValidate(focus_task) &&
Bt(&focus_task->task_flags,TASKf_INPUT_FILTER_TASK))
focus_task=focus_task->parent_task;
if (TaskValidate(focus_task) && (doc=DocPut(focus_task)) &&
focus_task!=Fs && Bt(&focus_task->display_flags,DISPLAYf_SHOW)) {
DocLock(doc);
if (TaskValidate(focus_task) && original_focus_task==sys_focus_task &&
doc && doc==DocPut(focus_task) && (doc_e=doc->cur_entry)) {
if (doc_e==doc) doc_e=doc_e->last;
while (doc_e->last!=doc && (doc_e->type_u8==DOCT_NEW_LINE ||
doc_e->type_u8==DOCT_SOFT_NEW_LINE))
doc_e=doc_e->last;
while (doc_e->last->type_u8!=DOCT_NEW_LINE && doc_e->last!=doc)
doc_e=doc_e->last;
ACPutChoices(doc,doc_e,focus_task);
} else
DocUnlock(doc);
}
Sleep(333);
if (ScanMsg(&ch,,1<<MSG_KEY_DOWN) && (ch==CH_ESC||ch==CH_SHIFT_ESC))
break;
doc=DocPut;
DocLock(doc);
if (doc->cur_entry->de_flags & DOCEF_LINK) {
'' CH_SPACE;
doc->cur_entry=doc;
}
DocUnlock(doc);
}
ac.task=NULL;
}
U0 ACMainFileLstTraverse(U8 *files_find_mask)
{
U8 *buf;
CDirEntry *tempde,*tempde1;
try {
tempde=tempde1=FilesFind(files_find_mask,
FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES|FUF_CLUSTER_ORDER);
while (tempde) {
"%s\n",tempde->full_name;
buf=FileRead(tempde->full_name);
ACSingleFileAdd(buf);
Free(buf);
tempde=tempde->next;
}
} catch
Fs->catch_except=TRUE;
DirTreeDel(tempde1);
}
public Bool AutoComplete(Bool val=OFF)
{//Turn AutoComplete OFF (or ON).
Bool old_autocomplete=FALSE,
old_preempt=Preempt;
if (val) {
while (Bt(&ac.flags,ACf_INIT_IN_PROGRESS))
Sleep(10);
if (TaskValidate(ac.task))
old_autocomplete=TRUE;
else {
ac.task=Spawn(&ACTask,NULL,"AutoComplete");
TaskWait(ac.task);
}
WinToTop(ac.task);
} else {
if (TaskValidate(ac.task)) {
old_autocomplete=TRUE;
Kill(ac.task);
while (TaskValidate(ac.task))
Yield;
ac.task=NULL;
}
}
Preempt(old_preempt);
return old_autocomplete;
}
U0 ACProgressTask(Bool *_start_flag)
{
I64 start=dsk.write_cnt;
progress1=0;
progress1_max=(Size(ACD_DEF_FILENAME_Z,"+x+s")+BLK_SIZE-1)>>BLK_SIZE_BITS;
StrCpy(progress1_desc,"Uncompressing Dictionary");
start=dsk.write_cnt;
*_start_flag=TRUE;
while (progress1<progress1_max) {
progress1=dsk.write_cnt-start;
Sleep(10);
}
*progress1_desc=progress1=progress1_max=0;
}
public U0 ACInit(U8 *mask=NULL)
{//Read files and build AutoComplete statistics.
Bool start_flag;
CBlkDev *bd=Let2BlkDev;
while (LBts(&ac.flags,ACf_INIT_IN_PROGRESS))
Yield;
AutoComplete;
if (DrvIsWritable && FileFind(ACD_DEF_FILENAME_Z) &&
!FileFind(ACD_DEF_FILENAME)) {
if (bd->type!=BDT_RAM) {
start_flag=FALSE;
Spawn(&ACProgressTask,&start_flag);
while (!start_flag)
Yield;
}
Move(ACD_DEF_FILENAME_Z,ACD_DEF_FILENAME);
}
HashTableDel(ac.hash_table);
ac.hash_table=HashTableNew(2048,adam_task);
ac.num_words=0;
Free(ac.cur_word);
ac.cur_word=NULL;
if (mask)
ACMainFileLstTraverse(mask);
ACDWordsLoad;
LBtr(&ac.flags,ACf_INIT_IN_PROGRESS);
AutoComplete(ON);
}
I64 AutoCompleteSize()
{
if (ac.hash_table)
return HashTableSize2(ac.hash_table)+MSize2(acd.word_lst);
else
return 0;
}

282
Adam/AutoComplete/ACTask.CPP

@ -0,0 +1,282 @@
#help_index "AutoComplete/Dictionary"
U0 ACDDictWordsAdd(U8 *st)
{
I64 i;
U8 *ptr;
if (st && *st && (ptr=ACDWordPtAt(st))) {
for (i=0;i<ACD_MAX_FILLINS;i++) {
if (*ptr++!=ACD_WORD_CHAR)
break;
if (i) '\n';
acd.fillins[i]=ptr-1;
"$$GREEN$$'%d'$$FG$$ %-23ts",i,ptr;
ptr+=StrLen(ptr)+3;
}
acd.num_fillins=i;
}
}
#help_index "AutoComplete"
U0 ACDocRst(I64 left,I64 top)
{
CDoc *doc=DocPut;
DocRst(doc,TRUE);
doc->flags|=DOCF_MIN_SIZE;
Fs->border_src=BDS_CONST;
Fs->text_attr =Fs->border_attr=LTGRAY<<4+BLUE;
LBtr(&Fs->display_flags,DISPLAYf_SHOW);
WinHorz(left,Fs->win_right);
WinVert(top,Fs->win_bottom);
DocCursor;
}
I64 ACSkipCrap(U8 *src,I64 len)
{
I64 j;
j=len-1;
while (j>=0) {
if (Bt(chars_bmp_alpha_numeric,src[j]))
break;
else
j--;
}
return j+1;
}
I64 ACPriorWordInStr(U8 *src,U8 *dst,I64 len,I64 buf_size)
{
I64 i,j=0,k;
i=len-1;
while (i>=0)
if (!Bt(chars_bmp_alpha_numeric,src[i]))
break;
else
i--;
if (i>=-1 && len>0)
for (k=i+1;k<len && j<buf_size-1;k++)
dst[j++]=src[k];
dst[j]=0;
return i+1;
}
U0 ACFillInAdd(CHashAC *tempw)
{
I64 k;
if (ac.num_fillins<AC_MAX_FILLINS ||
tempw->hits>ac.fillin_hits[ac.num_fillins-1]) {
for (k=ac.num_fillins-1;k>=0;k--) {
if (tempw->hits<=ac.fillin_hits[k])
break;
else {
ac.fillin_matches[k+1]=ac.fillin_matches[k];
ac.fillin_hits[k+1] =ac.fillin_hits[k];
}
}
ac.fillin_matches[k+1]=tempw;
ac.fillin_hits[k+1] =tempw->hits;
if (ac.num_fillins<AC_MAX_FILLINS)
ac.num_fillins++;
}
}
U0 ACPutChoices(CDoc *focus_l,CDocEntry *doc_e,CTask *focus_task,
Bool force_refresh)
{
I64 i,data_col;
U8 *buf,*buf1,*src=NULL,*st;
CHashAC *tempw;
F64 timeout_time=tS+0.5;
CHashSrcSym *temph;
src=DocScanLine(focus_l,doc_e,&data_col);
DocUnlock(focus_l);
i=StrLen(src);
buf =MAlloc(MaxI64(i+1,256));
buf1=MAlloc(MaxI64(i+1,256));
if (data_col==-1)
data_col=0;
data_col=ACPriorWordInStr(src,buf,data_col,256);
ac.partial_len=StrLen(buf);
data_col=ACSkipCrap(src,data_col);
data_col=ACPriorWordInStr(src,buf1,data_col,256);
if (!ac.cur_word || StrCmp(ac.cur_word,buf) || force_refresh) {
st=ac.cur_word;
ac.cur_word=AStrNew(buf);
Free(st);
ac.num_fillins=0;
if (*ac.cur_word)
for (i=0;i<=ac.hash_table->mask && tS<timeout_time;i++) {
tempw=ac.hash_table->body[i];
while (tempw) {
if (!MemCmp(ac.cur_word,tempw->str,StrLen(ac.cur_word)))
ACFillInAdd(tempw);
tempw=tempw->next;
}
}
ACDocRst(51,13);
if (ac.cur_word && *ac.cur_word) {
"$$PURPLE$$Word:%s$$FG$$\n",ac.cur_word;
for (i=0;i<ac.num_fillins;i++) {
st=ac.fillin_matches[i]->str;
"$$GREEN$$F%02d$$FG$$ ",i+1;
if (TaskValidate(focus_task) &&
(temph=HashFind(st,focus_task->hash_table,HTG_SRC_SYM)) &&
temph->src_link) {
if (temph->type&HTF_PUBLIC)
"$$RED$$";
"$$TX+UL+L+PU,\"%Q\",A=\"%s\"$$$$FG$$\n",st,temph->src_link;
} else
"%s\n",st;
}
if (acd.has_words)
ACDDictWordsAdd(ac.cur_word);
} else if (FileFind("::/Doc/StandBy.TXT.Z"))
Type("::/Doc/StandBy.TXT.Z",0);
}
Free(src);
Free(buf);
Free(buf1);
}
U0 ACTaskNormal(I64 sc,I64 last_sc,
CTask *focus_task,CTask *original_focus_task)
{
CDoc *doc;
CDocEntry *doc_e;
if ((doc=DocPut(focus_task)) &&
focus_task!=Fs && Bt(&focus_task->display_flags,DISPLAYf_SHOW)) {
DocLock(doc);
if (TaskValidate(focus_task) && original_focus_task==sys_focus_task &&
doc && doc==DocPut(focus_task) && (doc_e=doc->cur_entry)) {
if (doc_e==doc) doc_e=doc_e->last;
while (doc_e->last!=doc && (doc_e->type_u8==DOCT_NEW_LINE ||
doc_e->type_u8==DOCT_SOFT_NEW_LINE))
doc_e=doc_e->last;
while (doc_e->last->type_u8!=DOCT_NEW_LINE && doc_e->last!=doc)
doc_e=doc_e->last;
ACPutChoices(doc,doc_e,focus_task,ToBool(sc!=last_sc));
} else
DocUnlock(doc);
}
if (!LBts(&Fs->display_flags,DISPLAYf_SHOW))
WinZBufUpdate;
}
U0 ACTaskCtrl(I64 sc,I64 last_sc,
CTask *focus_task,CTask *original_focus_task)
{
if (TaskValidate(focus_task) &&
(focus_task->scroll_x || focus_task->scroll_y)) {
if (LBtr(&Fs->display_flags,DISPLAYf_SHOW))
WinZBufUpdate;
} else {
if (sc!=last_sc) {
if (sc&SCF_ALT) {
ACDocRst(27,3);