Browse Source

TempleOSCDV5.00.ISO

v6
Terry A. Davis 5 years ago
committed by minexew
parent
commit
f6eacf7744
  1. BIN
      0000Boot/0000Kernel.BIN.C
  2. 26
      Adam/ABlkDev/FileMgr.HC
  3. 47
      Adam/ABlkDev/Mount.HC
  4. 52
      Adam/ABlkDev/PrtDsk.HC
  5. 16
      Adam/ADefine.HC
  6. 7
      Adam/AExts.HC
  7. 12
      Adam/AMath.HC
  8. 2
      Adam/AMem.HC
  9. BIN
      Adam/AMouse.HC
  10. 120
      Adam/ARegistry.HC
  11. 4
      Adam/AutoComplete/ACFill.HC
  12. 4
      Adam/AutoComplete/ACInit.HC
  13. 8
      Adam/AutoComplete/ACTask.HC
  14. 16
      Adam/CPURep.HC
  15. 6
      Adam/Ctrls/CtrlsA.HC
  16. 42
      Adam/Ctrls/CtrlsBttn.HC
  17. 2
      Adam/Ctrls/CtrlsSlider.HC
  18. 2
      Adam/Ctrls/MakeCtrls.HC
  19. 45
      Adam/DevInfo.HC
  20. 6
      Adam/DolDoc/DocChar.HC
  21. 34
      Adam/DolDoc/DocCodeTools.HC
  22. 2
      Adam/DolDoc/DocDblBuf.HC
  23. 2
      Adam/DolDoc/DocEd.HC
  24. 3
      Adam/DolDoc/DocFile.HC
  25. 26
      Adam/DolDoc/DocGr.HC
  26. 4
      Adam/DolDoc/DocHighlight.HC
  27. 34
      Adam/DolDoc/DocMacro.HC
  28. 14
      Adam/DolDoc/DocPopUp.HC
  29. 4
      Adam/DolDoc/DocPutKey.HC
  30. 26
      Adam/DolDoc/DocPutS.HC
  31. 6
      Adam/DolDoc/DocRecalc.HC
  32. 12
      Adam/DolDoc/DocRun.HC
  33. 12
      Adam/DolDoc/DocWidgetWiz.HC
  34. 1
      Adam/DolDoc/MakeDoc.HC
  35. 4
      Adam/God/GodDoodle.HC
  36. 35
      Adam/God/GodSong.HC
  37. 10
      Adam/God/HSNotes.DD
  38. 18
      Adam/God/HolySpirit.HC
  39. 32
      Adam/Gr/GrComposites.HC
  40. 18
      Adam/Gr/GrDC.HC
  41. 6
      Adam/Gr/GrGlbls.HC
  42. 2
      Adam/Gr/GrInitB.HC
  43. 18
      Adam/Gr/GrMath.HC
  44. 12
      Adam/Gr/GrPalette.HC
  45. 22
      Adam/Gr/GrPrimatives.HC
  46. 22
      Adam/Gr/GrScrn.HC
  47. 14
      Adam/Gr/GrSpritePlot.HC
  48. 2
      Adam/Gr/GrTextBase.HC
  49. 135
      Adam/Gr/SpriteBitMap.HC
  50. 121
      Adam/Gr/SpriteEd.HC
  51. 248
      Adam/Gr/SpriteMain.HC
  52. 159
      Adam/Gr/SpriteMesh.HC
  53. 18
      Adam/Gr/SpriteNew.HC
  54. 70
      Adam/Host.HC
  55. 28
      Adam/InFile.HC
  56. 64
      Adam/InsReg.HC
  57. 4
      Adam/MakeAdam.HC
  58. 12
      Adam/Menu.HC
  59. 6
      Adam/Opt/Boot/BootDVD.HC
  60. 6
      Adam/Opt/Boot/BootHD.HC
  61. 14
      Adam/Opt/Boot/BootMHD.HC
  62. 8
      Adam/Opt/Boot/BootMHD2.HC
  63. 9
      Adam/Opt/Boot/BootRAM.HC
  64. 45
      Adam/Opt/Boot/DskISORedSea.HC
  65. 49
      Adam/Opt/Utils/DocUtils.HC
  66. 36
      Adam/Opt/Utils/HeapLog.HC
  67. 2
      Adam/Opt/Utils/MakeUtils.HC
  68. 23
      Adam/Opt/Utils/MemRep.HC
  69. 12
      Adam/Opt/Utils/Profiler.HC
  70. 10
      Adam/Opt/Utils/StrUtils.HC
  71. 47
      Adam/Opt/Utils/TOS.HC
  72. 2
      Adam/Snd/MakeSnd.HC
  73. 60
      Adam/Snd/SndEffects.HC
  74. 3
      Adam/Snd/SndFile.HC
  75. 24
      Adam/Snd/SndMath.HC
  76. 26
      Adam/Snd/SndMusic.HC
  77. 2
      Adam/TaskRep.HC
  78. 4
      Adam/TaskSettings.HC
  79. 22
      Adam/Training.HC
  80. BIN
      Adam/WallPaper.HC
  81. 108
      Adam/Win.HC
  82. 454
      Adam/WinMgr.HC
  83. BIN
      Apps/AfterEgypt/AESplash.DD
  84. 194
      Apps/AfterEgypt/AfterEgypt.HC
  85. BIN
      Apps/AfterEgypt/Battle.HC
  86. 26
      Apps/AfterEgypt/Comics.HC
  87. BIN
      Apps/AfterEgypt/Comics/Moses01.DD
  88. BIN
      Apps/AfterEgypt/Comics/Moses02.DD
  89. BIN
      Apps/AfterEgypt/Comics/Moses04.DD
  90. BIN
      Apps/AfterEgypt/Comics/Moses05.DD
  91. BIN
      Apps/AfterEgypt/Comics/Moses06.DD
  92. BIN
      Apps/AfterEgypt/Comics/Moses07.DD
  93. BIN
      Apps/AfterEgypt/Comics/Moses08.DD
  94. BIN
      Apps/AfterEgypt/GodTalking.HC
  95. BIN
      Apps/AfterEgypt/HorebA.HC
  96. 97
      Apps/AfterEgypt/HorebBMP.HC
  97. 94
      Apps/AfterEgypt/HorebBSP.HC
  98. 144
      Apps/AfterEgypt/HorebC.HC
  99. 24
      Apps/AfterEgypt/Load.HC
  100. 77
      Apps/AfterEgypt/Map.HC

BIN
0000Boot/0000Kernel.BIN.C

Binary file not shown.

26
Adam/ABlkDev/FileMgr.HC

