Browse Source

TempleOSCDV4.06.ISO

v6
Terry A. Davis 6 years ago committed by minexew
parent
commit
b632ab9a4f
  1. BIN
      0000Boot/0000Kernel.BIN.C
  2. 48
      Adam/ABlkDev/ADskA.CPP
  3. 42
      Adam/ABlkDev/ADskB.CPP
  4. 20
      Adam/ABlkDev/ChkDsk.CPP
  5. 22
      Adam/ABlkDev/FileMgr.CPP
  6. 8
      Adam/ABlkDev/Mount.CPP
  7. 5
      Adam/ADefine.CPP
  8. 110
      Adam/AHash.CPP
  9. 41
      Adam/AMath.CPP
  10. 12
      Adam/AMathODE.CPP
  11. 22
      Adam/AMem.CPP
  12. 20
      Adam/ARegistry.CPP
  13. 14
      Adam/AutoComplete/ACDictGen.CPP
  14. 16
      Adam/AutoComplete/ACFill.CPP
  15. 4
      Adam/AutoFile.CPP
  16. 28
      Adam/Ctrls/CtrlsButton.CPP
  17. 20
      Adam/Ctrls/CtrlsSlider.CPP
  18. 4
      Adam/DolDoc/DocBin.CPP
  19. 10
      Adam/DolDoc/DocChar.CPP
  20. 34
      Adam/DolDoc/DocCodeTools.CPP
  21. 66
      Adam/DolDoc/DocDblBuf.CPP
  22. 28
      Adam/DolDoc/DocEd.CPP
  23. 28
      Adam/DolDoc/DocFile.CPP
  24. 70
      Adam/DolDoc/DocFind.CPP
  25. 18
      Adam/DolDoc/DocForm.CPP
  26. 58
      Adam/DolDoc/DocGet.CPP
  27. 6
      Adam/DolDoc/DocGr.CPP
  28. 4
      Adam/DolDoc/DocHighlight.CPP
  29. 76
      Adam/DolDoc/DocLink.CPP
  30. 6
      Adam/DolDoc/DocMacro.CPP
  31. 94
      Adam/DolDoc/DocNew.CPP
  32. 36
      Adam/DolDoc/DocOpt.CPP
  33. 20
      Adam/DolDoc/DocPlain.CPP
  34. 58
      Adam/DolDoc/DocPopUp.CPP
  35. 5
      Adam/DolDoc/DocPutKey.CPP
  36. 10
      Adam/DolDoc/DocPutS.CPP
  37. 32
      Adam/DolDoc/DocRecalc.CPP
  38. 6
      Adam/DolDoc/DocRecalcLib.CPP
  39. 28
      Adam/DolDoc/DocRun.CPP
  40. 30
      Adam/DolDoc/DocTerm.CPP
  41. 34
      Adam/DolDoc/DocTree.CPP
  42. 36
      Adam/DolDoc/DocWidgetWiz.CPP
  43. 48
      Adam/God/GodBible.CPP
  44. 6
      Adam/God/GodDoodle.CPP
  45. 6
      Adam/God/HSNotes.TXT
  46. 6
      Adam/God/HolySpirit.CPP
  47. 130
      Adam/Gr/GrBitMap.CPP
  48. 64
      Adam/Gr/GrComposites.CPP
  49. 108
      Adam/Gr/GrDC.CPP
  50. 4
      Adam/Gr/GrInitB.CPP
  51. 8
      Adam/Gr/GrMath.CPP
  52. 10
      Adam/Gr/GrPalette.CPP
  53. 154
      Adam/Gr/GrPrimatives.CPP
  54. 8
      Adam/Gr/GrScreen.CPP
  55. 26
      Adam/Gr/GrSpritePlot.CPP
  56. 14
      Adam/Gr/SpriteBitMap.CPP
  57. 52
      Adam/Gr/SpriteCode.CPP
  58. 82
      Adam/Gr/SpriteEd.CPP
  59. 276
      Adam/Gr/SpriteMain.CPP
  60. 18
      Adam/Gr/SpriteMesh.CPP
  61. 6
      Adam/Gr/SpriteNew.CPP
  62. 14
      Adam/Menu.CPP
  63. 14
      Adam/Opt/Boot/BootIns.CPP
  64. 2
      Adam/Opt/Boot/Reboot.CPP
  65. 16
      Adam/Opt/Utils/Diff.CPP
  66. 78
      Adam/Opt/Utils/FileBMP.CPP
  67. 6
      Adam/Opt/Utils/Find.CPP
  68. 2
      Adam/Opt/Utils/HeapLog.CPP
  69. 28
      Adam/Opt/Utils/LineRep.CPP
  70. 18
      Adam/Opt/Utils/LinkChk.CPP
  71. 38
      Adam/Opt/Utils/MemRep.CPP
  72. 36
      Adam/Opt/Utils/StrUtils.CPP
  73. 10
      Adam/Snd/SndMusic.CPP
  74. 5
      Adam/TaskRep.CPP
  75. 2
      Adam/TaskSettings.CPP
  76. 8
      Adam/Training.CPP
  77. BIN
      Adam/WallPaper.CPP
  78. 26
      Adam/WinA.CPP
  79. 30
      Adam/WinB.CPP
  80. 8
      Apps/AfterEgypt/AfterEgypt.CPP
  81. BIN
      Apps/AfterEgypt/Battle.CPP
  82. BIN
      Apps/AfterEgypt/Quail.CPP
  83. BIN
      Apps/AfterEgypt/WaterRock.CPP
  84. 14
      Apps/Budget/BgtAccts.CPP
  85. 24
      Apps/Budget/BgtFile.CPP
  86. 8
      Apps/Budget/BgtStrs.CPP
  87. 14
      Apps/Budget/Budget.CPP
  88. 28
      Apps/GrModels/BallGen.CPP
  89. 38
      Apps/GrModels/ManGen.CPP
  90. 6
      Apps/KeepAway/KeepAway.CPP
  91. 2
      Apps/Psalmody/PsalmodyFile.CPP
  92. 4
      Apps/Span/SpanDerive.CPP
  93. 8
      Apps/Span/SpanMain.CPP
  94. 12
      Apps/Span/SpanNew.CPP
  95. 4
      Apps/Strut/Strut.CPP
  96. 2
      Apps/TimeOut/TimeOut.CPP
  97. 62
      Apps/ToTheFront/ToTheFront.CPP
  98. 466
      Apps/X-Caliber/X-Caliber.CPP
  99. 2
      Apps/X-Caliber/XCCtrls.CPP
  100. 103
      Compiler/Asm.CPP
  101. Some files were not shown because too many files have changed in this diff Show More

