TempleOSCDV4.05.ISO
This commit is contained in:
1 parent
d1856315e0
commit
6fe38d2d9d
118 files changed
+4559
-5069
No files matched your search
@@ -106,6 +106,13 @@ Bool ClassRep2(CDoc *doc,U8 *_d,U8 *class_name=lastclass,
|
||||
} else
|
||||
DocPrint(doc,"%08X ",*ptr(U32 *)++);
|
||||
break;
|
||||
case RT_U64:
|
||||
if (dynamic) {
|
||||
doc_e=DocPrint(doc,"$$DA-TRM+RD+UD,RT=U64,A=\"%%08X\"$$ ");
|
||||
doc_e->data=ptr(U64 *)++;
|
||||
} else
|
||||
DocPrint(doc,"%08X ",*ptr(U64 *)++);
|
||||
break;
|
||||
case RT_F64:
|
||||
if (dynamic) {
|
||||
doc_e=DocPrint(doc,"$$DA-TRM+RD+UD,RT=F64,A=\"%%16g\"$$ ");
|
||||
|
||||
+2
-2
@@ -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.CPP,DD_TEMPLEOS_LOC"$.
|
||||
$TR-C,"LineRep"$
|
||||
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,708");
|
||||
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","80,702");
|
||||
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,248");
|
||||
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","79,899");
|
||||
$ID,-4$
|
||||
DefinePrint("DD_KERNEL","%08X",bfh);
|
||||
bfh(I64)+=bfh->file_size-1;
|
||||
|
||||
@@ -385,7 +385,7 @@ I64 EdFindReplace(CDoc *doc)
|
||||
Bool found,unlock;
|
||||
I64 cmd,i,j,plen,rlen,dlen,result=-1,sf_flags;
|
||||
U8 *src,*dst,*dst2;
|
||||
CDocEntry *doc_ce=doc->cur_entry,*doc_e;
|
||||
CDocEntry *doc_ce,*doc_e,*doc_marker=NULL;
|
||||
if (doc->find_replace->pmt)
|
||||
cmd=RSAC_REPLACE;
|
||||
else
|
||||
@@ -448,10 +448,8 @@ I64 EdFindReplace(CDoc *doc)
|
||||
goto fr_unlock_done;
|
||||
}
|
||||
|
||||
if (doc->find_replace->local_var) {
|
||||
if (doc->find_replace->local_var)
|
||||
EdSelectFun(doc);
|
||||
doc_ce=doc->cur_entry;
|
||||
}
|
||||
|
||||
if (!doc->find_replace->replace && !doc->find_replace->local_var) {
|
||||
EdFindNext(doc);
|
||||
@@ -462,14 +460,15 @@ I64 EdFindReplace(CDoc *doc)
|
||||
goto fr_unlock_done;
|
||||
rlen=StrLen(doc->find_replace->replace_text);
|
||||
if (doc->root.next!=doc) {
|
||||
doc_e=doc_ce;
|
||||
doc_e=doc_marker=DocSplitTag(doc,doc->cur_entry,doc->cur_col,
|
||||
doc->cur_entry->x+doc->cur_col,doc->cur_entry->y,DOCT_MARKER);
|
||||
do {
|
||||
if (doc_e==doc) {
|
||||
if (doc->find_replace->scan_fwd)
|
||||
doc_e=doc_e->next;
|
||||
else
|
||||
doc_e=doc_e->last;
|
||||
if (doc_e==doc_ce)
|
||||
if (doc_e==doc_marker)
|
||||
break;
|
||||
}
|
||||
if (doc_e->type_u8==DOCT_TEXT &&
|
||||
@@ -527,9 +526,11 @@ I64 EdFindReplace(CDoc *doc)
|
||||
doc_e=doc_e->next;
|
||||
else
|
||||
doc_e=doc_e->last;
|
||||
} while (doc_e!=doc_ce);
|
||||
} while (doc_e!=doc_marker);
|
||||
}
|
||||
fr_unlock_done:
|
||||
if (doc_marker)
|
||||
DocEntryDel(doc,doc_marker);
|
||||
DocRemSoftNewLines(doc,NULL);
|
||||
DocRecalc(doc);
|
||||
DocCenter(doc);
|
||||
|
||||
+23
-3
@@ -213,7 +213,7 @@ public Bool DocForm(U8 *_d,U8 *class_name=lastclass,
|
||||
CMemberLst *ml;
|
||||
CDocEntry *doc_e;
|
||||
U8 *fmtstr;
|
||||
CHashClass *tempc;
|
||||
CHashClass *tempc,*tempc2;
|
||||
CDoc *doc;
|
||||
Bool result=FALSE;
|
||||
I64 old_border_src=Fs->border_src,has_action;
|
||||
@@ -227,8 +227,28 @@ public Bool DocForm(U8 *_d,U8 *class_name=lastclass,
|
||||
doc->flags|=DOCF_MIN_SIZE;
|
||||
ml=tempc->member_lst_and_root;
|
||||
while (ml) {
|
||||
if (fmtstr=MemberMetaData("fmtstr",ml)) {
|
||||
doc_e=DocPrint(doc,"%s",fmtstr);
|
||||
if ((fmtstr=MemberMetaData("fmtstr",ml)) &&
|
||||
(doc_e=DocPrint(doc,"%s",fmtstr))) {
|
||||
tempc2=ml->member_class;
|
||||
if ((doc_e->type_u8==DOCT_DATA || doc_e->type_u8==DOCT_LST ||
|
||||
doc_e->type_u8==DOCT_CHECK_BOX) && !tempc2->ptr_stars_cnt) {
|
||||
tempc2=OptClassFwd(tempc2);
|
||||
tempc2-=tempc2->ptr_stars_cnt;
|
||||
if (tempc2->type & HTT_INTERNAL_TYPE) {
|
||||
if (ml->dim.next) { //Array
|
||||
if (tempc2->raw_type==RT_U8 &&
|
||||
LBtr(&doc_e->de_flags,&DOCEf_DFT_LEN)) {
|
||||
doc_e->len=ml->dim.total_cnt;
|
||||
if (doc_e->de_flags&DOCEF_HAS_TERMINATOR)
|
||||
doc_e->len--;
|
||||
Free(doc_e->tag); //See $LK,"DataTagWidth",A="FA:::/Adam/DolDoc/DocPlain.CPP,DataTagWidth"$
|
||||
doc_e->tag=MAlloc(doc_e->len+doc_e->min_col+2,
|
||||
doc->mem_task); //+2 because "_\0"
|
||||
}
|
||||
} else if (LBtr(&doc_e->de_flags,DOCEf_DFT_RAW_TYPE))
|
||||
doc_e->raw_type=tempc2->raw_type;
|
||||
}
|
||||
}
|
||||
if (doc_e->de_flags&DOCEF_REMALLOC_DATA) {
|
||||
doc_e->user_data=_d+ml->offset;
|
||||
doc_e->data=*doc_e->user_data(U8 **);
|
||||
|
||||
+10
-10
@@ -53,16 +53,16 @@ public I64 PopUpColorLighting(U8 *header=NULL)
|
||||
|
||||
class CTransformForm
|
||||
{
|
||||
F64 x_scale fmtstr "$$DA-TRM,RT=F64,A=\"X Scale :%12.6f\"$$\n";
|
||||
F64 y_scale fmtstr "$$DA-TRM,RT=F64,A=\"Y Scale :%12.6f\"$$\n";
|
||||
F64 z_scale fmtstr "$$DA-TRM,RT=F64,A=\"Z Scale :%12.6f\"$$\n";
|
||||
F64 é_z fmtstr
|
||||
"\nAngles are in degrees\n$$DA-TRM,RT=F64,A=\"Z-Axis :%12.6f\"$$\n";
|
||||
F64 é_y fmtstr "$$DA-TRM,RT=F64,A=\"Y-Axis :%12.6f\"$$\n";
|
||||
F64 é_x fmtstr "$$DA-TRM,RT=F64,A=\"X-Axis :%12.6f\"$$\n";
|
||||
F64 x_offset fmtstr "\n$$DA-TRM,RT=F64,A=\"X Offset:%12.6f\"$$\n";
|
||||
F64 y_offset fmtstr "$$DA-TRM,RT=F64,A=\"Y Offset:%12.6f\"$$\n";
|
||||
F64 z_offset fmtstr "$$DA-TRM,RT=F64,A=\"Z Offset:%12.6f\"$$\n";
|
||||
F64 x_scale fmtstr "$$DA-TRM,A=\"X Scale :%12.6f\"$$\n";
|
||||
F64 y_scale fmtstr "$$DA-TRM,A=\"Y Scale :%12.6f\"$$\n";
|
||||
F64 z_scale fmtstr "$$DA-TRM,A=\"Z Scale :%12.6f\"$$\n";
|
||||
F64 é_z fmtstr "\nAngles are in degrees\n"
|
||||
"$$DA-TRM,A=\"Z-Axis :%12.6f\"$$\n";
|
||||
F64 é_y fmtstr "$$DA-TRM,A=\"Y-Axis :%12.6f\"$$\n";
|
||||
F64 é_x fmtstr "$$DA-TRM,A=\"X-Axis :%12.6f\"$$\n";
|
||||
F64 x_offset fmtstr "\n$$DA-TRM,A=\"X Offset:%12.6f\"$$\n";
|
||||
F64 y_offset fmtstr "$$DA-TRM,A=\"Y Offset:%12.6f\"$$\n";
|
||||
F64 z_offset fmtstr "$$DA-TRM,A=\"Z Offset:%12.6f\"$$\n";
|
||||
};
|
||||
|
||||
Bool PopUpTransform(I64 *r)
|
||||
|
||||
@@ -7,7 +7,7 @@ U0 DocInit()
|
||||
CHashGeneric *temph;
|
||||
|
||||
DefineLstLoad("ST_DOC_CMDS",
|
||||
"TX\0CR\0SR\0CU\0TB\0CL\0PB\0PL\0LM\0RM\0HD\0FO\0ID\0FG\0"
|
||||
"TX\0CR\0SR\0CU\0MK\0TB\0CL\0PB\0PL\0LM\0RM\0HD\0FO\0ID\0FG\0"
|
||||
"BG\0FD\0BD\0PT\0WW\0UL\0IV\0BK\0SX\0SY\0CM\0AN\0LK\0BT\0"
|
||||
"DA\0CB\0LS\0MA\0MU\0HX\0TR\0SP\0IB\0IS\0SO\0HL\0HC\0ER\0");
|
||||
DefineLstLoad("ST_DOC_FLAGS",
|
||||
@@ -15,7 +15,7 @@ U0 DocInit()
|
||||
"LC\0LA\0RC\0RA\0LX\0CX\0RX\0TY\0CY\0BY\0"
|
||||
"HL\0WW\0BK\0IV\0SEL\0UL\0"
|
||||
"TC\0PRY\0MRX\0WR\0L\0X\0Q\0FST\0B\0S\0BD\0C\0CA\0RD\0UD\0P\0M\0"
|
||||
"TRM\0Z\0H\0TR\0LS\0SK\0PU\0SIF\0FS\0NC\0DD\0");
|
||||
"TRM\0Z\0H\0TR\0LS\0SK\0PU\0SIF\0FS\0NC\0DD\0DL\0DRT\0");
|
||||
DefineLstLoad("ST_LINK_TYPES",
|
||||
"FI\0FA\0FF\0FL\0MN\0PI\0PF\0PL\0BF\0DN\0HI\0AD\0AI\0AA\0AF\0AL\0");
|
||||
|
||||
@@ -26,9 +26,9 @@ U0 DocInit()
|
||||
|
||||
MemSet(doldoc.dft_de_flags, 0,sizeof(doldoc.dft_de_flags));
|
||||
MemSet(doldoc.dft_type_flags, 0,sizeof(doldoc.dft_type_flags));
|
||||
cc=CmpCtrlNew("TX+T;DA+P+TRM+T;CM+LE+RE;AN+T;LK+L+UL+T;MA+X+UL+T;MU+X+UL+T;"
|
||||
"BT+X+B+T;CB+CA+P+T;LS+LS+P+T;HX+P+Z;TR+TR+C+CA+UL+T;SP+T;IB+T;IS+T;"
|
||||
"SO+T;HC+T;",CCF_DONT_FREE_BUF);
|
||||
cc=CmpCtrlNew("TX+T;DA+P+TRM+T+DL+DRT;CM+LE+RE;AN+T;LK+L+UL+T;MA+X+UL+T;"
|
||||
"MU+X+UL+T;BT+X+B+T;CB+CA+P+T+DRT;LS+LS+P+T+DRT;HX+P+Z;TR+TR+C+CA+UL+T;"
|
||||
"SP+T;IB+T;IS+T;SO+T;HC+T;",CCF_DONT_FREE_BUF);
|
||||
cc->htc.hash_table_lst=NULL;
|
||||
Lex(cc);
|
||||
while (cc->token==TK_IDENT) {
|
||||
|
||||
@@ -338,9 +338,10 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
|
||||
}
|
||||
break;
|
||||
case DOCEf_LEN:
|
||||
if (cc->token)
|
||||
if (cc->token) {
|
||||
doc_e->len=LexExpression(cc);
|
||||
else
|
||||
doc_e->de_flags&=~DOCEF_DFT_LEN;
|
||||
} else
|
||||
goto pd_err;
|
||||
break;
|
||||
case DOCEf_AUX_STR:
|
||||
@@ -349,7 +350,7 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
|
||||
doc_e->aux_str=StrNew(st2,doc->mem_task);
|
||||
Free(st2);
|
||||
//$AN,"Anchor",A="DataTagWidth"$
|
||||
if (i==DOCT_DATA) {
|
||||
if (i==DOCT_DATA) { //See $LK,"DocForm",A="MN:DocForm"$()
|
||||
if (ptr=StrMatch(":",doc_e->aux_str))
|
||||
doc_e->min_col=ptr-doc_e->aux_str+1;
|
||||
doc_e->tag=MAlloc(doc_e->len+doc_e->min_col+2,
|
||||
@@ -430,6 +431,7 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
|
||||
if (j<0)
|
||||
goto pd_err;
|
||||
doc_e->raw_type=j;
|
||||
doc_e->de_flags&=~DOCEF_DFT_RAW_TYPE;
|
||||
Lex(cc);
|
||||
} else
|
||||
goto pd_err;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
CDocEntry *DocPutS(CDoc *doc,U8 *st)
|
||||
{//Don't use this. Use $LK-UL,"DocPrint",A="MN:DocPrint"$().
|
||||
//Does not handle partial Doc entries
|
||||
//Returns last newly created dollar-sign CDocEntry.
|
||||
//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;
|
||||
Bool unlock;
|
||||
@@ -157,6 +157,7 @@ CDocEntry *DocPutS(CDoc *doc,U8 *st)
|
||||
|
||||
public CDocEntry *DocPrint(CDoc *doc=NULL,U8 *fmt,...)
|
||||
{//You must not print partial doc cmds.
|
||||
//Returns last newly created dollar-sign CDocEntry or NULL.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv);
|
||||
CDocEntry *result=DocPutS(doc,buf);
|
||||
Free(buf);
|
||||
|
||||
+19
-13
@@ -129,20 +129,26 @@ U0 DocRecalcXY(CDoc *doc,CDocEntry *doc_e,
|
||||
}
|
||||
|
||||
CDocEntry *DocSplitTag(CDoc *doc,CDocEntry *doc_e,I64 i,I64 x,I64 y,I64 type_u8)
|
||||
{//Split tag at i, insert DOCT_SOFT_NEW_LINE or DOCT_CURSOR
|
||||
{//Split tag at i, insert DOCT_SOFT_NEW_LINE, DOCT_MARKER or DOCT_CURSOR
|
||||
U8 *ptr;
|
||||
CDocEntry *doc_e2=MAllocIdentical(doc_e,doc->mem_task);
|
||||
doc_e2->tag=StrNew(doc_e->tag+i,doc->mem_task);
|
||||
doc_e2->de_flags=doc_e->de_flags&~DOCEG_HAS_ALLOC|DOCEF_TAG;
|
||||
QueIns(doc_e2,doc_e);
|
||||
if (doc->cur_entry==doc_e && doc->cur_col>=i) {
|
||||
doc->cur_entry=doc_e2;
|
||||
doc->cur_col=doc->cur_col-i;
|
||||
}
|
||||
doc_e->tag[i]=0;
|
||||
ptr=StrNew(doc_e->tag,doc->mem_task);
|
||||
Free(doc_e->tag);
|
||||
doc_e->tag=ptr;
|
||||
CDocEntry *doc_e2;
|
||||
if (doc_e->type_u8==DOCT_TEXT && i) {
|
||||
if (i<StrLen(doc_e->tag)) {
|
||||
doc_e2=MAllocIdentical(doc_e,doc->mem_task);
|
||||
doc_e2->tag=StrNew(doc_e->tag+i,doc->mem_task);
|
||||
doc_e2->de_flags=doc_e->de_flags&~DOCEG_HAS_ALLOC|DOCEF_TAG;
|
||||
QueIns(doc_e2,doc_e);
|
||||
if (doc->cur_entry==doc_e && doc->cur_col>=i) {
|
||||
doc->cur_entry=doc_e2;
|
||||
doc->cur_col=doc->cur_col-i;
|
||||
}
|
||||
doc_e->tag[i]=0;
|
||||
ptr=StrNew(doc_e->tag,doc->mem_task);
|
||||
Free(doc_e->tag);
|
||||
doc_e->tag=ptr;
|
||||
}
|
||||
} else
|
||||
doc_e=doc_e->last;
|
||||
doc_e2=DocEntryNewBase(doc,type_u8|doc_e->type & 0xFFFFFF00,
|
||||
doc_e->de_flags&~DOCEG_HAS_ARG,x,y,doc_e->page_line_num);
|
||||
MemCpy(&doc_e2->settings,&doc_e->settings,sizeof(CDocSettings));
|
||||
|
||||
@@ -31,12 +31,12 @@ I64 PopUpLinkType(Bool include_anchor)
|
||||
|
||||
class CEdFileLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,LEN=511,A=\"File :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,A=\"File :%s\"$$\n";
|
||||
I64 book;
|
||||
U8 aux[512];
|
||||
I64 num;
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -44,12 +44,12 @@ class CEdFileLink
|
||||
|
||||
class CEdFileAnchorLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,LEN=511,A=\"File :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,A=\"File :%s\"$$\n";
|
||||
I64 book;
|
||||
U8 aux[512] fmtstr "$$DA-P,LEN=511,A=\"Anchor Label :%s\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,A=\"Anchor Label :%s\"$$\n";
|
||||
I64 num;
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -57,12 +57,12 @@ class CEdFileAnchorLink
|
||||
|
||||
class CEdFileFindLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,LEN=511,A=\"File :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,A=\"File :%s\"$$\n";
|
||||
I64 book;
|
||||
U8 aux[512] fmtstr "$$DA-P,LEN=511,A=\"Str :%s\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,A=\"Str :%s\"$$\n";
|
||||
I64 num fmtstr "$$DA-TRM,A=\"Occurrence Num:%04d\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -70,12 +70,12 @@ class CEdFileFindLink
|
||||
|
||||
class CEdFileLineLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,LEN=511,A=\"File :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,A=\"File :%s\"$$\n";
|
||||
I64 book;
|
||||
U8 aux[512];
|
||||
I64 num fmtstr "$$DA-TRM,A=\"Line Num :%04d\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -83,12 +83,12 @@ class CEdFileLineLink
|
||||
|
||||
class CEdManPageLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512];
|
||||
I64 book;
|
||||
U8 aux[512] fmtstr "$$DA-P,LEN=511,A=\"Label :%s\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,A=\"Label :%s\"$$\n";
|
||||
I64 num;
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -96,12 +96,12 @@ class CEdManPageLink
|
||||
|
||||
class CEdAddrLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512];
|
||||
I64 book;
|
||||
U8 aux[512] fmtstr "$$DA-P,LEN=511,A=\"Addr Exp :%s\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,A=\"Addr Exp :%s\"$$\n";
|
||||
I64 num fmtstr "$$DA-TRM,A=\"Bin Size :%04d\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -109,12 +109,12 @@ class CEdAddrLink
|
||||
|
||||
class CEdPlaceAnchor
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512];
|
||||
I64 book;
|
||||
U8 aux[512] fmtstr "$$DA-P,LEN=511,A=\"Anchor Label :%s\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,A=\"Anchor Label :%s\"$$\n";
|
||||
I64 num;
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up,
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide fmtstr "$$CB,\"Hide\"$$\n";
|
||||
@@ -122,13 +122,13 @@ class CEdPlaceAnchor
|
||||
|
||||
class CEdBibleLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512];
|
||||
I64 book fmtstr "$$LS,D=\"ST_BIBLE_BOOKS\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,LEN=511,A=\"Chapter Verse :%s\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,A=\"Chapter Verse :%s\"$$\n";
|
||||
I64 num;
|
||||
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -136,12 +136,12 @@ class CEdBibleLink
|
||||
|
||||
class CEdDefLink
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512];
|
||||
I64 book;
|
||||
U8 aux[512] fmtstr "$$DA-P,LEN=511,A=\"Word :%s\"$$\n";
|
||||
U8 aux[512] fmtstr "$$DA-P,A=\"Word :%s\"$$\n";
|
||||
I64 num fmtstr "$$DA-TRM,A=\"Def Num :%4d\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -149,12 +149,12 @@ class CEdDefLink
|
||||
|
||||
class CEdProject
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,LEN=511,A=\"File :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
file[512] fmtstr "$$DA-P,A=\"File :%s\"$$\n";
|
||||
I64 book;
|
||||
U8 aux[512];
|
||||
I64 num;
|
||||
U8 html_link[512] fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
Bool pop_up fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
quote fmtstr "$$CB,\"Quote\"$$\n",
|
||||
hide;
|
||||
@@ -433,13 +433,13 @@ U0 EdInsColor()
|
||||
|
||||
class CEdPageSetting1
|
||||
{
|
||||
U8 val[512] fmtstr "$$DA-P,LEN=511,A=\"Setting Val:%s\"$$\n";
|
||||
U8 val[512] fmtstr "$$DA-P,A=\"Setting Val:%s\"$$\n";
|
||||
Bool winrel;
|
||||
};
|
||||
|
||||
class CEdPageSetting2
|
||||
{
|
||||
U8 val[512] fmtstr "$$DA-P,LEN=511,A=\"Setting Val:%s\"$$\n";
|
||||
U8 val[512] fmtstr "$$DA-P,A=\"Setting Val:%s\"$$\n";
|
||||
Bool winrel fmtstr "$$CB,\"Win Relative\"$$\n";
|
||||
};
|
||||
|
||||
@@ -507,7 +507,7 @@ I64 PopUpWidgetType()
|
||||
|
||||
class CEdText
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n";
|
||||
Bool left_x fmtstr "$$CB,\"Left X\"$$\n",
|
||||
center_x fmtstr "$$CB,\"Center X\"$$\n",
|
||||
right_x fmtstr "$$CB,\"Right X\"$$\n",
|
||||
@@ -517,16 +517,11 @@ class CEdText
|
||||
underline fmtstr "$$CB,\"Underline\"$$\n",
|
||||
tree fmtstr "$$CB,\"Tree\"$$\n",
|
||||
collapsed fmtstr "$$CB,\"Collapsed\"$$\n";
|
||||
U8 scroll_x [512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Scroll X Length Expression:%s\"$$\n",
|
||||
shift_x [512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"X Offset Expression :%s\"$$\n",
|
||||
shift_y [512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Y Offset Expression :%s\"$$\n",
|
||||
define_str[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Define Str :%s\"$$\n",
|
||||
html_link[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Html Link :%s\"$$\n";
|
||||
U8 scroll_x [512] fmtstr "$$DA-P,A=\"Scroll X Length Expression:%s\"$$\n",
|
||||
shift_x [512] fmtstr "$$DA-P,A=\"X Offset Expression :%s\"$$\n",
|
||||
shift_y [512] fmtstr "$$DA-P,A=\"Y Offset Expression :%s\"$$\n",
|
||||
define_str[512] fmtstr "$$DA-P,A=\"Define Str :%s\"$$\n",
|
||||
html_link[512] fmtstr "$$DA-P,A=\"Html Link :%s\"$$\n";
|
||||
};
|
||||
|
||||
U0 EdInsText()
|
||||
@@ -570,8 +565,8 @@ U0 EdInsText()
|
||||
|
||||
class CEdSong
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
song[512] fmtstr "$$DA-P,LEN=511,A=\"Song :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
song[512] fmtstr "$$DA-P,A=\"Song :%s\"$$\n";
|
||||
};
|
||||
|
||||
U0 EdInsSong()
|
||||
@@ -584,7 +579,7 @@ U0 EdInsSong()
|
||||
|
||||
class CEdHtmlCode
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Html Code:%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Html Code:%s\"$$\n";
|
||||
};
|
||||
|
||||
U0 EdInsHtml()
|
||||
@@ -597,12 +592,9 @@ U0 EdInsHtml()
|
||||
|
||||
class CEdMacroMenu
|
||||
{
|
||||
U8 tag[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
left_macro[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Left Click Macro :%s\"$$\n",
|
||||
left_exp[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Left Click Expression :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
left_macro[512] fmtstr "$$DA-P,A=\"Left Click Macro :%s\"$$\n",
|
||||
left_exp[512] fmtstr "$$DA-P,A=\"Left Click Expression :%s\"$$\n";
|
||||
Bool popup fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
left_is_auto fmtstr "$$CB,\"Left is AutoStr\"$$\n",
|
||||
left_x fmtstr "$$CB,\"Left X \"$$\n",
|
||||
@@ -613,12 +605,9 @@ class CEdMacroMenu
|
||||
invert fmtstr "$$CB,\"Invert\"$$\n",
|
||||
underline fmtstr "$$CB,\"Underline\"$$\n",
|
||||
escape fmtstr "$$CB,\"Escape\"$$\n";
|
||||
U8 scroll_x[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Scroll X Length Expression:%s\"$$\n",
|
||||
shift_x[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"X Offset Expression :%s\"$$\n",
|
||||
shift_y[512]
|
||||
fmtstr "$$DA-P,LEN=511,A=\"Y Offset Expression :%s\"$$\n";
|
||||
U8 scroll_x[512] fmtstr "$$DA-P,A=\"Scroll X Length Expression:%s\"$$\n",
|
||||
shift_x[512] fmtstr "$$DA-P,A=\"X Offset Expression :%s\"$$\n",
|
||||
shift_y[512] fmtstr "$$DA-P,A=\"Y Offset Expression :%s\"$$\n";
|
||||
};
|
||||
|
||||
U0 EdInsMacroMenu(Bool is_macro)
|
||||
@@ -633,10 +622,10 @@ U0 EdInsMacroMenu(Bool is_macro)
|
||||
if (e->left_x ) CatPrint(buf,"+LX");
|
||||
if (e->center_x) CatPrint(buf,"+CX");
|
||||
if (e->right_x ) CatPrint(buf,"+RX");
|
||||
if (e->margin_rel) CatPrint(buf,"+MRX");
|
||||
if (e->margin_rel) CatPrint(buf,"+MRX");
|
||||
if (e->blink) CatPrint(buf,"+BK");
|
||||
if (e->invert) CatPrint(buf,"+IV");
|
||||
if (!e->underline) CatPrint(buf,"-UL");
|
||||
if (!e->underline) CatPrint(buf,"-UL");
|
||||
if (!e->escape) CatPrint(buf,"-X");
|
||||
if (e->left_is_auto) CatPrint(buf,"+LA");
|
||||
if (*e->tag || is_macro) {
|
||||
@@ -673,17 +662,16 @@ U0 EdInsMacroMenu(Bool is_macro)
|
||||
|
||||
class CEdButton
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n";
|
||||
Bool popup fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
left_x fmtstr "$$CB,\"Left X \"$$\n",
|
||||
center_x fmtstr "$$CB,\"Center X \"$$\n",
|
||||
right_x fmtstr "$$CB,\"Right X \"$$\n",
|
||||
margin_rel fmtstr "$$CB,\"Margin Rel X\"$$\n",
|
||||
escape fmtstr "$$CB,\"Escape\"$$\n";
|
||||
U8 left_macro[512] fmtstr "$$DA-P,LEN=511,A=\"Left Click Macro:%s\"$$\n";
|
||||
U8 left_macro[512] fmtstr "$$DA-P,A=\"Left Click Macro:%s\"$$\n";
|
||||
Bool left_is_auto fmtstr "$$CB,\"Left is AutoStr\"$$\n";
|
||||
U8 left_exp[512] fmtstr "$$DA-P,LEN=511,"
|
||||
"A=\"Left Click Expression:%s\"$$\n";
|
||||
U8 left_exp[512] fmtstr "$$DA-P,A=\"Left Click Expression:%s\"$$\n";
|
||||
Bool quote fmtstr "$$CB,\"Quote\"$$\n";
|
||||
};
|
||||
|
||||
@@ -734,8 +722,8 @@ U0 EdInsButton()
|
||||
|
||||
class CEdCursorMovement
|
||||
{
|
||||
U8 left_exp[512] fmtstr "$$DA-P,LEN=511,A=\"X Expression (LE):%s\"$$\n",
|
||||
right_exp[512] fmtstr "$$DA-P,LEN=511,A=\"Y Expression (RE):%s\"$$\n";
|
||||
U8 left_exp[512] fmtstr "$$DA-P,A=\"X Expression (LE):%s\"$$\n",
|
||||
right_exp[512] fmtstr "$$DA-P,A=\"Y Expression (RE):%s\"$$\n";
|
||||
Bool left_x fmtstr "$$CB,\"Left X \"$$\n",
|
||||
center_x fmtstr "$$CB,\"Center X \"$$\n",
|
||||
right_x fmtstr "$$CB,\"Right X \"$$\n",
|
||||
@@ -753,14 +741,14 @@ U0 EdInsCursorMovement()
|
||||
CEdCursorMovement *e=CAlloc(sizeof(CEdCursorMovement));
|
||||
if (DocForm(e,,,,ctrl_L_footer)) {
|
||||
*buf=0;
|
||||
if (e->left_x ) CatPrint(buf,"+LX");
|
||||
if (e->center_x) CatPrint(buf,"+CX");
|
||||
if (e->right_x ) CatPrint(buf,"+RX");
|
||||
if (e->margin_rel) CatPrint(buf,"+MRX");
|
||||
if (e->top_y ) CatPrint(buf,"+TY");
|
||||
if (e->center_y) CatPrint(buf,"+CY");
|
||||
if (e->bottom_y) CatPrint(buf,"+BY");
|
||||
if (e->page_rel) CatPrint(buf,"+PRY");
|
||||
if (e->left_x ) CatPrint(buf,"+LX");
|
||||
if (e->center_x) CatPrint(buf,"+CX");
|
||||
if (e->right_x ) CatPrint(buf,"+RX");
|
||||
if (e->margin_rel) CatPrint(buf,"+MRX");
|
||||
if (e->top_y ) CatPrint(buf,"+TY");
|
||||
if (e->center_y) CatPrint(buf,"+CY");
|
||||
if (e->bottom_y) CatPrint(buf,"+BY");
|
||||
if (e->page_rel) CatPrint(buf,"+PRY");
|
||||
if (!*e->left_exp) CatPrint(buf,"-LE");
|
||||
if (!*e->right_exp) CatPrint(buf,"-RE");
|
||||
if (e->quote)
|
||||
@@ -779,7 +767,7 @@ U0 EdInsCursorMovement()
|
||||
|
||||
class CEdDataNum
|
||||
{
|
||||
U8 fmt_str[512] fmtstr "$$DA-P,LEN=511,A=\"Format Str:%s\"$$\n";
|
||||
U8 fmt_str[512] fmtstr "$$DA-P,A=\"Format Str:%s\"$$\n";
|
||||
I64 len;
|
||||
Bool term fmtstr "$$CB,\"Form Field Terminator\"$$\n",
|
||||
remalloc,
|
||||
@@ -789,7 +777,7 @@ class CEdDataNum
|
||||
|
||||
class CEdDataStr
|
||||
{
|
||||
U8 fmt_str[512] fmtstr "$$DA-P,LEN=511,A=\"Format Str:%s\"$$\n";
|
||||
U8 fmt_str[512] fmtstr "$$DA-P,A=\"Format Str:%s\"$$\n";
|
||||
I64 len fmtstr "$$DA,A=\"Length:%d\"$$\n";
|
||||
Bool term fmtstr "$$CB,\"Zero Terminator\"$$\n",
|
||||
remalloc fmtstr "$$CB,\"Remalloc for Unlimited Length\"$$\n",
|
||||
@@ -845,7 +833,7 @@ U0 EdInsData()
|
||||
|
||||
class CEdCheckBox
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n";
|
||||
Bool refresh fmtstr "$$CB,\"Refresh Data\"$$\n";
|
||||
I64 type fmtstr "$$LS,D=\"ST_INT_SIZE_TYPES\"$$\n";
|
||||
};
|
||||
@@ -872,8 +860,8 @@ U0 EdInsCheckBox()
|
||||
|
||||
class CEdLst
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Dft Select :%s\"$$\n",
|
||||
define_str[512] fmtstr "$$DA-P,LEN=511,A=\"Define Str :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Dft Select :%s\"$$\n",
|
||||
define_str[512] fmtstr "$$DA-P,A=\"Define Str :%s\"$$\n";
|
||||
Bool refresh fmtstr "$$CB,\"Refresh Data\"$$\n";
|
||||
I64 type fmtstr "$$LS,D=\"ST_INT_SIZE_TYPES\"$$\n";
|
||||
};
|
||||
@@ -932,12 +920,11 @@ U0 EdInsHexEd()
|
||||
|
||||
class CEdBin
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,"
|
||||
"A=\"Tag Text :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n";
|
||||
I64 bin_num fmtstr "$$DA,A=\"Bin Num:%d\"$$\n";
|
||||
U8 bin_ptr_link_file[512] fmtstr "$$DA-P,LEN=511,A=\"File:%s\"$$\n";
|
||||
U8 bin_ptr_link_file[512] fmtstr "$$DA-P,A=\"File:%s\"$$\n";
|
||||
I64 bin_ptr_link_bin_num fmtstr "$$DA,A=\"File Bin Num:%d\"$$\n";
|
||||
U8 bin_ptr_link_tag[512] fmtstr "$$DA-P,LEN=511,A=\"File Bin Tag:%s\"$$\n";
|
||||
U8 bin_ptr_link_tag[512] fmtstr "$$DA-P,A=\"File Bin Tag:%s\"$$\n";
|
||||
};
|
||||
|
||||
U0 EdInsBin(I64 bin_num,I64 type)
|
||||
@@ -970,7 +957,7 @@ U0 EdInsBin(I64 bin_num,I64 type)
|
||||
|
||||
class CEdTree
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n";
|
||||
I64 indent fmtstr "$$DA,A=\"Indention:%d\"$$\n";
|
||||
Bool collapsed fmtstr "$$CB,\"Collapsed\"$$\n";
|
||||
};
|
||||
@@ -1055,7 +1042,7 @@ U0 EdInsWidgetWiz()
|
||||
#define EST_SPRITE_PTR 1
|
||||
#define EST_DUP_SPRITE 2
|
||||
#define EST_SPRITE_SIZE 3
|
||||
#define EST_SPRITE_MACRO 4
|
||||
#define EST_SPRITE_MACRO 4
|
||||
#define EST_SPRITE_MENU 5
|
||||
#define EST_SPRITE_LINK 6
|
||||
|
||||
@@ -1087,8 +1074,8 @@ I64 PopUpSpriteType()
|
||||
|
||||
class CEdMacroSprite
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
exp[512] fmtstr "$$DA-P,LEN=511,A=\"Macro :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
exp[512] fmtstr "$$DA-P,A=\"Macro :%s\"$$\n";
|
||||
Bool escape fmtstr "$$CB,\"Escape\"$$\n",
|
||||
popup fmtstr "$$CB,\"PopUp\"$$\n",
|
||||
is_auto fmtstr "$$CB,\"AutoStr\"$$\n";
|
||||
@@ -1096,8 +1083,8 @@ class CEdMacroSprite
|
||||
|
||||
class CEdMenuSprite
|
||||
{
|
||||
U8 tag[512] fmtstr "$$DA-P,LEN=511,A=\"Tag Text :%s\"$$\n",
|
||||
exp[512] fmtstr "$$DA-P,LEN=511,A=\"Expression :%s\"$$\n";
|
||||
U8 tag[512] fmtstr "$$DA-P,A=\"Tag Text :%s\"$$\n",
|
||||
exp[512] fmtstr "$$DA-P,A=\"Expression :%s\"$$\n";
|
||||
Bool escape fmtstr "$$CB,\"Escape\"$$\n",
|
||||
popup,
|
||||
is_auto;
|
||||
|
||||
@@ -9,7 +9,7 @@ public Bool GrPlot0(CDC *dc=gr.dc,I64 x,I64 y)
|
||||
|
||||
if (dc->flags & DCF_LOCATE_NEAREST) {
|
||||
dist=DistSqrI64(x,y,dc->cur_x,dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public I64 GrBlot(CDC *dc=gr.dc,I64 x,I64 y,CDC *img)
|
||||
}
|
||||
if (dc->flags & DCF_LOCATE_NEAREST) {
|
||||
dist=DistSqrI64(x+img->width>>1,y+img->height>>1,dc->cur_x,dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
@@ -669,7 +669,7 @@ public I64 GrPutChar(CDC *dc=gr.dc,I64 x,I64 y,U8 ch)
|
||||
}
|
||||
if (dc->flags & DCF_LOCATE_NEAREST) {
|
||||
dist=DistSqrI64(x+w2>>1,y+h2>>1,dc->cur_x,dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
@@ -961,7 +961,7 @@ public I64 GrRect(CDC *dc=gr.dc,I64 x,I64 y,I64 w,I64 h)
|
||||
dist=0;
|
||||
else
|
||||
dist=DistSqrI64(x+w>>1,y+h>>1,dc->cur_x,dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
@@ -1515,7 +1515,7 @@ I64 GrRayLen(CDC *dc,I64 *x1,I64 y,I64 z=0,I32 *db=NULL)
|
||||
!not_color && c==dc->color2) && plot) {
|
||||
if (dc->flags & DCF_LOCATE_NEAREST) {
|
||||
dist=DistSqrI64(x3,y3,dc->cur_x,dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
@@ -1592,7 +1592,7 @@ I64 GrRayLen(CDC *dc,I64 *x1,I64 y,I64 z=0,I32 *db=NULL)
|
||||
!not_color && c==dc->color2) && plot) {
|
||||
if (dc->flags & DCF_LOCATE_NEAREST) {
|
||||
dist=DistSqrI64(x3,y3,dc->cur_x,dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
@@ -1721,7 +1721,7 @@ public I64 GrHLine(CDC *dc=gr.dc,I64 x1,I64 x2,I64 y,I64 z1=0,I64 z2=0)
|
||||
else
|
||||
dist=SqrI64(dc->cur_x-x2);
|
||||
dist+=SqrI64(y-dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
|
||||
+2
-1
@@ -36,7 +36,8 @@ public class CGrGlbls
|
||||
I64 screen_zoom,sx,sy;
|
||||
|
||||
//When zoomed, this keeps the mouse centered.
|
||||
Bool continuous_scroll;
|
||||
Bool continuous_scroll,
|
||||
hide_row,hide_col;
|
||||
} gr;
|
||||
|
||||
//See $LK,"RLf_VGA",A="FF:::/Kernel/KStart.CPP,RLf_VGA"$
|
||||
|
||||
@@ -384,7 +384,7 @@ public Bool GrPlot3(CDC *dc=gr.dc,I64 x,I64 y,I64 z)
|
||||
}
|
||||
if (dc->flags & DCF_LOCATE_NEAREST) {
|
||||
dist=DistSqrI64(x,y,dc->cur_x,dc->cur_y);
|
||||
if (dist<dc->nearest_dist) {
|
||||
if (dist<=dc->nearest_dist) {
|
||||
dc->nearest_dist=dist;
|
||||
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ U0 GrUpdateTextBG()
|
||||
Bool blink_flag=Blink;
|
||||
U8 *dst2=dst;
|
||||
|
||||
if (gr.pan_text_x) {
|
||||
if (gr.pan_text_x||gr.hide_col) {
|
||||
gr.pan_text_x=ClampI64(gr.pan_text_x,-7,7);
|
||||
j=AbsI64(gr.pan_text_x)/FONT_WIDTH+1;
|
||||
num_cols-=j;
|
||||
@@ -197,7 +197,7 @@ U0 GrUpdateTextBG()
|
||||
}
|
||||
dst=dst2;
|
||||
|
||||
if (gr.pan_text_y) {
|
||||
if (gr.pan_text_y||gr.hide_row) {
|
||||
gr.pan_text_y=ClampI64(gr.pan_text_y,-7,7);
|
||||
j=AbsI64(gr.pan_text_y)/FONT_HEIGHT+1;
|
||||
num_rows-=j;
|
||||
@@ -261,7 +261,7 @@ U0 GrUpdateTextFG()
|
||||
U8 *dst_start=gr.dc2->body,*dst_end=dst_start+w1*gr.dc2->height-7*w1-8;
|
||||
Bool blink_flag=Blink;
|
||||
|
||||
if (gr.pan_text_x) {
|
||||
if (gr.pan_text_x||gr.hide_col) {
|
||||
gr.pan_text_x=ClampI64(gr.pan_text_x,-7,7);
|
||||
j=AbsI64(gr.pan_text_x)/FONT_WIDTH+1;
|
||||
num_cols-=j;
|
||||
@@ -273,7 +273,7 @@ U0 GrUpdateTextFG()
|
||||
w2+=j*FONT_WIDTH;
|
||||
}
|
||||
|
||||
if (gr.pan_text_y) {
|
||||
if (gr.pan_text_y||gr.hide_row) {
|
||||
gr.pan_text_y=ClampI64(gr.pan_text_y,-7,7);
|
||||
j=AbsI64(gr.pan_text_y)/FONT_HEIGHT+1;
|
||||
num_rows-=j;
|
||||
|
||||
+26
-26
@@ -238,7 +238,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
g.type=type;
|
||||
LexD2I32(cc,&g.pp.x1);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
Lex(cc); //Skip ,
|
||||
LexD2I32(cc,&g.pp.x2);
|
||||
break;
|
||||
@@ -247,7 +247,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Lex(cc); //Skip {
|
||||
LexD2I32(cc,&g.pp.x1);
|
||||
if (cc->token!=':')
|
||||
LexExcept(cc,"expecting ':' at ");
|
||||
LexExcept(cc,"Expecting ':' at ");
|
||||
Lex(cc); //Skip :
|
||||
LexD2I32(cc,&g.pp.x2);
|
||||
g.ppa.x2+=g.pp.x1;
|
||||
@@ -289,7 +289,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
g.type=SPT_CIRCLE;
|
||||
LexD2I32(cc,&g.pr.x1);
|
||||
if (cc->token!=':')
|
||||
LexExcept(cc,"expecting ':' at ");
|
||||
LexExcept(cc,"Expecting ':' at ");
|
||||
Lex(cc); //Skip :
|
||||
g.pr.radius=LexExpressionI64(cc);
|
||||
break;
|
||||
@@ -297,17 +297,17 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Lex(cc); //Skip {
|
||||
g.pwhas.sides=LexExpressionI64(cc);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
case SPT_ELLIPSE:
|
||||
Lex(cc); //Skip {
|
||||
g.type=type;
|
||||
LexD2I32(cc,&g.pwha.x1);
|
||||
if (cc->token!=':')
|
||||
LexExcept(cc,"expecting ':' at ");
|
||||
LexExcept(cc,"Expecting ':' at ");
|
||||
Lex(cc); //Skip :
|
||||
LexD2I32(cc,&g.pwha.width);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
Lex(cc); //Skip ,
|
||||
g.pwha.angle=ã/180*LexExpressionF64(cc);
|
||||
break;
|
||||
@@ -323,11 +323,11 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
g.type=type;
|
||||
LexD2I32(cc,&g.ps.x1);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
if (Lex(cc)==TK_STR) //Skip ,
|
||||
st=LexExtStr(cc);
|
||||
else
|
||||
LexExcept(cc,"expecting string at ");
|
||||
LexExcept(cc,"Expecting string at ");
|
||||
size=SpriteElemQuedBaseSize(type);
|
||||
i=StrLen(st)+1;
|
||||
result=MAlloc(size+i);
|
||||
@@ -348,7 +348,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Lex(cc); //Skip ,
|
||||
}
|
||||
if (g.nu.num<2)
|
||||
LexExcept(cc,"expecting point at ");
|
||||
LexExcept(cc,"Expecting point at ");
|
||||
size=SpriteElemQuedBaseSize(SPT_POLYLINE);
|
||||
result=MAlloc(size+g.nu.num*sizeof(CD2I32));
|
||||
MemCpy(result,&g,size);
|
||||
@@ -377,7 +377,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Lex(cc); //Skip ,
|
||||
}
|
||||
if (g.nu.num<2)
|
||||
LexExcept(cc,"expecting point at ");
|
||||
LexExcept(cc,"Expecting point at ");
|
||||
size=SpriteElemQuedBaseSize(type);
|
||||
result=MAlloc(size+g.nu.num*sizeof(CD3I32));
|
||||
if (LexExpressionI64(cc)) {
|
||||
@@ -406,11 +406,11 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Lex(cc); //Skip {
|
||||
LexD2I32(cc,&g.npu.x);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
tempv=QueVectU8New;
|
||||
while (TRUE) {
|
||||
if (!(i=LexGetChar(cc)))
|
||||
LexExcept(cc,"expecting '}' at ");
|
||||
LexExcept(cc,"Expecting '}' at ");
|
||||
if (i=='}')
|
||||
break;
|
||||
if ('0'<=i<='7')
|
||||
@@ -431,16 +431,16 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Lex(cc); //Skip {
|
||||
LexD2I32(cc,&g.pwhu.x1);
|
||||
if (cc->token!=':')
|
||||
LexExcept(cc,"expecting ':' at ");
|
||||
LexExcept(cc,"Expecting ':' at ");
|
||||
Lex(cc); //Skip :
|
||||
LexD2I32(cc,&g.pwhu.width);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
tempv=QueVectU8New;
|
||||
num1=0;
|
||||
while (TRUE) {
|
||||
if (!(i=ToUpper(LexGetChar(cc))))
|
||||
LexExcept(cc,"expecting '}' at ");
|
||||
LexExcept(cc,"Expecting '}' at ");
|
||||
if (i=='}')
|
||||
break;
|
||||
if ('0'<=i<='9')
|
||||
@@ -469,16 +469,16 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
if (LexExpressionI64(cc)) {
|
||||
g.type=SPT_SHIFTABLE_MESH;
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
Lex(cc); //Skip ,
|
||||
LexD3I32(cc,&g.pmu.x);
|
||||
if (cc->token!=':')
|
||||
LexExcept(cc,"expecting ':' at ");
|
||||
LexExcept(cc,"Expecting ':' at ");
|
||||
Lex(cc); //Skip :
|
||||
} else {
|
||||
g.type=SPT_MESH;
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
Lex(cc); //Skip ,
|
||||
}
|
||||
num1=0;
|
||||
@@ -492,7 +492,7 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Lex(cc); //Skip ,
|
||||
}
|
||||
if (cc->token!=':')
|
||||
LexExcept(cc,"expecting ':' at ");
|
||||
LexExcept(cc,"Expecting ':' at ");
|
||||
Lex(cc); //Skip :
|
||||
num2=0;
|
||||
QueInit(&roott);
|
||||
@@ -503,19 +503,19 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
Free(st);
|
||||
Lex(cc); //Skip color
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
Lex(cc); //Skip ,
|
||||
tempt->nums[0]=LexExpressionI64(cc);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
Lex(cc); //Skip ,
|
||||
tempt->nums[1]=LexExpressionI64(cc);
|
||||
if (cc->token!=',')
|
||||
LexExcept(cc,"expecting ',' at ");
|
||||
LexExcept(cc,"Expecting ',' at ");
|
||||
Lex(cc); //Skip ,
|
||||
tempt->nums[2]=LexExpressionI64(cc);
|
||||
if (cc->token!=')')
|
||||
LexExcept(cc,"expecting ')' at ");
|
||||
LexExcept(cc,"Expecting ')' at ");
|
||||
Lex(cc); //Skip )
|
||||
QueIns(tempt,roott.last);
|
||||
num2++;
|
||||
@@ -553,9 +553,9 @@ CSprite *Code2SpriteElem(CCmpCtrl *cc,I64 type)
|
||||
break;
|
||||
}
|
||||
if (cc->token!='}')
|
||||
LexExcept(cc,"expecting '}' at ");
|
||||
LexExcept(cc,"Expecting '}' at ");
|
||||
if (Lex(cc)!=';')
|
||||
LexExcept(cc,"expecting ';' at ");
|
||||
LexExcept(cc,"Expecting ';' at ");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ public U8 *Code2Sprite(CDoc *doc,I64 *_size=NULL)
|
||||
if (Lex(cc)=='{') //Skip ident
|
||||
QueIns(Code2SpriteElem(cc,i),root.last);
|
||||
} else if (cc->token)
|
||||
LexExcept(cc,"expecting sprite element type name at ");
|
||||
LexExcept(cc,"Expecting sprite element type name at ");
|
||||
} while (cc->token);
|
||||
okay=TRUE;
|
||||
} catch {
|
||||
|
||||
+4
-4
@@ -62,9 +62,9 @@ CMenuEntry *MenuNewSub(CCmpCtrl *cc,CTask *task)
|
||||
if (cc->token!=',' && cc->token!=')')
|
||||
tempme->a2=LexExpressionI64(cc);
|
||||
if (cc->token!=')')
|
||||
LexExcept(cc,"missing ')' at ");
|
||||
LexExcept(cc,"Missing ')' at ");
|
||||
if (Lex(cc)!=';')
|
||||
LexExcept(cc,"missing ';' at");
|
||||
LexExcept(cc,"Missing ';' at");
|
||||
Lex(cc); //Skip ;
|
||||
} else if (cc->token=='{') {
|
||||
Lex(cc); //Skip {
|
||||
@@ -73,11 +73,11 @@ CMenuEntry *MenuNewSub(CCmpCtrl *cc,CTask *task)
|
||||
while (tempse && cc->token!='}')
|
||||
tempse=tempse->next=MenuNewSub(cc,task);
|
||||
if (cc->token!='}')
|
||||
LexExcept(cc,"missing '}' at ");
|
||||
LexExcept(cc,"Missing '}' at ");
|
||||
else
|
||||
Lex(cc); //Skip }
|
||||
} else
|
||||
LexExcept(cc,"expecting '{' at ");
|
||||
LexExcept(cc,"Expecting '{' at ");
|
||||
}
|
||||
return tempme;
|
||||
}
|
||||
|
||||
@@ -197,14 +197,14 @@ public I64 FileOcc(U8 *needle_str,
|
||||
|
||||
class CFind
|
||||
{
|
||||
U8 find_text[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,"
|
||||
U8 find_text[STR_LEN] fmtstr "$$DA-P,"
|
||||
"A=\"FIND :%s\"$$\n";
|
||||
U8 replace_text[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,"
|
||||
U8 replace_text[STR_LEN] fmtstr "$$DA-P,"
|
||||
"A=\"REPLACE :%s\"$$\n";
|
||||
Bool replace fmtstr "$$CB,\"REPLACE\"$$\n";
|
||||
Bool match_case fmtstr "$$CB,\"MATCH CASE\"$$\n";
|
||||
Bool whole_labels fmtstr "$$CB,\"WHOLE LABELS\"$$\n";
|
||||
U8 filemask[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"FILE MASK :%s\"$$\n";
|
||||
U8 filemask[STR_LEN] fmtstr "$$DA-P,A=\"FILE MASK :%s\"$$\n";
|
||||
Bool recurse fmtstr "$$CB,\"RECURSE\"$$\n";
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user