@ -566,14 +566,14 @@ U0 FMRightClick()
}
}
U8 *fm_ip_str=NULL;
U8 *fm_ms_str=NULL;
U0 (*fp_old_final_scrn_update)(CDC *dc);
U0 FMFinalScrnUpdate(CDC *dc)
{
if (fm_ip_str) {
if (fm_ms_str) {
dc->color=LTRED;
GrPrint(dc,ip.pos.x,ip.pos.y,"%s",fm_ip_str);
GrPrint(dc,ms.pos.x,ms.pos.y,"%s",fm_ms_str);
}
(*fp_old_final_scrn_update)(dc);
}
@ -581,7 +581,7 @@ U0 FMFinalScrnUpdate(CDC *dc)
public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
{//File manager. Also, used to choose files and dirs.
CDirEntry *head=NULL,*tmpde,*tmpde1,*tmpde2;
I64 sc,ch,a1,a2,msg_code;
I64 sc,ch,arg1,arg2,msg_code;
CDoc *doc=NULL,*old_put_doc=DocPut,*old_display_doc=DocDisplay;
U8 *res=NULL,*st,*st2,*old_cur_dir=CurDir;
CDocEntry *doc_ce=NULL,*doc_e;
@ -600,26 +600,26 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
}
do {
DocUnlock(doc);
do msg_code=GetMsg(&a1,&a2,1<<MSG_KEY_DOWN|1<<MSG_IP_L_DOWN|1<<MSG_IP_L_UP|
1<<MSG_IP_R_UP);
do msg_code=GetMsg(&arg1,&arg2,
1<<MSG_KEY_DOWN|1<<MSG_MS_L_DOWN|1<<MSG_MS_L_UP|1<<MSG_MS_R_UP);
while (Fs!=sys_focus_task);
DocLock(doc);
switch (msg_code) {
case MSG_IP_R_UP:
case MSG_MS_R_UP:
DocUnlock(doc);
FMRightClick;
DocLock(doc);
break;
case MSG_IP_L_DOWN:
case MSG_MS_L_DOWN:
doc_ce=doc->cur_entry;
fm_ip_str=doc_ce->tag;
fm_ms_str=doc_ce->tag;
gr.fp_final_scrn_update=&FMFinalScrnUpdate;
break;
case MSG_IP_L_UP:
case MSG_MS_L_UP:
if (doc_ce) {
gr.fp_final_scrn_update=fp_old_final_scrn_update;
if (WinCursorPosSet(Fs,a1+Fs->pix_left+Fs->scroll_x,
a2+Fs->pix_top+Fs->scroll_y,TRUE)) {
if (WinCursorPosSet(Fs,arg1+Fs->pix_left+Fs->scroll_x,
arg2+Fs->pix_top+Fs->scroll_y,TRUE)) {
doc_e=doc->cur_entry;
if (doc_e!=doc_ce) {
st2=NULL;
@ -678,7 +678,7 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
break;
case MSG_KEY_DOWN:
doc_ce=NULL;
ch=a1; sc=a2;
ch=arg1; sc=arg2;
if (sc.u8[0]==SC_DELETE && !(sc&(SCF_SHIFT|SCF_CTRL)))
ch=CH_CTRLY;
if (ch && sc&SCF_ALT) goto fm_regular_key;

47
Adam/ABlkDev/Mount.HC

@ -1,13 +1,14 @@
#help_index "Install;File/Cmd Line (Typically);Cmd Line (Typically);"
I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
U8 Mount2(U8 boot_drv_let,CDoc *_doc,Bool _caller_is_prtdsk)
{//If _doc, called by $LK,"::/Kernel/KCfg.HC"$ else called by $LK,"Mount",A="MN:Mount"$().
I64 cnt,res=0,num_hints,drv_let,type,unit;
I64 cnt,total=0,num_hints,drv_let,type,unit,prt_num;
U8 blks_buf[STR_LEN],addr_buf[STR_LEN],base0_buf[STR_LEN],base1_buf[STR_LEN],
*filename=NULL,*filename2=NULL;
*filename=NULL,*filename2=NULL,res=0;
CATARep *head=NULL,*tmpha;
Bool one_drv,make_free;
Bool whole_drv,make_free;
CDoc *doc;
boot_drv_let=ToUpper(boot_drv_let);
if (boot_drv_let)
boot_drv_let=Let2Let(boot_drv_let);
do {
cnt=0;
if (!_doc)
@ -19,10 +20,10 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
"$$GREEN$$Q$$FG$$-$$GREEN$$S$$FG$$ are ISO file write drives.\n"
"$$GREEN$$T$$FG$$-$$GREEN$$Z$$FG$$ are ATAPI CD/DVD drives.\n"
"\nDrive Letter ($$PURPLE$$<ENTER>$$FG$$ to exit):";
drv_let=ToUpper(GetChar);
drv_let=Let2Let(GetChar);
'\n';
if (type=Let2BlkDevType(drv_let)) {
one_drv=FALSE;
whole_drv=FALSE;
if (_doc) { //Called by $LK,"::/Kernel/KCfg.HC"$
doc=_doc;
make_free=FALSE;
@ -32,6 +33,7 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
make_free=TRUE;
}
unit=0;
prt_num=MIN_I64;
switch (type) {
case BDT_RAM:
"Addr of RAM disk ($$PURPLE$$<ENTER>$$FG$$ to MAlloc):";
@ -44,6 +46,7 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
filename=GetStr("File Name:");
break;
case BDT_ATA:
prt_num=GetI64("Partition Num (Default=All):",prt_num);
case BDT_ATAPI:
num_hints=ATARep(,,&head);
if (type==BDT_ATAPI && boot_drv_let)
@ -87,6 +90,8 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
case BDT_ISO_FILE_WRITE:
if (!*blks_buf) StrCpy(blks_buf,"0");
DocPrint(doc,"bd->max_blk=(%s)-1;\n",blks_buf);
DocPrint(doc,"bd->drv_offset=19<<2+"
"(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;\n");
break;
case BDT_ISO_FILE_READ:
filename2=FileNameAbs(filename);
@ -102,31 +107,37 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
make_free=TRUE;
} else
DocPrint(doc,"bd->base0=%s;bd->base1=%s;\n",base0_buf,base1_buf);
if (type==BDT_ATA && repartition) {
if (type==BDT_ATA && _caller_is_prtdsk) {
"\nReformat WHOLE drive!";
one_drv=YorN;
whole_drv=YorN;
}
break;
}
DocPrint(doc,"BlkDevAdd(bd,%d,%d);\n",one_drv,make_free);
DocPrint(doc,"BlkDevAdd(bd,%d,%d,%d);\n",prt_num,whole_drv,make_free);
if (_doc) //Called by $LK,"::/Kernel/KCfg.HC"$
cnt++;
else { //Called by $LK,"Mount",A="MN:Mount"$()
if ((cnt=ExeDoc(doc)) && one_drv)
PrtDsk(drv_let);
if ((cnt=ExeDoc(doc)) && whole_drv) {
if (_caller_is_prtdsk) {
res=drv_let;
PrtDsk(drv_let,1.0); //First mount whole drive.
} else
PrtDsk(drv_let);
}
DocDel(doc);
}
}
res+=cnt;
} while (cnt || !res && _doc); //At least 1 if Called by $LK,"::/Kernel/KCfg.HC"$
total+=cnt;
} while (cnt && !_caller_is_prtdsk ||
!total && _doc); //At least 1 if Called by $LK,"::/Kernel/KCfg.HC"$
Free(filename);
Free(filename2);
return res;
}
public I64 Mount(Bool repartition=FALSE)
{//Mount drives.
return Mount2(0,NULL,repartition);
public U8 Mount(Bool caller_is_prtdsk=FALSE)
{//Mount drives. Called from $LK,"PrtDsk(Mount)",A="FF:::/Adam/ABlkDev/PrtDsk.HC,Mount("$.
return Mount2(0,NULL,caller_is_prtdsk);
}
public U0 Unmount(U8 drv_let=0)
@ -141,7 +152,7 @@ public U8 MountFile(U8 *filename)
CBlkDev *bd=BlkDevNextFreeSlot(dv->drv_let,BDT_ISO_FILE_READ);
bd->drv_offset=19<<2+(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;
bd->file_dsk_name=AStrNew(filename3);
BlkDevAdd(bd,TRUE,TRUE);
BlkDevAdd(bd,,TRUE,TRUE);
Free(filename3);
Free(filename2);
return dv->drv_let;

52
Adam/ABlkDev/PrtDsk.HC

@ -10,20 +10,20 @@ class CPlannedDrv
Bool pri;
};
//Available to assist in writing scripts.
I64 drv_dsk_dsk_size=0;
public I64 PrtDsk(U8 drv_let=0,...)
{/*Partition the disk containing partition drv_let.
public I64 PrtDsk(U8 drv_let=0)
{//Partition the disk containing partition drv_let.
//drv_let=0 means add new drive that
//is not already mounted.
drv_let=0 means add new drive that is not already mounted.
>PrtDsk('C',0.5,0.25,0.25); //Make three. 50% C, 25% D, 25% E, round-up to blk.
*/
CBlkDev *bd;
CPlannedDrv head,*tmppp;
CMasterBoot mbr;
Bool pri=TRUE;
I64 ext_base,drv_let2,pri_cnt=0,
i,start_offset,offset,remaining;
drv_dsk_dsk_size=0;
I64 ext_base,drv_let2,pri_cnt=0,i,start_offset,offset,
total,remaining,cur_arg=0;
"This command does not play well\n"
"with other operating systems.\n"
"You really should use another\n"
@ -34,17 +34,17 @@ public I64 PrtDsk(U8 drv_let=0)
"until you set block zero to zero\n"
"with $$LK,\"BootMHDZero\",\"MN:BootMHDZero\"$$()\n\n\n"
"Continue";
if (!YorN) return 0;
if (argc<=cur_arg && !YorN)
return 0;
'\n';
if (drv_let && !Let2BlkDev(drv_let,FALSE))
drv_let=0;
if (!drv_let) {
Mount(TRUE);
return 0;
}
if (!(bd=Let2BlkDev(drv_let,FALSE)) || bd->type!=BDT_ATA)
if (!drv_let && !(drv_let=Mount(TRUE)) ||
!(bd=Let2BlkDev(drv_let,FALSE)) || bd->type!=BDT_ATA)
return 0;
drv_dsk_dsk_size=bd->max_blk+1;
total=bd->max_blk+1;
QueInit(&head);
drv_let2=bd->first_drv_let;
remaining=FloorU64(bd->max_blk+1,ROUND_DRV_TO);
@ -55,7 +55,7 @@ public I64 PrtDsk(U8 drv_let=0)
tmppp->pri=FALSE;
if (pri) {
"Primary Partition";
if (YorN) {
if (argc>cur_arg || YorN) {
pri_cnt++;
tmppp->pri=TRUE;
if (pri_cnt==3)
@ -63,10 +63,14 @@ public I64 PrtDsk(U8 drv_let=0)
} else
pri=FALSE;
}
"Blocks Remaining:%d (0x%X)\n",
"\nBlocks Remaining:%d (0x%X)\n",
remaining-DRV_HEADER,remaining-DRV_HEADER;
tmppp->size=CeilU64(GetI64("Size in Blocks :",
remaining-DRV_HEADER)+DRV_HEADER,ROUND_DRV_TO);
if (argc>cur_arg)
tmppp->size=MinI64(CeilU64(MaxI64(remaining,DRV_HEADER),ROUND_DRV_TO),
CeilU64(argv[cur_arg++](F64)*total,ROUND_DRV_TO));
else
tmppp->size=CeilU64(GetI64("Size in Blocks :",
remaining-DRV_HEADER)+DRV_HEADER,ROUND_DRV_TO);
} while (!(ROUND_DRV_TO<=tmppp->size<=FloorU64(remaining,ROUND_DRV_TO)));
QueIns(tmppp,head.last);
remaining-=tmppp->size;
@ -85,7 +89,7 @@ public I64 PrtDsk(U8 drv_let=0)
tmppp=tmppp->next;
drv_let2++;
}
if (!AreYouSure)
if (!argc && !AreYouSure)
goto pd_done;
remaining=FloorU64(bd->max_blk+1,ROUND_DRV_TO)-ROUND_DRV_TO;
@ -149,15 +153,15 @@ public I64 PrtDsk(U8 drv_let=0)
}
bd->flags&=~(BDF_INITIALIZED | BDF_INIT_IN_PROGRESS);
BlkDevAdd(bd,FALSE,TRUE);
BlkDevAdd(bd,,FALSE,TRUE);
for (i=bd->first_drv_let;i<drv_let2;i++)
Fmt(i,,FALSE);
pd_done:
pd_done:
while (head.next!=&head) {
tmppp=head.next;
QueRem(tmppp);
Free(tmppp);
}
return drv_dsk_dsk_size;
return total;
}

16
Adam/ADefine.HC

@ -2,7 +2,7 @@
U0 LoadDocDefines()
{
CBinFile *bfh=sys_boot_base-sizeof(CBinFile);
CBinFile *bfh=mem_boot_base-sizeof(CBinFile);
DefinePrint("DD_OS_NAME_VERSION","TempleOS V%0.2f",sys_os_version);
DefinePrint("DD_TEMPLEOS_AGE","%0.1f",
@ -11,8 +11,8 @@ U0 LoadDocDefines()
//This is cut and replaced when I generate a distro.
//See $LK,"DD_TEMPLEOS_LOC",A="FF:::/Demo/AcctExample/TOSDistro.HC,DD_TEMPLEOS_LOC"$.
$TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","120,770");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,303");
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,466");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,791");
$ID,-4$
DefinePrint("DD_KERNEL","%08X",bfh);
bfh(I64)+=bfh->file_size-1;
@ -27,12 +27,14 @@ $ID,-4$
DefinePrint("DD_SYS_FIXED_AREA_BASE","%08X",SYS_FIXED_AREA);
DefinePrint("DD_SYS_FIXED_AREA_END","%08X",
SYS_FIXED_AREA+sizeof(CSysFixedArea)-1);
DefinePrint("DD_SYS_HEAP_BASE","%08X",sys_heap_base);
DefinePrint("DD_SYS_HEAP_LIMIT","%08X",sys_heap_limit);
DefinePrint("DD_MEM_HEAP_BASE","%08X",mem_heap_base);
DefinePrint("DD_MEM_HEAP_LIMIT","%08X",mem_heap_limit);
DefinePrint("DD_MEM_MIN_MEG","%dMeg",MEM_MIN_MEG);
DefinePrint("DD_UNCACHED_ALIAS","%010X",dev.uncached_alias);
DefinePrint("DD_MEM_MAPPED_SPACE_GIG","%dGig",MEM_MAPPED_SPACE/0x40000000);
DefinePrint("DD_MEM_MAPPED_SPACE_END","%010X",MEM_MAPPED_SPACE-1);
DefinePrint("DD_PHYSICAL_SPACE_END","%010X",
mem_physical_space-1);
DefinePrint("DD_MAPPED_SPACE_END","%010X",
mem_mapped_space-1);
DefinePrint("DD_JIFFY_HZ","%dHz",JIFFY_FREQ);
}

7
Adam/AExts.HC

@ -58,8 +58,8 @@ extern CMenuEntry *MenuEntryFind(CMenu *haystack_menu,U8 *needle_full_name);
extern CMenu *MenuFilePush(U8 *filename);
extern U0 MenuPop();
extern CMenu *MenuPush(U8 *st);
extern I64 Mount(Bool repartition=FALSE);
extern CTask *Noise(I64 ms,F64 min_freq,F64 max_freq);
extern U8 Mount(Bool caller_is_prtdsk=FALSE);
extern CTask *Noise(I64 mS,F64 min_ona,F64 max_ona);
extern Bool Plain(U8 *filename,I64 edf_dof_flags=0);
extern Bool PopUpCancelOk(U8 *header=NULL,U8 *footer=NULL);
extern I64 PopUpColor(U8 *header=NULL,
@ -80,6 +80,7 @@ extern I64 PopUpRangeI64(
extern Bool PopUpTransform(I64 *r);
extern U0 Refresh(I64 cnt=1,Bool force=FALSE);
extern U0 RegOneTimePopUp(I64 flag_num,U8 *msg);
extern Bool RegWrite(U8 *path,U8 *fmt,...);
extern U0 SettingsPop(CTask *task=NULL,I64 flags=0);
extern CTaskSettings *SettingsPush(CTask *task=NULL,I64 flags=0);
extern U0 TemplateCtrlSlider(CDoc *doc);
@ -87,7 +88,7 @@ extern Bool View();
extern U0 ViewAnglesDel(CTask *task=NULL);
extern CCtrl *ViewAnglesNew(CTask *task=NULL);
extern Bool WinBorder(Bool val=OFF,CTask *task=NULL);
extern CDoc *WinCursorPosSet(CTask *task,I64 ipx,I64 ipy,Bool set_cursor=TRUE);
extern CDoc *WinCursorPosSet(CTask *task,I64 msx,I64 msy,Bool set_cursor=TRUE);
extern Bool WinHorz(I64 left,I64 right,CTask *task=NULL);
extern U0 WinMax(CTask *task=NULL);
extern U0 WinScrollNull(CTask *task,CD3I64 *s);

12
Adam/AMath.HC

@ -88,13 +88,13 @@ public Complex *CMul(Complex *prod,Complex *n1,Complex *n2)
public Complex *CDiv(Complex *quot,Complex *n1,Complex *n2)
{//quot=n1/n2
F64 m1,a1,m2,a2;
R2P(&m1,&a1,n1->x,n1->y);
R2P(&m2,&a2,n2->x,n2->y);
F64 m1,arg1,m2,arg2;
R2P(&m1,&arg1,n1->x,n1->y);
R2P(&m2,&arg2,n2->x,n2->y);
m1/=m2;
a1-=a2;
quot->x=m1*Cos(a1);
quot->y=m1*Sin(a1);
arg1-=arg2;
quot->x=m1*Cos(arg1);
quot->y=m1*Sin(arg1);
return quot;
}

2
Adam/AMem.HC

@ -96,7 +96,7 @@ public Bool IsInHeapCtrl(U8 *a,CHeapCtrl *hc,Bool lock=TRUE)
PAUSE
m=hc->next_mem_blk;
while (m!=&hc->next_mem_blk) {
if (a>=m && a<m(U8 *)+m->pages<<MEM_PAGE_BITS) {
if (a>=m && a<m(U8 *)+m->pags<<MEM_PAG_BITS) {
if (lock)
LBtr(&hc->locked_flags,HClf_LOCKED);
POPFD

BIN
Adam/AInputPointer.HC → Adam/AMouse.HC

Binary file not shown.

120
Adam/ARegistry.HC

@ -16,7 +16,7 @@ Bool RegCache()
return TRUE;
}
public Bool RegSetDftEntry(U8 *path,U8 *val,Bool is_adam_entry=FALSE)
public Bool RegDft(U8 *path,U8 *val,Bool is_adam_entry=FALSE)
{//Add code doc tree branch to registry.
Bool res,unlock_doc;
RegCache;
@ -40,13 +40,13 @@ public Bool RegSetDftEntry(U8 *path,U8 *val,Bool is_adam_entry=FALSE)
return res;
}
public I64 RegExeBranch(U8 *path)
public I64 RegExe(U8 *path)
{//Execute doc tree branch in registry.
RegCache;
return DocTreeBranchExe(sys_registry_doc,path);
}
public Bool RegWriteBranch(U8 *path,U8 *fmt,...)
public Bool RegWrite(U8 *path,U8 *fmt,...)
{//Rewrite doc tree branch in registry.
Bool res,unlock_doc;
CDocEntry *tree_branch,*start_indent,*end_indent;
@ -65,6 +65,46 @@ public Bool RegWriteBranch(U8 *path,U8 *fmt,...)
Free(buf);
return res;
}
public I64 RegCnt(U8 *path)
{//Tree branch cnt in registry.
I64 res=0;
CDocEntry *tree_branch,*start_indent,*end_indent;
Bool unlock_doc=DocLock(sys_registry_doc);
if (DocTreeFind(sys_registry_doc,path,
&tree_branch,&start_indent,&end_indent)) {
end_indent=end_indent->next;
while (start_indent!=end_indent) {
res++;
start_indent=start_indent->next;
}
}
if (unlock_doc)
DocUnlock(sys_registry_doc);
return res;
}
public Bool RegAppend(U8 *path,U8 *fmt,...)
{//Rewrite doc tree branch in registry.
Bool res,unlock_doc;
CDocEntry *tree_branch,*start_indent,*end_indent;
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
RegCache;
unlock_doc=DocLock(sys_registry_doc);
if (res=DocTreeFind(sys_registry_doc,path,
&tree_branch,&start_indent,&end_indent)) {
sys_registry_doc->cur_entry=end_indent;
sys_registry_doc->cur_col=sys_registry_doc->cur_entry->min_col;
} else
DocTreeMake(sys_registry_doc,path);
DocPrint(sys_registry_doc,"%s",buf);
if (DrvIsWritable(*sys_registry_doc->filename.name))
DocWrite(sys_registry_doc);
if (unlock_doc)
DocUnlock(sys_registry_doc);
Free(buf);
return res;
}
public Bool OneTimePopUp(U8 *_flags,I64 flag_num,U8 *msg)
{//See $LK,"::/Apps/X-Caliber/X-Caliber.HC"$.
@ -87,7 +127,7 @@ public Bool OneTimePopUp(U8 *_flags,I64 flag_num,U8 *msg)
U0 RegOneTimePopUp(I64 flag_num,U8 *msg)
{//You're not supposed to make system pop-up flags, only me.
if (OneTimePopUp(sys_msg_flags,flag_num,msg))
RegWriteBranch("Adam/SysMsgFlags","sys_msg_flags[0]=0x%X;\n",
RegWrite("Adam/SysMsgFlags","sys_msg_flags[0]=0x%X;\n",
sys_msg_flags[0]);
}
@ -95,12 +135,74 @@ U0 RegInit()
{
U8 buf[STR_LEN];
Bool version_present;
RegSetDftEntry("Adam/SysMsgFlags","sys_msg_flags[0]=0;\n",TRUE);
RegDft("Adam/SysMsgFlags","sys_msg_flags[0]=0;\n",TRUE);
StrPrint(buf,"registry_version=%4.3f;\n",sys_os_version);
version_present=RegSetDftEntry("Adam/SysRegVer",buf,TRUE);
RegExeBranch("Adam");
version_present=RegDft("Adam/SysRegVer",buf,TRUE);
RegExe("Adam");
if (registry_version!=sys_os_version) {
RegWriteBranch("Adam/SysRegVer",buf);
RegExeBranch("Adam");
RegWrite("Adam/SysRegVer",buf);
RegExe("Adam");
}
}
#help_index "Boot/Once;Misc/Once"
public U0 AOnceFlush()
{//Flush AOnce() buf.
RegWrite("Once/Adam","");
}
public U0 OnceFlush()
{//Flush Once() buf.
RegWrite("Once/User","");
}
public U0 AOnce(U8 *fmt,...)
{//Writes Adam code to $LK,"Registry",A="FI:~/Registry.HC"$ to be executed next boot.
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
RegAppend("Once/Adam","%s\n",buf);
Free(buf);
}
public U0 Once(U8 *fmt,...)
{//Writes User code to $LK,"Registry",A="FI:~/Registry.HC"$ to be executed next boot.
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
RegAppend("Once/User","%s\n",buf);
Free(buf);
}
public U0 AOnceDrv(U8 drv_let=0,U8 *fmt,...)
{//Writes Adam code to drv $LK,"Registry",A="FI:~/Registry.HC"$ to be executed next boot.
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
I64 old_drv_let=*sys_registry_doc->filename.name;
if (drv_let)
*sys_registry_doc->filename.name=drv_let;
RegAppend("Once/Adam","%s\n",buf);
Free(buf);
*sys_registry_doc->filename.name=old_drv_let;
}
public U0 OnceDrv(U8 drv_let=0,U8 *fmt,...)
{//Writes User code to drv $LK,"Registry",A="FI:~/Registry.HC"$ to be executed next boot.
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
I64 old_drv_let=*sys_registry_doc->filename.name;
if (drv_let)
*sys_registry_doc->filename.name=drv_let;
RegAppend("Once/User","%s\n",buf);
Free(buf);
*sys_registry_doc->filename.name=old_drv_let;
}
public U0 OnceExe()
{//Execute Once code. This goes in $LK,"~/Once.HC"$.
RegDft("Once/Adam","");
if (RegCnt("Once/Adam")>2) {
Adam("RegExe(\"Once/Adam\");");
AOnceFlush;
}
RegDft("Once/User","");
if (RegCnt("Once/User")>2) {
RegExe("Once/User");
OnceFlush;
}
}

4
Adam/AutoComplete/ACFill.HC

@ -212,11 +212,11 @@ U0 ACMisspelledFind(CDoc *doc)
do {
if (doc_e!=doc && doc_e->de_flags&DOCEF_TAG) {
while (col<doc_e->max_col) {
while (col<doc_e->max_col && !Bt(chars_bmp_word,doc_e->tag[col]))
while (col<doc_e->max_col && !Bt(char_bmp_word,doc_e->tag[col]))
col++;
if (col<doc_e->max_col) {
col2=col;
while (col2<doc_e->max_col && Bt(chars_bmp_word,doc_e->tag[col2]))
while (col2<doc_e->max_col && Bt(char_bmp_word,doc_e->tag[col2]))
col2++;
ch=doc_e->tag[col2];
doc_e->tag[col2]=0;

4
Adam/AutoComplete/ACInit.HC

@ -65,7 +65,7 @@ U0 ACSingleFileAdd(U8 *buf)
while (TRUE) {
while (TRUE) {
if (ch=*ptr++) {
if (Bt(chars_bmp_alpha_numeric,ch))
if (Bt(char_bmp_alpha_numeric,ch))
break;
} else
return;
@ -75,7 +75,7 @@ U0 ACSingleFileAdd(U8 *buf)
ptr--;
while (TRUE) {
if (ch=*ptr2++) {
if (Bt(chars_bmp_alpha_numeric,ch))
if (Bt(char_bmp_alpha_numeric,ch))
*ptr3++=ch;
else if (ch!=CH_CURSOR)
break;

8
Adam/AutoComplete/ACTask.HC

@ -36,7 +36,7 @@ I64 ACSkipCrap(U8 *src,I64 len)
I64 j;
j=len-1;
while (j>=0) {
if (Bt(chars_bmp_alpha_numeric,src[j]))
if (Bt(char_bmp_alpha_numeric,src[j]))
break;
else
j--;
@ -49,7 +49,7 @@ 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]))
if (!Bt(char_bmp_alpha_numeric,src[i]))
break;
else
i--;
@ -223,12 +223,12 @@ U0 ACTask(I64)
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;
-WIF_SELF_MS_L-WIF_SELF_MS_R-WIG_DBL_CLICK;
Free(ac.cur_word);
ac.cur_word=NULL;
while (TRUE) {
if (scan_code&(SCF_CTRL|SCF_ALT) ||
GetTSC>KbdMouseEvtTime+cnts.time_stamp_freq>>1) {
GetTSC>KbdMsEvtTime+cnts.time_stamp_freq>>1) {
last_scan_code=scan_code;
scan_code=kbd.scan_code;
}

16
Adam/CPURep.HC

@ -30,7 +30,7 @@ public U0 CPURep(Bool full=FALSE)
CCPURep cr;
if (!full)
"%d Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
"%03X Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
else {
cr.swaps=CAlloc(sizeof(I64)*mp_cnt);
cr.cycles=CAlloc(sizeof(I64)*mp_cnt);
@ -47,22 +47,22 @@ public U0 CPURep(Bool full=FALSE)
Yield;
tf=tS;
"\nCPU: %d Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
"\n%03X Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
"\n Context\n"
"Core Swaps/s Cycles\n"
"---- ------------- -----------------\n";
"CPU Swaps/s Cycles\n"
"--- ------------- -----------------\n";
total_swaps=0;
total_cycles=0;
for (i=0;i<mp_cnt;i++) {
"%4d %13,d %17,d\n",i,
" %02X %13,d %17,d\n",i,
ToI64(cr.swaps[i]/(tf-t0)),ToI64(cr.cycles[i]/(tf-t0));
total_swaps+=cr.swaps[i];
total_cycles+=cr.cycles[i];
}
"---- ------------- -----------------\n";
"%4d %13,d %17,d\n",i,
"--- ------------- -----------------\n";
"%03X %13,d %17,d\n",i,
ToI64(total_swaps/(tf-t0)),ToI64(total_cycles/(tf-t0));
" Avg %13,d %17,d\n\n",
"Avg %13,d %17,d\n\n",
ToI64(total_swaps/(tf-t0)/i),ToI64(total_cycles/(tf-t0)/i);
"Avg Cycles/Swap: %12.6f\n",ToF64(total_cycles)/total_swaps;
"Avg Time/Swap : %12.6fns\n\n",(tf-t0)*1000000000.0*i/total_swaps;

6
Adam/Ctrls/CtrlsA.HC

@ -203,7 +203,7 @@ U0 WinScrollsInit(CTask *task)
if (!CtrlFindUnique(task,CTRLT_WIN_HSCROLL)) {
c=CAlloc(sizeof(CCtrl));
c->win_task=task;
c->flags=CTRLF_SHOW|CTRLF_BORDER|CTRLF_CAPTURE_LEFT_IP;
c->flags=CTRLF_SHOW|CTRLF_BORDER|CTRLF_CAPTURE_LEFT_MS;
c->type=CTRLT_WIN_HSCROLL;
c->state=&task->horz_scroll;
c->update_derived_vals=&WinDerivedScrollValsUpdate;
@ -215,7 +215,7 @@ U0 WinScrollsInit(CTask *task)
if (!CtrlFindUnique(task,CTRLT_WIN_VSCROLL)) {
c=CAlloc(sizeof(CCtrl));
c->win_task=task;
c->flags=CTRLF_SHOW|CTRLF_BORDER|CTRLF_CAPTURE_LEFT_IP;
c->flags=CTRLF_SHOW|CTRLF_BORDER|CTRLF_CAPTURE_LEFT_MS;
c->type=CTRLT_WIN_VSCROLL;
c->state=&task->vert_scroll;
c->update_derived_vals=&WinDerivedScrollValsUpdate;
@ -364,7 +364,7 @@ public CCtrl *ViewAnglesNew(CTask *task=NULL)
s->cy=GREEN;
s->cz=LTGREEN;
c->win_task=task;
c->flags=CTRLF_SHOW|CTRLF_CAPTURE_LEFT_IP;
c->flags=CTRLF_SHOW|CTRLF_CAPTURE_LEFT_MS;
c->type=CTRLT_VIEWING_ANGLES;
c->state=s;
c->draw_it=&DrawViewAnglesCtrl;

42
Adam/Ctrls/CtrlsButton.HC → Adam/Ctrls/CtrlsBttn.HC

@ -1,17 +1,17 @@
#define BUTTON_BORDER 2
#define BTTN_BORDER 2
#define BTF_DONT_FREE 1
class CCtrlButtonState
class CCtrlBttnState
{
I64 state,num_states,flags;
U8 *state_texts;
CColorROPU32 *state_colors;
};
U0 DrawCtrlButton(CDC *dc,CCtrl *c)
U0 DrawCtrlBttn(CDC *dc,CCtrl *c)
{
CCtrlButtonState *s=c->state;
CCtrlBttnState *s=c->state;
I64 l;
U8 *st;
@ -21,17 +21,17 @@ U0 DrawCtrlButton(CDC *dc,CCtrl *c)
st=s->state_texts;
dc->color=s->state_colors[s->state];
l=StrLen(st);
GrRect(dc,c->left+BUTTON_BORDER,c->top+BUTTON_BORDER,
c->right-c->left+1-BUTTON_BORDER*2,
c->bottom-c->top+1-BUTTON_BORDER*2);
GrRect(dc,c->left+BTTN_BORDER,c->top+BTTN_BORDER,
c->right-c->left+1-BTTN_BORDER*2,
c->bottom-c->top+1-BTTN_BORDER*2);
dc->color=s->state_colors[s->state]^(WHITE<<16+WHITE);
GrPrint(dc,(c->left+c->right+1-l*FONT_WIDTH)>>1,
(c->top+c->bottom+1-FONT_HEIGHT)>>1,"%s",st);
}
U0 LeftClickCtrlButton(CCtrl *c,I64,I64,Bool down)
U0 LeftClickCtrlBttn(CCtrl *c,I64,I64,Bool down)
{
CCtrlButtonState *s=c->state;
CCtrlBttnState *s=c->state;
if (down) {
s->state++;
if (s->state==s->num_states)
@ -39,12 +39,12 @@ U0 LeftClickCtrlButton(CCtrl *c,I64,I64,Bool down)
}
}
public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
public CCtrl *CtrlBttnNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
I64 num_states=1,U8 *state_texts,
I32 *state_colors,CCtrlButtonState *_s=NULL)
{//Create button ctrl. See $LK,"::/Apps/Strut/Strut.HC"$.
I32 *state_colors,CCtrlBttnState *_s=NULL)
{//Create bttn ctrl. See $LK,"::/Apps/Strut/Strut.HC"$.
CCtrl *res;
CCtrlButtonState *s;
CCtrlBttnState *s;
I64 i,j,l;
U8 *st;
if (width<0) {
@ -54,15 +54,15 @@ public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
j=StrLen(st);
if (j>l) l=j;
}
width=BUTTON_BORDER*4+l*FONT_WIDTH;
width=BTTN_BORDER*4+l*FONT_WIDTH;
}
if (height<0) height=BUTTON_BORDER*4+FONT_HEIGHT;
if (height<0) height=BTTN_BORDER*4+FONT_HEIGHT;
res=CAlloc(sizeof(CCtrl));
if (_s) {
s=_s;
MemSet(s,0,sizeof(CCtrlButtonState));
MemSet(s,0,sizeof(CCtrlBttnState));
} else {
s=CAlloc(sizeof(CCtrlButtonState));
s=CAlloc(sizeof(CCtrlBttnState));
s->flags=BTF_DONT_FREE;
}
s->num_states=num_states;
@ -72,8 +72,8 @@ public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
res->flags=CTRLF_SHOW;
res->type=CTRLT_GENERIC;
res->state=s;
res->draw_it=&DrawCtrlButton;
res->left_click=&LeftClickCtrlButton;
res->draw_it=&DrawCtrlBttn;
res->left_click=&LeftClickCtrlBttn;
res->left=x;
res->top=y;
res->right=res->left+width-1;
@ -82,8 +82,8 @@ public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
return res;
}
public U0 CtrlButtonDel(CCtrl *c)
{//Free button ctrl.
public U0 CtrlBttnDel(CCtrl *c)
{//Free bttn ctrl.
QueRem(c);
if (!(c->flags&BTF_DONT_FREE))
Free(c->state);

2
Adam/Ctrls/CtrlsSlider.HC

@ -176,7 +176,7 @@ CCtrl *SliderNew()
{
CCtrl *c=CAlloc(sizeof(CCtrl));
c->win_task=Fs;
c->flags=CTRLF_SHOW|CTRLF_CAPTURE_LEFT_IP;
c->flags=CTRLF_SHOW|CTRLF_CAPTURE_LEFT_MS;
c->type=CTRLT_GENERIC;
");
if (*m->glbl_name)

2
Adam/Ctrls/MakeCtrls.HC

@ -3,6 +3,6 @@ Cd(__DIR__);;
#help_index "Ctrls"
#help_file "::/Doc/Ctrls"
#include "CtrlsA"
#include "CtrlsButton"
#include "CtrlsBttn"
#include "CtrlsSlider"
Cd("..");;

45
Adam/DevInfo.HC

@ -6,9 +6,12 @@
#define PCI_DEV_FILE "::/Misc/PCIDevices.DD.Z"
/****
//1) Plain text edit and remove file header and tail
//2) Text find-and-replace "=0A=" with "".
//3) Run PCIDevFileGen().
//1) Download http://www.pcidatabase.com/reports.php?type=tab-delimeted
//2) Rename to ::/Misc/PCIDevices.DD.Z
//3) ToDolDoc("::/Misc/PCIDevices.DD.Z");
//4) Edit and remove file header and tail
//5) Text find-and-replace "=0A=" with "". (Doesn't seem necessary anmore.)
//6) Run PCIDevFileGen(). (Doesn't seem necessary anmore.)
public U0 PCIDevFileGen()
{
@ -168,34 +171,50 @@ public U0 PCIRep()
#help_index "Info;Memory/Info"
public U0 MemBIOSRep()
{//Report the memory ranges reported by the BIOS at boot.
U16 *m01=SYS_MEM_E801;
CMemE820 *m20=SYS_MEM_E820;
U16 *m01=MEM_E801;
CMemE820 *m20=MEM_E820;
CMemRange *tmpmr;
"Standard Addresses\n"
"0x000A0000-0x000BFFFF VGA\n"
"0xFEE00000-0xFEE00FFF See $$LK,\"APIC\",A=\"MN:LAPIC_BASE\"$$\n\n"
"000A0000-000BFFFF VGA\n"
"FEE00000-FEE00FFF See $$LK,\"APIC\",A=\"MN:LAPIC_BASE\"$$\n\n"
"32 Bit Device Mem\n";
while (LBts(&sys_semas[SYS_SEMA_DEV_MEM],0))
while (LBts(&sys_semas[SEMA_DEV_MEM],0))
Yield;
tmpmr=dev.mem32_head.next;
while (tmpmr!=&dev.mem32_head) {
"%02X:0x%016X-0x%016X\n",
"%02X:%016X-%016X\n",
tmpmr->type,tmpmr->base,tmpmr->base+tmpmr->size-1;
tmpmr=tmpmr->next;
}
LBtr(&sys_semas[SYS_SEMA_DEV_MEM],0);
LBtr(&sys_semas[SEMA_DEV_MEM],0);
"\nBIOS Memory Report 15:E801\n"
"01:0x0000000000000000-0x%016X\n",0x100000+m01[0]<<10-1;
"01:0x0000000001000000-0x%016X\n",0x1000000+m01[1]<<16-1;
"01:0000000000000000-%016X\n",0x100000+m01[0]<<10-1;
"01:0000000001000000-%016X\n",SYS_16MEG_AREA_LIMIT+m01[1]<<16-1;
if (m20->type) {
'\n';
"BIOS Memory Report 15:E820\n";
while (m20->type) {
"%02X:0x%016X-0x%016X\n",m20->type,m20->base,m20->base+m20->len-1;
"%02X:%016X-%016X\n",m20->type,m20->base,m20->base+m20->len-1;
m20++;
}
}
}
public U0 MemPageRep()
{//Page Table Report.
"MAPPED\t :%010X with ",mem_mapped_space;
if (Bt(&mem_page_size,30))
"$$RED$$1GIG$$FG$$ pages\n";
else
"$$RED$$2MEG$$FG$$ pages\n";
"PML2\t :%010X 2MEG :%08X\n",
*MEM_PML2(U64 *),*MEM_NUM_2MEG(U64 *);
"PML3\t :%010X 1GIG :%08X\n",
*MEM_PML3(U64 *),*MEM_NUM_1GIG(U64 *);
"PML4\t :%010X 512GIG:%08X\n",
*MEM_PML4(U64 *),*MEM_NUM_512GIG(U64 *);
"FIXED_AREA:%010X\n",SYS_FIXED_AREA;
"HEAP_BASE :%010X\nHEAP_LIMIT:%010X\n",mem_heap_base,mem_heap_limit;
}

6
Adam/DolDoc/DocChar.HC

@ -443,7 +443,7 @@ U0 EdCharIns(I64 ch,I64 sc,CDoc *doc)
I64 i,j,m,y=doc_ce->y;
if (doc->flags & DOCF_IN_DOLLAR) {
if (!Bt(chars_bmp_getkey,ch))
if (!Bt(char_bmp_printable,ch))
goto ic_done;
ChkDollarBufSize(doc);
doc->dollar_buf[doc->dollar_buf_ptr++]=ch;
@ -510,7 +510,7 @@ U0 EdCharIns(I64 ch,I64 sc,CDoc *doc)
goto ic_done;
}
if (doc->flags & DOCF_OVERSTRIKE) {
if (Bt(chars_bmp_displayable,ch)) {
if (Bt(char_bmp_displayable,ch)) {
ic_overstrike:
if (IsEditableText(doc_ce)) {
if (doc->cur_col<doc_ce->max_col) {
@ -578,7 +578,7 @@ ic_form_tab:
DocInsEntry(doc,doc_ne);
}
} else {
if (Bt(chars_bmp_displayable,ch)) {
if (Bt(char_bmp_displayable,ch)) {
if (doc_ce->type_u8==DOCT_DATA) {
while (TRUE) {
i=doc_ce->len+doc_ce->min_col;

34
Adam/DolDoc/DocCodeTools.HC

@ -359,7 +359,7 @@ U0 EdRACollect(CDoc *doc,CRenum *head)
StrCpy(buf,"@@");
i=2;
while (ch>=0 && i<sizeof(CEdFindText.find_text)) {
if (Bt(chars_bmp_alpha_numeric,ch))
if (Bt(char_bmp_alpha_numeric,ch))
buf[i++]=ch;
else
break;
@ -367,7 +367,7 @@ U0 EdRACollect(CDoc *doc,CRenum *head)
}
if (i<sizeof(CEdFindText.find_text)) {
buf[i++]=0;
while (ch>=0 && Bt(chars_bmp_white_space,ch))
while (ch>=0 && Bt(char_bmp_white_space,ch))
ch=EdRAGetU8(doc);
if (ch==':') {
ch=EdRAGetU8(doc);
@ -426,7 +426,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
I64 i,start_y,end_y,x,r,goto_line_num;
U8 *b,*st,*st2,*prj_file;
CTask *task=NULL;
CSrvCmd *tmpc;
CJob *tmpc;
CQueVectU8 *indent;
DocRecalc(doc);
@ -442,7 +442,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
task=Spawn(&SrvCmdLine,NULL,"Srv",,Fs);
st2=CurDir;
st=MStrPrint("Cd(\"%s\");",st2);
tmpc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
tmpc=TaskExe(task,Fs,st,1<<JOBf_WAKE_MASTER|1<<JOBf_FOCUS_MASTER);
Free(st2);
Free(st);
WinHorz(Fs->win_left,Fs->win_right, task);
@ -455,23 +455,23 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
st2=DirFile(prj_file),
st=MStrPrint("Cd(\"%s\");",st2);
Free(st2);
tmpc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|
1<<SVCf_FOCUS_MASTER|1<<SVCf_FREE_ON_COMPLETE);
tmpc=TaskExe(task,Fs,st,1<<JOBf_WAKE_MASTER|
1<<JOBf_FOCUS_MASTER|1<<JOBf_FREE_ON_COMPLETE);
Free(st);
st=MStrPrint("\"$$WW,1$$\";Cmp(\"%s\",\"SysTmp\",\"SysTmp\");",
prj_file);
tmpc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
tmpc=TaskExe(task,Fs,st,1<<JOBf_WAKE_MASTER|1<<JOBf_FOCUS_MASTER);
Free(st);
if (JobResScan(tmpc,&r))
if (!r) {
tmpc=TaskExe(task,Fs,
"Load(\"SysTmp\",LDF_JUST_LOAD);",
1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
1<<JOBf_WAKE_MASTER|1<<JOBf_FOCUS_MASTER);
if (JobResScan(tmpc,&r))
okay=TRUE;
}
tmpc=TaskExe(task,Fs,"Del(\"SysTmp.*\");",
1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
1<<JOBf_WAKE_MASTER|1<<JOBf_FOCUS_MASTER);
JobResScan(tmpc,&r);
} else {
Free(prj_file);
@ -483,7 +483,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
else
st=MStrPrint("\"$$WW,1$$\";ExeFile(\"%s\",CCF_JUST_LOAD);",
doc->filename.name);
tmpc=TaskExe(task,Fs,st,1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
tmpc=TaskExe(task,Fs,st,1<<JOBf_WAKE_MASTER|1<<JOBf_FOCUS_MASTER);
Free(st);
if (JobResScan(tmpc,&r) && r)
okay=TRUE;
@ -492,10 +492,10 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
}
if (!okay) {
PopUpOk("Has Errors");
while (LBts(&sys_semas[SYS_SEMA_FIX],0))
while (LBts(&sys_semas[SEMA_FIX],0))
Yield;
ToFileLine(dbg.fix_file_line,&st,&i);
LBtr(&sys_semas[SYS_SEMA_FIX],0);
LBtr(&sys_semas[SEMA_FIX],0);
if (!StrCmp(st,doc->filename.name))
goto_line_num=i;
Free(st);
@ -510,9 +510,9 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
indent=EdRICode(doc);
DocUnlock(doc);
if (beep) {
Snd(2000); Sleep(150); Snd(0);
Snd(86); Sleep(150); Snd;
Sleep(100);
Snd(2000); Sleep(150); Snd(0);
Snd(86); Sleep(150); Snd;
}
DocLock(doc);
EdRemFunLeadingSpace(doc);
@ -577,9 +577,9 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
}
DocUnlock(doc);
if (beep) {
Snd(2000); Sleep(150); Snd(0);
Snd(86); Sleep(150); Snd;
Sleep(100);
Snd(2000); Sleep(150); Snd(0);
Snd(86); Sleep(150); Snd;
}
DocLock(doc);
EdRenumAsm(doc);
@ -633,7 +633,7 @@ U0 EdChSC(CDoc *doc)
DocPrint(doc,"CH_SPACE,0x%X",sc);
else if (ch==CH_SHIFT_SPACE)
DocPrint(doc,"CH_SHIFT_SPACE,0x%X",sc);
else if (Bt(chars_bmp_displayable,ch))
else if (Bt(char_bmp_displayable,ch))
DocPrint(doc,"'%c',0x%X",ch,sc);
else
DocPrint(doc,"0x%X,0x%X",ch,sc);

2
Adam/DolDoc/DocDblBuf.HC

@ -4,6 +4,8 @@ public CDoc *DocPut(CTask *task=NULL)
//Basically, StdOut unless double buffering.
CDoc *res;
if (!task) task=Fs;
if (Bt(&task->task_flags,TASKf_INPUT_FILTER_TASK))
task=task->parent_task;
if ((res=task->put_doc) && res->doc_signature==DOC_SIGNATURE_VAL)
return res;
else

2
Adam/DolDoc/DocEd.HC

@ -240,7 +240,7 @@ public Bool Plain(U8 *filename,I64 edf_dof_flags=0)
return res;
}
#help_index "DolDoc;Task/Srv/Exe"
#help_index "DolDoc;Job/Exe;Task/Job/Exe"
public I64 PopUpEd(U8 *filename,CTask *parent=NULL,CTask **_pu_task=NULL)
{//Create PopUp win task and edit a doc.
U8 *st=MStrPrint("Ed(\"%Q\");",filename);

3
Adam/DolDoc/DocFile.HC

@ -120,9 +120,6 @@ public U8 *DocSave(CDoc *doc,I64 *_size=NULL)
case DOCT_TAB:
*dst++='\t';
break;
case DOCT_PAGE_BREAK:
*dst++=CH_FORM_FEED;
break;
case DOCT_NEW_LINE:
if (doc->flags&DOCF_CARRIAGE_RETURN)
*dst++='\r';

26
Adam/DolDoc/DocGr.HC

@ -65,8 +65,9 @@ class CTransformForm
F64 z_offset fmtstr "$$DA-TRM,A=\"Z Offset:%12.6f\"$$\n";
};
Bool PopUpTransform(I64 *r)
{
#help_index "Graphics/Input;Graphics/Math/3D Transformation"
public Bool PopUpTransform(I64 *r)
{//Prompt for Mat4x4 transform.
CTransformForm *tf=MAlloc(sizeof(CTransformForm));
tf->x_scale=1.0;
tf->y_scale=1.0;
@ -96,6 +97,7 @@ Bool PopUpTransform(I64 *r)
return FALSE;
}
#help_index "Graphics/Input"
#define PU_SPACING 10
U0 DrawIt(CTask *task,CDC *dc)
{
@ -124,7 +126,7 @@ U0 DrawIt(CTask *task,CDC *dc)
I64 DitherColor2(U8 *header=NULL)
{
I64 msg_code,a1,a2,res=-1,i,j;
I64 msg_code,arg1,arg2,res=-1,i,j;
DocClear;
"%s",header;
DocRecalc(DocPut);
@ -132,21 +134,21 @@ I64 DitherColor2(U8 *header=NULL)
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
Fs->draw_it=&DrawIt;
do {
msg_code=GetMsg(&a1,&a2,1<<MSG_IP_L_DOWN|1<<MSG_KEY_DOWN);
if (msg_code==MSG_IP_L_DOWN) {
msg_code=GetMsg(&a1,&a2,1<<MSG_IP_L_UP);
i=a1/PU_SPACING;
j=(a2-FramePtr("DitherFrame"))/PU_SPACING;
if (a1>=0 && a2>=0 && 0<=j<17 && 0<=i<17) {
msg_code=GetMsg(&arg1,&arg2,1<<MSG_MS_L_DOWN|1<<MSG_KEY_DOWN);
if (msg_code==MSG_MS_L_DOWN) {
msg_code=GetMsg(&arg1,&arg2,1<<MSG_MS_L_UP);
i=arg1/PU_SPACING;
j=(arg2-FramePtr("DitherFrame"))/PU_SPACING;
if (arg1>=0 && arg2>=0 && 0<=j<17 && 0<=i<17) {
if (j==16) j=TRANSPARENT;
if (i==16) i=TRANSPARENT;
res=j+i<<16+ROPF_DITHER;
goto dc_done;
}
}
} while (!(msg_code==MSG_KEY_DOWN && (a1==CH_ESC || a1==CH_SHIFT_ESC)));
do GetMsg(&a1,&a2,1<<MSG_KEY_UP);
while (!a1);
} while (!(msg_code==MSG_KEY_DOWN && (arg1==CH_ESC || arg1==CH_SHIFT_ESC)));
do GetMsg(&arg1,&arg2,1<<MSG_KEY_UP);
while (!arg1);
dc_done:
SettingsPop;
FramePtrDel("DitherFrame");

4
Adam/DolDoc/DocHighlight.HC

@ -12,7 +12,7 @@ U32 *DocHighlight(CDocEntry *doc_e,U8 *src,I64 len,I64 _tmp_u32_attr)
case DOCSS_NORMAL:
hl_normal:
while (len) {
while (len && !Bt(chars_bmp_alpha_numeric,*src)) {
while (len && !Bt(char_bmp_alpha_numeric,*src)) {
tmp_u32_attr=_tmp_u32_attr;
ch1=*src++;
switch (ch1) {
@ -65,7 +65,7 @@ hl_normal:
if (!--len) goto hl_normal_done;
}
ptr=src;
while (len && Bt(chars_bmp_alpha_numeric,*src)) {
while (len && Bt(char_bmp_alpha_numeric,*src)) {
src++;
len--;
}

34
Adam/DolDoc/DocMacro.HC

@ -5,18 +5,18 @@ StrCpy(captured_macro_name,"Test");
I64 sys_macro_repeat_n=1;
U0 SysMacroStripKey(CSrvCmd *macro_head,I64 a1,I64 a2)
U0 SysMacroStripKey(CJob *macro_head,I64 arg1,I64 arg2)
{
CSrvCmd *tmpc,*tmpc1;
CJob *tmpc,*tmpc1;
tmpc=macro_head->next;
while (tmpc!=macro_head) {
tmpc1=tmpc->next;
if (tmpc->cmd_code==SVCT_MSG &&
if (tmpc->job_code==JOBT_MSG &&
(tmpc->msg_code==MSG_KEY_DOWN || tmpc->msg_code==MSG_KEY_UP ||
tmpc->msg_code==MSG_KEY_DOWN_UP) &&
a1 && tmpc->aux1==a1 || !a1 && tmpc->aux2==a2) {
arg1 && tmpc->aux1==arg1 || !arg1 && tmpc->aux2==arg2) {
QueRem(tmpc);
SrvCmdDel(tmpc);
JobDel(tmpc);
}
tmpc=tmpc1;
}
@ -33,11 +33,11 @@ class CMacroTmp
U8 buf[STR_LEN];
};
CMacroTmp *Cmd2MT(CSrvCmd *tmpc)
CMacroTmp *Cmd2MT(CJob *tmpc)
{
U8 buf[8];
CMacroTmp *tmpmt=CAlloc(sizeof(CMacroTmp));
if (Bt(chars_bmp_macro,tmpc->aux1) && tmpc->msg_code==MSG_KEY_DOWN) {
if (Bt(char_bmp_macro,tmpc->aux1) && tmpc->msg_code==MSG_KEY_DOWN) {
tmpmt->type=MT_CHAR;
buf[0]=tmpc->aux1;
buf[1]=0;
@ -50,13 +50,13 @@ CMacroTmp *Cmd2MT(CSrvCmd *tmpc)
return tmpmt;
}
U8 *SysMacro2Str(CSrvCmd *macro_head)
U8 *SysMacro2Str(CJob *macro_head)
{
CSrvCmd *tmpc;
CJob *tmpc;
I64 cnt=1; //terminating zero
U8 *ptr,*m;
CMacroTmp *tmpmt,*tmpmt1,head;
LBtr(&sys_semas[SYS_SEMA_RECORD_MACRO],0);
LBtr(&sys_semas[SEMA_RECORD_MACRO],0);
QueInit(&head);
head.type=MT_NULL;
@ -107,7 +107,7 @@ U0 PlaySysMacro(I64 n=1)
CTask *task=sys_focus_task;
U8 *m;
if (TaskValidate(task)) {
LBtr(&sys_semas[SYS_SEMA_RECORD_MACRO],0);
LBtr(&sys_semas[SEMA_RECORD_MACRO],0);
m=SysMacro2Str(&sys_macro_head);
while (n-- && TaskValidate(task)) {
if (task==Fs)
@ -139,7 +139,7 @@ I64 PopUpMacroMenu()
{
I64 res=0;
U8 buf[STR_LEN];
CSrvCmd *tmpc;
CJob *tmpc;
CDoc *doc=DocNew;
CDocEntry *doc_e=DocPrint(doc,"$$DA-P,LEN=STR_LEN-1,A=\"Name:%%s\"$$");
doc_e->data=captured_macro_name;
@ -163,7 +163,7 @@ I64 PopUpMacroMenu()
Fs->popup_task=sys_macro_task;
LBts(&sys_macro_task->display_flags,DISPLAYf_WIN_ON_TOP);
tmpc=TaskExe(sys_macro_task,Fs,buf,
1<<SVCf_WAKE_MASTER|1<<SVCf_FOCUS_MASTER);
1<<JOBf_WAKE_MASTER|1<<JOBf_FOCUS_MASTER);
JobResScan(tmpc,&res);
Fs->popup_task=NULL;
Kill(sys_macro_task);
@ -183,9 +183,9 @@ U0 MacroTask(I64)
WinRefocus(sys_focus_task);
switch (i) {
case SM_RECORD:
LBtr(&sys_semas[SYS_SEMA_RECORD_MACRO],0);
LBtr(&sys_semas[SEMA_RECORD_MACRO],0);
QueDel(&sys_macro_head,TRUE);
LBts(&sys_semas[SYS_SEMA_RECORD_MACRO],0);
LBts(&sys_semas[SEMA_RECORD_MACRO],0);
break;
case SM_PLAY:
PlaySysMacro;
@ -194,10 +194,10 @@ U0 MacroTask(I64)
PlaySysMacro(sys_macro_repeat_n);
break;
case SM_STOP:
LBtr(&sys_semas[SYS_SEMA_RECORD_MACRO],0);
LBtr(&sys_semas[SEMA_RECORD_MACRO],0);
break;
case SM_INS:
LBtr(&sys_semas[SYS_SEMA_RECORD_MACRO],0);
LBtr(&sys_semas[SEMA_RECORD_MACRO],0);
EdInsCapturedMacro;
break;
}

14
Adam/DolDoc/DocPopUp.HC

@ -3,7 +3,7 @@ public CTask *PopUpViewDoc(CDoc *doc,I64 dof_flags=0)
{//Pass doc to PopUp win task for viewing.
U8 *buf=MStrPrint("DocEd(0x%X,0x%X);",doc,dof_flags);
CTask *task=Spawn(&SrvCmdLine,NULL,"View",,Fs);
TaskExe(task,NULL,buf,1<<SVCf_EXIT_ON_COMPLETE|1<<SVCf_FREE_ON_COMPLETE);
TaskExe(task,NULL,buf,1<<JOBf_EXIT_ON_COMPLETE|1<<JOBf_FREE_ON_COMPLETE);
Free(buf);
return task;
}
@ -120,7 +120,7 @@ public U8 *PopUpPickDefineSub(U8 *dname)
#help_index "DolDoc/Input;StdIn/DolDoc"
public I64 PopUp1(U8 *b1,I64 n1,U8 *header=NULL,U8 *footer=NULL)
{//Make PopUp win task with one button.
{//Make PopUp win task with one bttn.
I64 i,l1=StrLen(b1);
CDoc *doc=DocNew;
if (header) DocPrint(doc,"%s",header);
@ -132,7 +132,7 @@ public I64 PopUp1(U8 *b1,I64 n1,U8 *header=NULL,U8 *footer=NULL)
}
public I64 PopUp2(U8 *b1,I64 n1,U8 *b2,I64 n2,U8 *header=NULL,U8 *footer=NULL)
{//Make PopUp win task with two buttons.
{//Make PopUp win task with two bttns.
I64 i,l1=StrLen(b1),l2=StrLen(b2),y;
CDoc *doc=DocNew;
if (header) {
@ -151,17 +151,17 @@ public I64 PopUp2(U8 *b1,I64 n1,U8 *b2,I64 n2,U8 *header=NULL,U8 *footer=NULL)
}
public Bool PopUpOk(U8 *header=NULL,U8 *footer=NULL)
{//Make PopUp win task with OKAY button.
{//Make PopUp win task with OKAY bttn.
return PopUp1("OKAY",1,header,footer)>0;
}
public Bool PopUpNoYes(U8 *header=NULL,U8 *footer=NULL)
{//Make PopUp win task with NO/YES buttons.
{//Make PopUp win task with NO/YES bttns.
return $WW,0$PopUp2("YES",1,"NO",0,header,footer)>0;
}
public Bool PopUpCancelOk(U8 *header=NULL,U8 *footer=NULL)
{//Make PopUp win task CANCEL/OKAY buttons.
{//Make PopUp win task CANCEL/OKAY bttns.
return PopUp2("OKAY",1,"CANCEL",0,header,footer)>0;
}
@ -265,7 +265,7 @@ public F64 PopUpRangeF64Log(F64 lo,F64 hi,I64 steps,
return PopUpRangeF64Exp(lo,hi,Exp(Ln(hi/lo)/(steps-1)),fmt,header,footer);
}
#help_index "Task/Srv/Exe;Compiler"
#help_index "Job/Exe;Task/Job/Exe;Compiler"
public I64 AdamFile(U8 *filename,Bool warn_ext=TRUE)
{//Make adam_task execute file.
Bool okay=TRUE;

4
Adam/DolDoc/DocPutKey.HC

@ -16,7 +16,7 @@ public U0 DocPutKey(CDoc *doc,I64 ch=0,I64 sc=0)
if (!Bt(doldoc.clean_scan_codes,sc.u8[0]))
doc->flags|=DOCF_UNDO_DIRTY;
DocCaptureUndo(doc);
if (Bt(chars_bmp_getkey,ch) && !(sc&(SCF_CTRL|SCF_ALT))) {
if (Bt(char_bmp_printable,ch) && !(sc&(SCF_CTRL|SCF_ALT))) {
if (sc&SCF_KEY_DESC) {
st=Char2KeyName(ch,FALSE);
KeyDescSet("Char /'%s'",st);
@ -348,7 +348,7 @@ public U0 DocPutKey(CDoc *doc,I64 ch=0,I64 sc=0)
} else {
//$LK,"::/Adam/God/HSNotes.DD"$
FifoU8Flush(god.fifo);
GodBitsIns(GOD_GOOD_BITS,KbdMouseEvtTime>>GOD_BAD_BITS);
GodBitsIns(GOD_GOOD_BITS,KbdMsEvtTime>>GOD_BAD_BITS);
if (sc&SCF_SHIFT)
GodBiblePassage;
else

26
Adam/DolDoc/DocPutS.HC

@ -5,7 +5,7 @@ CDocEntry *DocPutS(CDoc *doc,U8 *st)
//Does not handle partial Doc entries.
//Returns last newly created dollar-sign CDocEntry or NULL.
U8 *ptr=st,*ptr2,*st2,*ptr3,*ptr4,*src,
*char_bitmap;
*char_bmp;
Bool unlock;
I64 ch,j;
CDocEntry *doc_e=NULL,*res=NULL,*doc_ce;
@ -13,16 +13,16 @@ CDocEntry *DocPutS(CDoc *doc,U8 *st)
return NULL;
unlock=DocLock(doc);
if (doc->flags & DOCF_PLAIN_TEXT_TABS)
char_bitmap=chars_bmp_zero_cr_nl_cursor;
char_bmp=char_bmp_zero_cr_nl_cursor;
else if (doc->flags & DOCF_PLAIN_TEXT)
char_bitmap=chars_bmp_zero_tab_ff_cr_nl_cursor;
char_bmp=char_bmp_zero_tab_cr_nl_cursor;
else
char_bitmap=chars_bmp_zero_tab_ff_cr_nl_cursor_dollar;
char_bmp=char_bmp_zero_tab_cr_nl_cursor_dollar;
doc_ce=doc->cur_entry;
while (*ptr) {
ptr2=ptr;
do ch=*ptr++;
while (!Bt(char_bitmap,ch) || ch==CH_CURSOR && doc->flags&DOCF_NO_CURSOR);
while (!Bt(char_bmp,ch) || ch==CH_CURSOR && doc->flags&DOCF_NO_CURSOR);
ptr--;
if (!ch) {
if (j=ptr-ptr2) {
@ -76,12 +76,6 @@ CDocEntry *DocPutS(CDoc *doc,U8 *st)
DocInsEntry(doc,doc_e);
ptr++;
break;
case CH_FORM_FEED:
doc_e=DocEntryNewBase(doc,
DOCT_PAGE_BREAK|doc->settings_head.dft_text_attr<<8);
DocInsEntry(doc,doc_e);
ptr++;
break;
case '\t':
doc_e=DocEntryNewBase(doc,
DOCT_TAB|doc->settings_head.dft_text_attr<<8);
@ -119,10 +113,6 @@ CDocEntry *DocPutS(CDoc *doc,U8 *st)
doc_e=DocEntryNewBase(doc,
DOCT_CURSOR|doc->settings_head.dft_text_attr<<8);
DocInsEntry(doc,doc_e);
} else if (ch==CH_FORM_FEED) {
doc_e=DocEntryNewBase(doc,
DOCT_PAGE_BREAK|doc->settings_head.dft_text_attr<<8);
DocInsEntry(doc,doc_e);
} else
*ptr4++=ch;
}
@ -184,7 +174,7 @@ public U0 DocPrintPartial(CDoc *doc=NULL,U8 *fmt,...)
DocPutKey(doc,ch,0);
else
while (ch=*ptr) {
if (!Bt(chars_bmp_safe_dollar,ch) ||
if (!Bt(char_bmp_safe_dollar,ch) ||
doc->flags & (DOCF_OVERSTRIKE|DOCF_IN_DOLLAR)) {
DocPutKey(doc,ch,0);
ptr++;
@ -192,7 +182,7 @@ public U0 DocPrintPartial(CDoc *doc=NULL,U8 *fmt,...)
ptr2=ptr++;
while (TRUE) {
ch=*ptr++;
if (!Bt(chars_bmp_safe_dollar,ch))
if (!Bt(char_bmp_safe_dollar,ch))
break;
}
ptr--;
@ -271,7 +261,7 @@ U0 DocDump(CDoc *doc,I64 uS_delay=0)
doc_e=doc_e2;
if (doc_e->type_u8==DOCT_NEW_LINE) {
'\n';
BusyWait(uS_delay);
Busy(uS_delay);
doc_e=doc_e->next;
}
}

6
Adam/DolDoc/DocRecalc.HC

@ -553,7 +553,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
i_jif>>=3;
for (k=0;k<doc_e->scroll_len;k++) {
ch=ptr[(i_jif+k)%j];
if (!Bt(chars_bmp_displayable,ch)) ch='.';
if (!Bt(char_bmp_displayable,ch)) ch='.';
if (recalc_flags&RECALCG_MASK==RECALCt_TO_SCRN &&
!(doc_e->de_flags&DOCEF_DONT_DRAW)) {
if (doc_e->de_flags & DOCEF_BORDER_PLOT &&
@ -693,7 +693,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
x+=(doc_e->hex_ed_width-k)*3;
for (j=0;j<k;j++) {
ch=*bptr++;
if (!Bt(chars_bmp_displayable,ch)) ch='.';
if (!Bt(char_bmp_displayable,ch)) ch='.';
if (recalc_flags&RECALCG_MASK==RECALCt_TO_SCRN &&
!(doc_e->de_flags&DOCEF_DONT_DRAW)) {
if (doc_e->de_flags & DOCEF_BORDER_PLOT &&
@ -1057,7 +1057,7 @@ rc_adjust_xy:
break;
case DOCT_LST:
case DOCT_TREE:
case DOCT_BUTTON:
case DOCT_BTTN:
case DOCT_LINK:
case DOCT_MENU_VAL:
case DOCT_MACRO:

12
Adam/DolDoc/DocRun.HC

@ -10,11 +10,11 @@ public I64 DocEntryRun(CDoc *doc,CDocEntry *doc_e,
DocLock(doc);
if (!exited) {
if (doc_e->de_flags & DOCEF_ESC) {
Msg(MSG_KEY_DOWN,CH_ESC,0,1<<SVCf_DONT_FILTER);
Msg(MSG_KEY_DOWN,CH_ESC,0,1<<JOBf_DONT_FILTER);
has_action=TRUE;
goto er_done;
} if (doc_e->de_flags & DOCEF_QUIT) {
Msg(MSG_KEY_DOWN,CH_SHIFT_ESC,0,1<<SVCf_DONT_FILTER);
Msg(MSG_KEY_DOWN,CH_SHIFT_ESC,0,1<<JOBf_DONT_FILTER);
has_action=TRUE;
goto er_done;
} else if (doc_e->de_flags & DOCEF_CHECK_COLLAPSABLE) {
@ -31,13 +31,13 @@ public I64 DocEntryRun(CDoc *doc,CDocEntry *doc_e,</