TempleOSCDV5.01.ISO
This commit is contained in:
1 parent
f6eacf7744
commit
320c7ee98a
219 files changed
+5211
-4853
No files matched your search
@@ -46,7 +46,7 @@ U0 DocBinsValidate(CDoc *doc)
|
||||
if (doc_e->de_flags & DOCEF_HAS_BIN) {
|
||||
if (b=doc_e->bin_data=DocBinFindNum(doc,doc_e->bin_num)) {
|
||||
if (doc_e->de_flags & DOCEF_BIN_PTR_LINK)
|
||||
b->tmp_use_cnt=MAX_I32;
|
||||
b->tmp_use_cnt=I32_MAX;
|
||||
if (!b->use_cnt++)
|
||||
b->renum_num=++renum_num;
|
||||
doc_e->bin_num=b->renum_num;
|
||||
|
||||
@@ -18,14 +18,14 @@ public I64 EdCurU8(CDoc *doc)
|
||||
return res;
|
||||
}
|
||||
|
||||
public U0 EdCursorLeft(CDoc *doc,I64 sc=MIN_I64)
|
||||
public U0 EdCursorLeft(CDoc *doc,I64 sc=I64_MIN)
|
||||
{//Move cursor left. Might need a call to $LK,"DocRecalc",A="MN:DocRecalc"$().
|
||||
//See $LK,"EdRenumAsm",A="MN:EdRenumAsm"$ for an example.
|
||||
U8 *dst;
|
||||
Bool unlock=DocLock(doc);
|
||||
CDocEntry *doc_ce=doc->cur_entry,*original_ce=doc_ce,*doc_ne;
|
||||
I64 cc=doc->cur_col,y=doc_ce->y;
|
||||
if (sc!=MIN_I64) sc=sc.u32[0];
|
||||
if (sc!=I64_MIN) sc=sc.u32[0];
|
||||
if (sc>=0 && sc&SCF_CTRL) {
|
||||
while (doc_ce->last!=doc && (doc_ce->last->y==y ||
|
||||
doc_ce->de_flags & (DOCEF_SKIP|DOCEF_FILTER_SKIP)))
|
||||
@@ -90,14 +90,14 @@ public U0 EdCursorLeft(CDoc *doc,I64 sc=MIN_I64)
|
||||
DocUnlock(doc);
|
||||
}
|
||||
|
||||
public U0 EdCursorRight(CDoc *doc,I64 sc=MIN_I64)
|
||||
public U0 EdCursorRight(CDoc *doc,I64 sc=I64_MIN)
|
||||
{//Move cursor right. Might need a call to $LK,"DocRecalc",A="MN:DocRecalc"$().
|
||||
//See $LK,"EdRenumAsm",A="MN:EdRenumAsm"$ for an example.
|
||||
Bool unlock=DocLock(doc);
|
||||
U8 *dst;
|
||||
CDocEntry *doc_ce=doc->cur_entry,*original_ce=doc_ce,*doc_ne;
|
||||
I64 cc=doc->cur_col,y=doc_ce->y,old_de_flags,old_color;
|
||||
if (sc!=MIN_I64) sc=sc.u32[0];
|
||||
if (sc!=I64_MIN) sc=sc.u32[0];
|
||||
if (sc>=0 && sc&SCF_CTRL) {
|
||||
while (doc_ce!=doc && doc_ce->next->y==y &&
|
||||
doc_ce->next->type_u8!=DOCT_SOFT_NEW_LINE && doc_ce->next!=doc &&
|
||||
@@ -166,7 +166,7 @@ public U0 EdCursorRight(CDoc *doc,I64 sc=MIN_I64)
|
||||
DocUnlock(doc);
|
||||
}
|
||||
|
||||
public U0 EdLineUp(CDoc *doc,I64 sc=MIN_I64)
|
||||
public U0 EdLineUp(CDoc *doc,I64 sc=I64_MIN)
|
||||
{//Move cursor up. Might need a call to $LK,"DocRecalc",A="MN:DocRecalc"$().
|
||||
//See $LK,"EdRenumAsm",A="MN:EdRenumAsm"$ for an example.
|
||||
Bool unlock=DocLock(doc);
|
||||
@@ -174,7 +174,7 @@ public U0 EdLineUp(CDoc *doc,I64 sc=MIN_I64)
|
||||
I64 y,x;
|
||||
CDocEntry *doc_ce=doc->cur_entry,*doc_ne;
|
||||
|
||||
if (sc!=MIN_I64) sc=sc.u32[0];
|
||||
if (sc!=I64_MIN) sc=sc.u32[0];
|
||||
if (doc_ce->type_u8==DOCT_HEX_ED) {
|
||||
doc->cur_col=doc->cur_col-doc_ce->hex_ed_width*3;
|
||||
if (doc->cur_col>=0) {
|
||||
@@ -277,14 +277,14 @@ public U0 EdLineUp(CDoc *doc,I64 sc=MIN_I64)
|
||||
DocUnlock(doc);
|
||||
}
|
||||
|
||||
public U0 EdLineDown(CDoc *doc,I64 sc=MIN_I64)
|
||||
public U0 EdLineDown(CDoc *doc,I64 sc=I64_MIN)
|
||||
{//Move cursor down. Might need a call to $LK,"DocRecalc",A="MN:DocRecalc"$().
|
||||
//See $LK,"EdRenumAsm",A="MN:EdRenumAsm"$ for an example.
|
||||
Bool unlock=DocLock(doc);
|
||||
U8 *dst;
|
||||
I64 y,x,old_de_flags=0,old_color;
|
||||
CDocEntry *doc_ce=doc->cur_entry,*doc_ne,*doc_ce2;
|
||||
if (sc!=MIN_I64) sc=sc.u32[0];
|
||||
if (sc!=I64_MIN) sc=sc.u32[0];
|
||||
if (doc_ce->type_u8==DOCT_HEX_ED) {
|
||||
doc->cur_col=doc->cur_col+doc_ce->hex_ed_width*3;
|
||||
if (doc->cur_col>=doc_ce->len*3) {
|
||||
|
||||
@@ -601,7 +601,7 @@ U0 EdPopUpChSC(I64 *_ch,I64 *_sc)
|
||||
{
|
||||
I64 sc;
|
||||
"Press A Key\n";
|
||||
DocPut->flags|=DOCF_MIN_SIZE;
|
||||
DocPut->flags|=DOCF_SIZE_MIN;
|
||||
do GetMsg(_ch,&sc,1<<MSG_KEY_DOWN);
|
||||
while (sc.u8[0]==SC_SHIFT || sc.u8[0]==SC_CTRL || sc.u8[0]==SC_ALT);
|
||||
*_sc=sc;
|
||||
|
||||
@@ -146,13 +146,13 @@ public Bool DocEd(CDoc *doc,I64 dof_flags=0)
|
||||
LBts(&Fs->display_flags,DISPLAYf_SHOW);
|
||||
WinZBufUpdate;
|
||||
}
|
||||
if (dof_flags&DOF_MIN_SIZE)
|
||||
doc->flags|=DOCF_MIN_SIZE;
|
||||
if (dof_flags&DOF_SIZE_MIN)
|
||||
doc->flags|=DOCF_SIZE_MIN;
|
||||
|
||||
DocUnlock(doc);
|
||||
if (!(dof_flags&DOF_DONT_WINMGR_SYNC)) {
|
||||
Refresh(2,TRUE);
|
||||
if (doc->flags&DOCF_MIN_SIZE)
|
||||
if (doc->flags&DOCF_SIZE_MIN)
|
||||
Refresh(2,TRUE);
|
||||
}
|
||||
res=View;
|
||||
@@ -178,7 +178,7 @@ public Bool DocEd(CDoc *doc,I64 dof_flags=0)
|
||||
}
|
||||
Free(old_task_title);
|
||||
DocDel(bdoc);
|
||||
if (dof_flags&DOF_MIN_SIZE) {
|
||||
if (dof_flags&DOF_SIZE_MIN) {
|
||||
WinHorz(old_left,old_right);
|
||||
WinVert(old_top,old_bottom);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public Bool DocLineNumGoTo(CDoc *doc,I64 line_num) //one based
|
||||
return res;
|
||||
}
|
||||
|
||||
public Bool DocFind(CDoc *haystack_doc,I64 start_line_num=MIN_I64,
|
||||
public Bool DocFind(CDoc *haystack_doc,I64 start_line_num=I64_MIN,
|
||||
U8 *needle,I64 match=1)
|
||||
{//Find str by searching tags. Move cur_entry & center.
|
||||
Bool res=FALSE,unlock;
|
||||
@@ -26,7 +26,7 @@ U8 *needle,I64 match=1)
|
||||
I64 i;
|
||||
if (haystack_doc) {
|
||||
unlock=DocLock(haystack_doc);
|
||||
if (start_line_num==MIN_I64) {
|
||||
if (start_line_num==I64_MIN) {
|
||||
res=TRUE;
|
||||
doc_e=haystack_doc->head.next;
|
||||
} else {
|
||||
|
||||
@@ -223,8 +223,8 @@ public Bool DocForm(U8 *_d,U8 *class_name=lastclass,
|
||||
doc->desc='Form';
|
||||
if (header) DocPrint(doc,"%s",header);
|
||||
doc->flags|=DOCF_OVERSTRIKE|DOCF_FORM;
|
||||
if (dof_flags&DOF_MIN_SIZE)
|
||||
doc->flags|=DOCF_MIN_SIZE;
|
||||
if (dof_flags&DOF_SIZE_MIN)
|
||||
doc->flags|=DOCF_SIZE_MIN;
|
||||
ml=tmpc->member_lst_and_root;
|
||||
while (ml) {
|
||||
if ((fmtstr=MemberMetaData("fmtstr",ml)) &&
|
||||
@@ -332,12 +332,12 @@ dm_restart:
|
||||
|
||||
public I64 PopUpMenu(CDoc *doc,I64 dof_flags=0)
|
||||
{//Run menu chooser doc in PopUp win task.
|
||||
doc->flags|=DOCF_MIN_SIZE | DOCF_FORM;
|
||||
doc->flags|=DOCF_SIZE_MIN | DOCF_FORM;
|
||||
return PopUpPrint("DocMenu(0x%X,0x%X);",doc,dof_flags);
|
||||
}
|
||||
|
||||
public Bool PopUpForm(U8 *_d,U8 *class_name=lastclass,
|
||||
I64 dof_flags=DOF_MIN_SIZE,U8 *header=NULL,U8 *footer=NULL)
|
||||
I64 dof_flags=DOF_SIZE_MIN,U8 *header=NULL,U8 *footer=NULL)
|
||||
{//See $LK,"::/Demo/DolDoc/Form.HC"$ and $LK,"::/Demo/LastClass.HC"$.
|
||||
return PopUpPrint("DocForm(0x%X,0x%X,0x%X,0x%X,0x%X);",_d,class_name,
|
||||
dof_flags,header,footer);
|
||||
|
||||
@@ -150,7 +150,7 @@ gs_done:
|
||||
}
|
||||
|
||||
#help_index "Keyboard Devices;Char/Input;StdIn"
|
||||
public I64 GetI64(U8 *msg=NULL,I64 dft=0,I64 lo=MIN_I64,I64 hi=MAX_I64)
|
||||
public I64 GetI64(U8 *msg=NULL,I64 dft=0,I64 lo=I64_MIN,I64 hi=I64_MAX)
|
||||
{//Prompt user for I64 expression.
|
||||
Bool okay;
|
||||
U8 *st;
|
||||
@@ -176,7 +176,7 @@ public I64 GetI64(U8 *msg=NULL,I64 dft=0,I64 lo=MIN_I64,I64 hi=MAX_I64)
|
||||
}
|
||||
}
|
||||
|
||||
public F64 GetF64(U8 *msg=NULL,F64 dft=0,F64 lo=MIN_F64,F64 hi=MAX_F64)
|
||||
public F64 GetF64(U8 *msg=NULL,F64 dft=0,F64 lo=F64_MIN,F64 hi=F64_MAX)
|
||||
{//Prompt user for F64 expression.
|
||||
Bool okay;
|
||||
U8 *st;
|
||||
@@ -202,12 +202,12 @@ public F64 GetF64(U8 *msg=NULL,F64 dft=0,F64 lo=MIN_F64,F64 hi=MAX_F64)
|
||||
}
|
||||
}
|
||||
|
||||
public CDate GetDate(U8 *msg=NULL,CDate dft=MIN_I64,
|
||||
CDate lo=MIN_I64,CDate hi=MAX_I64)
|
||||
public CDate GetDate(U8 *msg=NULL,CDate dft=I64_MIN,
|
||||
CDate lo=I64_MIN,CDate hi=I64_MAX)
|
||||
{//Prompt user for date expression. (Use $LK,"Now",A="MN:Now"$() if you want current time.)
|
||||
U8 *st;
|
||||
CDate res;
|
||||
if (dft==MIN_I64) dft=Now;
|
||||
if (dft==I64_MIN) dft=Now;
|
||||
while (TRUE) {
|
||||
if (msg)
|
||||
"" msg,dft,dft;
|
||||
|
||||
@@ -9,7 +9,7 @@ public I64 PopUpColor(U8 *header=NULL,
|
||||
DocPrint(doc,"%s",header);
|
||||
if (allow_transparent)
|
||||
DocPrint(doc,"$$MU,\"TRANSPARENT\",LE=TRANSPARENT$$\n");
|
||||
for (i=0;i<NUM_COLORS;i++)
|
||||
for (i=0;i<COLORS_NUM;i++)
|
||||
DocPrint(doc,"$$BG,%d$$$$MU,\"__%-8Z__\",LE=%d$$$$BG$$\n",i,i,"ST_COLORS",i);
|
||||
if (allow_dft)
|
||||
DocPrint(doc,"$$BG,WHITE$$$$MU,\"DEFAULT\",LE=DOC_DFT$$$$BG$$");
|
||||
@@ -33,14 +33,14 @@ public I64 PopUpColorLighting(U8 *header=NULL)
|
||||
"\n");
|
||||
DocPrint(doc,
|
||||
"\n$$LTPURPLE$$Single-Sided Full-Range Double-Sided Full-Range\n$$BLACK$$");
|
||||
for (i=0;i<NUM_COLORS/2;i++) {
|
||||
for (i=0;i<COLORS_NUM/2;i++) {
|
||||
DocPrint(doc,"$$BG,%d$$$$MU,\"__%-19Z__\",LE=%d$$$$BG$$ ",i,i,"ST_COLORS",i);
|
||||
DocPrint(doc,"$$BG,%d$$$$MU,\"__%-19Z__\",LE=%d$$$$BG$$\n",i,i,"ST_COLORS",
|
||||
ROPF_TWO_SIDED+i);
|
||||
}
|
||||
DocPrint(doc,
|
||||
"\n$$LTPURPLE$$Single-Sided Half-Range Double-Sided Half-Range\n$$BLACK$$");
|
||||
for (i=0;i<NUM_COLORS;i++) {
|
||||
for (i=0;i<COLORS_NUM;i++) {
|
||||
DocPrint(doc,"$$BG,%d$$$$MU,\"__%-19Z__\",LE=%d$$$$BG$$ ",
|
||||
i,i,"ST_COLORS",ROPF_HALF_RANGE_COLOR+i);
|
||||
DocPrint(doc,"$$BG,%d$$$$MU,\"__%-19Z__\",LE=%d$$$$BG$$\n",
|
||||
|
||||
+16
-11
@@ -1,5 +1,10 @@
|
||||
#help_index "DolDoc/Misc"
|
||||
|
||||
CColorROPU32 highlight_hash_type_colors[HTt_TYPES_NUM]=
|
||||
DOC_COLOR_EXPORT_SYS_SYM,0,DOC_COLOR_DEFINE_STR,DOC_COLOR_GLBL_VAR,
|
||||
DOC_COLOR_CLASS,DOC_COLOR_KEYWORD,DOC_COLOR_FUN,0,0,DOC_COLOR_KEYWORD,
|
||||
DOC_COLOR_KEYWORD,DOC_COLOR_KEYWORD,DOC_COLOR_REG,0,0,0,0};
|
||||
|
||||
U32 *DocHighlight(CDocEntry *doc_e,U8 *src,I64 len,I64 _tmp_u32_attr)
|
||||
{//Be aware of $LK,"::/Demo/ToHtmlToTXTDemo/ToHtml.HC"$.
|
||||
U32 *res=MAlloc((len+1)*sizeof(U32)),*dst=res;
|
||||
@@ -35,12 +40,12 @@ hl_normal:
|
||||
}
|
||||
break;
|
||||
case '\'':
|
||||
tmp_u32_attr=DOC_COLOR_QUOTE<<8|mask_tmp_u32_attr;
|
||||
tmp_u32_attr=DOC_COLOR_CHAR_CONST<<8|mask_tmp_u32_attr;
|
||||
*dst++=ch1+tmp_u32_attr;
|
||||
len--;
|
||||
goto hl_single_quote;
|
||||
case '\"':
|
||||
tmp_u32_attr=DOC_COLOR_QUOTE<<8|mask_tmp_u32_attr;
|
||||
tmp_u32_attr=DOC_COLOR_STR<<8|mask_tmp_u32_attr;
|
||||
*dst++=ch1+tmp_u32_attr;
|
||||
len--;
|
||||
goto hl_dbl_quote;
|
||||
@@ -71,13 +76,13 @@ hl_normal:
|
||||
}
|
||||
ch=*src;
|
||||
*src=0;
|
||||
if (tmph=HashFind(ptr,cmp.asm_hash,
|
||||
HTT_KEYWORD|HTT_ASM_KEYWORD|HTT_OPCODE|HTT_REG)) {
|
||||
if (tmph->type&(HTT_KEYWORD|HTT_ASM_KEYWORD|HTT_OPCODE))
|
||||
tmp_u32_attr=DOC_COLOR_KEYWORD<<8|mask_tmp_u32_attr;
|
||||
else
|
||||
tmp_u32_attr=DOC_COLOR_KEYWORD2<<8|mask_tmp_u32_attr;
|
||||
} else
|
||||
if (tmph=HashFind(ptr,adam_task->hash_table,
|
||||
HTT_EXPORT_SYS_SYM|HTT_DEFINE_STR|HTT_GLBL_VAR|HTT_CLASS|
|
||||
HTT_INTERNAL_TYPE|HTT_FUN|HTT_KEYWORD|HTT_ASM_KEYWORD|
|
||||
HTT_OPCODE|HTT_REG))
|
||||
tmp_u32_attr=highlight_hash_type_colors[HashTypeNum(tmph)]<<8|
|
||||
mask_tmp_u32_attr;
|
||||
else
|
||||
tmp_u32_attr=_tmp_u32_attr;
|
||||
while (ch1=*ptr++)
|
||||
*dst++=ch1+tmp_u32_attr;
|
||||
@@ -88,7 +93,7 @@ hl_normal_done:
|
||||
s->comment_depth=0;
|
||||
break;
|
||||
case DOCSS_SINGLE_QUOTE:
|
||||
tmp_u32_attr=DOC_COLOR_QUOTE<<8|mask_tmp_u32_attr;
|
||||
tmp_u32_attr=DOC_COLOR_CHAR_CONST<<8|mask_tmp_u32_attr;
|
||||
hl_single_quote:
|
||||
last_ch=0;
|
||||
while (len--) {
|
||||
@@ -105,7 +110,7 @@ hl_single_quote:
|
||||
s->comment_depth=0;
|
||||
break;
|
||||
case DOCSS_DBL_QUOTE:
|
||||
tmp_u32_attr=DOC_COLOR_QUOTE<<8|mask_tmp_u32_attr;
|
||||
tmp_u32_attr=DOC_COLOR_CHAR_CONST<<8|mask_tmp_u32_attr;
|
||||
hl_dbl_quote:
|
||||
last_ch=0;
|
||||
while (len--) {
|
||||
|
||||
@@ -42,11 +42,11 @@ U0 DocInit()
|
||||
}
|
||||
CmpCtrlDel(cc);
|
||||
|
||||
for (i=0;i<DOCT_NUM_TYPES;i++)
|
||||
for (i=0;i<DOCT_TYPES_NUM;i++)
|
||||
doldoc.dft_de_flags[i]&=~DOCG_BL_IV_UL;
|
||||
|
||||
doldoc.type_flags_form[0]=0;
|
||||
for (i=0;i<DOCT_NUM_TYPES;i++)
|
||||
for (i=0;i<DOCT_TYPES_NUM;i++)
|
||||
if (Bt(&doldoc.dft_de_flags[i],DOCEf_TAG) && i!=DOCT_TEXT || i==DOCT_HEX_ED)
|
||||
Bts(doldoc.type_flags_form,i);
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ I64 PopUpMacroMenu()
|
||||
"$$CM+LX,1,3$$$$BT,\"STOP\",LE=SM_STOP$$"
|
||||
"$$CM+LX,17,0$$$$BT,\"CANCEL\",LE=DOCM_CANCEL$$"
|
||||
"\n\n\n$$GREEN$$SHIFT-F2$$FG$$ will play macro.\n");
|
||||
doc->flags|=DOCF_MIN_SIZE | DOCF_FORM;
|
||||
doc->flags|=DOCF_SIZE_MIN | DOCF_FORM;
|
||||
StrPrint(buf,"DocMenu(%d);",doc);
|
||||
sys_macro_task=Spawn(&SrvCmdLine,NULL,"Macro Popup",,Fs);
|
||||
Fs->popup_task=sys_macro_task;
|
||||
|
||||
@@ -276,7 +276,7 @@ public U0 DocRst(CDoc *doc,Bool is_old)
|
||||
doc->dollar_buf_ptr=0;
|
||||
doc->cmd_U8=CH_SPACE;
|
||||
doc->page_line_num=0;
|
||||
doc->best_d=MAX_I64;
|
||||
doc->best_d=I64_MAX;
|
||||
|
||||
s=&doc->settings_head;
|
||||
s->left_margin=DOC_DFT;
|
||||
@@ -376,7 +376,7 @@ public CDoc *DocNew(U8 *filename=NULL,CTask *task=NULL)
|
||||
doc->left_click_link=&EdLeftClickLink;
|
||||
doc->dollar_buf_size=84;
|
||||
doc->dollar_buf=MAlloc(doc->dollar_buf_size,task);
|
||||
doc->max_entries=MAX_I64;
|
||||
doc->max_entries=I64_MAX;
|
||||
doc->win_task=task;
|
||||
doc->mem_task=task;
|
||||
DocRst(doc,FALSE);
|
||||
|
||||
@@ -47,7 +47,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
|
||||
U8 *buf,*buf2;
|
||||
|
||||
if (doc_e->type_u8==DOCT_FOREGROUND &&
|
||||
doc->flags&DOCF_COLOR_NAMES && 0<=attr<NUM_COLORS) {
|
||||
doc->flags&DOCF_COLOR_NAMES && 0<=attr<COLORS_NUM) {
|
||||
buf=StrNew(DefineSub(attr,"ST_COLORS"));
|
||||
attr=DOC_DFT;
|
||||
} else
|
||||
@@ -58,7 +58,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
|
||||
|
||||
de_flags=doc_e->de_flags&~(DOCG_BL_IV_UL|DOCEF_SEL|
|
||||
DOCEF_HIGHLIGHT|DOCEF_WORD_WRAP|DOCEF_SKIP|DOCEF_FILTER_SKIP);
|
||||
for (i=0;i<DOCEf_NUM_FLAGS;i++)
|
||||
for (i=0;i<DOCEf_FLAGS_NUM;i++)
|
||||
if (Bt(&f1,i)!=Bt(&de_flags,i)) {
|
||||
if (Bt(&de_flags,i)) {
|
||||
if (!(1<<i&DOCEG_HAS_ARG)) {
|
||||
@@ -92,7 +92,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
|
||||
case DOCT_BACKGROUND:
|
||||
case DOCT_DFT_FOREGROUND:
|
||||
case DOCT_DFT_BACKGROUND:
|
||||
if (doc->flags&DOCF_COLOR_NAMES && 0<=attr<NUM_COLORS) {
|
||||
if (doc->flags&DOCF_COLOR_NAMES && 0<=attr<COLORS_NUM) {
|
||||
buf2=MStrPrint("%s%Z,",buf,doc_e->attr,"ST_COLORS");
|
||||
Free(buf); buf=buf2;
|
||||
break;
|
||||
@@ -114,7 +114,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
|
||||
buf2=MStrPrint("%s%d,",buf,doc_e->attr);
|
||||
Free(buf); buf=buf2;
|
||||
}
|
||||
case DOCT_NUM_TYPES-1: //nobound switch
|
||||
case DOCT_TYPES_NUM-1: //nobound switch
|
||||
break;
|
||||
}
|
||||
de_flags=doc_e->de_flags & DOCEG_HAS_ARG;
|
||||
@@ -202,7 +202,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
|
||||
case DOCEf_USER_DATA:
|
||||
buf2=MStrPrint("%sU=0x%X,",buf,doc_e->user_data);
|
||||
break;
|
||||
case DOCEf_NUM_FLAGS-1: //nobound switch
|
||||
case DOCEf_FLAGS_NUM-1: //nobound switch
|
||||
break;
|
||||
}
|
||||
Free(buf); buf=buf2;
|
||||
@@ -285,7 +285,7 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
|
||||
else
|
||||
doc_e->attr=attr;
|
||||
break;
|
||||
#assert DOCT_ERROR==DOCT_NUM_TYPES-1
|
||||
#assert DOCT_ERROR==DOCT_TYPES_NUM-1
|
||||
case DOCT_ERROR:
|
||||
goto pd_err;
|
||||
}
|
||||
@@ -460,7 +460,7 @@ CDocEntry *PrsDollarCmd(CDoc *doc,U8 *st)
|
||||
else
|
||||
goto pd_err;
|
||||
break;
|
||||
case DOCEf_NUM_FLAGS-1: //nobound switch
|
||||
case DOCEf_FLAGS_NUM-1: //nobound switch
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public U8 *FileNameForm(U8 *dft=NULL,I64 dof_flags=0,CTask *mem_task=NULL)
|
||||
public U8 *PopUpFileName(U8 *dft=NULL,I64 dof_flags=0)
|
||||
{//Filename chooser. Uses form, not $LK,"FileMgr",A="MN:FileMgr"$().
|
||||
U8 *st=MStrPrint("FileNameForm(\"%Q\",0x%X,Fs->parent_task);",
|
||||
dft,dof_flags|DOF_MIN_SIZE),*res=PopUp(st,Fs);
|
||||
dft,dof_flags|DOF_SIZE_MIN),*res=PopUp(st,Fs);
|
||||
Free(st);
|
||||
return res;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ public U8 *PopUpGetStr(U8 *header=NULL)
|
||||
return res;
|
||||
}
|
||||
|
||||
public I64 PopUpGetI64(U8 *msg,I64 dft,I64 lo=MIN_I64,I64 hi=MAX_I64)
|
||||
public I64 PopUpGetI64(U8 *msg,I64 dft,I64 lo=I64_MIN,I64 hi=I64_MAX)
|
||||
{//Prompt for I64 text expression in PopUp win task.
|
||||
U8 *st=MStrPrint("GetI64(0x%X,0x%X,0x%X,0x%X);",msg,dft,lo,hi);
|
||||
I64 res=PopUp(st,Fs);
|
||||
@@ -192,7 +192,7 @@ public I64 PopUpGetI64(U8 *msg,I64 dft,I64 lo=MIN_I64,I64 hi=MAX_I64)
|
||||
return res;
|
||||
}
|
||||
|
||||
public F64 PopUpGetF64(U8 *msg,F64 dft,F64 lo=MIN_F64,F64 hi=MAX_F64)
|
||||
public F64 PopUpGetF64(U8 *msg,F64 dft,F64 lo=F64_MIN,F64 hi=F64_MAX)
|
||||
{//Prompt for F64 text expression in PopUp win task.
|
||||
U8 *st=MStrPrint("GetF64(0x%X,0x%X(F64),0x%X(F64),0x%X(F64));",msg,dft,lo,hi);
|
||||
F64 res=PopUp(st,Fs)(F64);
|
||||
|
||||
@@ -255,9 +255,9 @@ I64 DocTmpAttr(CDoc *doc,CDocEntry *doc_e,I64 cur_u8_attr)
|
||||
|
||||
public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
|
||||
{//Recalc and fmt. Also used by WinMgr to draw on scrn.
|
||||
I64 i,ii,j,k,x,x0,y,y0,D,d2,col,col2,best_col=0,best_d=MAX_I64,xx,yy,zz,
|
||||
I64 i,ii,j,k,x,x0,y,y0,D,d2,col,col2,best_col=0,best_d=I64_MAX,xx,yy,zz,
|
||||
num_entries=0,i_jif,cur_u8_attr,tmp_u32_attr,
|
||||
cursor_y=MIN_I64,left_margin,right_margin,y_plot_top,y_plot_bottom,
|
||||
cursor_y=I64_MIN,left_margin,right_margin,y_plot_top,y_plot_bottom,
|
||||
top,left,bottom,right,width,height,scroll_x,scroll_y,pix_top,pix_left;
|
||||
CDocEntry reg *doc_e,reg *doc_e2,*best_doc_e,*next_clear_found=NULL,
|
||||
*added_cursor=NULL;
|
||||
@@ -422,8 +422,8 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
|
||||
skipped_update= doc_e==doc && doc->head.next!=doc;
|
||||
|
||||
if (full_refresh) {
|
||||
doc->min_x=MAX_I32; doc->min_y=MAX_I32;
|
||||
doc->max_x=MIN_I32; doc->max_y=MIN_I32;
|
||||
doc->min_x=I32_MAX; doc->min_y=I32_MAX;
|
||||
doc->max_x=I32_MIN; doc->max_y=I32_MIN;
|
||||
}
|
||||
while (doc_e!=doc) {
|
||||
while (TRUE) {
|
||||
@@ -967,7 +967,7 @@ rc_adjust_xy:
|
||||
dc->flags|=DCF_DONT_DRAW;
|
||||
bptr=tmpb->data;
|
||||
ii=SpriteTypeMask(bptr);
|
||||
if (ii&1<<SPT_NUM_TYPES) {
|
||||
if (ii&1<<SPT_TYPES_NUM) {
|
||||
bptr=gr.empty_sprite;
|
||||
ii=SpriteTypeMask(bptr);
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ rc_adjust_xy:
|
||||
doc_e->de_flags&DOCEF_TAG && doc_e->tag)
|
||||
x-=StrLen(doc_e->tag);
|
||||
break;
|
||||
case DOCT_NUM_TYPES-1: //nobound switch
|
||||
case DOCT_TYPES_NUM-1: //nobound switch
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1178,7 +1178,7 @@ rc_skip:
|
||||
}
|
||||
}
|
||||
}
|
||||
if (doc->flags & DOCF_MIN_SIZE) {
|
||||
if (doc->flags & DOCF_SIZE_MIN) {
|
||||
if (Bt(&win_task->display_flags,DISPLAYf_NO_BORDER)) {
|
||||
if (left<0)
|
||||
left=0;
|
||||
|
||||
@@ -173,7 +173,7 @@ public U0 DocCollapse(Bool collapse=TRUE,CDoc *doc=NULL)
|
||||
}
|
||||
|
||||
#help_index "DolDoc/Cmd Line (Typically);Cmd Line (Typically)"
|
||||
public I64 DocMax(I64 i=MAX_I64)
|
||||
public I64 DocMax(I64 i=I64_MAX)
|
||||
{//Set max document entries. (Cmd line buffer size.)
|
||||
//Adjusts the size of the cmd line buf.
|
||||
//Normally, the cmd line deletes entries
|
||||
|
||||
@@ -60,7 +60,7 @@ ft_done:
|
||||
|
||||
public Bool DocTreeMake(CDoc *doc,U8 *path)
|
||||
{//Make registry-like tree widget.
|
||||
I64 i=0,j=MIN_I64,k=0;
|
||||
I64 i=0,j=I64_MIN,k=0;
|
||||
U8 *st1=StrNew(path),
|
||||
*st2=MAlloc(StrLen(path)+1),
|
||||
*st3=StrNew(path);
|
||||
|
||||
@@ -21,13 +21,13 @@ See $LK,"::/Doc/DolDocOverview.DD"$
|
||||
public class CDolDocGlbls
|
||||
{
|
||||
CHashTable *hash;
|
||||
I64 dft_de_flags [DOCT_NUM_TYPES],
|
||||
type_flags_nontag_invis [(DOCT_NUM_TYPES+63)/64],
|
||||
type_flags_form [(DOCT_NUM_TYPES+63)/64],
|
||||
type_flags_data [(DOCT_NUM_TYPES+63)/64],
|
||||
type_flags_chk_dup [(DOCT_NUM_TYPES+63)/64],
|
||||
I64 dft_de_flags [DOCT_TYPES_NUM],
|
||||
type_flags_nontag_invis [(DOCT_TYPES_NUM+63)/64],
|
||||
type_flags_form [(DOCT_TYPES_NUM+63)/64],
|
||||
type_flags_data [(DOCT_TYPES_NUM+63)/64],
|
||||
type_flags_chk_dup [(DOCT_TYPES_NUM+63)/64],
|
||||
clean_scan_codes [4];
|
||||
I32 dft_type_flags [DOCT_NUM_TYPES];
|
||||
I32 dft_type_flags [DOCT_TYPES_NUM];
|
||||
} doldoc;
|
||||
MemSet(&doldoc,0,sizeof(CDolDocGlbls));
|
||||
|
||||
|
||||
Reference in new issue
Block a user