BIN
0000Boot/0000Kernel.BIN.C

Binary file not shown.

48
Adam/ABlkDev/ADskA.CPP

@ -63,7 +63,7 @@ public Bool Copy(U8 *src_files_find_mask,U8 *dst_files_find_mask=".")
//If the name ends in ".Z", it will
//be stored compressed. If not ".Z"
//it will be stored uncompressed.
Bool result=TRUE;
Bool res=TRUE;
CDirContext *dirc;
CDirEntry *tempde,*tempde1;
U8 *st;
@ -76,7 +76,7 @@ public Bool Copy(U8 *src_files_find_mask,U8 *dst_files_find_mask=".")
if (!(tempde->attr & RS_ATTR_DIR)) {
st=FileNameAbs(tempde->name);
if (!CopySingle(tempde->full_name,st))
result=FALSE;
res=FALSE;
Free(st);
}
tempde=tempde->next;
@ -84,7 +84,7 @@ public Bool Copy(U8 *src_files_find_mask,U8 *dst_files_find_mask=".")
DirContextDel(dirc);
}
DirTreeDel(tempde1);
return result;
return res;
} else {
DirTreeDel(tempde1);
return CopySingle(src_files_find_mask,dst_files_find_mask);
@ -103,21 +103,21 @@ public Bool Move(U8 *f1,U8 *f2)
I64 CopyTree2(CDirEntry *tempde,I64 src_dir_len,I64 dst_dir_len,U8 *dst_dir)
{
U8 *st;
I64 result=1;
I64 res=1;
while (tempde) {
st=MAlloc(StrLen(tempde->full_name)+dst_dir_len+2);
MemCpy(st,dst_dir,dst_dir_len);
StrCpy(st+dst_dir_len,tempde->full_name+src_dir_len);
if (tempde->attr & RS_ATTR_DIR) {
MkDir(st);
result+=CopyTree2(tempde->sub,src_dir_len,dst_dir_len,dst_dir);
res+=CopyTree2(tempde->sub,src_dir_len,dst_dir_len,dst_dir);
} else
if (CopySingle(tempde->full_name,st))
result++;
res++;
Free(st);
tempde=tempde->next;
}
return result;
return res;
}
public I64 CopyTree(U8 *src_files_find_mask,U8 *dst_files_find_mask,
Bool no_mask=TRUE)
@ -125,7 +125,7 @@ public I64 CopyTree(U8 *src_files_find_mask,U8 *dst_files_find_mask,
//Returns the count of copied files (not dirs).
CDirContext *dirc;
CDirEntry *tempde=NULL;
I64 result=0,i1,i2;
I64 res=0,i1,i2;
U8 *st1,*st2;
st1=DirNameAbs(src_files_find_mask);
@ -148,60 +148,60 @@ public I64 CopyTree(U8 *src_files_find_mask,U8 *dst_files_find_mask,
st2=CurDir;
i2=StrLen(st2);
if (i2==3) i2--;
result=CopyTree2(tempde,i1,i2,st2);
res=CopyTree2(tempde,i1,i2,st2);
DirContextDel(dirc);
Free(st2);
}
DirTreeDel(tempde);
Free(st1);
}
return result;
return res;
}
I64 DelTreeDirs(CDirEntry *tempde1)
{
I64 result=0;
I64 res=0;
CDirEntry *tempde2;
while (tempde1) {
tempde2=tempde1->next;
if (tempde1->attr & RS_ATTR_DIR) {
if (tempde1->sub)
result+=DelTreeDirs(tempde1->sub);
result+=Del(tempde1->full_name,TRUE,TRUE);
res+=DelTreeDirs(tempde1->sub);
res+=Del(tempde1->full_name,TRUE,TRUE);
}
DirEntryDel(tempde1);
tempde1=tempde2;
}
return result;
return res;
}
I64 DelTreeFiles(CDirEntry *tempde1)
{
I64 result=0;
I64 res=0;
CDirEntry *tempde2;
while (tempde1) {
tempde2=tempde1->next;
if (tempde1->attr & RS_ATTR_DIR) {
if (tempde1->sub)
result+=DelTreeFiles(tempde1->sub);
res+=DelTreeFiles(tempde1->sub);
} else
result+=Del(tempde1->full_name,FALSE,TRUE);
res+=Del(tempde1->full_name,FALSE,TRUE);
DirEntryDel(tempde1);
tempde1=tempde2;
}
return result;
return res;
}
public I64 DelTree(U8 *files_find_mask,U8 *fu_flags=NULL)
{//Delete directory tree.
I64 result=0,fuf_flags=0;
I64 res=0,fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
if (IsDir(files_find_mask)) {
result=DelTreeDirs(FilesFind(files_find_mask,fuf_flags));
result+=Del(files_find_mask,TRUE,TRUE);
result+=Del(files_find_mask,FALSE,TRUE);
res=DelTreeDirs(FilesFind(files_find_mask,fuf_flags));
res+=Del(files_find_mask,TRUE,TRUE);
res+=Del(files_find_mask,FALSE,TRUE);
} else
result=DelTreeFiles(FilesFind(files_find_mask,fuf_flags));
return result;
res=DelTreeFiles(FilesFind(files_find_mask,fuf_flags));
return res;
}
U0 TouchFile(U8 *filename,U8 *attr,CDate cdt=MIN_I64)

42
Adam/ABlkDev/ADskB.CPP

