Browse Source

TempleOSCDV5.02.ISO

v6
Terry A. Davis 5 years ago
committed by minexew
parent
commit
4b32f058d5
  1. BIN
      0000Boot/0000Kernel.BIN.C
  2. 28
      Adam/ABlkDev/ADskA.HC
  3. 2
      Adam/ABlkDev/ADskB.HC
  4. 76
      Adam/ABlkDev/DskChk.HC
  5. 4
      Adam/ABlkDev/DskPrt.HC
  6. 14
      Adam/ABlkDev/FileMgr.HC
  7. 4
      Adam/ABlkDev/MakeABlkDev.HC
  8. 8
      Adam/ABlkDev/Mount.HC
  9. 9
      Adam/ADefine.HC
  10. 2
      Adam/AExts.HC
  11. 2
      Adam/AHash.HC
  12. 38
      Adam/ARegistry.HC
  13. 4
      Adam/AutoComplete/ACFill.HC
  14. 2
      Adam/AutoComplete/ACInit.HC
  15. 3
      Adam/AutoComplete/ACTask.HC
  16. 74
      Adam/DolDoc/DocClipBoard.HC
  17. 10
      Adam/DolDoc/DocCodeTools.HC
  18. 6
      Adam/DolDoc/DocFind.HC
  19. 2
      Adam/DolDoc/DocLink.HC
  20. 26
      Adam/DolDoc/DocPopUp.HC
  21. 24
      Adam/DolDoc/DocPutKey.HC
  22. 94
      Adam/DolDoc/DocTree.HC
  23. 6
      Adam/God/GodBible.HC
  24. 8
      Adam/God/HolySpirit.HC
  25. 4
      Adam/Gr/GrDC.HC
  26. 14
      Adam/Gr/GrEnd.HC
  27. 48
      Adam/Gr/SpriteBitMap.HC
  28. 18
      Adam/Gr/SpriteEd.HC
  29. 66
      Adam/Gr/SpriteMesh.HC
  30. 4
      Adam/Host.HC
  31. 6
      Adam/Opt/Boot/BootHDIns.HC
  32. 6
      Adam/Opt/Boot/BootMHDIns.HC
  33. 36
      Adam/Opt/Boot/DskISO9660.HC
  34. 24
      Adam/Opt/Boot/DskISORedSea.HC
  35. 2
      Adam/Opt/Utils/LineRep.HC
  36. 6
      Adam/Opt/Utils/MemRep.HC
  37. 4
      Adam/Opt/Utils/StrUtils.HC
  38. 6
      Adam/Opt/Utils/ToTXT.HC
  39. 2
      Adam/TaskSettings.HC
  40. 1
      Adam/Win.HC
  41. 26
      Adam/WinMgr.HC
  42. 10
      Apps/Budget/BgtEntry.HC
  43. 2
      Apps/Budget/Install.HC
  44. 6
      Apps/Psalmody/Help.DD
  45. 2
      Apps/Psalmody/Install.HC
  46. 222
      Apps/Psalmody/JukeBox.HC
  47. 2
      Apps/Psalmody/Psalmody.HC
  48. 18
      Apps/Psalmody/PsalmodyFile.HC
  49. 16
      Apps/Psalmody/PsalmodyMain.HC
  50. 2
      Apps/Span/Install.HC
  51. 4
      Apps/Span/SpanNew.HC
  52. 2
      Apps/TimeClock/Install.HC
  53. 2
      Apps/ToTheFront/Install.HC
  54. 4
      Apps/ToTheFront/TTFInit.HC
  55. 2
      Compiler/Asm.HC
  56. 12
      Compiler/CMain.HC
  57. 2
      Compiler/CMisc.HC
  58. BIN
      Compiler/Compiler.BIN
  59. 1
      Compiler/CompilerB.HH
  60. 4
      Compiler/Lex.HC
  61. 14
      Demo/AcctExample/HomeKeyPlugIns.HC
  62. 2
      Demo/AcctExample/HomeSys.HC
  63. 11
      Demo/AcctExample/PersonalMenu.DD
  64. 5
      Demo/AcctExample/PersonalNotes.DD
  65. 21
      Demo/AcctExample/Registry.HC
  66. 12
      Demo/AcctExample/TOS/TOSBlog.HC
  67. 8
      Demo/AcctExample/TOS/TOSCfg.HC
  68. 92
      Demo/AcctExample/TOS/TOSDistro.HC
  69. 3
      Demo/AcctExample/TOS/TOSExt.HC
  70. 63
      Demo/AcctExample/TOS/TOSHolySpirit.HC
  71. 4
      Demo/AcctExample/TOS/TOSIns.HC
  72. 28
      Demo/AcctExample/TOS/TOSMisc.HC
  73. 12
      Demo/AcctExample/TOS/TOSNIST.HC
  74. 20
      Demo/AcctExample/TOS/TOSToHtml.HC
  75. 2
      Demo/DolDoc/CallBack.HC
  76. 4
      Demo/Dsk/DataBase.HC
  77. 6
      Demo/Dsk/DskRaw.HC
  78. 2
      Demo/Dsk/UnusedSpaceRep.HC
  79. 4
      Demo/RevFileDemo/Rev.HC
  80. 6
      Demo/ToHtmlToTXTDemo/DemoInPage.DD
  81. 10
      Demo/ToHtmlToTXTDemo/ToHtml.HC
  82. 2
      Demo/WebLogDemo/WebLogScramble.HC
  83. 33
      Doc/ChgLog.DD
  84. 154
      Doc/Comm.HC
  85. 2
      Doc/Demands.DD
  86. 2
      Doc/DolDocOverview.DD
  87. 2
      Doc/Features.DD
  88. BIN
      Doc/FileLowLevel.DD
  89. 10
      Doc/FileMgr.DD
  90. 4
      Doc/FileMgrPullDown.DD
  91. 2
      Doc/FileUtils.DD
  92. 6
      Doc/Glossary.DD
  93. 2
      Doc/Install.DD
  94. 4
      Doc/Quirks.DD
  95. 6
      Doc/RedSea.DD
  96. 2
      Doc/Sprite.DD
  97. 2
      Doc/SpriteBitMap.DD
  98. 2
      Doc/SpriteEd.DD
  99. 2
      Doc/Start.DD
  100. 4
      Doc/Tips.DD

BIN
0000Boot/0000Kernel.BIN.C

Binary file not shown.

28
Adam/ABlkDev/ADskA.HC