@ -1,33 +1,33 @@
#help_index "File/Internal"
I64 DirTreeSerializeSize(CDirEntry *tempde)
{
I64 result=0;
I64 res=0;
while (tempde) {
result+=CDIR_SIZE+1;
res+=CDIR_SIZE+1;
if (tempde->attr & RS_ATTR_DIR)
result+=DirTreeSerializeSize(tempde->sub);
res+=DirTreeSerializeSize(tempde->sub);
tempde=tempde->next;
}
return result+1;
return res+1;
}
I64 DirTreeSerializeFill(CDirEntry *tempde,U8 *dst)
{
I64 result=0,i;
I64 res=0,i;
while (tempde) {
*dst++=1;
result++;
res++;
MemCpy(dst,&tempde->start,CDIR_SIZE);
dst+=CDIR_SIZE;
result+=CDIR_SIZE;
res+=CDIR_SIZE;
if (tempde->attr & RS_ATTR_DIR) {
i=DirTreeSerializeFill(tempde->sub,dst);
dst+=i;
result+=i;
res+=i;
}
tempde=tempde->next;
}
*dst=0;
return result+1;
return res+1;
}
public U8 *DirTreeSerialize(CDirEntry *tempde,I64 *_size=NULL)
{//Serialize tree returned from $LK,"FilesFind",A="MN:FilesFind"$() into a one contiguous U8 array.
@ -80,7 +80,7 @@ U0 FOFlatten(CDirEntry *tempde,CDirEntry **a,I64 *i)
I64 Size1(CDirEntry *tempde,I64 *_fuf_flags,I64 round_to)
{
U8 buf[BLK_SIZE];
I64 result=0,i;
I64 res=0,i;
CDrv *dv;
while (tempde) {
if ((i=tempde->size) && Bt(_fuf_flags,FUf_EXPAND) &&
@ -95,25 +95,25 @@ I64 Size1(CDirEntry *tempde,I64 *_fuf_flags,I64 round_to)
if (tempde->attr&RS_ATTR_DIR)
i+=Size1(tempde->sub,_fuf_flags,round_to);
tempde->user_data=i;
result+=i;
res+=i;
tempde=tempde->next;
}
return result;
return res;
}
public I64 Size(U8 *files_find_mask="/*",U8 *fu_flags=NULL,I64 round_to=0)
{//Total size of files in mask. "+x" for expanded size.
//Does not include directory size of base directory, but
//does include size of sub directories.
I64 fuf_flags=0,result=0;
I64 fuf_flags=0,res=0;
CDirEntry *tempde1=NULL;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
if (tempde1=FilesFind(files_find_mask,fuf_flags&FUG_FILES_FIND)) {
fuf_flags&=FUF_EXPAND;
result=Size1(tempde1,&fuf_flags,round_to);
res=Size1(tempde1,&fuf_flags,round_to);
DirTreeDel(tempde1);
}
return result;
return res;
}
public I64 FileCnt(CDirEntry *tempde)
@ -151,20 +151,20 @@ public I64 Zip(U8 *files_find_mask="*",U8 *fu_flags=NULL)
{//Compress files by moving to .Z filename.
U8 *st;
CDirEntry *tempde,*tempde1;
I64 result=0,fuf_flags=0;
I64 res=0,fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+f+F+O");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
tempde=tempde1=FilesFind(files_find_mask,fuf_flags);
while (tempde) {
if (!IsDotZ(tempde->full_name)) {
st=MStrPrint("%s.Z",tempde->full_name);
result+=Move(tempde->full_name,st);
res+=Move(tempde->full_name,st);
Free(st);
}
tempde=tempde->next;
}
DirTreeDel(tempde1);
return result;
return res;
}
public I64 Unzip(U8 *files_find_mask="*.Z",U8 *fu_flags=NULL)
@ -173,7 +173,7 @@ public I64 Unzip(U8 *files_find_mask="*.Z",U8 *fu_flags=NULL)
//It automatically unzips ".Z" files.
U8 *st;
CDirEntry *tempde,*tempde1;
I64 result=0,fuf_flags=0;
I64 res=0,fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+f+F+O");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
tempde=tempde1=FilesFind(files_find_mask,fuf_flags);
@ -181,11 +181,11 @@ public I64 Unzip(U8 *files_find_mask="*.Z",U8 *fu_flags=NULL)
if (IsDotZ(tempde->full_name)) {
st=StrNew(tempde->full_name);
StrLastRem(st,".");
result+=Move(tempde->full_name,st);
res+=Move(tempde->full_name,st);
Free(st);
}
tempde=tempde->next;
}
DirTreeDel(tempde1);
return result;
return res;
}

20
Adam/ABlkDev/ChkDsk.CPP

@ -389,7 +389,7 @@ public U0 DskView(U8 drv_let=0)
I64 RedSeaUnusedDrvSpace(U8 drv_let=0)
{
CDrv *dv=Let2Drv(drv_let);
I64 result=0,i,l;
I64 res=0,i,l;
U8 *bitmap;
try {
l=(dv->size+dv->spc-1)/dv->spc;
@ -398,16 +398,16 @@ I64 RedSeaUnusedDrvSpace(U8 drv_let=0)
RBlks(dv,bitmap,dv->fat1,i);
for (i=0;i<l;i++)
if (!Bt(bitmap,i))
result++;
res++;
Free(bitmap);
} catch
DrvUnlock(dv);
return result*BLK_SIZE*dv->spc;
return res*BLK_SIZE*dv->spc;
}
I64 FAT32UnusedDrvSpace(U8 drv_let=0)
{
CDrv *dv=Let2Drv(drv_let);
I64 result=0,i,l;
I64 res=0,i,l;
U32 *bitmap;
try {
l=(dv->size+dv->spc-1)/dv->spc;
@ -416,24 +416,24 @@ I64 FAT32UnusedDrvSpace(U8 drv_let=0)
RBlks(dv,bitmap,dv->fat1,i);
for (i=0;i<l;i++)
if (!bitmap[i])
result++;
res++;
Free(bitmap);
} catch
DrvUnlock(dv);
return result*BLK_SIZE*dv->spc;
return res*BLK_SIZE*dv->spc;
}
public I64 UnusedDrvSpace(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);
I64 result=0;
I64 res=0;
Drv(drv_let);
switch (dv->fs_type) {
case FSt_REDSEA:
result=RedSeaUnusedDrvSpace(drv_let);
res=RedSeaUnusedDrvSpace(drv_let);
break;
case FSt_FAT32:
result=FAT32UnusedDrvSpace(drv_let);
res=FAT32UnusedDrvSpace(drv_let);
break;
default:
PrintErr("File System Not Supported\n");
@ -441,5 +441,5 @@ public I64 UnusedDrvSpace(U8 drv_let=0)
Drv(Drv2Let(old_dv));
Cd(old_dir);
Free(old_dir);
return result;
return res;
}

22
Adam/ABlkDev/FileMgr.CPP

@ -31,22 +31,22 @@ class CFMUncollapsedLst
CFMUncollapsedLst *FMCollectUncollapsedLst(CDoc *doc)
{
CDocEntry *doc_e=doc->root.next;
CFMUncollapsedLst *result=NULL,*tempc;
CFMUncollapsedLst *res=NULL,*tempc;
CDirEntry *tempde;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_TREE) {
if (!(doc_e->de_flags&DOCEF_CHECKED_COLLAPSED)) {
if (tempde=doc_e->user_data) {
tempc=MAlloc(sizeof(CFMUncollapsedLst));
tempc->next=result;
result=tempc;
tempc->next=res;
res=tempc;
tempc->name=StrNew(tempde->full_name);
}
}
}
doc_e=doc_e->next;
}
return result;
return res;
}
U0 FMMarkUncollapsed(CDoc *doc,CFMUncollapsedLst *tempc,
@ -549,7 +549,7 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
CDirEntry *root=NULL,*tempde,*tempde1,*tempde2;
I64 sc,ch,a1,a2,msg_code;
CDoc *doc=NULL,*old_put_doc=DocPut,*old_display_doc=DocDisplay;
U8 *result=NULL,*st,*st2,*old_cur_dir=CurDir;
U8 *res=NULL,*st,*st2,*old_cur_dir=CurDir;
CDocEntry *doc_ce=NULL,*doc_e;
Bool okay;
@ -706,13 +706,13 @@ public U8 *FileMgr(I64 mode=FM_NORMAL,CTask *mem_task=NULL)
doc_ce=doc->cur_entry;
tempde=doc_ce->user_data;
if (mode==FM_PICK_FILE && doc_ce->type_u8==DOCT_MENU_VAL)
result=StrNew(tempde->full_name,mem_task);
res=StrNew(tempde->full_name,mem_task);
else if (mode==FM_PICK_DIR) {
if (doc_ce->type_u8==DOCT_TREE)
result=StrNew(tempde->full_name,mem_task);
res=StrNew(tempde->full_name,mem_task);
else if (doc_ce->type_u8==DOCT_MENU_VAL &&
(tempde=tempde->parent))
result=StrNew(tempde->full_name,mem_task);
res=StrNew(tempde->full_name,mem_task);
}
break;
default:
@ -747,8 +747,8 @@ fm_regular_key:
DirTreeDel(root);
Cd(old_cur_dir);
Free(old_cur_dir);
if (mode!=FM_NORMAL && !result)
result=StrNew("",mem_task);
if (mode!=FM_NORMAL && !res)
res=StrNew("",mem_task);
MenuPop;
return result;
return res;
}

8
Adam/ABlkDev/Mount.CPP

@ -1,7 +1,7 @@
#help_index "Install;File/Cmd Line (Typically);Cmd Line (Typically);"
I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
{//If _doc, called by $LK,"::/Kernel/KCfg.CPP"$ else called by $LK,"Mount",A="MN:Mount"$().
I64 cnt,result=0,num_hints,drv_let,type,unit;
I64 cnt,res=0,num_hints,drv_let,type,unit;
U8 blks_buf[STR_LEN],addr_buf[STR_LEN],base0_buf[STR_LEN],base1_buf[STR_LEN];
CATARep *root=NULL,*tempha;
Bool one_drv,make_free;
@ -103,9 +103,9 @@ I64 Mount2(U8 boot_drv_let,CDoc *_doc,Bool repartition)
DocDel(doc);
}
}
result+=cnt;
} while (cnt || !result && _doc); //At least 1 if Called by $LK,"::/Kernel/KCfg.CPP"$
return result;
res+=cnt;
} while (cnt || !res && _doc); //At least 1 if Called by $LK,"::/Kernel/KCfg.CPP"$
return res;
}
public I64 Mount(Bool repartition=FALSE)

5
Adam/ADefine.CPP

@ -11,13 +11,12 @@ U0 LoadDocDefines()
//This is cut and replaced when I generate a distro.
//See $LK,"DD_TEMPLEOS_LOC",A="FF:::/Demo/AcctExample/TOSDistro.CPP,DD_TEMPLEOS_LOC"$.
$TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,248");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","79,899");
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,714");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","79,854");
$ID,-4$
DefinePrint("DD_KERNEL","%08X",bfh);
bfh(I64)+=bfh->file_size-1;
DefinePrint("DD_KERNEL_END","%08X",bfh);
DefinePrint("DD_PROTECTED_LOW","%08X",MEM_PROTECTED_LOW_LIMIT);
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.CPP,DD_BOOT_HIGH_LOC_DVD"$

110
Adam/AHash.CPP