@ -6,34 +6,34 @@ public U8 *DBlk(I64 blk,Bool write=FALSE)
//See $LK,"::/Demo/Dsk/DskRaw.HC"$.
U8 *buf=MAlloc(BLK_SIZE);
RBlks(Fs->cur_dv,buf,blk,1);
BlkRead(Fs->cur_dv,buf,blk,1);
DocD(buf,BLK_SIZE);
if (write) {
"Edit and press <ESC> to write or <SHIFT-ESC>\n";
if (View) {
"Write\n";
WBlks(Fs->cur_dv,buf,blk,1);
BlkWrite(Fs->cur_dv,buf,blk,1);
}
}
return buf;
}
public U8 *DCluster(I64 c,Bool write=FALSE,I64 num=0)
{//Dump disk cluster. Optionally, write.
//If you set write to TRUE, the cluster will
public U8 *DClus(I64 c,Bool write=FALSE,I64 num=0)
{//Dump disk clus. Optionally, write.
//If you set write to TRUE, the clus will
//be written when you press <ESC>.
//See $LK,"::/Demo/Dsk/DskRaw.HC"$.
//Do $LK,"Dir",A="MN:Dir"$("*",TRUE); to get cluster numbers of files.
//Do $LK,"Dir",A="MN:Dir"$("*",TRUE); to get clus numbers of files.
U8 *buf=MAlloc(Fs->cur_dv->spc<<BLK_SIZE_BITS);
c=ClusterNumNext(Fs->cur_dv,c,num);
RClusters(Fs->cur_dv,buf,c,1);
"Cluster:%X\n",c;
c=ClusNumNext(Fs->cur_dv,c,num);
ClusRead(Fs->cur_dv,buf,c,1);
"Clus:%X\n",c;
DocD(buf,Fs->cur_dv->spc<<BLK_SIZE_BITS);
if (write) {
"Edit and press <ESC> to write or <SHIFT-ESC>\n";
if (View) {
"Write\n";
WClusters(Fs->cur_dv,buf,c,1);
ClusWrite(Fs->cur_dv,buf,c,1);
}
}
return buf;
@ -67,7 +67,7 @@ public Bool Copy(U8 *src_files_find_mask,U8 *dst_files_find_mask=".")
CDirContext *dirc;
CDirEntry *tmpde,*tmpde1;
U8 *st;
if (!(tmpde1=FilesFind(src_files_find_mask,FUF_CLUSTER_ORDER)))
if (!(tmpde1=FilesFind(src_files_find_mask,FUF_CLUS_ORDER)))
return FALSE;
if (IsDir(dst_files_find_mask)) {
if (dirc=DirContextNew(dst_files_find_mask,TRUE)) {
@ -109,7 +109,7 @@ I64 CopyTree2(CDirEntry *tmpde,I64 src_dir_len,I64 dst_dir_len,U8 *dst_dir)
MemCpy(st,dst_dir,dst_dir_len);
StrCpy(st+dst_dir_len,tmpde->full_name+src_dir_len);
if (tmpde->attr & RS_ATTR_DIR) {
MkDir(st,LinkedLstCnt(tmpde->sub));
DirMk(st,LinkedLstCnt(tmpde->sub));
res+=CopyTree2(tmpde->sub,src_dir_len,dst_dir_len,dst_dir);
} else
if (CopySingle(tmpde->full_name,st))
@ -140,12 +140,12 @@ public I64 CopyTree(U8 *src_files_find_mask,U8 *dst_files_find_mask,
Free(st2);
if (dirc=DirContextNew(src_files_find_mask,TRUE,,no_mask)) {
tmpde=FilesFind(dirc->mask,FUF_RECURSE);
st1=CurDir;
st1=DirCur;
DirContextDel(dirc);
i1=StrLen(st1);
if (i1==3) i1--;
if (dirc=DirContextNew(dst_files_find_mask,TRUE,TRUE)) {
st2=CurDir;
st2=DirCur;
i2=StrLen(st2);
if (i2==3) i2--;
res=CopyTree2(tmpde,i1,i2,st2);

2
Adam/ABlkDev/ADskB.HC

@ -87,7 +87,7 @@ I64 Size1(CDirEntry *tmpde,I64 *_fuf_flags,I64 round_to)
!(tmpde->attr&RS_ATTR_DIR) &&
FileAttr(tmpde->name)&RS_ATTR_COMPRESSED) {
dv=Let2Drv(*tmpde->full_name);
RBlks(dv,buf,Cluster2Blk(dv,tmpde->cluster),1);
BlkRead(dv,buf,Clus2Blk(dv,tmpde->clus),1);
i=(&buf)(CArcCompress *)->expanded_size;
}
if (round_to)

76
Adam/ABlkDev/ChkDsk.HC → Adam/ABlkDev/DskChk.HC

@ -21,20 +21,20 @@ I64 RedSeaChkDskLst(CDrv *dv,CDirEntry *tmpde1,
errs+=RedSeaChkDskLst(dv,tmpde1->sub,bits,bits2,size,bpc);
j=(tmpde1->size+bpc-1)/bpc;
for (i=0;i<j;i++) {
if (i+tmpde1->cluster-dv->data_area>size) {
PrintErr("Invalid Cluster:%s Cluster:%X\n",tmpde1->full_name,
i+tmpde1->cluster);
if (i+tmpde1->clus-dv->data_area>size) {
PrintErr("Invalid Clus:%s Clus:%X\n",tmpde1->full_name,
i+tmpde1->clus);
errs++;
break;
}
if (LBts(bits,i+tmpde1->cluster-dv->data_area)) {
PrintErr("Dbl Alloc:%s Cluster:%X\n",tmpde1->full_name,
i+tmpde1->cluster);
if (LBts(bits,i+tmpde1->clus-dv->data_area)) {
PrintErr("Dbl Alloc:%s Clus:%X\n",tmpde1->full_name,
i+tmpde1->clus);
errs++;
}
if (!LBtr(bits2,i+tmpde1->cluster-dv->data_area)) {
PrintErr("UnAlloc:%s Cluster:%X\n",tmpde1->full_name,
i+tmpde1->cluster);
if (!LBtr(bits2,i+tmpde1->clus-dv->data_area)) {
PrintErr("UnAlloc:%s Clus:%X\n",tmpde1->full_name,
i+tmpde1->clus);
errs++;
}
}
@ -59,27 +59,27 @@ 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->fat1,((size+7)>>3+BLK_SIZE-1)>>BLK_SIZE_BITS);
BlkRead(dv,bits2,dv->fat1,((size+7)>>3+BLK_SIZE-1)>>BLK_SIZE_BITS);
//Get Root Dir size
ptr2=MAlloc(bpc);
RBlks(dv,ptr2,dv->root_cluster,1);
BlkRead(dv,ptr2,dv->root_clus,1);
ptr=ptr2(U8 *)-offset(CDirEntry.start);
j=(ptr->size+bpc-1)/bpc;
Free(ptr2);
for (i=0;i<j;i++) {
if (i+dv->root_cluster-dv->data_area>size) {
PrintErr("Invalid Cluster: RootDir Cluster:%X\n",i+dv->root_cluster);
if (i+dv->root_clus-dv->data_area>size) {
PrintErr("Invalid Clus: RootDir Clus:%X\n",i+dv->root_clus);
errs++;
break;
}
if (LBts(bits,i+dv->root_cluster-dv->data_area)) {
PrintErr("Dbl Alloc: RootDir Cluster:%X\n",i+dv->root_cluster);
if (LBts(bits,i+dv->root_clus-dv->data_area)) {
PrintErr("Dbl Alloc: RootDir Clus:%X\n",i+dv->root_clus);
errs++;
}
if (!LBtr(bits2,i+dv->root_cluster-dv->data_area)) {
PrintErr("UnAlloc: RootDir Cluster:%X\n",i+dv->root_cluster);
if (!LBtr(bits2,i+dv->root_clus-dv->data_area)) {
PrintErr("UnAlloc: RootDir Clus:%X\n",i+dv->root_clus);
errs++;
}
}
@ -88,10 +88,10 @@ I64 RedSeaChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
bits,bits2,size,bpc);
for (i=1;i<size;i++)
if (Bt(bits2,i)) {
PrintWarn("Shouldn't Alloc Cluster:%0X\n",i+dv->data_area);
PrintWarn("Shouldn't Alloc Clus:%0X\n",i+dv->data_area);
errs++;
if (ChkDskConfirm(_fix,_confirm))
RedSeaFreeClusters(dv,i+dv->data_area,1);
RedSeaFreeClus(dv,i+dv->data_area,1);
}
Free(files_find_mask);
@ -113,23 +113,23 @@ I64 FAT32ChkDskLst(CDrv *dv,CDirEntry *tmpde1,
if (tmpde1->attr & RS_ATTR_DIR && tmpde1->sub)
errs+=FAT32ChkDskLst(dv,tmpde1->sub,bits,bits2,size,bpc);
i=0;
c=tmpde1->cluster;
c=tmpde1->clus;
while (0<c<0x0FFFFFF8) {
if (c>size) {
PrintErr("Invalid Cluster:%s Cluster:%X\n",tmpde1->full_name,c);
PrintErr("Invalid Clus:%s Clus:%X\n",tmpde1->full_name,c);
errs++;
break;
}
if (LBts(bits,c)) {
PrintErr("Dbl Alloc:%s Cluster:%X\n",tmpde1->full_name,c);
PrintErr("Dbl Alloc:%s Clus:%X\n",tmpde1->full_name,c);
errs++;
}
if (!bits2[c]) {
PrintErr("UnAlloc:%s Cluster:%X\n",tmpde1->full_name,c);
PrintErr("UnAlloc:%s Clus:%X\n",tmpde1->full_name,c);
errs++;
} else
bits2[c]=0;
c=ClusterNumNext(dv,c);
c=ClusNumNext(dv,c);
i++;
}
if (!(tmpde1->attr & RS_ATTR_DIR)) {
@ -163,25 +163,25 @@ 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->fat1,(size*4+BLK_SIZE-1)>>BLK_SIZE_BITS);
BlkRead(dv,bits2,dv->fat1,(size*4+BLK_SIZE-1)>>BLK_SIZE_BITS);
c=dv->root_cluster;
c=dv->root_clus;
while (0<c<0x0FFFFFF8) {
if (c>size) {
PrintErr("Invalid Cluster: RootDir Cluster:%X\n",c);
PrintErr("Invalid Clus: RootDir Clus:%X\n",c);
errs++;
break;
}
if (LBts(bits,c)) {
PrintErr("Dbl Alloc: RootDir Cluster:%X\n",c);
PrintErr("Dbl Alloc: RootDir Clus:%X\n",c);
errs++;
}
if (!bits2[c]) {
PrintErr("UnAlloc: RootDir Cluster:%X\n",c);
PrintErr("UnAlloc: RootDir Clus:%X\n",c);
errs++;
} else
bits2[c]=0;
c=ClusterNumNext(dv,c);
c=ClusNumNext(dv,c);
}
errs+=FAT32ChkDskLst(dv,FilesFind(files_find_mask,FUF_RECURSE),
@ -190,10 +190,10 @@ I64 FAT32ChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
bits2[1]=0; //See $LK,"FAT32Fmt",A="MN:FAT32Fmt"$()
for (i=1;i<size;i++)
if (bits2[i]) {
PrintWarn("Shouldn't Alloc Cluster:%0X\n",i);
PrintWarn("Shouldn't Alloc Clus:%0X\n",i);
errs++;
if (ChkDskConfirm(_fix,_confirm))
FAT32FreeClusters(dv,i);
FAT32FreeClus(dv,i);
}
Free(files_find_mask);
Free(bits);
@ -204,7 +204,7 @@ I64 FAT32ChkDsk(U8 drv_let,Bool *_fix,Bool *_confirm)
return errs;
}
public I64 ChkDsk(U8 drv_let=0,Bool fix=FALSE,Bool confirm=TRUE)
public I64 DskChk(U8 drv_let=0,Bool fix=FALSE,Bool confirm=TRUE)
{//Check disk for allocation errors and, optionally, fix.
//You probably want to reformat and reinstall.
I64 errs=0;
@ -246,7 +246,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->fat1,i);
BlkRead(dv,bitmap,dv->fat1,i);
i=0;
for (y=0;y<GR_HEIGHT-3*FONT_HEIGHT;y++) {
if (ScanKey)
@ -288,7 +288,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->fat1,i);
BlkRead(dv,bitmap,dv->fat1,i);
i=0;
for (y=0;y<GR_HEIGHT-3*FONT_HEIGHT;y++) {
if (ScanKey)
@ -394,7 +394,7 @@ I64 RedSeaUnusedDrvSpace(U8 drv_let=0)
l=dv->size+dv->drv_offset-dv->data_area;
i=((l+7)>>3+BLK_SIZE-1)>>BLK_SIZE_BITS;
bitmap=MAlloc(i<<BLK_SIZE_BITS);
RBlks(dv,bitmap,dv->fat1,i);
BlkRead(dv,bitmap,dv->fat1,i);
for (i=0;i<l;i++)
if (!Bt(bitmap,i))
res++;
@ -412,7 +412,7 @@ I64 FAT32UnusedDrvSpace(U8 drv_let=0)
l=(dv->size+dv->spc-1)/dv->spc-(2+dv->data_area-dv->drv_offset);
i=(l*4+BLK_SIZE-1)>>BLK_SIZE_BITS;
bitmap=MAlloc(i<<BLK_SIZE_BITS);
RBlks(dv,bitmap,dv->fat1,i);
BlkRead(dv,bitmap,dv->fat1,i);
for (i=0;i<l;i++)
if (!bitmap[i])
res++;
@ -421,7 +421,7 @@ I64 FAT32UnusedDrvSpace(U8 drv_let=0)
DrvUnlock(dv);
return res*BLK_SIZE*dv->spc;
}
public I64 UnusedDrvSpace(U8 drv_let=0)
public I64 DrvUnused(U8 drv_let=0)
{//Returns unused size in bytes.
CDrv *dv=Let2Drv(drv_let),*old_dv=Fs->cur_dv;
U8 *old_dir=StrNew(Fs->cur_dir);

4
Adam/ABlkDev/PrtDsk.HC → Adam/ABlkDev/DskPrt.HC

@ -10,12 +10,12 @@ class CPlannedDrv
Bool pri;
};
public I64 PrtDsk(U8 drv_let=0,...)
public I64 DskPrt(U8 drv_let=0,...)
{/*Partition the disk containing partition drv_let.
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.
>DskPrt('C',0.5,0.25,0.25); //Make three. 50% C, 25% D, 25% E, round-up to blk.
*/
CBlkDev *bd;

14
Adam/ABlkDev/FileMgr.HC

@ -145,7 +145,7 @@ U0 FMRebuildDoc(CDoc **_doc,CDirEntry **_head,I64 mode)
{
CDrv *dv;
I64 i;
CDoc *doc=*_doc,*doc2=sys_clipboard_doc,*parent_doc;
CDoc *doc=*_doc,*doc2=sys_clip_doc,*parent_doc;
CFMUncollapsedLst *tmpc=NULL;
U8 *cur_entry=NULL,*next_entry=NULL;
CDocEntry *doc_ce;
@ -284,7 +284,7 @@ U0 FMMkDir(CDoc *doc)
Cd(parent->full_name);
if (DocForm(&fn)) {
Silent;
MkDir(fn.name);
DirMk(fn.name);
Silent(OFF);
}
}
@ -293,7 +293,7 @@ U0 FMMkDir(CDoc *doc)
Cd(tmpde->full_name);
if (DocForm(&fn)) {
Silent;
MkDir(fn.name);
DirMk(fn.name);
Silent(OFF);
}
}
@ -335,7 +335,7 @@ U0 FMChgDsk(CDoc *doc)
while (tmpde->parent)
tmpde=tmpde->parent;
Silent;
ChgDsk(*tmpde->full_name);
DskChg(*tmpde->full_name);
Silent(OFF);
}
}
@ -439,7 +439,7 @@ U0 FMBurnISO(CDoc *doc)
U0 FMCopy(CDoc *doc)
{
CDoc *doc2=sys_clipboard_doc;
CDoc *doc2=sys_clip_doc;
U8 *st;
CDocEntry *doc_ce=doc->cur_entry,*doc_e;
CDirEntry *tmpde,*tmpde1=NULL,*tmpde2;
@ -511,7 +511,7 @@ I64 PopUpFMRight(U8 *header=NULL,U8 *footer=NULL)
"$$CM+LX,29,0$$$$BT,\"RENAME \",LE=FMR_RENAME$$"
"$$CM+LX,1,3 $$$$BT,\"MAKE DIRECTORY \",LE=FMR_MKDIR$$"
"$$CM+LX,29,0$$$$BT,\"PLAIN-TEXT EDIT \",LE=FMR_PLAIN$$"
"$$CM+LX,1,3 $$$$BT,\"PASTE CLIPBOARD FILES \",LE=FMR_PASTE$$"
"$$CM+LX,1,3 $$$$BT,\"PASTE CLIP FILES \",LE=FMR_PASTE$$"
"$$CM+LX,29,0$$$$BT,\"CHANGE DISK(MOUNT IT) \",LE=FMR_CHG_DSK$$"
"$$CM+LX,1,3 $$$$BT,\"FORMAT \",LE=FMR_FORMAT$$"
"$$CM+LX,1,3 $$$$BT,\"MOUNT ISO.C FILE \","
@ -596,7 +596,7 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
CDirEntry *head=NULL,*tmpde,*tmpde1,*tmpde2;
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;
U8 *res=NULL,*st,*st2,*old_cur_dir=DirCur;
CDocEntry *doc_ce=NULL,*doc_e;
Bool okay;

4
Adam/ABlkDev/MakeABlkDev.HC

@ -1,8 +1,8 @@
Cd(__DIR__);;
#include "ADskA"
#include "ADskB"
#include "PrtDsk"
#include "DskPrt"
#include "Mount"
#include "ChkDsk"
#include "DskChk"
#include "FileMgr"
Cd("..");;

8
Adam/ABlkDev/Mount.HC

@ -120,9 +120,9 @@ U8 Mount2(U8 boot_drv_let,CDoc *_doc,Bool _caller_is_prtdsk)
if ((cnt=ExeDoc(doc)) && whole_drv) {
if (_caller_is_prtdsk) {
res=drv_let;
PrtDsk(drv_let,1.0); //First mount whole drive.
DskPrt(drv_let,1.0); //First mount whole drive.
} else
PrtDsk(drv_let);
DskPrt(drv_let);
}
DocDel(doc);
}
@ -136,7 +136,7 @@ U8 Mount2(U8 boot_drv_let,CDoc *_doc,Bool _caller_is_prtdsk)
}
public U8 Mount(Bool caller_is_prtdsk=FALSE)
{//Mount drives. Called from $LK,"PrtDsk(Mount)",A="FF:::/Adam/ABlkDev/PrtDsk.HC,Mount("$.
{//Mount drives. Called from $LK,"DskPrt(Mount)",A="FF:::/Adam/ABlkDev/DskPrt.HC,Mount("$.
return Mount2(0,NULL,caller_is_prtdsk);
}
@ -147,7 +147,7 @@ public U0 Unmount(U8 drv_let=0)
public U8 MountFile(U8 *filename)
{//Mount ISO.C file.
U8 *filename2=DftExt(filename,"ISO.C"),*filename3=FileNameAbs(filename2);
U8 *filename2=ExtDft(filename,"ISO.C"),*filename3=FileNameAbs(filename2);
CDrv *dv=DrvMakeFreeSlot(DrvNextFreeLet('M')); //First $LK,"BDT_ISO_FILE_READ",A="MN:BDT_ISO_FILE_READ"$
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;

9
Adam/ADefine.HC

@ -10,16 +10,17 @@ U0 LoadDocDefines()
//This is cut and replaced when I generate a distro.
//See $LK,"DD_TEMPLEOS_LOC",A="FF:::/Demo/AcctExample/TOS/TOSDistro.HC,DD_TEMPLEOS_LOC"$.
$TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,710");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,944");
$ID,-4$
DefinePrint("DD_KERNEL","%08X",bfh);
bfh(I64)+=bfh->file_size-1;
DefinePrint("DD_KERNEL_END","%08X",bfh);
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.HC,DD_BOOT_HIGH_LOC_DVD"$
$TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,873");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,990");
$ID,-4$
DefinePrint("DD_MP_VECT","%08X",MP_VECT_ADDR);
DefinePrint("DD_MP_VECT_END","%08X",
MP_VECT_ADDR+COREAP_16BIT_INIT_END-COREAP_16BIT_INIT-1);

2
Adam/AExts.HC

@ -7,7 +7,7 @@ extern U0 ACMisspelledFind(CDoc *doc);
extern I64 AdamFile(U8 *filename,Bool warn_ext=TRUE);
extern Bool AutoComplete(Bool val=OFF);
extern I64 BMPWrite(U8 *filename,CDC *dc,I64 bits=4);
extern U0 ClipboardDel();
extern U0 ClipDel();
extern CCtrl *CtrlFindUnique(CTask *haystack_task,I64 needle_type);
extern Bool CtrlInside(CCtrl *c,I64 x,I64 y);
extern U8 *DC2Sprite(CDC *tmpb);

2
Adam/AHash.HC

@ -373,7 +373,7 @@ public U0 PopUpHelpIndex(U8 *idx,CTask *parent=NULL)
#help_index "Hash/System"
public U0 MapFileLoad(U8 *filename)
{//Load map file so we have src line info.
U8 *st,*ptr,*name=DftExt(filename,"MAP.Z"),
U8 *st,*ptr,*name=ExtDft(filename,"MAP.Z"),
*absname=FileNameAbs(name);
CDoc *doc=DocRead(name);
CDocEntry *doc_e;

38
Adam/ARegistry.HC

@ -43,26 +43,14 @@ public Bool RegDft(U8 *path,U8 *val,Bool is_adam_entry=FALSE)
public I64 RegExe(U8 *path)
{//Execute doc tree branch in registry.
RegCache;
return DocTreeBranchExe(sys_registry_doc,path);
return DocTreeExe(sys_registry_doc,path);
}
public Bool RegWrite(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);
Bool res;
RegCache;
unlock_doc=DocLock(sys_registry_doc);
if (res=DocTreeFind(sys_registry_doc,path,
&tree_branch,&start_indent,&end_indent))
DocCut(sys_registry_doc,tree_branch,end_indent);
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);
res=DocTreeWriteJoin(sys_registry_doc,path,TRUE,fmt,argc,argv);
return res;
}
@ -85,24 +73,10 @@ public I64 RegCnt(U8 *path)
}
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);
{//Append to doc tree branch in registry.
Bool res;
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);
res=DocTreeAppendJoin(sys_registry_doc,path,TRUE,fmt,argc,argv);
return res;
}

4
Adam/AutoComplete/ACFill.HC

@ -11,7 +11,7 @@ public U8 *ACDDefGet(U8 *st,I64 def_num=1)
if (f=FOpen(ACD_DEF_FILENAME,"r")) {
buf=MAlloc(ACD_BLK_SIZE*2+1);
buf[ACD_BLK_SIZE*2]=0; //terminate
FRBlks(f,buf,tmph->user_data0*ACD_BLK_SIZE/BLK_SIZE,
FBlkRead(f,buf,tmph->user_data0*ACD_BLK_SIZE/BLK_SIZE,
ACD_BLK_SIZE*2/BLK_SIZE);
FClose(f);
in_ptr=buf;
@ -55,7 +55,7 @@ public U8 *ACDDefsGet(U8 *st)
if (f=FOpen(ACD_DEF_FILENAME,"r")) {
buf=MAlloc(ACD_BLK_SIZE*2+1);
buf[ACD_BLK_SIZE*2]=0; //terminate
FRBlks(f,buf,tmph->user_data0*ACD_BLK_SIZE/BLK_SIZE,
FBlkRead(f,buf,tmph->user_data0*ACD_BLK_SIZE/BLK_SIZE,
ACD_BLK_SIZE*2/BLK_SIZE);
FClose(f);
in_ptr=buf;

2
Adam/AutoComplete/ACInit.HC

@ -96,7 +96,7 @@ U0 ACMainFileLstTraverse(U8 *files_find_mask)
CDirEntry *tmpde,*tmpde1;
try {
tmpde=tmpde1=FilesFind(files_find_mask,
FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES|FUF_CLUSTER_ORDER);
FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES|FUF_CLUS_ORDER);
while (tmpde) {
"%s\n",tmpde->full_name;
buf=FileRead(tmpde->full_name);

3
Adam/AutoComplete/ACTask.HC

@ -222,8 +222,7 @@ U0 ACTask(I64)
LBts(&Fs->display_flags,DISPLAYf_SHOW);
WinHorz(51,Fs->win_right);
LBts(&Fs->display_flags,DISPLAYf_WIN_ON_TOP);
Fs->win_inhibit=WIG_TASK_DFT-WIF_SELF_BORDER
-WIF_SELF_MS_L-WIF_SELF_MS_R-WIG_DBL_CLICK;
Fs->win_inhibit=WIG_NO_FOCUS_TASK_DFT;
Free(ac.cur_word);
ac.cur_word=NULL;
while (TRUE) {

74
Adam/DolDoc/DocClipBoard.HC

@ -1,19 +1,19 @@
#help_index "DolDoc/Clipboard"
#help_index "DolDoc/Clip"
sys_clipboard_doc=DocNew;
sys_clip_doc=DocNew;
public U0 ClipboardDel()
{//Delete everything on clipboard.
DocRst(sys_clipboard_doc,TRUE);
public U0 ClipDel()
{//Delete everything on clip.
DocRst(sys_clip_doc,TRUE);
}
public U0 EdCopyToClipboard(CDoc *doc)
{//Copy $LK,"DOCET_SEL",A="MN:DOCET_SEL"$ flagged entries to clipboard.
CDoc *doc2=sys_clipboard_doc;
public U0 ClipCopy(CDoc *doc)
{//Copy $LK,"DOCET_SEL",A="MN:DOCET_SEL"$ flagged entries to clip.
CDoc *doc2=sys_clip_doc;
Bool unlock_doc=DocLock(doc),
unlock_doc2=DocLock(doc2);
CDocEntry *doc_e=doc->head.next,*doc_ne;
ClipboardDel;
ClipDel;
while (doc_e!=doc) {
if (doc_e->type & DOCET_SEL) {
doc_e->type&=~DOCET_SEL;
@ -30,13 +30,13 @@ public U0 EdCopyToClipboard(CDoc *doc)
DocUnlock(doc);
}
public U0 EdCutToClipboard(CDoc *doc)
{//Remove sel entries and place on clipboard.
CDoc *doc2=sys_clipboard_doc;
public U0 ClipCut(CDoc *doc)
{//Remove sel entries and place on clip.
CDoc *doc2=sys_clip_doc;
Bool unlock_doc=DocLock(doc),
unlock_doc2=DocLock(doc2);
CDocEntry *doc_e=doc->head.next,*doc_e1,*doc_ne,*doc_e2=NULL;
ClipboardDel;
ClipDel;
while (doc_e!=doc) {
doc_e1=doc_e->next;
if (doc_e->type & DOCET_SEL) {
@ -62,9 +62,9 @@ public U0 EdCutToClipboard(CDoc *doc)
DocUnlock(doc);
}
public U0 EdPasteClipboard(CDoc *doc)
{//Insert copy of clipboard at insert pt, cur_entry.
CDoc *doc2=sys_clipboard_doc;
public U0 ClipPaste(CDoc *doc)
{//Insert copy of clip at insert pt, cur_entry.
CDoc *doc2=sys_clip_doc;
Bool unlock_doc=DocLock(doc),
unlock_doc2=DocLock(doc2);
CDocEntry *doc_ce=doc->cur_entry,*doc_e;
@ -87,17 +87,18 @@ public U0 DocCut(CDoc *doc,CDocEntry *start,CDocEntry *end)
{//Del start to end entry, including end points.
Bool unlock_doc=DocLock(doc);
CDocEntry *doc_e1;
while (start!=doc) {
doc_e1=start->next;
if (start==doc->cur_entry) {
doc->cur_entry=start->next;
doc->cur_col=doc->cur_entry->min_col;
}
DocEntryDel(doc,start);
if (start==end)
break;
start=doc_e1;
}
if (start!=doc && (start->last!=end || end==doc))
do {
doc_e1=start->next;
if (start==doc->cur_entry) {
doc->cur_entry=start->next;
doc->cur_col=doc->cur_entry->min_col;
}
DocEntryDel(doc,start);
if (start==end)
break;
start=doc_e1;
} while (start!=doc);
DocRemSoftNewLines(doc,NULL);
if (unlock_doc)
DocUnlock(doc);
@ -108,15 +109,16 @@ public CDoc *DocCopy(CDoc *doc,CDocEntry *start,CDocEntry *end)
CDoc *doc2=DocNew;
Bool unlock_doc=DocLock(doc);
CDocEntry *doc_ne;
while (start!=doc) {
if (!Bt(doldoc.type_flags_data,start->type_u8)) {
doc_ne=DocEntryCopy(doc2,start);
QueIns(doc_ne,doc2->head.last);
}
if (start==end)
break;
start=start->next;
}
if (start!=doc && (start->last!=end || end==doc))
do {
if (!Bt(doldoc.type_flags_data,start->type_u8)) {
doc_ne=DocEntryCopy(doc2,start);
QueIns(doc_ne,doc2->head.last);
}
if (start==end)
break;
start=start->next;
} while (start!=doc);
if (unlock_doc)
DocUnlock(doc);
return doc2;

10
Adam/DolDoc/DocCodeTools.HC

@ -440,7 +440,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
DocFlagsToggle(doc,DOCF_PLAIN_TEXT);
DocWrite(doc);
task=Spawn(&SrvCmdLine,NULL,"Srv",,Fs);
st2=CurDir;
st2=DirCur;
st=MStrPrint("Cd(\"%s\");",st2);
tmpc=TaskExe(task,Fs,st,1<<JOBf_WAKE_MASTER|1<<JOBf_FOCUS_MASTER);
Free(st2);
@ -504,7 +504,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
case EF_REINDENT:
start_y=doc->cur_entry->y;
EdReplaceTroubleAll(doc,TRUE,FALSE);
DocLineNumGoTo(doc,start_y+1);
DocGoToLine(doc,start_y+1);
if (EdGoToFun(doc,FALSE,FALSE)) {
start_y=doc->cur_entry->y;
indent=EdRICode(doc);
@ -516,7 +516,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
}
DocLock(doc);
EdRemFunLeadingSpace(doc);
DocLineNumGoTo(doc,start_y+1);
DocGoToLine(doc,start_y+1);
doc_e=doc->cur_entry;
end_y=start_y+indent->total_cnt;
while (start_y<=doc_e->y<end_y) {
@ -562,7 +562,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
}
start_y=doc->cur_entry->y;
EdReplaceTroubleAll(doc,FALSE,FALSE);
DocLineNumGoTo(doc,start_y+1);
DocGoToLine(doc,start_y+1);
break;
case EF_RENUM_ASM:
if (EdGoToFun(doc,FALSE,TRUE)) {
@ -588,7 +588,7 @@ U0 EdCodeTools2(CDoc *doc,I64 tool_action,Bool beep=TRUE)
}
DocRecalc(doc);
DocLineNumGoTo(doc,goto_line_num);
DocGoToLine(doc,goto_line_num);
DocUnlock(doc);
if (!unlock)

6
Adam/DolDoc/DocFind.HC

@ -1,6 +1,6 @@
#help_index "DolDoc/Editor"
public Bool DocLineNumGoTo(CDoc *doc,I64 line_num) //one based
public Bool DocGoToLine(CDoc *doc,I64 line_num) //one based
{//Nearest to specified line num. Move cur_entry & center.
Bool res=FALSE,unlock;
if (doc) {
@ -30,7 +30,7 @@ U8 *needle,I64 match=1)
res=TRUE;
doc_e=haystack_doc->head.next;
} else {
res=DocLineNumGoTo(haystack_doc,start_line_num);
res=DocGoToLine(haystack_doc,start_line_num);
doc_e=haystack_doc->cur_entry;
}
if (res) {
@ -580,5 +580,5 @@ U0 EdGoToLine(CDoc *doc)
CEdLineGoTo gtl;
gtl.line=1;
if (DocForm(&gtl))
DocLineNumGoTo(doc,gtl.line);
DocGoToLine(doc,gtl.line);
}

2
Adam/DolDoc/DocLink.HC

@ -127,7 +127,7 @@ Bool DocFileEd(I64 _type,U8 *filename,
if (res || other_found)
switch (type) {
case LK_FILE_LINE:
res=DocLineNumGoTo(doc,*_num);
res=DocGoToLine(doc,*_num);
break;
case LK_FILE_ANCHOR:
res=DocAnchorFind(doc,needle_str);

26
Adam/DolDoc/DocPopUp.HC

@ -8,22 +8,16 @@ public CTask *PopUpViewDoc(CDoc *doc,I64 dof_flags=0)
return task;
}
U0 PopUpViewPrintEndCB()
{
DocDel(FramePtr("ViewStrFrame"));
Exit;
}
public CTask *PopUpViewPrint(U8 *fmt,...)
{//View Print stmt in PopUp win task.
CTask *task;
CTask *task=Spawn(&SrvCmdLine,NULL,"View",,Fs);
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
CDoc *doc=DocNew;
CDoc *doc=DocNew(,task);
DocPrint(doc,buf);
Free(buf);
task=PopUpViewDoc(doc);
FramePtrAdd("ViewStrFrame",doc,task);
task->task_end_cb=&PopUpViewPrintEndCB;
buf=MStrPrint("DocEd(0x%X);",doc);
TaskExe(task,NULL,buf,1<<JOBf_EXIT_ON_COMPLETE|1<<JOBf_FREE_ON_COMPLETE);
Free(buf);
return task;
}
@ -34,7 +28,7 @@ public U8 *PopUpPickFile(U8 *dir=NULL)
if (dir)
st=MStrPrint("Cd(\"%Q\");FileMgr(FM_PICK_FILE,Fs->parent_task);",dir);
else {
st2=CurDir;
st2=DirCur;
st=MStrPrint("Cd(\"%Q\");FileMgr(FM_PICK_FILE,Fs->parent_task);",st2);
Free(st2);
}
@ -49,7 +43,7 @@ public U8 *PopUpPickDir(U8 *dir=NULL)
if (dir)
st=MStrPrint("Cd(\"%Q\");FileMgr(FM_PICK_DIR,Fs->parent_task);",dir);
else {
st2=CurDir;
st2=DirCur;
st=MStrPrint("Cd(\"%Q\");FileMgr(FM_PICK_DIR,Fs->parent_task);",st2);
Free(st2);
}
@ -270,7 +264,7 @@ public I64 AdamFile(U8 *filename,Bool warn_ext=TRUE)
{//Make adam_task execute file.
Bool okay=TRUE;
U8 *name=FileNameAbs(filename),
*name2=DftExt(name,"HC.Z");
*name2=ExtDft(name,"HC.Z");
I64 res=0;
if (warn_ext &&
!FilesFindMatch(name2,FILEMASK_JIT) &&
@ -288,7 +282,7 @@ public I64 PopUpFile(U8 *filename,Bool warn_ext=TRUE,
{//$LK,"ExeFile2",A="MN:ExeFile2"$() in $LK,"PopUp",A="MN:PopUp"$ task. Cont as User.
Bool okay=TRUE;
U8 *st,*name=FileNameAbs(filename),
*name2=DftExt(name,"HC.Z");
*name2=ExtDft(name,"HC.Z");
I64 res=0;
if (warn_ext &&
!FilesFindMatch(name2,FILEMASK_JIT) &&
@ -310,7 +304,7 @@ public I64 PopUpFile(U8 *filename,Bool warn_ext=TRUE,
public I64 PopUpRunFile(U8 *filename,I64 ccf_flags=0,...)
{//$LK,"ExeFile",A="MN:ExeFile"$() with args using $LK,"LastFun",A="MN:LastFun"$() in $LK,"PopUp",A="MN:PopUp"$ task.
U8 *st,*name=FileNameAbs(filename),
*name2=DftExt(name,"HC.Z");
*name2=ExtDft(name,"HC.Z");
I64 res=0;
st=MStrPrint(
"\"$$$$WW+H,1$$$$\";ExeFile2(\"%s\",0x%X);LastFun(0x%X,0x%X);",

24
Adam/DolDoc/DocPutKey.HC

@ -182,12 +182,12 @@ public U0 DocPutKey(CDoc *doc,I64 ch=0,I64 sc=0)
if (!(sc&SCF_CTRL)) {
if (sc&SCF_KEY_DESC) {
if (sc&SCF_SHIFT)
KeyDescSet("Edit/Cut To Clipboard");
KeyDescSet("Edit/Cut To Clip");
else
KeyDescSet("Char /Delete");
} else {
if (sc&SCF_SHIFT)
EdCutToClipboard(doc);
ClipCut(doc);
else
EdCharDel(doc);
}
@ -197,16 +197,16 @@ public U0 DocPutKey(CDoc *doc,I64 ch=0,I64 sc=0)
if (sc&(SCF_SHIFT|SCF_CTRL)!=(SCF_SHIFT|SCF_CTRL)) {
if (sc&SCF_KEY_DESC) {
if (sc&SCF_SHIFT)
KeyDescSet("Edit/Paste Clipboard");
KeyDescSet("Edit/Paste Clip");
else if (sc&SCF_CTRL)
KeyDescSet("Edit/Copy to Clipboard");
KeyDescSet("Edit/Copy to Clip");
else
KeyDescSet("Edit/Toggle Overstrike");
} else {
if (sc&SCF_SHIFT)
EdPasteClipboard(doc);
ClipPaste(doc);
else if (sc&SCF_CTRL)
EdCopyToClipboard(doc);
ClipCopy(doc);
else
doc->flags^=DOCF_OVERSTRIKE;
}
@ -383,9 +383,9 @@ public U0 DocPutKey(CDoc *doc,I64 ch=0,I64 sc=0)
case CH_CTRLC:
if (!(sc&SCF_SHIFT)) {
if (sc&SCF_KEY_DESC)
KeyDescSet("Edit/Copy to Clipboard");
KeyDescSet("Edit/Copy to Clip");
else
EdCopyToClipboard(doc);
ClipCopy(doc);
}
break;
case CH_CTRLD:
@ -616,9 +616,9 @@ public U0 DocPutKey(CDoc *doc,I64 ch=0,I64 sc=0)
case CH_CTRLV:
if (!(sc&SCF_SHIFT)) {
if (sc&SCF_KEY_DESC)
KeyDescSet("Edit/Paste Clipboard");
KeyDescSet("Edit/Paste Clip");
else
EdPasteClipboard(doc);
ClipPaste(doc);
}
break;
case CH_CTRLW:
@ -637,9 +637,9 @@ public U0 DocPutKey(CDoc *doc,I64 ch=0,I64 sc=0)
case CH_CTRLX:
if (!(sc&SCF_SHIFT)) {
if (sc&SCF_KEY_DESC)
KeyDescSet("Edit/Cut To Clipboard");
KeyDescSet("Edit/Cut To Clip");
else
EdCutToClipboard(doc);
ClipCut(doc);
}
break;
case CH_CTRLY:

94
Adam/DolDoc/DocTree.HC

@ -1,9 +1,9 @@
#help_index "DolDoc"
#help_index "DolDoc/Tree"
public Bool DocTreeFind(CDoc *haystack_doc,U8 *needle_path,
CDocEntry **_tree_entry=NULL,
CDocEntry **_start_indent=NULL, CDocEntry **_end_indent=NULL)
{//Find registry-like tree widget start and end.
{//Find tree widget start and end.
I64 i=0,k=0;
U8 *st1=StrNew(needle_path),*st2=MAlloc(StrLen(needle_path)+1);
Bool res=FALSE,unlock_doc=DocLock(haystack_doc);
@ -58,8 +58,16 @@ ft_done:
return res;
}
public Bool DocTreeFFind(U8 *name,U8 *path)
{//Find tree widget in file.
CDoc *doc=DocRead(name);
Bool res=DocTreeFind(doc,path);
DocDel(doc);
return res;
}
public Bool DocTreeMake(CDoc *doc,U8 *path)
{//Make registry-like tree widget.
{//Make tree widget.
I64 i=0,j=I64_MIN,k=0;
U8 *st1=StrNew(path),
*st2=MAlloc(StrLen(path)+1),
@ -113,6 +121,73 @@ mt_done:
return res;
}
Bool DocTreeWriteJoin(CDoc *doc,U8 *path,Bool write,U8 *fmt,I64 argc,I64 *argv)
{//Rewrite doc tree branch.
CDocEntry *tree_branch,*start_indent,*end_indent;
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
Bool res,unlock_doc=DocLock(doc);
if (res=DocTreeFind(doc,path,
&tree_branch,&start_indent,&end_indent)) {
DocCut(doc,start_indent->next,end_indent->last);
doc->cur_entry=start_indent->next;
doc->cur_col=doc->cur_entry->min_col;
} else
DocTreeMake(doc,path);
DocPrint(doc,"%s",buf);
if (write && DrvIsWritable(*doc->filename.name))
DocWrite(doc);
if (unlock_doc)
DocUnlock(doc);
Free(buf);
return res;
}
Bool DocTreeAppendJoin(CDoc *doc,U8 *path,Bool write,U8 *fmt,I64 argc,I64 *argv)
{//Append to doc tree branch.
CDocEntry *tree_branch,*start_indent,*end_indent;
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
Bool res,unlock_doc=DocLock(doc);
if (res=DocTreeFind(doc,path,
&tree_branch,&start_indent,&end_indent)) {
doc->cur_entry=end_indent;
doc->cur_col=doc->cur_entry->min_col;
} else
DocTreeMake(doc,path);
DocPrint(doc,"%s",buf);
if (write && DrvIsWritable(*doc->filename.name))
DocWrite(doc);
if (unlock_doc)
DocUnlock(doc);
Free(buf);
return res;
}
public Bool DocTreeWrite(CDoc *doc,U8 *path,Bool write=TRUE,U8 *fmt,...)
{//Rewrite doc tree branch.
return DocTreeWriteJoin(doc,path,write,fmt,argc,argv);
}
public Bool DocTreeAppend(CDoc *doc,U8 *path,Bool write=TRUE,U8 *fmt,...)
{//Append to doc tree branch.
return DocTreeAppendJoin(doc,path,write,fmt,argc,argv);
}
public Bool DocTreeFWrite(U8 *name,U8 *path,U8 *fmt,...)
{//Rewrite doc tree branch in file.
CDoc *doc=DocRead(name);
Bool res=DocTreeWriteJoin(doc,path,TRUE,fmt,argc,argv);
DocDel(doc);
return res;
}
public Bool DocTreeFAppend(U8 *name,U8 *path,U8 *fmt,...)
{//Append to doc tree branch in file.
CDoc *doc=DocRead(name);
Bool res=DocTreeAppendJoin(doc,path,TRUE,fmt,argc,argv);
DocDel(doc);
return res;
}
#help_index "DolDoc/Compiler;Compiler"
public I64 ExeDoc(CDoc *doc,I64 ccf_flags=0)
{//JIT Compile and execute a document.
@ -141,8 +216,9 @@ public I64 ExeDoc(CDoc *doc,I64 ccf_flags=0)
return res;
}
public I64 DocTreeBranchExe(CDoc *doc,U8 *path)
{//JIT Compile and execute code in doc tree branch.
#help_index "DolDoc/Tree;DolDoc/Compiler;Compiler"
public I64 DocTreeExe(CDoc *doc,U8 *path)
{//Execute doc tree branch.
CDoc *doc2;
Bool unlock_doc=DocLock(doc);
CDocEntry *tree_branch,*start_indent,*end_indent;
@ -157,11 +233,11 @@ public I64 DocTreeBranchExe(CDoc *doc,U8 *path)
return res;
}
public I64 ExeTreeBranch(U8 *registry_file,U8 *path)
{//JIT Compile and execute a specified branch in a specified file.
public I64 DocTreeFExe(U8 *name,U8 *path)
{//Execute doc tree branch in file.
I64 res;
CDoc *doc=DocRead(registry_file);
res=DocTreeBranchExe(doc,path);
CDoc *doc=DocRead(name);
res=DocTreeExe(doc,path);
DocDel(doc);
return res;
}

6
Adam/God/GodBible.HC

@ -158,7 +158,7 @@ public U8 *BibleLine2Verse(I64 line,I64 separate_ch=CH_SPACE)
}
if (0<=--i<cnt) {
doc=DocRead(BIBLE_FILENAME,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
DocLineNumGoTo(doc,line); //one based
DocGoToLine(doc,line); //one based
doc_e=doc->cur_entry;
while (doc_e!=doc && (doc_e->type_u8!=DOCT_TEXT || !*doc_e->tag))
doc_e=doc_e->next;
@ -222,7 +222,7 @@ public U0 BookLines(CDoc *doc_out=NULL,I64 start,I64 lines,
if (!doc_out) doc_out=DocPut;
if (doc_out && FileFind(book_filename)) {
doc_in=DocRead(book_filename,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
DocLineNumGoTo(doc_in,start); //one based
DocGoToLine(doc_in,start); //one based
doc_e=doc_in->cur_entry;
while (lines>0 && doc_e!=doc_in) {
if (doc_e->type_u8==DOCT_TEXT)
@ -255,7 +255,7 @@ public U0 BibleVerse(CDoc *doc_out=NULL,U8 *verse,I64 lines)
if (i>=0) {
i=Str2I64(DefineSub(i,"ST_BIBLE_BOOK_LINES"));
doc_in=DocRead(BIBLE_FILENAME,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
DocLineNumGoTo(doc_in,i); //one based
DocGoToLine(doc_in,i); //one based
if (*st2) {
StrCpy(doc_in->find_replace->find_text,st2);
EdFindNext(doc_in);

8
Adam/God/HolySpirit.HC

@ -135,6 +135,14 @@ public I64 GodInit(U8 *files_find_mask="/Adam/God/Vocab.DD*",U8 *fu_flags=NULL)
return god.num_words;
} GodInit;
public U8 *GodWordStr(I64 bits=17)
{//Make God pick a word. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.DD"$
if (god.num_words)
return god.words[GodBits(bits)%god.num_words];
else
return NULL;
}
public U0 GodWord(I64 bits=17,Bool show_num=FALSE)
{//Make God pick a word. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.DD"$
I64 i;

4
Adam/Gr/GrDC.HC

@ -379,7 +379,7 @@ public CDC *DCLoad(U8 *src,I64 *_size=NULL,CTask *task=NULL)
public I64 GRWrite(U8 *filename,CDC *dc,I64 dcsf_flags=DCSF_COMPRESSED)
{//TempleOS GR File.
I64 size;
U8 *st=DftExt(filename,"GR.Z"),
U8 *st=ExtDft(filename,"GR.Z"),
*src=DCSave(dc,&size,dcsf_flags);
FileWrite(st,src,size);
Free(st);
@ -390,7 +390,7 @@ public I64 GRWrite(U8 *filename,CDC *dc,I64 dcsf_flags=DCSF_COMPRESSED)
public CDC *GRRead(U8 *filename,CTask *task=NULL)
{//TempleOS GR File.
CDC *dc=NULL;
U8 *st=DftExt(filename,"GR.Z"),
U8 *st=ExtDft(filename,"GR.Z"),
*src=FileRead(st);
if (src)
dc=DCLoad(src,,task);

14
Adam/Gr/GrEnd.HC

@ -10,20 +10,20 @@ U0 CtrlAltZ(I64 sc)
CtrlAltCBSet('Z',&CtrlAltZ,"Cmd /Zoom In",
"Cmd /Zoom Out");
U0 Scrn2Clipboard(I64)
U0 Scrn2Clip(I64)
{
CDC *dc=DCScrnCapture;
U8 *elems=DC2Sprite(dc);
Bool unlock_doc=DocLock(sys_clipboard_doc);
ClipboardDel;
DocSprite(sys_clipboard_doc,elems);
Bool unlock_doc=DocLock(sys_clip_doc);
ClipDel;
DocSprite(sys_clip_doc,elems);
if (unlock_doc)
DocUnlock(sys_clipboard_doc);
DocUnlock(sys_clip_doc);
Free(elems);
DCDel(dc);
}
U0 CtrlAltS(I64)
{
Spawn(&Scrn2Clipboard);
Spawn(&Scrn2Clip);
}
CtrlAltCBSet('S',&CtrlAltS,"Cmd /Scrn Shot to Clipboard");
CtrlAltCBSet('S',&CtrlAltS,"Cmd /Scrn Shot to Clip");

48
Adam/Gr/SpriteBitMap.HC

@ -75,10 +75,10 @@ I64 PopUpSpriteBitMap(CColorROPU32 color,I64 width)
"$$MU-UL,\"Flood Fill Not Color\",LE=SPBM_FLOOD_FILL_NOT$$\n"
"$$MU-UL,\"PolyLine\",LE=SPBM_POLYLINE$$\n"
"$$MU-UL,\"PolyPoint\",LE=SPBM_POLYPT$$\n"
"\n$$MU-UL,\"Copy to Clipboard\",LE=SPBM_COPY$$\n"
"$$MU-UL,\"Delete to Clipboard\",LE=SPBM_DELETE$$\n"
"$$MU-UL,\"Paste Clipboard\",LE=SPBM_PASTE$$\n"
"$$MU-UL,\"Paste Transparent Clipboard\",LE=SPBM_PASTE_TRANSPARENT$$\n"
"\n$$MU-UL,\"Copy to Clip\",LE=SPBM_COPY$$\n"
"$$MU-UL,\"Delete to Clip\",LE=SPBM_DELETE$$\n"
"$$MU-UL,\"Paste Clip\",LE=SPBM_PASTE$$\n"
"$$MU-UL,\"Paste Transparent Clip\",LE=SPBM_PASTE_TRANSPARENT$$\n"
"\n$$MU-UL,\"Save BMP File\",LE=SPBM_SAVE_BMP$$\n"
"$$MU-UL,\"Save GR File\",LE=SPBM_SAVE_GRA$$\n"
"\n$$MU-UL,\"Undo\",LE=SPBM_UNDO$$\n"
@ -208,7 +208,7 @@ I64 SpriteBitMapEd(CDoc *,CDocEntry *doc_e,CDC *dc,I64 *_xx1,I64 *_yy1,
U8 *st=NULL;
CEdFileName filename;
CDC *img=*_img,
*clipboard=NULL,*undo=NULL,*dc2;
*clip=NULL,*undo=NULL,*dc2;
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
doc_e->de_flags|=DOCEF_DONT_DRAW;
@ -390,14 +390,14 @@ bm_menu:
break;
case SPBM_PASTE:
case SPBM_PASTE_TRANSPARENT:
if (clipboard) {
if (clip) {
GrBitMapEdPrepPersistentDC(dc,xx1,yy1,img);
if (mode==SPBM_PASTE) {
clipboard->flags|=DCF_NO_TRANSPARENTS;
GrBlot(dc,arg1,arg2,clipboard);
clipboard->flags&=~DCF_NO_TRANSPARENTS;
clip->flags|=DCF_NO_TRANSPARENTS;
GrBlot(dc,arg1,arg2,clip);
clip->flags&=~DCF_NO_TRANSPARENTS;
} else {
dc2=DCCopy(clipboard);
dc2=DCCopy(clip);
DCColorChg(dc2,bkcolor);
GrBlot(dc,arg1,arg2,dc2);
DCDel(dc2);
@ -517,14 +517,14 @@ bm_menu:
break;
case SPBM_PASTE:
case SPBM_PASTE_TRANSPARENT:
if (clipboard) {
if (clip) {
GrBitMapEdPrepPersistentDC(dc,xx1,yy1,img);
if (mode==SPBM_PASTE) {
clipboard->flags|=DCF_NO_TRANSPARENTS;
GrBlot(dc,arg1,arg2,clipboard);
clipboard->flags&=~DCF_NO_TRANSPARENTS;
clip->flags|=DCF_NO_TRANSPARENTS;
GrBlot(dc,arg1,arg2,clip);
clip->flags&=~DCF_NO_TRANSPARENTS;
} else {
dc2=DCCopy(clipboard);
dc2=DCCopy(clip);
DCColorChg(dc2,bkcolor);
GrBlot(dc,arg1,arg2,dc2);
DCDel(dc2);
@ -611,9 +611,9 @@ bm_menu:
y11=arg2;
y22=y1;
}
DCDel(clipboard);
clipboard=DCExt(img,x11-xx1,y11-yy1,x22-xx1,y22-yy1);
clipboard->bkcolor=bkcolor;
DCDel(clip);
clip=DCExt(img,x11-xx1,y11-yy1,x22-xx1,y22-yy1);
clip->bkcolor=bkcolor;
if (mode==SPBM_DELETE) {
img->color=bkcolor;
GrRect(img,x11-xx1,y11-yy1,x22-x11+1,y22-y11+1);
@ -629,14 +629,14 @@ bm_menu:
break;
case SPBM_PASTE:
case SPBM_PASTE_TRANSPARENT:
if (clipboard) {
if (clip) {
GrBitMapEdPrepPersistentDC(dc,xx1,yy1,img);
if (mode==SPBM_PASTE) {
clipboard->flags|=DCF_NO_TRANSPARENTS;
GrBlot(img,arg1-xx1,arg2-yy1,clipboard);
clipboard->flags&=~DCF_NO_TRANSPARENTS;
clip->flags|=DCF_NO_TRANSPARENTS;
GrBlot(img,arg1-xx1,arg2-yy1,clip);
clip->flags&=~DCF_NO_TRANSPARENTS;
} else {
dc2=DCCopy(clipboard);
dc2=DCCopy(clip);
DCColorChg(dc2,bkcolor);
GrBlot(img,arg1-xx1,arg2-yy1,dc2);
DCDel(dc2);
@ -665,7 +665,7 @@ bm_menu:
bm_key_up_done:
GetMsg(,,1<<MSG_KEY_UP);
bm_done:
DCDel(clipboard);
DCDel(clip);
DCDel(undo);
Free(st);
DCFill(dc);

18
Adam/Gr/SpriteEd.HC

@ -724,7 +724,7 @@ Bool SpriteEdText(CSprite **_head,I64 *_cur_elem_num)
#define SPED_SET_ORIGIN 10
#define SPED_SHIFT_SUB_ORIGIN 11
#define SPED_TEXT_ED 12
#define SPED_INS_CLIPBOARD 13
#define SPED_INS_CLIP 13
#define SPED_MAIN_MENU 14
#define SPED_EXIT 15
@ -733,7 +733,7 @@ U0 GrInit3()
DefineLstLoad("ST_SPRITE_ED_MENU","Select/Unselect All\0 \0Select\0"
"Select Rects\0Unselect\0Unselect Rects\0Shift Points\0Shift Rects\0"
"Shift Selected\0Transform Selected\0Set Origin\0"
"Insert Shift SubOrigin\0Edit as Text\0Insert Clipboard\0Main Menu\0");
"Insert Shift SubOrigin\0Edit as Text\0Insert Clip\0Main Menu\0");
}
GrInit3;
@ -757,7 +757,7 @@ I64 PopUpSpriteEd(CSprite **_head,I64 *_cur_elem_num)
"$$MU-UL,\"Set Origin\",LE=SPED_SET_ORIGIN$$\n"
"$$MU-UL,\"Insert Shift SubOrigin\",LE=SPED_SHIFT_SUB_ORIGIN$$\n\n"
"$$MU-UL,\"Edit as Text\",LE=SPED_TEXT_ED$$\n"
"$$MU-UL,\"Insert Clipboard Sprite's\",LE=SPED_INS_CLIPBOARD$$\n\n"
"$$MU-UL,\"Insert Clip Sprite's\",LE=SPED_INS_CLIP$$\n\n"
"$$PURPLE$$$$MU-UL,\"+] Sprite Main Menu\",LE=SPED_MAIN_MENU$$$$LTBLUE$$\n"
"$$MU-UL,\"Exit Sprite\",LE=SPED_EXIT$$\n"
"$$MU-UL,\"Abort Sprite\",LE=DOCM_CANCEL$$");
@ -1218,17 +1218,17 @@ I64 SpriteEd(CDoc *doc,CDocEntry *doc_ce,I64 x,I64 y,
} while (msg_code!=MSG_MS_L_UP);
*_cur_elem_num+=1;
break;
case SPED_INS_CLIPBOARD:
RegOneTimePopUp(ARf_CSPRITE_INS_CLIPBOARD,
case SPED_INS_CLIP:
RegOneTimePopUp(ARf_CSPRITE_INS_CLIP,
"You will probably want to shift around\n"
"the location of element groups. Use\n"
"'Insert shift sub-origin' after picking the\n"
"element to insert before. Or,\n"
"use 'shift points'.\n");
insert_pt=SpriteSetSettings(,*_head,*_cur_elem_num);
unlock=DocLock(sys_clipboard_doc);
doc_e2=sys_clipboard_doc->head.next;
while (doc_e2!=sys_clipboard_doc) {
unlock=DocLock(sys_clip_doc);
doc_e2=sys_clip_doc->head.next;
while (doc_e2!=sys_clip_doc) {
if (doc_e2->type_u8==DOCT_SPRITE) {
head2=Sprite2SpriteQue(doc_e2->bin_data->data);
if (head2->next!=head2) {
@ -1249,7 +1249,7 @@ I64 SpriteEd(CDoc *doc,CDocEntry *doc_ce,I64 x,I64 y,
doc_e2=doc_e2->next;
}
if (unlock)
DocUnlock(sys_clipboard_doc);
DocUnlock(sys_clip_doc);
SpriteEdUpdate(doc,doc_ce,*_head);
break;
case SPED_TEXT_ED:

66
Adam/Gr/SpriteMesh.HC

@ -588,33 +588,33 @@ U0 MeshCursorW(CMeshFrame *e,CTask *task,I64 *_x,I64 *_y,I64 *_z)
*_x=x; *_y=y; *_z=z;
}
CMeshEdVertex sys_clipboard_vertex_head;
CMeshEdTri sys_clipboard_tri_head;
CMeshEdVertex sys_clip_vertex_head;
CMeshEdTri sys_clip_tri_head;
U0 MeshClipboardInit()
U0 MeshClipInit()
{
QueInit(&sys_clipboard_vertex_head);
QueInit(&sys_clipboard_tri_head);
QueInit(&sys_clip_vertex_head);
QueInit(&sys_clip_tri_head);
}
U0 MeshClipboardRst()
U0 MeshClipRst()
{
QueDel(&sys_clipboard_vertex_head,TRUE);
QueDel(&sys_clipboard_tri_head,TRUE);
MeshClipboardInit;
QueDel(&sys_clip_vertex_head,TRUE);
QueDel(&sys_clip_tri_head,TRUE);
MeshClipInit;
}
U0 MeshClipboardCopy(CMeshFrame *e)
U0 MeshClipCopy(CMeshFrame *e)
{
CMeshEdVertex *tmpv=e->vertex_head.next,*tmpv2;
CMeshEdTri *tmpt=e->tri_head.next,*tmpt2;
MeshClipboardRst;
MeshClipRst;
while (tmpv!=&e->vertex_head) {
if (tmpv->flags&VF_SEL) {
tmpv->copy=tmpv2=ACAlloc(sizeof(CMeshEdVertex));
MemCpy(&tmpv2->p,&tmpv->p,sizeof(CD3I32));
QueIns(tmpv2,sys_clipboard_vertex_head.last);
QueIns(tmpv2,sys_clip_vertex_head.last);
tmpv->flags|=VF_COPIED;
tmpv->flags&=~VF_SEL;
} else {
@ -631,7 +631,7 @@ U0 MeshClipboardCopy(CMeshFrame *e)
tmpt2->t[1]=tmpt->t[1]->copy;
tmpt2->t[2]=tmpt->t[2]->copy;
tmpt2->mt.color=tmpt->mt.color;
QueIns(tmpt2,sys_clipboard_tri_head.last);
QueIns(tmpt2,sys_clip_tri_head.last);
tmpt->flags|=TF_COPIED;
tmpt->flags&=~TF_SEL;
} else
@ -640,11 +640,11 @@ U0 MeshClipboardCopy(CMeshFrame *e)
}
}
U0 MeshClipboardCut(CMeshFrame *e)
U0 MeshClipCut(CMeshFrame *e)
{
CMeshEdVertex *tmpv=e->vertex_head.next,*tmpv1;
CMeshEdTri *tmpt=e->tri_head.next,*tmpt1;
MeshClipboardCopy(e);
MeshClipCopy(e);
while (tmpt!=&e->tri_head) {
tmpt1=tmpt->next;
if (tmpt->flags&TF_COPIED)
@ -659,8 +659,8 @@ U0 MeshClipboardCut(CMeshFrame *e)
}
}
U0 MeshClipboardDel(CMeshFrame *e)
{//Technically not clipboard
U0 MeshClipDel(CMeshFrame *e)
{//Technically not clip
CMeshEdVertex *tmpv=e->vertex_head.next,*tmpv1;
CMeshEdTri *tmpt=e->tri_head.next,*tmpt1;
while (tmpt!=&e->tri_head) {
@ -677,14 +677,14 @@ U0 MeshClipboardDel(CMeshFrame *e)
}
}
U0 MeshClipboardPaste(CMeshFrame *e)
U0 MeshClipPaste(CMeshFrame *e)
{
CMeshEdVertex *tmpv2=sys_clipboard_vertex_head.next,*tmpv;
CMeshEdTri *tmpt2=sys_clipboard_tri_head.next,*tmpt;
CMeshEdVertex *tmpv2=sys_clip_vertex_head.next,*tmpv;
CMeshEdTri *tmpt2=sys_clip_tri_head.next,*tmpt;
MeshVertexSelAll(e,FALSE);
MeshTriSelAll(e,FALSE);
while (tmpv2!=&sys_clipboard_vertex_head) {
while (tmpv2!=&sys_clip_vertex_head) {
tmpv2->copy=tmpv=CAlloc(sizeof(CMeshEdVertex));
MemCpy(&tmpv->p,&tmpv2->p,sizeof(CD3I32));
QueIns(tmpv,e->vertex_head.last);
@ -692,7 +692,7 @@ U0 MeshClipboardPaste(CMeshFrame *e)
tmpv2=tmpv2->next;
}
while (tmpt2!=&sys_clipboard_tri_head) {
while (tmpt2!=&sys_clip_tri_head) {
tmpt=MeshTriNew(e,tmpt2->mt.color,tmpt2->t[0]->copy,
tmpt2->t[1]->copy,tmpt2->t[2]->copy);
tmpt->flags|=TF_SEL;
@ -700,7 +700,7 @@ U0 MeshClipboardPaste(CMeshFrame *e)
}
}
MeshClipboardInit;
MeshClipInit;
U0 DrawIt(CTask *task,CDC *dc)
{
@ -1088,10 +1088,10 @@ me_restart:
switch (arg2.u8[0]) {
case SC_DELETE:
if (arg2&SCF_SHIFT)
goto me_clipboard_cut;
goto me_clip_cut;
else {
if (MeshSelCnt(&e))
MeshClipboardDel(&e);
MeshClipDel(&e);
else if (e.ed_mode!='t')
MeshVertexDel(&e,MeshVertexFindScrPt(&e,
ms.presnap.x-Fs->pix_left-Fs->scroll_x,
@ -1103,9 +1103,9 @@ me_restart:
break;
case SC_INS:
if (arg2&SCF_CTRL)
goto me_clipboard_copy;
goto me_clip_copy;
else if (arg2&SCF_SHIFT)
goto me_clipboard_paste;
goto me_clip_paste;
}
break;
case CH_BACKSPACE:
@ -1209,27 +1209,27 @@ me_chain:
WinBorder(Bt(&Fs->display_flags,DISPLAYf_NO_BORDER));
break;
case CH_CTRLC:
me_clipboard_copy:
me_clip_copy:
if (e.ed_mode=='t') {
Beep;Beep;
} else
MeshClipboardCopy(&e);
MeshClipCopy(&e);
break;
case CH_CTRLV:
me_clipboard_paste:
me_clip_paste:
if (e.ed_mode=='t') {
Beep;Beep;
} else {
MeshClipboardPaste(&e);
MeshClipPaste(&e);
e.ed_mode='m';
}
break;
case CH_CTRLX:
me_clipboard_cut:
me_clip_cut:
if (e.ed_mode=='t') {
Beep;Beep;
} else
MeshClipboardCut(&e);
MeshClipCut(&e);
break;
case CH_SHIFT_ESC:
save_and_exit=FALSE;