@ -2,7 +2,7 @@
class CWho
{
CHashGeneric *h;
U8 *index;
U8 *idx;
};
I64 HashEntriesCompare(CWho *h1,CWho *h2)
@ -28,11 +28,11 @@ I64 HashEntriesCompare2(CWho *h1,CWho *h2)
return i1-i2;
}
I64 HelpIndexCnt(U8 *ptr,U8 *index)
I64 HelpIndexCnt(U8 *ptr,U8 *idx)
{
I64 cnt=0,ch,index_len=StrLen(index);
I64 cnt=0,ch,idx_len=StrLen(idx);
while (*ptr) {
if (!StrNCmp(ptr,index,index_len))
if (!StrNCmp(ptr,idx,idx_len))
cnt++;
while (ch=*ptr++)
if (ch==';')
@ -43,10 +43,10 @@ I64 HelpIndexCnt(U8 *ptr,U8 *index)
return cnt;
}
U8 *HelpIndexStr(U8 **_ptr,U8 *index)
U8 *HelpIndexStr(U8 **_ptr,U8 *idx)
{
U8 *ptr=*_ptr,*ptr2,*result;
I64 ch,index_len=StrLen(index);
U8 *ptr=*_ptr,*ptr2,*res;
I64 ch,idx_len=StrLen(idx);
while (*ptr) {
ptr2=ptr;
while (ch=*ptr++)
@ -55,13 +55,13 @@ U8 *HelpIndexStr(U8 **_ptr,U8 *index)
if (!ch)
ptr--;
*_ptr=ptr;
if (!StrNCmp(ptr2,index,index_len)) {
if (!StrNCmp(ptr2,idx,idx_len)) {
if (ch==';')
ptr--;
*ptr=0;
result=StrNew(ptr2);
res=StrNew(ptr2);
*ptr=ch;
return result;
return res;
}
}
return NULL;
@ -71,7 +71,7 @@ U8 *HelpComment(CTask *task,CHash *temph,U8 *_src_link)
{
CDoc *doc;
CDocEntry *doc_e;
U8 *result=NULL,*ptr,*ptr2,*src_link=StrNew(_src_link);
U8 *res=NULL,*ptr,*ptr2,*src_link=StrNew(_src_link);
if (*src_link=='F' && src_link[2]==':')
*src_link='P';
@ -102,35 +102,35 @@ U8 *HelpComment(CTask *task,CHash *temph,U8 *_src_link)
ptr+=6;
while (*ptr==CH_SPACE)
ptr++;
result=StrNew(ptr);
res=StrNew(ptr);
doc_e=doc_e->next;
}
while (doc_e!=doc && doc_e->type_u8!=DOCT_NEW_LINE) {
if (doc_e->type_u8==DOCT_TAB) {
ptr=MStrPrint("%s ",result);
Free(result);
result=ptr;
ptr=MStrPrint("%s ",res);
Free(res);
res=ptr;
} else if (doc_e->de_flags&DOCEF_TAG) {
ptr=MStrPrint("%s%s",result,doc_e->tag);
Free(result);
result=ptr;
ptr=MStrPrint("%s%s",res,doc_e->tag);
Free(res);
res=ptr;
}
doc_e=doc_e->next;
}
}
XTalkWait(task,"%c",CH_SHIFT_ESC);
if (result) {
ptr=MStrUtil(result,SUF_REM_TRAILING|SUF_REM_LEADING|SUF_SINGLE_SPACE);
Free(result);
result=ptr;
if (res) {
ptr=MStrUtil(res,SUF_REM_TRAILING|SUF_REM_LEADING|SUF_SINGLE_SPACE);
Free(res);
res=ptr;
}
return result;
return res;
}
I64 HashEntriesCompare3(CWho *h1,CWho *h2)
{
I64 i,i1=0,i2=0;
i=StrCmp(h1->index,h2->index);
i=StrCmp(h1->idx,h2->idx);
if (i)
return i;
else {
@ -147,7 +147,7 @@ I64 HashEntriesCompare3(CWho *h1,CWho *h2)
}
public U0 Who(U8 *fu_flags=NULL,CHashTable *h=NULL,
U8 *index=NULL,CDoc *doc=NULL)
U8 *idx=NULL,CDoc *doc=NULL)
{//Dump hash symbol table.
// "+p" for only public symbols
// "+m" to order by number (normally alphabetical)
@ -157,7 +157,7 @@ U8 *index=NULL,CDoc *doc=NULL)
CHashGeneric *ptr;
CWho *lst;
I64 cnt,i,j,k,f=0;
U8 buf[512],*st,*last_index=StrNew(""),*cur_index,*comment;
U8 buf[512],*st,*last_idx=StrNew(""),*cur_idx,*comment;
Bool recurse,publics,map;
CTask *task;
@ -171,7 +171,7 @@ U8 *index=NULL,CDoc *doc=NULL)
if (!h) h=Fs->hash_table;
if (index) {
if (idx) {
task=User;
TaskWait(task);
LBtr(&task->display_flags,DISPLAYf_SHOW);
@ -186,10 +186,10 @@ U8 *index=NULL,CDoc *doc=NULL)
while (temph) {
if (!(temph->type & (HTF_IMPORT | HTF_PRIVATE)) &&
(temph->type & HTF_PUBLIC || !publics)) {
if (!index)
if (!idx)
cnt++;
else if (temph->type&HTG_SRC_SYM && (cur_index=temph->index))
cnt+=HelpIndexCnt(cur_index,index);
else if (temph->type&HTG_SRC_SYM && (cur_idx=temph->idx))
cnt+=HelpIndexCnt(cur_idx,idx);
}
temph=temph->next;
}
@ -210,12 +210,12 @@ U8 *index=NULL,CDoc *doc=NULL)
while (temph) {
if (!(temph->type & (HTF_IMPORT | HTF_PRIVATE)) &&
(temph->type & HTF_PUBLIC || !publics))
if (!index)
if (!idx)
lst[j++].h=temph;
else if (temph->type&HTG_SRC_SYM && (cur_index=temph->index) &&
(k=HelpIndexCnt(cur_index,index)))
else if (temph->type&HTG_SRC_SYM && (cur_idx=temph->idx) &&
(k=HelpIndexCnt(cur_idx,idx)))
while (k--) {
lst[j].index=HelpIndexStr(&cur_index,index);
lst[j].idx=HelpIndexStr(&cur_idx,idx);
lst[j++].h=temph;
}
temph=temph->next;
@ -229,30 +229,30 @@ U8 *index=NULL,CDoc *doc=NULL)
if (map)
QSort(lst,cnt,sizeof(CWho),&HashEntriesCompare2);
else if (index)
else if (idx)
QSort(lst,cnt,sizeof(CWho),&HashEntriesCompare3);
else
QSort(lst,cnt,sizeof(CWho),&HashEntriesCompare);
if (index) {
if (idx) {
progress1_max=cnt;
progress1=0;
}
for (i=0;i<cnt;i++) {
comment=NULL;
ptr=lst[i].h;
if (index)
if (cur_index=lst[i].index) {
if (StrCmp(cur_index,last_index)) {
Free(last_index);
last_index=StrNew(cur_index);
if (idx)
if (cur_idx=lst[i].idx) {
if (StrCmp(cur_idx,last_idx)) {
Free(last_idx);
last_idx=StrNew(cur_idx);
if (i)
DocPrint(doc,"\n\n");
DocPrint(doc,"$$WW,0$$$$PURPLE$$$$TX+CX,\"%Q\"$$$$FG$$\n",cur_index);
DocPrint(doc,"$$WW,0$$$$PURPLE$$$$TX+CX,\"%Q\"$$$$FG$$\n",cur_idx);
}
}
if (index && ptr->type & HTT_HELP_FILE) {
if (idx && ptr->type & HTT_HELP_FILE) {
DocPrint(doc,"$$WW,1$$");
DocType(doc,ptr->str);
DocPrint(doc,"$$WW,0$$");
@ -260,12 +260,12 @@ U8 *index=NULL,CDoc *doc=NULL)
if (ptr->type&HTG_SRC_SYM && ptr(CHashSrcSym *)->src_link) {
DocPrint(doc,"$$LK,\"%-20s\",A=\"%s\"$$",
ptr->str,ptr(CHashSrcSym *)->src_link);
if (index)
if (idx)
comment=HelpComment(task,ptr,ptr(CHashSrcSym *)->src_link);
} else
DocPrint(doc,"%-20s",ptr->str);
if (!index) {
if (!idx) {
if (ptr->type & HTT_DEFINE_STR) {
st=MStrUtil(ptr(CHashDefineStr *)->data,SUF_SAFE_DOLLAR);
j=ptr(CHashDefineStr *)->cnt;
@ -305,12 +305,12 @@ U8 *index=NULL,CDoc *doc=NULL)
}
DocPrint(doc,"\n");
}
Free(lst[i].index);
if (index)
Free(lst[i].idx);
if (idx)
progress1++;
}
Free(lst);
if (index)
if (idx)
progress1=progress1_max=0;
wh_done:
@ -320,7 +320,7 @@ wh_done:
else
DocRecalc(doc);
}
Free(last_index);
Free(last_idx);
Kill(task);
}
@ -357,15 +357,15 @@ public I64 HashDepthRep(CHashTable *table=NULL)
#help_index "Help System"
#help_file "::/Doc/HelpSystem"
public U0 DocHelpIndex(CDoc *doc,U8 *index)
{//Put to doc report for given help index.
Who("+p",,index,doc);
public U0 DocHelpIndex(CDoc *doc,U8 *idx)
{//Put to doc report for given help idx.
Who("+p",,idx,doc);
}
public U0 PopUpHelpIndex(U8 *index,CTask *parent=NULL)
{//PopUp win report for given help index.
public U0 PopUpHelpIndex(U8 *idx,CTask *parent=NULL)
{//PopUp win report for given help idx.
U8 *buf;
buf=MStrPrint("DocHelpIndex(DocPut,\"%s\");View;",index);
buf=MStrPrint("DocHelpIndex(DocPut,\"%s\");View;",idx);
PopUp(buf,parent);
Free(buf);
}

41
Adam/AMath.CPP

@ -18,12 +18,12 @@ public U0 P2R(F64 *_x=NULL,F64 *_y=NULL,F64 mag,F64 arg)
public F64 Wrap(F64 é,F64 base=-ã)
{//Returns angle in range [base,base+2*ã)
F64 result=é%(2*ã);
if (result>=base+2*ã)
result-=2*ã;
else if (result<base)
result+=2*ã;
return result;
F64 res=é%(2*ã);
if (res>=base+2*ã)
res-=2*ã;
else if (res<base)
res+=2*ã;
return res;
}
public I64 DistSqrI64(I64 x1,I64 y1,I64 x2,I64 y2)
@ -65,29 +65,29 @@ public F64 Cosh(F64 x)
}
#help_index "Math/Complex;Data Types/Complex"
public Complex *CAdd(Complex *n1,Complex *n2,Complex *sum)
{//n1 + n2 -->sum
public Complex *CAdd(Complex *sum,Complex *n1,Complex *n2)
{//sum=n1+n2
sum->x=n1->x+n2->x;
sum->y=n1->y+n2->y;
return sum;
}
public Complex *CSub(Complex *n1,Complex *n2,Complex *diff)
{//n1 - n2 -->diff
public Complex *CSub(Complex *diff,Complex *n1,Complex *n2)
{//diff=n1-n2
diff->x=n1->x-n2->x;
diff->y=n1->y-n2->y;
return diff;
}
public Complex *CMul(Complex *n1,Complex *n2,Complex *prod)
{//n1 * n2 -->prod
public Complex *CMul(Complex *prod,Complex *n1,Complex *n2)
{//prod=n1*n2
prod->x=n1->x*n2->x-n1->y*n2->y;
prod->y=n1->x*n2->y+n1->y*n2->x;
return prod;
}
public Complex *CDiv(Complex *n1,Complex *n2,Complex *quot)
{//n1 / n2 -->quot
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);
@ -99,7 +99,7 @@ public Complex *CDiv(Complex *n1,Complex *n2,Complex *quot)
}
public Complex *CScale(Complex *dst,F64 s)
{//dst *= s
{//dst*=s
dst->x*=s;
dst->y*=s;
return dst;
@ -113,22 +113,21 @@ public Complex *CCopy(Complex *dst,Complex *src)
}
public Complex *CEqu(Complex *dst,F64 x,F64 y)
{//dst=x,y
{//dst=(x,y)
dst->x=x;
dst->y=y;
return dst;
}
public Complex *CPoly(Complex *dst,Complex *x,Complex *zeros,I64 n)
{//Eval complex polynomial.
public Complex *CPoly(Complex *dst,I64 n,Complex *zeros,Complex *x)
{//Eval complex polynomial
I64 i;
Complex n1,n2;
if (n>0) {
CSub(x,&zeros[0],dst);
CSub(dst,x,&zeros[0]);
for (i=1;i<n;i++) {
CCopy(&n1,dst);
CSub(x,&zeros[i],&n2);
CMul(&n1,&n2,dst);
CMul(dst,&n1,CSub(&n2,x,&zeros[i]));
}
} else
CEqu(dst,1.0,0.0);

12
Adam/AMathODE.CPP

@ -190,7 +190,7 @@ public CSpring *SpringFind(CMathODE *ode,F64 x,F64 y,F64 z=0)
}
public U0 MassOrSpringFind(
CMathODE *ode,CMass **result_mass,CSpring **result_spring,
CMathODE *ode,CMass **res_mass,CSpring **res_spring,
F64 x,F64 y,F64 z=0)
{//Find spring or mass nearest x,y,z.
CMass *tempm,*best_mass=NULL;
@ -219,8 +219,8 @@ public U0 MassOrSpringFind(
}
temps=temps->next;
}
if (result_mass) *result_mass =best_mass;
if (result_spring) *result_spring=best_spring;
if (res_mass) *res_mass =best_mass;
if (res_spring) *res_spring=best_spring;
}
public CMass *MassFindNum(CMathODE *ode,I64 num)
@ -263,7 +263,7 @@ U0 ODECalcSprings(CMathODE *ode)
} else {
e1=temps->end1;
e2=temps->end2;
d=D3Norm(D3Sub(&e2->state->x,&e1->state->x,&p));
d=D3Norm(D3Sub(&p,&e2->state->x,&e1->state->x));
temps->displacement=d-temps->rest_len;
temps->f=temps->displacement*temps->const;
if (temps->f>0 && temps->flags&SSF_NO_TENSION)
@ -297,7 +297,7 @@ U0 ODECalcDrag(CMathODE *ode)
if (ode->drag_v3)
d+=dd*ode->drag_v3;
D3SubEqu(&tempm->DstateDt->DxDt,
D3Mul(d*tempm->drag_profile_factor,&tempm->state->DxDt,&p));
D3Mul(&p,d*tempm->drag_profile_factor,&tempm->state->DxDt));
}
tempm=tempm->next;
}
@ -501,7 +501,7 @@ F64 ode_alloced_factor=0.75;
U0 ODEsUpdate(CTask *task)
{/* This routine is called by the $LK,"window mgr",A="FF:::/Adam/Gr/GrScreen.CPP,ODEsUpdate"$ on a continuous
basis to allow real-time simulation. It is intended
to provide results good enough for games. It uses a runge-kutta
to provide ress good enough for games. It uses a runge-kutta
integrator which is a better algorithm than doing it with Euler.
It is adaptive step-sized, so it slows down when an important

22
Adam/AMem.CPP

@ -1,31 +1,31 @@
#help_index "Memory/Task"
public I64 TaskMemAlloced(CTask *task=NULL,Bool override_validate=FALSE)
{//Count of bytes alloced to a task, used+unused.
I64 result;
I64 res;
if (!task) task=Fs;
if (override_validate || TaskValidate(task)) {
result=task->code_heap->alloced_u8s;
res=task->code_heap->alloced_u8s;
if (task->code_heap!=task->data_heap)
result+=task->data_heap->alloced_u8s;
return result;
res+=task->data_heap->alloced_u8s;
return res;
} else
return 0;
}
public I64 TaskMemUsed(CTask *task=NULL,Bool override_validate=FALSE)
{//Count of bytes alloced to a task and in use.
I64 result;
I64 res;
if (!task) task=Fs;
if (override_validate || TaskValidate(task)) {
result=task->code_heap->used_u8s;
res=task->code_heap->used_u8s;
if (task->data_heap!=task->code_heap)
result+=task->data_heap->used_u8s;
return result;
res+=task->data_heap->used_u8s;
return res;
} else
return 0;
}
#help_index "Memory/Task;Debugging/Heap"
#help_index "Memory/Task;Debugging/Heap;Memory/Debugging"
public Bool HeapRep(CTask *task)
{//Report status of task's heap.
I64 i,cnt;
@ -85,7 +85,7 @@ public Bool HeapRep(CTask *task)
'\n';
}
#help_index "Memory/HeapCtrl;Debugging/Heap"
#help_index "Memory/HeapCtrl;Debugging/Heap;Memory/Debugging"
public Bool IsInHeapCtrl(U8 *a,CHeapCtrl *hc,Bool lock=TRUE)
{//Check addr if in HeapCtrl.
CMemBlk *m;
@ -156,7 +156,7 @@ public Bool HeapCtrlWalk(CHeapCtrl *hc)
return FALSE;
}
#help_index "Memory/Task;Debugging/Heap"
#help_index "Memory/Task;Debugging/Heap;Memory/Debugging"
public Bool IsInHeap(U8 *a,CTask *task=NULL,Bool lock=TRUE)
{//Check addr if in task's heaps.
if (!task) task=Fs;

20
Adam/ARegistry.CPP

@ -18,7 +18,7 @@ Bool RegCache()
public Bool RegSetDftEntry(U8 *path,U8 *val,Bool is_adam_entry=FALSE)
{//Add code doc tree branch to registry.
Bool result,unlock_doc;
Bool res,unlock_doc;
RegCache;
unlock_doc=DocLock(sys_registry_doc);
if (!DocTreeFind(sys_registry_doc,path)) {
@ -32,12 +32,12 @@ public Bool RegSetDftEntry(U8 *path,U8 *val,Bool is_adam_entry=FALSE)
}
if (DrvIsWritable(':'))
DocWrite(sys_registry_doc);
result=FALSE;
res=FALSE;
} else
result=TRUE;
res=TRUE;
if (unlock_doc)
DocUnlock(sys_registry_doc);
return result;
return res;
}
public I64 RegExeBranch(U8 *path)
@ -48,12 +48,12 @@ public I64 RegExeBranch(U8 *path)
public Bool RegWriteBranch(U8 *path,U8 *fmt,...)
{//Rewrite doc tree branch in registry.
Bool result,unlock_doc;
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 (result=DocTreeFind(sys_registry_doc,path,
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);
@ -63,12 +63,12 @@ public Bool RegWriteBranch(U8 *path,U8 *fmt,...)
if (unlock_doc)
DocUnlock(sys_registry_doc);
Free(buf);
return result;
return res;
}
public Bool OneTimePopUp(U8 *_flags,I64 flag_num,U8 *msg)
{//See $LK,"::/Apps/X-Caliber/X-Caliber.CPP"$.
Bool result=FALSE;
Bool res=FALSE;
CDoc *doc=DocNew;
CDocEntry *doc_e;
if (!Bt(_flags,flag_num)) {
@ -77,11 +77,11 @@ public Bool OneTimePopUp(U8 *_flags,I64 flag_num,U8 *msg)
DocPrint(doc,"$$CM+CX,0,4$$$$BT,\"OKAY\",LE=1$$\n");
if (PopUpMenu(doc)==1 && doc_e->de_flags&DOCEF_CHECKED_COLLAPSED) {
LBts(_flags,flag_num);
result=TRUE;
res=TRUE;
}
DocDel(doc);
}
return result;
return res;
}
U0 RegOneTimePopUp(I64 flag_num,U8 *msg)

14
Adam/AutoComplete/ACDictGen.CPP

@ -56,7 +56,7 @@ $$ --> $$$$
I64 ACDNextCmd(U8 **_ptr)
{
U8 *ptr=*_ptr,*ptr2;
I64 ch,result=-1;
I64 ch,res=-1;
do {
do {
if (!(ch=*ptr++)) goto ncmd_done;
@ -67,22 +67,22 @@ I64 ACDNextCmd(U8 **_ptr)
if (!(ch=*ptr2++)) goto ncmd_done;
} while (ch!='>');
*--ptr2=0;
result=LstMatch(ptr,"h1\0/h1\0def\0/def\0hw\0/hw\0tt\0/tt\0"
res=LstMatch(ptr,"h1\0/h1\0def\0/def\0hw\0/hw\0tt\0/tt\0"
"ety\0@fld\0@cd\0@blockquote\0@wordforms\0@note\0@altname\0@chform\0"
"@cref\0@syn\0/ety\0@/fld\0@/cd\0@/blockquote\0@/wordforms\0@/note\0"
"@/altname\0@/chform\0@/cref\0@/syn\0");
*ptr2++='>';
ptr=ptr2;
} while (result<0);
} while (res<0);
ncmd_done:
*_ptr=ptr;
return result;
return res;
}
U8 *ACDNextEntry(U8 **_ptr)
{
U8 *result,*ignore,*ptr=*_ptr,buf[ACD_BLK_SIZE],*out_ptr=buf;
U8 *res,*ignore,*ptr=*_ptr,buf[ACD_BLK_SIZE],*out_ptr=buf;
I64 ch,l;
while (TRUE) {
while (TRUE) {
@ -111,9 +111,9 @@ U8 *ACDNextEntry(U8 **_ptr)
}
nentry_done:
*out_ptr++=0;
result=StrNew(buf);
res=StrNew(buf);
*_ptr=ptr-1;
return result;
return res;
}
I64 ACDCompareWords(U8 *e1,U8 *e2)

16
Adam/AutoComplete/ACFill.CPP

@ -3,7 +3,7 @@ public U8 *ACDDefGet(U8 *st,I64 def_num=1)
{//MAlloc str holding single dict definition of word.
CFile *f;
CHashGeneric *temph;
U8 *result=NULL,*buf,*in_ptr,
U8 *res=NULL,*buf,*in_ptr,
*st2=MStrUtil(st,SUF_TO_UPPER);
temph=HashFind(st2,ac.hash_table,HTT_DICT_WORD);
Free(st2);
@ -31,7 +31,7 @@ public U8 *ACDDefGet(U8 *st,I64 def_num=1)
in_ptr++;
}
if (*in_ptr++==ACD_DEF_CHAR) {
result=StrNew(in_ptr);
res=StrNew(in_ptr);
break;
}
}
@ -40,14 +40,14 @@ public U8 *ACDDefGet(U8 *st,I64 def_num=1)
Free(buf);
}
}
return result;
return res;
}
public U8 *ACDDefsGet(U8 *st)
{//MAlloc str with all dict definitions of word.
CFile *f;
CHashGeneric *temph;
U8 *result=NULL,*buf,*in_ptr,*in_ptr2,
U8 *res=NULL,*buf,*in_ptr,*in_ptr2,
*st2=MStrUtil(st,SUF_TO_UPPER);
temph=HashFind(st2,ac.hash_table,HTT_DICT_WORD);
Free(st2);
@ -70,9 +70,9 @@ public U8 *ACDDefsGet(U8 *st)
&& in_ptr2<buf+ACD_BLK_SIZE*2) {
in_ptr2++;
}
result=MAlloc(in_ptr2+1-in_ptr);
MemCpy(result,in_ptr,in_ptr2-in_ptr);
result[in_ptr2-in_ptr]=ACD_END_CHAR;
res=MAlloc(in_ptr2+1-in_ptr);
MemCpy(res,in_ptr,in_ptr2-in_ptr);
res[in_ptr2-in_ptr]=ACD_END_CHAR;
break;
}
}
@ -80,7 +80,7 @@ public U8 *ACDDefsGet(U8 *st)
Free(buf);
}
}
return result;
return res;
}
/*Fmt of word lst entry:

4
Adam/AutoFile.CPP

@ -133,7 +133,7 @@ public U0 AFSetIP(I64 mS=7,I64 x=MAX_I64,I64 y=MAX_I64,I64 z=MAX_I64,
public Bool AFView()
{//Let user type until <ESC> or <SHIFT-ESC>.
Bool result=View;
Bool res=View;
DocBottom;
return result;
return res;
}

28
Adam/Ctrls/CtrlsButton.CPP

@ -43,7 +43,7 @@ public CCtrl *CtrlButtonNew(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.CPP"$.
CCtrl *result;
CCtrl *res;
CCtrlButtonState *s;
I64 i,j,l;
U8 *st;
@ -57,7 +57,7 @@ public CCtrl *CtrlButtonNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
width=BUTTON_BORDER*4+l*FONT_WIDTH;
}