lst -> list

This commit is contained in:
xmm15 2020-02-15 18:26:51 -06:00
parent 1fcbe40f9e
commit 143c1830e0
117 changed files with 1377 additions and 1377 deletions

Binary file not shown.

View File

@ -84,7 +84,7 @@ public U0 StrFileWrite(U8 *name,CHashTable *table,Bool no_nums=FALSE)
if (table) {
count=0; //Count Strings
for (i=0;i<=table->mask;i++)
count+=LinkedLstCount(table->body[i]);
count+=LinkedListCount(table->body[i]);
a=MAlloc(count*sizeof(CHashGeneric *));
j=0; //Load Strings
for (i=0;i<=table->mask;i++) {

View File

@ -34,7 +34,7 @@ class CBgtEntry
#define BT_SEMIANNUAL 4
#define BT_ANNUAL 5
DefineLstLoad("ST_BGT_TEMPLATE_TYPES",
DefineListLoad("ST_BGT_TEMPLATE_TYPES",
"Null\0Interval\0Monthly\0Bimonthly\0Semiannual\0Annual\0");
class CBgtTemplate

View File

@ -47,7 +47,7 @@ $SP,"",BI=9$
$SP,"",BI=10$
$ID,-6$
U8 *gate_type_lst="NULL\0OUTPUT\0INPUT\0"
U8 *gate_type_list="NULL\0OUTPUT\0INPUT\0"
"NOT\0AND\0OR\0NAND\0NOR\0XOR\0AND3\0OR3\0NAND3\0NOR3\0";
#define GT_NULL 0 //Specifies that table entry has not been filled-in
@ -84,7 +84,7 @@ U0 GetGates()
"\nEnter the available gate types in the order you prefer them to be used.\n"
"Your choices are:\n";
for (i=GT_FIRST_REAL_GATE;i<GT_ENTRIES_NUM;i++)
"%z ",i,gate_type_lst;
"%z ",i,gate_type_list;
'\n';
num_sel_gates=0;
@ -95,7 +95,7 @@ U0 GetGates()
Free(st);
return;
}
i=LstMatch(st,gate_type_lst,LMF_IGNORE_CASE);
i=ListMatch(st,gate_type_list,LMF_IGNORE_CASE);
Free(st);
if (i<GT_FIRST_REAL_GATE)
"Invalid response\n";

View File

@ -58,6 +58,6 @@ class PsmCtrl
Bool playing;
} psm;
U8 *psm_note_lst="A\0A#\0B\0C\0C#\0D\0D#\0E\0F\0F#\0G\0G#\0";
U8 *psm_note_list="A\0A#\0B\0C\0C#\0D\0D#\0E\0F\0F#\0G\0G#\0";
U8 psm_note_map[12]={6,6,5,4,4,3,3,2,1,1,0,0};
U8 psm_note_inverse_map[7]={10,8,7,5,3,2,0};

View File

@ -52,7 +52,7 @@ $ID,-8$
F64 psm_durations[PSM_DURATIONS_NUM+1]={
2*.25/3,.25,2*.5/3,.5,2.0/3.0,0.5*1.5,1.0,1.5,2.0,3.0,4.0,6.0,1000000.0};
U8 *psm_duration_lst="st\0s\0et\0e\0qt\0e.\0q\0q.\0h\0h.\0w\0w.\0";
U8 *psm_duration_list="st\0s\0et\0e\0qt\0e.\0q\0q.\0h\0h.\0w\0w.\0";
U8 *psm_duration_imgs[PSM_DURATIONS_NUM]={
$IB,"<1>",BI=1$,$IB,"<1>",BI=1$,$IB,"<2>",BI=2$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<2>",BI=2$,$IB,"<3>",BI=3$,$IB,"<3>",BI=3$,$IB,"<4>",BI=4$,$IB,"<4>",BI=4$,$IB,"<5>",BI=5$,$IB,"<5>",BI=5$};
Bool psm_triplet_durations[PSM_DURATIONS_NUM]={TRUE,FALSE,TRUE,
@ -76,7 +76,7 @@ Bool PsmHasWords(U8 *st)
Bool PsmIsDotted(I64 duration)
{
U8 *st=LstSub(duration,psm_duration_lst);
U8 *st=ListSub(duration,psm_duration_list);
if (st[1]=='.')
return TRUE;
else
@ -162,7 +162,7 @@ U0 PsmRecalcNoteXY()
ona++;
octave=Ona2Octave(ona);
note =Ona2Note (ona);
note=music.note_map[*LstSub(note,psm_note_lst)-'A'];
note=music.note_map[*ListSub(note,psm_note_list)-'A'];
if (note<3)
octave++;
tmpn->y=(15+(psm_note_map[note]-7*(octave-4)))*4;

View File

@ -271,7 +271,7 @@ U8 *PsmCvtSong()
ona++;
octave=Ona2Octave(ona);
note =Ona2Note (ona);
note=music.note_map[*LstSub(note,psm_note_lst)-'A'];
note=music.note_map[*ListSub(note,psm_note_list)-'A'];
}
if (Bt(&tmpn->flags,PSMf_TIE))
*dst++='(';
@ -280,14 +280,14 @@ U8 *PsmCvtSong()
last_octave=octave;
}
if (tmpn->duration!=last_duration) {
src=LstSub(tmpn->duration,psm_duration_lst);
src=ListSub(tmpn->duration,psm_duration_list);
*dst++=src[0];
if (src[1])
*dst++=src[1];
last_duration=tmpn->duration;
}
if (tmpn->ona) {
src=LstSub(note,psm_note_lst);
src=ListSub(note,psm_note_list);
*dst++=src[0];
if (src[1])
*dst++=src[1];

View File

@ -750,7 +750,7 @@ mo_got_message:
else
st="R";
} else
st=LstSub(Ona2Note(ona),psm_note_lst);
st=ListSub(Ona2Note(ona),psm_note_list);
Snd(ona);
if (psm.record_entry->checked) {
if (!was_null) {

View File

@ -37,7 +37,7 @@ CColorROPU32 run_colors[2]={RED,GREEN};
#define MD_MODES_NUM 6
CColorROPU32 mode_colors[MD_MODES_NUM]=
{BROWN,LTGRAY,DKGRAY,RED,PURPLE,RED};
DefineLstLoad("ST_SPAN_MODES","Mass\0Concrete\0Steel\0Wire\0Move\0Delete\0");
DefineListLoad("ST_SPAN_MODES","Mass\0Concrete\0Steel\0Wire\0Move\0Delete\0");
class SpanAnimateStruct
{

View File

@ -27,7 +27,7 @@ class MySpring:CSpring
#define MMD_PLAY 1
#define MMD_MODES_NUM 2
CColorROPU32 main_mode_colors[MMD_MODES_NUM]={LTRED,LTGREEN};
DefineLstLoad("ST_MAIN_MODES","Edit\0Play\0");
DefineListLoad("ST_MAIN_MODES","Edit\0Play\0");
CCtrlBttnState main_mode_bttn;
//Edit Modes
@ -38,7 +38,7 @@ CCtrlBttnState main_mode_bttn;
#define EMD_MOVE 4
#define EMD_MODES_NUM 5
CColorROPU32 edit_mode_colors[EMD_MODES_NUM]={LTGRAY,LTCYAN,CYAN,YELLOW,LTBLUE};
DefineLstLoad("ST_EDIT_MODES","Mass\0Spring\0Connector\0Thruster\0Move\0");
DefineListLoad("ST_EDIT_MODES","Mass\0Spring\0Connector\0Thruster\0Move\0");
CCtrlBttnState edit_mode_bttn;
CTask *task;

View File

@ -5,7 +5,7 @@ U8 *RandVocabWord()
if (!acd.num_words)
return NULL;
i=RandU32%acd.num_words;
ptr=acd.word_lst;
ptr=acd.word_list;
while (i-- && *ptr==ACD_WORD_CHAR)
ptr+=StrLen(ptr)+3;
if (*ptr++!=ACD_WORD_CHAR)

View File

@ -919,7 +919,7 @@ U0 ParseAsmBlk(CCompCtrl *cc,I64 cmp_flags)
Lex(cc);
}
while (cc->token && cc->token!='}') {
AsmLineLst(cc);
AsmLineList(cc);
if (cc->token==TK_IDENT && cc->hash_entry) {
if (cc->hash_entry->type&HTT_ASM_KEYWORD) {
i=cc->hash_entry->user_data0;
@ -946,7 +946,7 @@ U0 ParseAsmBlk(CCompCtrl *cc,I64 cmp_flags)
Lex(cc); //skip ';';
break;
case AKW_ORG:
if (cc->htc.local_var_lst)
if (cc->htc.local_var_list)
LexExcept(cc,"ORG not allowed in fun asm blk ");
if (aotc->org!=INVALID_PTR)
LexExcept(cc,"Just one org allowed ");
@ -955,7 +955,7 @@ U0 ParseAsmBlk(CCompCtrl *cc,I64 cmp_flags)
aotc->org=AsmLexExpression(cc);
break;
case AKW_ALIGN:
if (cc->htc.local_var_lst)
if (cc->htc.local_var_list)
LexExcept(cc,"ALIGN not allowed in fun asm blk ");
i=AsmLexExpression(cc);
j=Bsf(i);
@ -988,10 +988,10 @@ U0 ParseAsmBlk(CCompCtrl *cc,I64 cmp_flags)
ParseBinFile(cc);
break;
case AKW_LIST:
aotc->lst=TRUE;
aotc->list=TRUE;
break;
case AKW_NOLIST:
aotc->lst=FALSE;
aotc->list=FALSE;
break;
case AKW_USE16:
aotc->seg_size=16;
@ -1078,7 +1078,7 @@ U0 ParseAsmBlk(CCompCtrl *cc,I64 cmp_flags)
HashAdd(tmpex,cc->htc.local_hash_table);
} else
HashAdd(tmpex,cc->htc.glbl_hash_table);
if (cc->htc.local_var_lst) {//AsmBlk in fun? Also add goto-like label.
if (cc->htc.local_var_list) {//AsmBlk in fun? Also add goto-like label.
if (!(g_lb=COCGoToLabelFind(cc,tmpex->str))) {
g_lb=COCMiscNew(cc,CMT_ASM_LABEL);
g_lb->str=StrNew(tmpex->str);
@ -1109,6 +1109,6 @@ U0 ParseAsmBlk(CCompCtrl *cc,I64 cmp_flags)
break;
}
AOTLocalsResolve(cc);
aotc->lst=FALSE;
aotc->list=FALSE;
cc->flags&=cc->flags&~CCF_ASM_EXPRESSIONS|old_flags;
}

View File

@ -4,7 +4,7 @@ U0 AsmPrsInsFlags(CCompCtrl *cc,CInst *tmpins)
while (TRUE) {
switch (cc->token) {
case TK_IDENT:
if ((i=LstMatch(cc->cur_str,"NO\0CB\0CW\0CD\0CP\0IB\0IW\0ID\0"))>=0) {
if ((i=ListMatch(cc->cur_str,"NO\0CB\0CW\0CD\0CP\0IB\0IW\0ID\0"))>=0) {
tmpins->opcode_modifier=i;
break;
} else
@ -69,12 +69,12 @@ U0 AsmHashLoad()
tmpo_max=MAlloc(size_max);
cc=CompCtrlNew(FileRead("OpCodes.DD"),,"OpCodes.DD");
cc->htc.hash_table_lst=NULL;
cc->htc.hash_table_list=NULL;
Lex(cc);
while (cc->token) {
if (cc->token!=TK_IDENT)
LexExcept(cc,"Expecting identifier at ");
i=LstMatch(cc->cur_str,"NONE\0R8\0R16\0R32\0R64\0SEG\0FSTK\0"
i=ListMatch(cc->cur_str,"NONE\0R8\0R16\0R32\0R64\0SEG\0FSTK\0"
"MM\0XMM\0OPCODE\0KEYWORD\0ASM_KEYWORD\0");
if (i<=0)
LexExcept(cc,"Unknown Statement");

View File

@ -15,13 +15,13 @@ U0 AOTStoreCodeU8(CCompCtrl *cc,U8 b)
break;
}
tmpbin->body[aotc->rip++ & (AOT_BIN_BLK_SIZE-1)]=b;
if (aotc->lst) {
if (aotc->lst_col>=24) {
if (aotc->list) {
if (aotc->list_col>=24) {
'\n';
aotc->lst_col=0;
aotc->list_col=0;
}
"%02X ",b;
aotc->lst_col+=3;
aotc->list_col+=3;
}
if (aotc->rip>aotc->num_bin_U8s)
aotc->num_bin_U8s=aotc->rip;
@ -52,13 +52,13 @@ U0 AOTStoreCodeU32(CCompCtrl *cc,U32 d)
_d=tmpbin->body+ aotc->rip&(AOT_BIN_BLK_SIZE-1);
*_d=d;
aotc->rip+=sizeof(U32);
if (aotc->lst) {
if (aotc->lst_col>=24) {
if (aotc->list) {
if (aotc->list_col>=24) {
'\n';
aotc->lst_col=0;
aotc->list_col=0;
}
"%08X ",d;
aotc->lst_col+=9;
aotc->list_col+=9;
}
if (aotc->rip>aotc->num_bin_U8s)
aotc->num_bin_U8s=aotc->rip;
@ -90,13 +90,13 @@ U0 AOTStoreCodeU64(CCompCtrl *cc,U64 q)
_q=tmpbin->body+ aotc->rip&(AOT_BIN_BLK_SIZE-1);
*_q=q;
aotc->rip+=sizeof(I64);
if (aotc->lst) {
if (aotc->lst_col>=24) {
if (aotc->list) {
if (aotc->list_col>=24) {
'\n';
aotc->lst_col=0;
aotc->list_col=0;
}
"%016X ",q;
aotc->lst_col+=17;
aotc->list_col+=17;
}
if (aotc->rip>aotc->num_bin_U8s)
aotc->num_bin_U8s=aotc->rip;
@ -144,32 +144,32 @@ I64 AsmLexExpression(CCompCtrl *cc)
return res;
}
U0 AsmLineLst(CCompCtrl *cc)
U0 AsmLineList(CCompCtrl *cc)
{
CAOTCtrl *aotc=cc->aotc;
CLexFile *tmpf=cc->lex_include_stk;
CDocEntry *doc_e=tmpf->line_start,*doc_e2;
if (aotc->lst && aotc->lst_last_lfn==tmpf && doc_e) {
if (doc_e2=aotc->lst_last_line) {
if (aotc->list && aotc->list_last_lfn==tmpf && doc_e) {
if (doc_e2=aotc->list_last_line) {
if (tmpf->flags& LFSF_DOC) {
while (doc_e2->y<doc_e->y) {
"%h*c%08X",24-aotc->lst_col,CH_SPACE,aotc->lst_last_rip;
aotc->lst_col=0;
"%h*c%08X",24-aotc->list_col,CH_SPACE,aotc->list_last_rip;
aotc->list_col=0;
doc_e2=LexPutLine(cc,doc_e2);
}
} else {
while (*doc_e2(U8 *) && doc_e2!=doc_e) {
"%h*c%08X",24-aotc->lst_col,CH_SPACE,aotc->lst_last_rip;
aotc->lst_col=0;
"%h*c%08X",24-aotc->list_col,CH_SPACE,aotc->list_last_rip;
aotc->list_col=0;
doc_e2=LexPutLine(cc,doc_e2);
}
}
aotc->lst_last_line=doc_e2;
aotc->list_last_line=doc_e2;
} else
aotc->lst_last_line=doc_e;
aotc->list_last_line=doc_e;
} else {
aotc->lst_last_line=NULL;
aotc->lst_last_lfn=tmpf;
aotc->list_last_line=NULL;
aotc->list_last_lfn=tmpf;
}
aotc->lst_last_rip=aotc->rip;
aotc->list_last_rip=aotc->rip;
}

View File

@ -8,8 +8,8 @@ U0 AsmResolve(CCompCtrl *cc,CAsmUnresolvedRef *tmpu,U8 *label,Bool undefined)
while (tmpauh) {
if (tmpauh->hash->type & HTF_UNRESOLVED) {
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->next=tmpauh->hash->ie_lst;
tmpauh->hash->ie_lst=tmpie;
tmpie->next=tmpauh->hash->ie_list;
tmpauh->hash->ie_list=tmpie;
tmpie->rip=tmpu->rip;
tmpie->aot=cc->aot;
tmpie->type=tmpu->type;
@ -64,12 +64,12 @@ U0 AOTLocalsResolve(CCompCtrl *cc)
if (!undefined)
AsmResolve(cc,tmpu,label,FALSE);
Free(tmpu->machine_code);
LinkedLstDel(tmpu->asm_undef_hash);
LinkedListDel(tmpu->asm_undef_hash);
Free(tmpu);
tmpu=tmpu1;
}
HashTableDel(cc->htc.local_hash_table);
cc->htc.hash_table_lst=cc->htc.local_hash_table=HashTableNew(16);
cc->htc.hash_table_list=cc->htc.local_hash_table=HashTableNew(16);
cc->htc.local_hash_table->next=cc->htc.glbl_hash_table;
aotc->local_unresolved=NULL;
}
@ -97,14 +97,14 @@ U0 AOTGlobalsResolve(CCompCtrl *cc,CAOT *tmpaot)
tmpex=tmpauh->hash;
if (tmpex->type & HTT_EXPORT_SYS_SYM&& tmpex->type & HTF_UNRESOLVED &&
!(tmpex->type & HTF_IMPORT) &&
(tmpf=HashFind(tmpex->str,cc->htc.hash_table_lst,HTT_FUN)) &&
(tmpf=HashFind(tmpex->str,cc->htc.hash_table_list,HTT_FUN)) &&
!Bt(&tmpf->flags,Cf_EXTERN)) {
tmpex->val=tmpf->exe_addr;
tmpex->type&=~HTF_UNRESOLVED;
label=tmpauh->hash->str;
} else {
if (!(tmpex->type & HTF_IMPORT)) {
if (cc->htc.local_var_lst) {
if (cc->htc.local_var_list) {
tmpex->type|=HTF_GOTO_LABEL;
tmpex->use_count++;
} else {
@ -126,7 +126,7 @@ U0 AOTGlobalsResolve(CCompCtrl *cc,CAOT *tmpaot)
}
AsmResolve(cc,tmpu,label,undefined);
Free(tmpu->machine_code);
LinkedLstDel(tmpu->asm_undef_hash);
LinkedListDel(tmpu->asm_undef_hash);
Free(tmpu);
tmpu=tmpu1;
}
@ -135,7 +135,7 @@ U0 AOTGlobalsResolve(CCompCtrl *cc,CAOT *tmpaot)
tmpex=cc->htc.glbl_hash_table->body[i];
while (tmpex) {
if (tmpex->type & (HTF_IMPORT|HTF_GOTO_LABEL)) {
if (tmpex->use_count && (tmpie=tmpex->ie_lst)) {
if (tmpex->use_count && (tmpie=tmpex->ie_list)) {
if (tmpex->type&HTF_GOTO_LABEL)
tmpie->flags|=IEF_GOTO_LABEL;
if (tmpex->import_name)
@ -146,7 +146,7 @@ U0 AOTGlobalsResolve(CCompCtrl *cc,CAOT *tmpaot)
tmpie1=tmpie->next;
QueueInsert(tmpie,tmpaot->last_ie);
} while (tmpie=tmpie1);
tmpex->ie_lst=NULL;
tmpex->ie_list=NULL;
}
} else if (tmpex->type & (HTF_EXPORT|HTF_RESOLVE)) {
if (tmpex->type & HTF_UNRESOLVED) {
@ -155,7 +155,7 @@ U0 AOTGlobalsResolve(CCompCtrl *cc,CAOT *tmpaot)
}
if (tmpex->type & HTF_RESOLVE) {
tmpf=tmpex;
tmpeu=tmpf->ext_lst;
tmpeu=tmpf->ext_list;
while (tmpeu) {
tmpeu8=tmpeu->next;
j=tmpf->exe_addr-(tmpeu->rip+4);

View File

@ -268,7 +268,7 @@ U0 ICFPow(CCompCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 rip)
I64 i;
CAOTImportExport *tmpie;
CHashExport *tmpex=HashFind("SYS_POW",
cc->htc.hash_table_lst,HTT_EXPORT_SYS_SYM);
cc->htc.hash_table_list,HTT_EXPORT_SYS_SYM);
ICMov(tmpi,MDF_REG+RT_I64,REG_RAX,0,
tmpi->arg2.type,tmpi->arg2.reg,tmpi->arg2.disp,rip);
@ -289,8 +289,8 @@ U0 ICFPow(CCompCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 rip)
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_IMM_I64;
tmpie->rip=rip+tmpi->ic_count-8;
tmpie->next=tmpex->ie_lst;
tmpex->ie_lst=tmpie;
tmpie->next=tmpex->ie_list;
tmpex->ie_list=tmpie;
}
ICU16(tmpi,0xD3FF);
} else {
@ -300,8 +300,8 @@ U0 ICFPow(CCompCtrl *cc,CIntermediateCode *tmpi,U8 *buf,I64 rip)
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_REL_I32;
tmpie->rip=rip+tmpi->ic_count-4;
tmpie->next=tmpex->ie_lst;
tmpex->ie_lst=tmpie;
tmpie->next=tmpex->ie_list;
tmpex->ie_list=tmpie;
}
}
} else {//Kernel

View File

@ -30,12 +30,12 @@ extern Bool ParseStatement(CCompCtrl *cc,I64 try_count=0,
CCodeMisc *lb_break=NULL,I64 cmp_flags=CMPF_PRS_SEMICOLON);
extern U0 ParseStreamBlk(CCompCtrl *cc);
extern CHashClass *ParseType(CCompCtrl *cc,CHashClass **_tmpc1,
I64 *_mode,CMemberLst *tmpm,U8 **_ident,CHashFun **_fun_ptr,
I64 *_mode,CMemberList *tmpm,U8 **_ident,CHashFun **_fun_ptr,
CHashExport **_tmpex,CArrayDim *tmpad,I64 fsp_flags);
extern I64 ParseUnaryModifier(CCompCtrl *cc,CPrsStk *ps,
CMemberLst **_local_var,CArrayDim **_tmpad,I64 *unary_post_prec);
CMemberList **_local_var,CArrayDim **_tmpad,I64 *unary_post_prec);
extern I64 ParseUnaryTerm(
CCompCtrl *cc,CPrsStk *ps,CMemberLst **_local_var,CArrayDim **_tmpad,
CCompCtrl *cc,CPrsStk *ps,CMemberList **_local_var,CArrayDim **_tmpad,
I64 *max_prec,I64 *unary_pre_prec,I64 *paren_prec);
extern U0 ParseVarInit2(CCompCtrl *cc,U8 **_dst,CHashClass *tmpc,
CArrayDim *tmpad,U8 *data_addr_rip,U8 **_base,Bool data_heap,I64 pass);

View File

@ -40,13 +40,13 @@ I64 HashEntrySize2(CHashSrcSym *tmph)
res+=MSize2(tmph->src_link);
res+=MSize2(tmph->idx);
res+=MSize2(tmph->import_name);
res+=LinkedLstSize(tmph->ie_lst);
res+=LinkedListSize(tmph->ie_list);
if (tmph->type & (HTT_FUN | HTT_EXPORT_SYS_SYM))
res+=MSize2(tmph->dbg_info);
if (tmph->type & HTT_CLASS)
res+=MemberLstSize(tmph);
res+=MemberListSize(tmph);
else if (tmph->type & HTT_FUN) {
res+=MemberLstSize(tmph);
res+=MemberListSize(tmph);
if (dbg_info=tmph->dbg_info)
//This should be $LK,"MSize",A="MN:MSize"$() but it would crash on AOT .BIN file funs.
res+=dbg_info->body[dbg_info->max_line+1-dbg_info->min_line]
@ -54,7 +54,7 @@ I64 HashEntrySize2(CHashSrcSym *tmph)
} else if (tmph->type&HTT_DEFINE_STR)
res+=MSize2(tmph(CHashDefineStr *)->data);
else if (tmph->type & HTT_GLBL_VAR) {
res+=LinkedLstSize(tmph(CHashGlobalVar *)->dim.next);
res+=LinkedListSize(tmph(CHashGlobalVar *)->dim.next);
if (!(tmph(CHashGlobalVar *)->flags&GVF_ALIAS))
res+=MSize2(tmph(CHashGlobalVar *)->data_addr);
if (tmph(CHashGlobalVar *)->fun_ptr)

View File

@ -203,28 +203,28 @@ CIntermediateStruct intermediate_code_table[IC_ICS_NUM]={
U0 CompLoadDefines()
{
DefineLstLoad("ST_RAW_TYPES",
DefineListLoad("ST_RAW_TYPES",
"\0\0I0\0U0\0I8\0U8\0I16\0U16\0I32\0U32\0I64\0U64\0"
"F32\0UF32\0F64\0UF64\0");
DefineLstLoad("ST_NATURAL_TYPES",
DefineListLoad("ST_NATURAL_TYPES",
"I8\0U8\0I16\0U16\0I32\0U32\0I64\0U64\0F64\0String\0");
DefineLstLoad("ST_INT_SIZE_TYPES",
DefineListLoad("ST_INT_SIZE_TYPES",
"I8\0U8\0I16\0U16\0I32\0U32\0I64\0U64\0");
DefineLstLoad("ST_TY_TYPES","NULL\0STK\0IMM\0REG\0DISP\0SIB\0RIP\0");
DefineLstLoad("ST_U8_REGS","AL\0CL\0DL\0BL\0AH\0CH\0DH\0BH\0"
DefineListLoad("ST_TY_TYPES","NULL\0STK\0IMM\0REG\0DISP\0SIB\0RIP\0");
DefineListLoad("ST_U8_REGS","AL\0CL\0DL\0BL\0AH\0CH\0DH\0BH\0"
"R8u8\0R9u8\0R10u8\0R11u8\0R12u8\0R13u8\0R14u8\0R15u8\0");
DefineLstLoad("ST_U8_REX_REGS","AL\0CL\0DL\0BL\0RSPu8\0RBPu8\0RSIu8\0RDIu8\0"
DefineListLoad("ST_U8_REX_REGS","AL\0CL\0DL\0BL\0RSPu8\0RBPu8\0RSIu8\0RDIu8\0"
"R8u8\0R9u8\0R10u8\0R11u8\0R12u8\0R13u8\0R14u8\0R15u8\0");
DefineLstLoad("ST_U16_REGS","AX\0CX\0DX\0BX\0SP\0BP\0SI\0DI\0"
DefineListLoad("ST_U16_REGS","AX\0CX\0DX\0BX\0SP\0BP\0SI\0DI\0"
"R8u16\0R9u16\0R10u16\0R11u16\0R12u16\0R13u16\0R14u16\0R15u16\0");
DefineLstLoad("ST_U32_REGS","EAX\0ECX\0EDX\0EBX\0ESP\0EBP\0ESI\0EDI\0"
DefineListLoad("ST_U32_REGS","EAX\0ECX\0EDX\0EBX\0ESP\0EBP\0ESI\0EDI\0"
"R8u32\0R9u32\0R10u32\0R11u32\0R12u32\0R13u32\0R14u32\0R15u32\0");
DefineLstLoad("ST_U64_REGS","RAX\0RCX\0RDX\0RBX\0RSP\0RBP\0RSI\0RDI\0"
DefineListLoad("ST_U64_REGS","RAX\0RCX\0RDX\0RBX\0RSP\0RBP\0RSI\0RDI\0"
"R8\0R9\0R10\0R11\0R12\0R13\0R14\0R15\0");
DefineLstLoad("ST_MM_REGS","MM0\0MM1\0MM2\0MM3\0MM4\0MM5\0MM6\0MM7\0");
DefineLstLoad("ST_XMM_REGS",
DefineListLoad("ST_MM_REGS","MM0\0MM1\0MM2\0MM3\0MM4\0MM5\0MM6\0MM7\0");
DefineListLoad("ST_XMM_REGS",
"XMM0\0XMM1\0XMM2\0XMM3\0XMM4\0XMM5\0XMM6\0XMM7\0");
DefineLstLoad("ST_ARG_TYPES","NONE\0REL8\0REL16\0REL32\0"
DefineListLoad("ST_ARG_TYPES","NONE\0REL8\0REL16\0REL32\0"
"IMM8\0IMM16\0IMM32\0IMM64\0UIMM8\0UIMM16\0UIMM32\0UIMM64\0"
"R8\0R16\0R32\0R64\0RM8\0RM16\0RM32\0RM64\0"
"M8\0M16\0M32\0M64\0M1632\0M16N32\0M16N16\0M32N32\0"
@ -232,8 +232,8 @@ U0 CompLoadDefines()
"AL\0AX\0EAX\0RAX\0CL\0DX\0\0SREG\0"
"SS\0DS\0ES\0FS\0GS\0CS\0ST0\0STI\0"
"MM\0MM32\0MM64\0XMM\0XMM32\0XMM64\0XMM128\0XMM0\0");
DefineLstLoad("ST_SEG_REGS","ES\0CS\0SS\0DS\0FS\0GS\0");
DefineLstLoad("ST_FSTK_REGS","ST0\0ST1\0ST2\0ST3\0ST4\0ST5\0ST6\0ST7\0");
DefineListLoad("ST_SEG_REGS","ES\0CS\0SS\0DS\0FS\0GS\0");
DefineListLoad("ST_FSTK_REGS","ST0\0ST1\0ST2\0ST3\0ST4\0ST5\0ST6\0ST7\0");
}
U0 CompFillTables()

View File

@ -70,9 +70,9 @@ CAOT *CompJoin(CCompCtrl *cc,I64 cmp_flags,U8 *map_name=NULL,U8 mapfile_drv_let=
cc->htc.glbl_hash_table->next=htc->glbl_hash_table;
} else
cc->htc.glbl_hash_table->next=Fs->hash_table;
cc->htc.hash_table_lst=cc->htc.local_hash_table=HashTableNew(16);
cc->htc.hash_table_list=cc->htc.local_hash_table=HashTableNew(16);
cc->htc.local_hash_table->next=cc->htc.glbl_hash_table;
cc->htc.local_var_lst=cc->htc.fun; //HolyC local vars
cc->htc.local_var_list=cc->htc.fun; //HolyC local vars
cc->htc.fun=NULL;
try {
if (cmp_flags&CMPF_LEX_FIRST)
@ -106,7 +106,7 @@ CAOT *CompJoin(CCompCtrl *cc,I64 cmp_flags,U8 *map_name=NULL,U8 mapfile_drv_let=
cc->error_count=1;
cc->aot=res->parent_aot;
Free(res);
LinkedLstDel(aotc->bin);
LinkedListDel(aotc->bin);
res=NULL;
} else {
if (map_name)
@ -139,7 +139,7 @@ CAOT *CompJoin(CCompCtrl *cc,I64 cmp_flags,U8 *map_name=NULL,U8 mapfile_drv_let=
tmpbin=tmpbin->next;
}
}
LinkedLstDel(aotc->bin);
LinkedListDel(aotc->bin);
res->abss=aotc->abss;
res->heap_glbls=aotc->heap_glbls;
res->max_align_bits=aotc->max_align_bits;

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -395,7 +395,7 @@ class CIntermediateStruct
class COptReg
{
I64 offset;
CMemberLst *m;
CMemberList *m;
};
#define CMPF_ASM_BLK 1

View File

@ -24,7 +24,7 @@ public extern Bool Trace(Bool val=ON);
#help_index "Compiler/Lex"
#help_file "::/Doc/Lex"
extern U0 ClassMemberLstDel(CHashClass *c);
extern U0 ClassMemberListDel(CHashClass *c);
public extern U0 CompCtrlDel(CCompCtrl *cc);
public extern CCompCtrl *CompCtrlNew(U8 *buf=NULL,I64 flags=0,U8 *filename=NULL);
public extern I64 CompCtrlSize(CCompCtrl *cc);
@ -53,12 +53,12 @@ public extern U0 LexSkipEol(CCompCtrl *cc);
public extern U8 *LexStatement2Bin(
CCompCtrl *cc,I64 *_type,I64 cmp_flags=CMPF_PRS_SEMICOLON);
public extern U0 LexWarn(CCompCtrl *cc,U8 *str=NULL);
extern CMemberLst *MemberClassBaseFind(
extern CMemberList *MemberClassBaseFind(
CHashClass *needle_class,CHashClass *haystack_class);
public extern CMemberLst *MemberFind(U8 *needle_str,CHashClass *haystack_class);
extern U0 MemberLstDel(CMemberLst *tmpm);
public extern I64 MemberMetaData(U8 *st,CMemberLst *ml);
public extern CMemberLstMeta *MemberMetaFind(U8 *st,CMemberLst *ml);
public extern CMemberList *MemberFind(U8 *needle_str,CHashClass *haystack_class);
extern U0 MemberListDel(CMemberList *tmpm);
public extern I64 MemberMetaData(U8 *st,CMemberList *ml);
public extern CMemberListMeta *MemberMetaFind(U8 *st,CMemberList *ml);
public extern CHashClass *OptClassFwd(CHashClass *tmpc);
public extern I64 ParseKeyWord(CCompCtrl *cc);

View File

@ -36,7 +36,7 @@ CCompCtrl *CompCtrlNew(U8 *buf=NULL,I64 flags=0,U8 *filename=NULL)
cc->flags=flags;
cc->opts=1<<OPTf_WARN_UNUSED_VAR|1<<OPTf_WARN_HEADER_MISMATCH;
cc->htc.hash_mask=HTG_TYPE_MASK-HTT_IMPORT_SYS_SYM;
cc->htc.define_hash_table=cc->htc.hash_table_lst=
cc->htc.define_hash_table=cc->htc.hash_table_list=
cc->htc.glbl_hash_table=cc->htc.local_hash_table=Fs->hash_table;
if (flags&CCF_KEEP_AT_SIGN)
cc->char_bmp_alpha_numeric=char_bmp_alpha_numeric_no_at;
@ -58,8 +58,8 @@ CCompCtrl *CompCtrlNew(U8 *buf=NULL,I64 flags=0,U8 *filename=NULL)
U0 CompCtrlDel(CCompCtrl *cc)
{//Free CCompCtrl.
while (LexFilePop(cc));
LinkedLstDel(cc->lex_prs_stk);
LinkedLstDel(cc->htc.next);
LinkedListDel(cc->lex_prs_stk);
LinkedListDel(cc->htc.next);
Free(cc->ps);
Free(cc->cur_str);
Free(cc->cur_help_idx);
@ -491,12 +491,12 @@ lex_ident:
}
buf[i++]=0;
tmph=NULL;
if (cc->htc.local_var_lst)
cc->local_var_entry=MemberFind(buf,cc->htc.local_var_lst);
if (cc->htc.local_var_list)
cc->local_var_entry=MemberFind(buf,cc->htc.local_var_list);
else
cc->local_var_entry=NULL;
if (!cc->local_var_entry && cc->htc.hash_table_lst)
tmph=HashFind(buf,cc->htc.hash_table_lst,cc->htc.hash_mask);
if (!cc->local_var_entry && cc->htc.hash_table_list)
tmph=HashFind(buf,cc->htc.hash_table_list,cc->htc.hash_mask);
if (tmph)
j=tmph->type;
else

View File

@ -42,9 +42,9 @@ U0 LexPopNoRestore(CCompCtrl *cc)
Free(tmpf);
}
I64 MemberMetaData(U8 *needle_str,CMemberLst *haystack_member_lst)
I64 MemberMetaData(U8 *needle_str,CMemberList *haystack_member_list)
{//Find meta data name, return meta data val. See $LK,"::/Demo/ClassMeta.HC"$.
CMemberLstMeta *meta=haystack_member_lst->meta;
CMemberListMeta *meta=haystack_member_list->meta;
while (meta) {
if (!StrCmp(meta->str,needle_str))
return meta->user_data;
@ -53,9 +53,9 @@ I64 MemberMetaData(U8 *needle_str,CMemberLst *haystack_member_lst)
return 0;
}
CMemberLstMeta *MemberMetaFind(U8 *needle_str,CMemberLst *haystack_member_lst)
CMemberListMeta *MemberMetaFind(U8 *needle_str,CMemberList *haystack_member_list)
{//Find meta data name, return meta data struct. See $LK,"::/Demo/ClassMeta.HC"$.
CMemberLstMeta *meta=haystack_member_lst->meta;
CMemberListMeta *meta=haystack_member_list->meta;
while (meta) {
if (!StrCmp(meta->str,needle_str))
return meta;
@ -64,12 +64,12 @@ CMemberLstMeta *MemberMetaFind(U8 *needle_str,CMemberLst *haystack_member_lst)
return NULL;
}
CMemberLst *MemberFind(U8 *needle_str,CHashClass *haystack_class)
CMemberList *MemberFind(U8 *needle_str,CHashClass *haystack_class)
{//Find class member. See $LK,"ClassRep",A="MN:ClassRep"$() and $LK,"DocForm",A="MN:DocForm"$().
I64 i;
CMemberLst *tmpm;
CMemberList *tmpm;
do {
tmpm=haystack_class->member_lst_and_root;
tmpm=haystack_class->member_list_and_root;
while (tmpm) {
if (!(i=StrCmp(tmpm->str,needle_str))) {
tmpm->use_count++;
@ -84,10 +84,10 @@ CMemberLst *MemberFind(U8 *needle_str,CHashClass *haystack_class)
return NULL;
}
CMemberLst *MemberClassBaseFind(CHashClass *needle_class,
CMemberList *MemberClassBaseFind(CHashClass *needle_class,
CHashClass *haystack_class)
{//Find class member class base. For finding dup class local vars.
CMemberLst *tmpm;
CMemberList *tmpm;
tmpm=haystack_class->member_class_base_root;
while (tmpm) {
if (needle_class==tmpm->member_class_base)
@ -100,15 +100,15 @@ CMemberLst *MemberClassBaseFind(CHashClass *needle_class,
return NULL;
}
U0 MemberAdd(CCompCtrl *cc,CMemberLst *tmpm,CHashClass *tmpc,I64 mode)
U0 MemberAdd(CCompCtrl *cc,CMemberList *tmpm,CHashClass *tmpc,I64 mode)
{
U8 *st=tmpm->str;
CMemberLst **tmpm1,*tmpm2;
CMemberList **tmpm1,*tmpm2;
if (MemberFind(st,tmpc) && StrCmp(st,"pad") &&
StrCmp(st,"reserved") && StrCmp(st,"_anon_"))
LexExcept(cc,"Duplicate member at ");
tmpm1=&tmpc->member_lst_and_root;
tmpm1=&tmpc->member_list_and_root;
while (tmpm2=*tmpm1) {
if (StrCmp(tmpm2->str,st)<=0)
tmpm1=&tmpm2->left;
@ -143,18 +143,18 @@ U0 MemberAdd(CCompCtrl *cc,CMemberLst *tmpm,CHashClass *tmpc,I64 mode)
tmpm->right=NULL;
tmpm->left_class_base=NULL;
tmpm->right_class_base=NULL;
tmpm2=tmpc->last_in_member_lst;
tmpm2->next=tmpc->last_in_member_lst=tmpm;
tmpm2=tmpc->last_in_member_list;
tmpm2->next=tmpc->last_in_member_list=tmpm;
}
CMemberLst *MemberLstNew(I64 _reg)
CMemberList *MemberListNew(I64 _reg)
{
CMemberLst *res=CAlloc(sizeof(CMemberLst));
CMemberList *res=CAlloc(sizeof(CMemberList));
res->reg=_reg;
return res;
}
Bool MemberLstCmp(CMemberLst *tmpm1,CMemberLst *tmpm2,I64 count=I64_MAX)
Bool MemberListCmp(CMemberList *tmpm1,CMemberList *tmpm2,I64 count=I64_MAX)
{
while (tmpm1 && tmpm2 && count--) {
if (StrCmp(tmpm1->str,tmpm2->str) ||
@ -180,14 +180,14 @@ Bool MemberLstCmp(CMemberLst *tmpm1,CMemberLst *tmpm2,I64 count=I64_MAX)
return FALSE;
}
U0 MemberLstDel(CMemberLst *tmpm)
U0 MemberListDel(CMemberList *tmpm)
{
CMemberLst *tmpm1;
CMemberLstMeta *tmp_meta,*tmp_meta1;
CMemberList *tmpm1;
CMemberListMeta *tmp_meta,*tmp_meta1;
while (tmpm) {
tmpm1=tmpm->next;
Free(tmpm->str);
LinkedLstDel(tmpm->dim.next);
LinkedListDel(tmpm->dim.next);
if (tmpm->flags & MLF_STR_DFT_AVAILABLE)
Free(tmpm->dft_val);
if (tmpm->flags & MLF_FUN)
@ -206,27 +206,27 @@ U0 MemberLstDel(CMemberLst *tmpm)
}
}
U0 ClassMemberLstDel(CHashClass *tmpc)
U0 ClassMemberListDel(CHashClass *tmpc)
{
MemberLstDel(tmpc->member_lst_and_root);
MemberListDel(tmpc->member_list_and_root);
tmpc->size=0;
tmpc->last_in_member_lst=&tmpc->member_lst_and_root;
tmpc->member_lst_and_root=NULL;
tmpc->last_in_member_list=&tmpc->member_list_and_root;
tmpc->member_list_and_root=NULL;
tmpc->member_class_base_root=NULL;
tmpc->member_count=0;
if (tmpc->type&HTT_FUN)
tmpc(CHashFun *)->arg_count=0;
}
I64 MemberLstSize(CHashClass *tmpc)
I64 MemberListSize(CHashClass *tmpc)
{
CMemberLst *tmpm;
CMemberLstMeta *tmp_meta;
CMemberList *tmpm;
CMemberListMeta *tmp_meta;
I64 res=0;
tmpm=tmpc->member_lst_and_root;
tmpm=tmpc->member_list_and_root;
while (tmpm) {
res+=MSize2(tmpm->str);
res+=LinkedLstSize(tmpm->dim.next);
res+=LinkedListSize(tmpm->dim.next);
if (tmpm->flags & MLF_STR_DFT_AVAILABLE)
res+=MSize2(tmpm->dft_val);
if (tmpm->flags & MLF_FUN)

View File

@ -556,7 +556,7 @@ U0 CompF2PushPop(CIntermediateCode *tmpi,
class COptMemberVar
{
I64 score,offset_start,offset_end,lea_balance;
CMemberLst *m;
CMemberList *m;
};
I64 OptMVCompare(COptMemberVar *mv1,COptMemberVar *mv2)

View File

@ -5,7 +5,7 @@ U0 OptPass3(CCompCtrl *cc,COptReg *reg_offsets)
CIntermediateCode *tmpi,*tmpi1,*tmpi2,*tmpi_next,
*tmpil1,*tmpil2;
I64 code,i,j,l,member_count,used_reg_mask=0;
CMemberLst *tmpm;
CMemberList *tmpm;
COptMemberVar *mv=NULL;
CAOT *tmpaot;
CAOTImportExport *tmpie;
@ -23,7 +23,7 @@ U0 OptPass3(CCompCtrl *cc,COptReg *reg_offsets)
member_count+=2;
mv=CAlloc(member_count*sizeof(COptMemberVar));
member_count=0;
tmpm=cc->htc.fun->member_lst_and_root;
tmpm=cc->htc.fun->member_list_and_root;
while (tmpm) {
tmpc=OptClassFwd(tmpm->member_class);
if (0<=tmpm->reg<REG_REGS_NUM) {

View File

@ -129,8 +129,8 @@ cc->pass==10 is final pass, code is placed into buf.
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_IMM_U32;
tmpie->rip=rip2+tmpi->ic_count-4;
tmpie->next=tmpg->ie_lst;
tmpg->ie_lst=tmpie;
tmpie->next=tmpg->ie_list;
tmpg->ie_list=tmpie;
}
ICU24(tmpi,0xC06348);
break;
@ -337,8 +337,8 @@ cc->pass==10 is final pass, code is placed into buf.
if (buf) {
tmpf=tmpi->ic_data;
tmpeu=CAlloc(sizeof(CExternUsage));
tmpeu->next=tmpf->ext_lst;
tmpf->ext_lst=tmpeu;
tmpeu->next=tmpf->ext_list;
tmpf->ext_list=tmpeu;
tmpeu->rip=rip2+1;
}
break;
@ -364,8 +364,8 @@ cc->pass==10 is final pass, code is placed into buf.
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_IMM_I64;
tmpie->rip=rip2+tmpi->ic_count-8;
tmpie->next=tmpf->ie_lst;
tmpf->ie_lst=tmpie;
tmpie->next=tmpf->ie_list;
tmpf->ie_list=tmpie;
}
ICU16(tmpi,0xD3FF);
} else {
@ -376,8 +376,8 @@ cc->pass==10 is final pass, code is placed into buf.
tmpie=CAlloc(sizeof(CAOTImportExport));
tmpie->type=IET_REL_I32;
tmpie->rip=rip2+tmpi->ic_count-4;
tmpie->next=tmpf->ie_lst;
tmpf->ie_lst=tmpie;
tmpie->next=tmpf->ie_list;
tmpf->ie_list=tmpie;
}
}
break;

View File

@ -68,7 +68,7 @@ U0 ParseExpression2(CCompCtrl *cc,I64 *_max_prec,CPrsStk *ps)
unary_post_prec,left_prec=PREC_MAX;
CIntermediateCode *tmpi;
CHashClass *tmpc;
CMemberLst *local_var;
CMemberList *local_var;
CArrayDim *tmpad=NULL;
goto pe_unary_term1;
@ -303,7 +303,7 @@ Bool ParseExpression(CCompCtrl *cc,I64 *_max_prec,Bool end_exp,CPrsStk *_ps=NULL
U0 ParseSizeOf(CCompCtrl *cc)
{
CHashClass *tmpc;
CMemberLst *tmpm;
CMemberList *tmpm;
CDebugInfo *dbg_info;
I64 i;
if (cc->token!=TK_IDENT)
@ -353,7 +353,7 @@ pu_sizeof_member:
U0 ParseOffsetOf(CCompCtrl *cc)
{
CHashClass *tmpc;
CMemberLst *tmpm;
CMemberList *tmpm;
I64 i;
if (cc->token!=TK_IDENT)
LexExcept(cc,"Invalid class at ");
@ -386,21 +386,21 @@ I64 ParseFunCall(CCompCtrl *cc,CPrsStk *ps,Bool indirect,CHashFun *tmpf)
Bool is_first_arg=TRUE,needs_right_paren,is_print,is_putchars,
is_template_fun;
CHashClass *tmpc2,*last_class=NULL;
CMemberLst *tmpm;
CMemberList *tmpm;
CCodeCtrl *tmpcbh,*tmpcbh1;
CCodeMisc *cm;
CIntermediateCode *tmpi;
if (!tmpf) {
if (cc->token==TK_CHAR_CONST) {
if (!(tmpf=HashFind("PutChars",cc->htc.hash_table_lst,HTT_FUN)))
if (!(tmpf=HashFind("PutChars",cc->htc.hash_table_list,HTT_FUN)))
LexExcept(cc,"Missing header for Print() and PutChars() at ");
if (!cc->cur_i64) //empty char signals PutChars with variable
Lex(cc);
is_print=FALSE;
is_putchars=TRUE;
} else {
if (!(tmpf=HashFind("Print",cc->htc.hash_table_lst,HTT_FUN)))
if (!(tmpf=HashFind("Print",cc->htc.hash_table_list,HTT_FUN)))
LexExcept(cc,"Missing header for Print() and PutChars() at ");
if (!*cc->cur_str) //empty string signals Print with variable fmt_str
Lex(cc);
@ -428,7 +428,7 @@ I64 ParseFunCall(CCompCtrl *cc,CPrsStk *ps,Bool indirect,CHashFun *tmpf)
tmpcbh=cc->coc.coc_next;
cc->coc.coc_next=NULL;
i=tmpf->arg_count;
tmpm=tmpf->member_lst_and_root;
tmpm=tmpf->member_list_and_root;
argc_count=0;
if (cc->token=='(') {
Lex(cc);
@ -590,7 +590,7 @@ I64 ParseFunCall(CCompCtrl *cc,CPrsStk *ps,Bool indirect,CHashFun *tmpf)
return PE_UNARY_MODIFIERS;
}
I64 ParseUnaryTerm(CCompCtrl *cc,CPrsStk *ps,CMemberLst **_local_var,
I64 ParseUnaryTerm(CCompCtrl *cc,CPrsStk *ps,CMemberList **_local_var,
CArrayDim **_tmpad,I64 *max_prec,I64 *unary_pre_prec,I64 *paren_prec)
{
I64 i,j;
@ -598,7 +598,7 @@ I64 ParseUnaryTerm(CCompCtrl *cc,CPrsStk *ps,CMemberLst **_local_var,
CHashClass *tmpc;
CHashFun *tmpf;
CHashGlobalVar *tmpg;
CMemberLst *tmpm;
CMemberList *tmpm;
CAsmUndefHash *tmpauh;
CCodeMisc *cm;
Bool paren_warn;
@ -627,7 +627,7 @@ I64 ParseUnaryTerm(CCompCtrl *cc,CPrsStk *ps,CMemberLst **_local_var,
if (Bt(&tmpf->flags,Cf_EXTERN)) {
if (cc->flags&CCF_AOT_COMPILE) {
if (cc->flags&CCF_ASM_EXPRESSIONS) {
if (tmpex=HashFind(tmpf->str,cc->htc.hash_table_lst,
if (tmpex=HashFind(tmpf->str,cc->htc.hash_table_list,
HTT_EXPORT_SYS_SYM))
goto pu_export_sys_sym;
else
@ -815,7 +815,7 @@ pu_new_sys_sym:
tmpex=CAlloc(sizeof(CHashExport),Fs->code_heap);
tmpex->str=cc->cur_str;
cc->cur_str=NULL;
if (!cc->htc.local_var_lst &&
if (!cc->htc.local_var_list &&
*tmpex->str=='@' && tmpex->str[1]=='@') {
tmpex->type=HTT_EXPORT_SYS_SYM | HTF_UNRESOLVED | HTF_LOCAL;
HashAdd(tmpex,cc->htc.local_hash_table);
@ -957,12 +957,12 @@ pu_export_sys_sym:
LexExcept(cc,"Missing expression at ");
}
I64 ParseUnaryModifier(CCompCtrl *cc,CPrsStk *ps,CMemberLst **_local_var,
I64 ParseUnaryModifier(CCompCtrl *cc,CPrsStk *ps,CMemberList **_local_var,
CArrayDim **_tmpad,I64 *unary_post_prec)
{
CHashClass *tmpc,*tmpc1;
CHashFun *fun_ptr;
CMemberLst *tmpm=*_local_var;
CMemberList *tmpm=*_local_var;
CIntermediateCode *tmpi,*tmpi1;
CArrayDim *tmpad1,tmpad2;
CCodeMisc *cm;

View File

@ -54,7 +54,7 @@ for one * and two fwd for two **.
tmpc->ptr_stars_count=i;
tmpc++;
}
res->last_in_member_lst=&res->member_lst_and_root;
res->last_in_member_list=&res->member_list_and_root;
res->size=0;
return res;
}
@ -71,7 +71,7 @@ CHashFun *ParseFunNew()
tmpf->ptr_stars_count=i;
tmpf++;
}
res->last_in_member_lst=&res->member_lst_and_root;
res->last_in_member_list=&res->member_list_and_root;
res->size=0;
return res;
}
@ -209,7 +209,7 @@ U0 COCDel(CCompCtrl *cc,CCodeCtrl *coc)
Free(cm->float_consts);
break;
case CMT_ARRAY_DIM:
LinkedLstDel(cm->dim);
LinkedListDel(cm->dim);
break;
case CMT_HASH_ENTRY:
HashDel(cm->h);

View File

@ -51,9 +51,9 @@ CHashClass *ParseClass(CCompCtrl *cc,I64 keyword,I64 fsp_flags,Bool is_extern)
tmpc->size+=base_class->size;
}
if (keyword==KW_UNION)
ParseVarLst(cc,tmpc,PRS0_NULL|PRS1_CLASS|PRSF_UNION);
ParseVarList(cc,tmpc,PRS0_NULL|PRS1_CLASS|PRSF_UNION);
else
ParseVarLst(cc,tmpc,PRS0_NULL|PRS1_CLASS);
ParseVarList(cc,tmpc,PRS0_NULL|PRS1_CLASS);
tmpc->size+=tmpc->neg_offset;
}
return tmpc;
@ -62,7 +62,7 @@ CHashClass *ParseClass(CCompCtrl *cc,I64 keyword,I64 fsp_flags,Bool is_extern)
CHashFun *ParseFunJoin(CCompCtrl *cc,CHashClass *tmp_return,
U8 *name,I64 fsp_flags)
{
CMemberLst *tmpm,*header_lst;
CMemberList *tmpm,*header_list;
CAOTCtrl *aotc=cc->aotc;
CHashClass *header_return;
CHashFun *tmpf;
@ -88,10 +88,10 @@ CHashFun *ParseFunJoin(CCompCtrl *cc,CHashClass *tmp_return,
tmpf->idx=NULL;
Free(name);
header_arg_count=tmpf->arg_count;
header_lst=tmpf->member_lst_and_root;
header_list=tmpf->member_list_and_root;
header_return=tmpf->return_class;
tmpf->member_lst_and_root=NULL;
ClassMemberLstDel(tmpf);
tmpf->member_list_and_root=NULL;
ClassMemberListDel(tmpf);
} else {
tmpf=ParseFunNew;
header_return=NULL;
@ -111,11 +111,11 @@ CHashFun *ParseFunJoin(CCompCtrl *cc,CHashClass *tmp_return,
tmpf->return_class=tmp_return;
tmpf->use_count=0;
HashSrcFileSet(cc,tmpf);
ParseVarLst(cc,tmpf,PRS0_NULL|PRS1_FUN_ARG);
ParseVarList(cc,tmpf,PRS0_NULL|PRS1_FUN_ARG);
tmpf->arg_count=tmpf->member_count;
if (0<tmpf->arg_count<<3<=I16_MAX && !Bt(&tmpf->flags,Ff_DOT_DOT_DOT))
LBts(&tmpf->flags,Ff_RET1);
tmpm=tmpf->member_lst_and_root;
tmpm=tmpf->member_list_and_root;
while (tmpm) {
tmpm->offset+=16; //RBP+RETURN
tmpm=tmpm->next;
@ -127,19 +127,19 @@ CHashFun *ParseFunJoin(CCompCtrl *cc,CHashClass *tmp_return,
PrintWarn("Fun Header return mismatch '%s'\n",tmpf->str);
cc->warning_count++;
}
if (!MemberLstCmp(tmpf->member_lst_and_root,header_lst,header_arg_count)) {
if (!MemberListCmp(tmpf->member_list_and_root,header_list,header_arg_count)) {
PrintWarn("Fun header args mismatch '%s'\n",tmpf->str);
cc->warning_count++;
}
}
MemberLstDel(header_lst);
MemberListDel(header_list);
}
return tmpf;
}
U0 ParseFun(CCompCtrl *cc,CHashClass *tmp_return,U8 *name,I64 fsp_flags)
{
CMemberLst *tmpm;
CMemberList *tmpm;
CCodeMisc *saved_leave_label;
I64 i,j,size,*r;
Bool old_trace;
@ -148,7 +148,7 @@ U0 ParseFun(CCompCtrl *cc,CHashClass *tmp_return,U8 *name,I64 fsp_flags)
cc->min_line=cc->max_line=cc->lex_include_stk->line_num;
cc->flags&=~CCF_NO_REG_OPT;
cc->htc.local_var_lst=cc->htc.fun=ParseFunJoin(cc,tmp_return,name,fsp_flags);
cc->htc.local_var_list=cc->htc.fun=ParseFunJoin(cc,tmp_return,name,fsp_flags);
COCPush(cc);
Btr(&cc->flags,CCf_PASS_TRACE_PRESENT);
@ -190,7 +190,7 @@ U0 ParseFun(CCompCtrl *cc,CHashClass *tmp_return,U8 *name,I64 fsp_flags)
}
LBtr(&cc->htc.fun->flags,Cf_EXTERN);
COCPop(cc);
tmpm=cc->htc.fun->member_lst_and_root;
tmpm=cc->htc.fun->member_list_and_root;
while (tmpm) {
if (tmpm->flags & MLF_NO_UNUSED_WARN) {
if (tmpm->use_count>1&&StrCmp(tmpm->str,"_anon_"))
@ -203,10 +203,10 @@ U0 ParseFun(CCompCtrl *cc,CHashClass *tmp_return,U8 *name,I64 fsp_flags)
tmpm->str,cc->htc.fun->str);
tmpm=tmpm->next;
}
cc->htc.local_var_lst=cc->htc.fun=cc->fun_lex_file=NULL;
cc->htc.local_var_list=cc->htc.fun=cc->fun_lex_file=NULL;
}
U0 ParseGlobalVarLst(CCompCtrl *cc,I64 saved_mode,CHashClass *saved_tmpc,
U0 ParseGlobalVarList(CCompCtrl *cc,I64 saved_mode,CHashClass *saved_tmpc,
I64 saved_val,I64 fsp_flags)
{
I64 i,j,mode,k,val;
@ -790,7 +790,7 @@ sw_sub_end:
U0 ParseNoWarn(CCompCtrl *cc)
{
CMemberLst *tmpm;
CMemberList *tmpm;
while (cc->token==TK_IDENT) {
if (!(tmpm=cc->local_var_entry))
LexExcept(cc,"Expecting local var at ");
@ -814,8 +814,8 @@ U0 ParseStreamBlk(CCompCtrl *cc)
MemCpy(htc,&cc->htc,sizeof(CLexHashTableContext));
htc->old_flags=cc->flags;
cc->htc.next=htc;
cc->htc.fun=cc->htc.local_var_lst=NULL;
cc->htc.define_hash_table=cc->htc.hash_table_lst=
cc->htc.fun=cc->htc.local_var_list=NULL;
cc->htc.define_hash_table=cc->htc.hash_table_list=
cc->htc.glbl_hash_table=cc->htc.local_hash_table=Fs->hash_table;
cc->flags=cc->flags & ~(CCF_ASM_EXPRESSIONS|CCF_AOT_COMPILE) | CCF_EXE_BLK;
if (cc->token=='{')
@ -843,8 +843,8 @@ U0 ParseTryBlk(CCompCtrl *cc,I64 try_count)
{
CCodeMisc *lb_catch,*lb_done,*lb_untry;
CHashClass *tmpc=cmp.internal_types[RT_PTR];
CHashFun *tmp_try=HashFind("SysTry",cc->htc.hash_table_lst,HTT_FUN),
*tmp_untry=HashFind("SysUntry",cc->htc.hash_table_lst,HTT_FUN);
CHashFun *tmp_try=HashFind("SysTry",cc->htc.hash_table_list,HTT_FUN),
*tmp_untry=HashFind("SysUntry",cc->htc.hash_table_list,HTT_FUN);
if (!tmp_try || !tmp_untry)
LexExcept(cc,"Missing header for SysTry() and SysUntry() at ");
@ -1007,7 +1007,7 @@ Bool ParseStatement(CCompCtrl *cc,I64 try_count=0,
!(tmpex->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
LexExcept(cc,"Expecting type at ");
Lex(cc);
ParseGlobalVarLst(cc,PRS0__EXTERN|PRS1_NULL,tmpex,i,fsp_flags);
ParseGlobalVarList(cc,PRS0__EXTERN|PRS1_NULL,tmpex,i,fsp_flags);
break;
case KW__IMPORT:
sm_underscore_import:
@ -1021,7 +1021,7 @@ sm_underscore_import:
!(tmpex->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
LexExcept(cc,"Expecting type at ");
Lex(cc);
ParseGlobalVarLst(cc,PRS0__IMPORT|PRS1_NULL,tmpex,
ParseGlobalVarList(cc,PRS0__IMPORT|PRS1_NULL,tmpex,
import_name,fsp_flags);
Free(import_name);
break;
@ -1042,7 +1042,7 @@ sm_underscore_import:
if (Bt(&cc->opts,OPTf_EXTERNS_TO_IMPORTS))
goto sm_import;
Lex(cc);
ParseGlobalVarLst(cc,PRS0_EXTERN|PRS1_NULL,tmpex,0,fsp_flags);
ParseGlobalVarList(cc,PRS0_EXTERN|PRS1_NULL,tmpex,0,fsp_flags);
break;
case KW_IMPORT:
if (cc->token!=TK_IDENT || !(tmpex=cc->hash_entry) ||
@ -1050,7 +1050,7 @@ sm_underscore_import:
LexExcept(cc,"Expecting type at ");
sm_import:
Lex(cc);
ParseGlobalVarLst(cc,PRS0_IMPORT|PRS1_NULL,tmpex,0,fsp_flags);
ParseGlobalVarList(cc,PRS0_IMPORT|PRS1_NULL,tmpex,0,fsp_flags);
break;
case KW__INTERN:
i=LexExpressionI64(cc);
@ -1058,7 +1058,7 @@ sm_import:
!(tmpex->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
LexExcept(cc,"Expecting type at ");
Lex(cc);
ParseGlobalVarLst(cc,PRS0__INTERN|PRS1_NULL,tmpex,i,fsp_flags);
ParseGlobalVarList(cc,PRS0__INTERN|PRS1_NULL,tmpex,i,fsp_flags);
break;
end:
fsp_flags&=FSF_ASM;
@ -1091,7 +1091,7 @@ sm_import:
LexExcept(cc,"Not in fun. Can't return a val ");
if (try_count) {
tmp_untry=HashFind("SysUntry",
cc->htc.hash_table_lst,HTT_FUN);
cc->htc.hash_table_list,HTT_FUN);
for (i=0;i<try_count;i++) {
if (Bt(&tmp_untry->flags,Cf_EXTERN)) {
cc->abs_counts.externs++;
@ -1145,7 +1145,7 @@ sm_import:
Lex(cc);
tmpex=ParseClass(cc,i,fsp_flags,FALSE);
if (!cc->htc.fun && cc->token!=';') {
ParseGlobalVarLst(cc,PRS0_NULL|PRS1_NULL,tmpex,0,fsp_flags);
ParseGlobalVarList(cc,PRS0_NULL|PRS1_NULL,tmpex,0,fsp_flags);
fsp_flags&=FSF_ASM;
break;
} else {
@ -1158,13 +1158,13 @@ sm_not_keyword_afterall:
if (tmpex->type & (HTT_CLASS|HTT_INTERNAL_TYPE)) {
if (cc->htc.fun) {
if (fsp_flags&FSF_STATIC)
ParseVarLst(cc,cc->htc.fun,PRS0_NULL|PRS1_STATIC_LOCAL_VAR);
ParseVarList(cc,cc->htc.fun,PRS0_NULL|PRS1_STATIC_LOCAL_VAR);
else
ParseVarLst(cc,cc->htc.fun,PRS0_NULL|PRS1_LOCAL_VAR);
ParseVarList(cc,cc->htc.fun,PRS0_NULL|PRS1_LOCAL_VAR);
if (cc->token=='}') goto sm_done;
} else {
Lex(cc);
ParseGlobalVarLst(cc,PRS0_NULL|PRS1_NULL,tmpex,0,fsp_flags);
ParseGlobalVarList(cc,PRS0_NULL|PRS1_NULL,tmpex,0,fsp_flags);
}
} else {
if (tmpex->type & (HTT_OPCODE|HTT_ASM_KEYWORD)) {

View File

@ -3,7 +3,7 @@ U0 ParseVarInit(CCompCtrl *cc,U8 **_dst,CHashClass *tmpc,CArrayDim *tmpad,
{
U8 *dst=*_dst,*machine_code;
I64 i,j,r,old_flags,type,size;
CMemberLst *tmpm;
CMemberList *tmpm;
CIntermediateCode *tmpi;
CAOTCtrl *aotc=cc->aotc;
CAOTAbsAddr *tmpa;
@ -11,7 +11,7 @@ U0 ParseVarInit(CCompCtrl *cc,U8 **_dst,CHashClass *tmpc,CArrayDim *tmpad,
Bool is_str;
tmpc=OptClassFwd(tmpc);
if (tmpm=tmpc->member_lst_and_root) {
if (tmpm=tmpc->member_list_and_root) {
if (cc->token!='{')
LexExcept(cc,"Expecting '{' at ");
LexPopNoRestore(cc);
@ -212,7 +212,7 @@ U0 ParseGlobalInit(CCompCtrl *cc,CHashGlobalVar *tmpg,I64 pass)
Bt(&cc->flags,CCf_AOT_COMPILE),pass);
}
U0 ParseStaticInit(CCompCtrl *cc,CMemberLst *tmpm,I64 pass)
U0 ParseStaticInit(CCompCtrl *cc,CMemberList *tmpm,I64 pass)
{
U8 *machine_code,*dst=tmpm->static_data;
CHashClass *tmpc=tmpm->member_class;
@ -283,7 +283,7 @@ U0 ParseArrayDims(CCompCtrl *cc,I64 mode,CArrayDim *dim)
}
CHashClass *ParseType(CCompCtrl *cc,CHashClass **_tmpc1,
I64 *_mode,CMemberLst *tmpm,U8 **_ident,CHashFun **_fun_ptr,
I64 *_mode,CMemberList *tmpm,U8 **_ident,CHashFun **_fun_ptr,
CHashExport **_tmpex,CArrayDim *tmpad,I64 fsp_flags)
{
I64 k,ptr_stars_count,mode=*_mode;
@ -372,13 +372,13 @@ CHashClass *ParseType(CCompCtrl *cc,CHashClass **_tmpc1,
U0 ParseDotDotDot(CCompCtrl *cc,CHashFun *tmpf,I64 _reg)
{
CMemberLst *tmpm;
CMemberList *tmpm;
CArrayDim *tmpad;
Bts(&tmpf->flags,Ff_DOT_DOT_DOT);
Lex(cc);
tmpm=MemberLstNew(_reg);
tmpm=MemberListNew(_reg);
tmpm->flags=MLF_DOT_DOT_DOT;
tmpm->member_class=cmp.internal_types[RT_I64];
tmpm->str=StrNew("argc");
@ -387,7 +387,7 @@ U0 ParseDotDotDot(CCompCtrl *cc,CHashFun *tmpf,I64 _reg)
tmpf->size+=8;
MemberAdd(cc,tmpm,tmpf,PRS1B_FUN_ARG);
tmpm=MemberLstNew(_reg);
tmpm=MemberListNew(_reg);
tmpm->flags=MLF_DOT_DOT_DOT;
tmpm->member_class=cmp.internal_types[RT_I64];
tmpm->str=StrNew("argv");
@ -405,13 +405,13 @@ U0 ParseDotDotDot(CCompCtrl *cc,CHashFun *tmpf,I64 _reg)
Lex(cc);
}
U0 ParseVarLst(CCompCtrl *cc,CHashClass *tmpc,I64 mode,I64 union_base=0)
U0 ParseVarList(CCompCtrl *cc,CHashClass *tmpc,I64 mode,I64 union_base=0)
{
I64 i,k,old_flags=cc->flags,old_flags2,type,_reg;
CHashClass *tmpc1,*tmpc2;
CHash *tmph;
CMemberLst *tmpm;
CMemberLstMeta *tmp_meta;
CMemberList *tmpm;
CMemberListMeta *tmp_meta;
U8 *machine_code;
Bool undef_array_size,first;
cc->flags|=CCF_DONT_MAKE_RES;
@ -478,7 +478,7 @@ pvl_restart1:
k=ParseKeyWord(cc);
if (k==KW_UNION) {
Lex(cc);
ParseVarLst(cc,tmpc,mode|PRSF_UNION,tmpc->size);
ParseVarList(cc,tmpc,mode|PRSF_UNION,tmpc->size);
} else {
if (!(tmph->type & (HTT_CLASS|HTT_INTERNAL_TYPE)))
LexExcept(cc,"Expecting type at ");
@ -487,7 +487,7 @@ pvl_restart2:
tmpc1=tmph;
LexPush(cc);
Lex(cc); //skip type or ','
tmpm=MemberLstNew(_reg);
tmpm=MemberListNew(_reg);
_reg=REG_UNDEF;
if (mode.u8[1]==PRS1B_STATIC_LOCAL_VAR) {
tmpm->flags|=MLF_STATIC;
@ -673,7 +673,7 @@ pvl_restart3:
cc->class_dol_offset=tmpc->size;
while (cc->token==TK_IDENT) {
tmp_meta=MAlloc(sizeof(CMemberLstMeta));
tmp_meta=MAlloc(sizeof(CMemberListMeta));
tmp_meta->next=tmpm->meta;
tmpm->meta=tmp_meta;
tmp_meta->str=cc->cur_str;

View File

@ -212,7 +212,7 @@ $FG,5$$TX+CX,"Bugs? Not really sure."$$FG$
$FG,5$$TX+CX,"TODO? Not really, just angst."$$FG$
* Should these be moved into $LK,"CHashClass",A="MN:CHashClass"$ from $LK,"CMemberLst",A="MN:CMemberLst"$ and $LK,"CHashGlobalVar",A="MN:CHashGlobalVar"$?
* Should these be moved into $LK,"CHashClass",A="MN:CHashClass"$ from $LK,"CMemberList",A="MN:CMemberList"$ and $LK,"CHashGlobalVar",A="MN:CHashGlobalVar"$?
$ID,5$CArrayDim dim;
CHashFun *fun_ptr;
$ID,-5$

View File

@ -271,7 +271,7 @@ class CWebBookMarkForm
I64 sec;
};
DefineLstLoad("ST_FAMLY_PHOTOS","Family1_58-78\0Family2_78-86\0"
DefineListLoad("ST_FAMLY_PHOTOS","Family1_58-78\0Family2_78-86\0"
"Family3_86-99\0Family4_99\0");
class CFamilyPhotoForm

View File

@ -35,8 +35,8 @@ U0 DumpStruct(U8 *_d,U8 *class_name=lastclass)
U0 (* fp_output_fun)(I64 i);
F64 percentile;
if (!tmpc) return;
CMemberLst *ml;
ml=tmpc->member_lst_and_root;
CMemberList *ml;
ml=tmpc->member_list_and_root;
while (ml) {
"%s:",ml->str;
@ -53,7 +53,7 @@ U0 DumpStruct(U8 *_d,U8 *class_name=lastclass)
//This corrects for the ambiguity, allowing zero percentile.
if (MemberMetaFind("percentile",ml)) {//check if it exists
//We could use the $LK,"CMemberLstMeta",A="MN:CMemberLstMeta"$ structure returned by
//We could use the $LK,"CMemberListMeta",A="MN:CMemberListMeta"$ structure returned by
//$LK,"MemberMetaFind",A="MN:MemberMetaFind"$() and save a search.
percentile=MemberMetaData("percentile",ml)(F64);
" percentile: %5.2f",percentile;

View File

@ -3,7 +3,7 @@
//These might be in the Zenith task.
DefineLoad("ST_YES_NO","(Yes or No)");
DefineLoad("ST_EXIT","Exit");
DefineLstLoad("ST_NO_YES_LST","No\0Yes\0");
DefineListLoad("ST_NO_YES_LIST","No\0Yes\0");
//New strings might be loaded for each user
//to override.
@ -12,7 +12,7 @@ DefineLstLoad("ST_NO_YES_LST","No\0Yes\0");
if (YorN) {
DefineLoad("ST_YES_NO","(Si or No)");
DefineLoad("ST_EXIT","Salida");
DefineLstLoad("ST_NO_YES_LST","No\0Si\0");
DefineListLoad("ST_NO_YES_LIST","No\0Si\0");
}
Bool Quit()
@ -23,7 +23,7 @@ Bool Quit()
while (TRUE) {
"%S %S?","ST_EXIT","ST_YES_NO";
st=GetStr;
i=DefineMatch(st,"ST_NO_YES_LST",LMF_IGNORE_CASE);
i=DefineMatch(st,"ST_NO_YES_LIST",LMF_IGNORE_CASE);
if (i>=0) {
res=i;
break;

View File

@ -16,7 +16,7 @@ class FDStruct
U0 FormDemo()
{
FDStruct fds;
DefineLstLoad("ST_PERSON_TYPE","Child\0Teen\0Adult\0");
DefineListLoad("ST_PERSON_TYPE","Child\0Teen\0Adult\0");
fds.num1=12.3e-4; //Set defaults
fds.num2=4.5e3;
fds.num3=0x1234;

View File

@ -1,4 +1,4 @@
//This loads a lst of zero terminated
//This loads a list of zero terminated
//strings into the sym table and
//gives a name to it.Strings like
//this are known as Define entries.

View File

@ -595,7 +595,7 @@ lt_restart:
}
break;
case MESSAGE_MS_R_UP:
i=PopUpPickLst("Reflect Line\0Reflect Spline\0Refract Line\0"
i=PopUpPickList("Reflect Line\0Reflect Spline\0Refract Line\0"
"Refract Spline\0Refract Flood Fill\0TestRay\0");
if (i>=0) {
mode=i;

View File

@ -14,7 +14,7 @@ as int and lower 32-bits as fraction.
See $LK,"::/Demo/SubIntAccess.HC"$ for how
to access upper or lower 32-bits.
For a complete lst of nonstandard compiler
For a complete list of nonstandard compiler
features, see $LK,"::/Doc/HolyC.DD"$.
*/
@ -68,7 +68,7 @@ because the compiler decides it cannot
place i into a reg, so there is a
penalty.
For a complete lst of nonstandard compiler
For a complete list of nonstandard compiler
features, see $LK,"::/Doc/HolyC.DD"$.
*/

View File

@ -1,7 +1,7 @@
U8 char_map[26]="22233344455566677778889999";
/*
Fmt of word lst entry:
Fmt of word list entry:
U8 ACD_WORD_CHAR
U8 word[] with terminating zero
I16 block; //definition offset in ::/Zenith/AutoComplete/ACDefs.DATA
@ -10,7 +10,7 @@ U0 PhoneNumWords(U8 *num)
{
I64 ch;
U8 *_num=StrNew(num),*dst=_num,
*dict=acd.word_lst,*st,*src;
*dict=acd.word_list,*st,*src;
while (*num) {
if ('0'<=*num<='9')
*dst++=*num;

View File

@ -3,9 +3,9 @@
U8 a[N];
class Lst
class List
{
Lst *next;
List *next;
U8 *a;
} l[N],*r[RADIX];
@ -20,7 +20,7 @@ U0 DumpIn()
U0 DumpOut()
{
I64 i,j=0;
Lst *tmpl;
List *tmpl;
"$$RED$$\n\nOutput$$FG$$\n";
for (i=0;i<RADIX;i++) {
tmpl=r[i];

View File

@ -1,7 +1,7 @@
#define M_DASH_THRESHOLD 0.140
#define M_SPACE_THRESHOLD 0.300
U8 *morse_lst=
U8 *morse_list=
"A.-\0"
"B-...\0"
@ -61,13 +61,13 @@ U0 MorseTable()
U8 *st;
I64 i=0;
for (i=0;i<13;i++ ) {
if (st=LstSub(i,morse_lst))
if (st=ListSub(i,morse_list))
"$$RED$$%C$$FG$$ %-7s ",*st,st+1;
if (st=LstSub(i+13,morse_lst))
if (st=ListSub(i+13,morse_list))
"$$RED$$%C$$FG$$ %-7s ",*st,st+1;
if (st=LstSub(i+26,morse_lst))
if (st=ListSub(i+26,morse_list))
"$$RED$$%C$$FG$$ %-7s ",*st,st+1;
if (st=LstSub(i+39,morse_lst))
if (st=ListSub(i+39,morse_list))
"$$RED$$%C$$FG$$ %-7s ",*st,st+1;
'\n';
}
@ -153,7 +153,7 @@ U0 Morse()
ch=MorseWaitKey;
if (ch==CH_SPACE) {
*dst=0;
src=morse_lst;
src=morse_list;
while (*src) {
if (!StrCmp(src+1,buf)) {
"$$GREEN$$%C$$FG$$",*src;

View File

@ -21,7 +21,7 @@ U8 *SuggestMatchForm(U8 *src)
return res;
}
/*Fmt of word lst entry:
/*Fmt of word list entry:
U8 ACD_WORD_CHAR
U8 word[] with terminating zero
I16 block; //definition offset in ::/Zenith/AutoComplete/ACDefs.DATA
@ -29,7 +29,7 @@ U8 *SuggestMatchForm(U8 *src)
Bool SuggestSpelling(U8 *word)
{
U8 *dict=acd.word_lst,
U8 *dict=acd.word_list,
*pf=SuggestMatchForm(word),
*wf;
I64 len=StrLen(pf),

View File

@ -26,7 +26,7 @@ I64 MyUtilFile(U8 *filename,I64 fuf_flags)
DocDel(doc);
return res;
}
I64 MyUtilLst(CDirEntry *tmpde,I64 fuf_flags)
I64 MyUtilList(CDirEntry *tmpde,I64 fuf_flags)
{
I64 res=0;
CDirEntry *tmpde1;
@ -35,7 +35,7 @@ I64 MyUtilLst(CDirEntry *tmpde,I64 fuf_flags)
if (tmpde->attr & RS_ATTR_DIR) {
if (tmpde->sub) {
"Processing Directory: %s\n",tmpde->full_name;
res+=MyUtilLst(tmpde->sub,fuf_flags);
res+=MyUtilList(tmpde->sub,fuf_flags);
}
} else
res+=MyUtilFile(tmpde->full_name,fuf_flags);
@ -49,6 +49,6 @@ I64 MyUtil(U8 *files_find_mask="*",U8 *fu_flags=NULL)
I64 fuf_flags=0;
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r+$$");
ScanFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags);
return MyUtilLst(FilesFind(files_find_mask,fuf_flags&FUG_FILES_FIND),
return MyUtilList(FilesFind(files_find_mask,fuf_flags&FUG_FILES_FIND),
fuf_flags&~FUG_FILES_FIND);
}

View File

@ -38,7 +38,7 @@ U0 ParseSingleLogFile(LogStruct *head,U8 *name,CDate *_dstart,CDate *_dend)
CDoc *doc=DocRead(name,
DOCF_PLAIN_TEXT_TABS|DOCF_DBL_DOLLARS|DOCF_NO_CURSOR);
CDocEntry *doc_e=doc->head.next;
U8 *src,*src2,*mon_lst=Define("ST_MONTHS");
U8 *src,*src2,*mon_list=Define("ST_MONTHS");
LogStruct *tmplg;
CDateStruct ds;
I64 i;
@ -65,7 +65,7 @@ U0 ParseSingleLogFile(LogStruct *head,U8 *name,CDate *_dstart,CDate *_dend)
do if (!*src2) throw;
while (*src2++!='/');
* --src2=0;
ds.mon=1+LstMatch(src,mon_lst,LMF_IGNORE_CASE);
ds.mon=1+ListMatch(src,mon_list,LMF_IGNORE_CASE);
src=++src2;
ds.year=Str2I64(src,10,&src);
if (*src++!=':') throw;
@ -141,7 +141,7 @@ LogStruct *ParseLogFiles(U8 *files_find_mask,CDate *_dstart,CDate *_dend)
return head;
}
U0 LogLstDel(LogStruct *head)
U0 LogListDel(LogStruct *head)
{
LogStruct *tmplg=head->next,*tmplg1;
while (tmplg!=head) {
@ -178,7 +178,7 @@ U0 BlockIPNuip(LogStruct *head)
BlockedStructAdd(&blocked_head,68<<24+227<<16+61<<8+6);
//pass 1: collect robot lst
//pass 1: collect robot list
while (tmplg!=head) {
if (StrIMatch("ROBOT",tmplg->file) &&
!IsBlocked(&blocked_head,tmplg->ip_num))
@ -519,7 +519,7 @@ U0 WebLogRep(U8 *mask,U8 *output_filename)
"$$WW,1$$";
}
LogLstDel(head);
LogListDel(head);
}
#if __CMD_LINE__

View File

@ -90,7 +90,7 @@ I64 WordsCompare(U8 *e1,U8 *e2)
return StrCmp(e1,e2);
}
/*Fmt of word lst entry:
/*Fmt of word list entry:
U8 ACD_WORD_CHAR
U8 word[] with terminating zero
I16 block; //definition offset in ::/Zenith/AutoComplete/ACDefs.DATA
@ -99,7 +99,7 @@ I64 WordsCompare(U8 *e1,U8 *e2)
U0 DisplayWords(I64 n)
{
I64 i=0,k;
U8 *w1,*w2,*dict=acd.word_lst;
U8 *w1,*w2,*dict=acd.word_list;
for (i=0;i<n;i++)
while (*dict) {
w1=word_ptrs[i];

View File

@ -20,7 +20,7 @@ I, $FG,2$Terry A. Davis$FG$, wrote all of ZenithOS over the past $TX,"13.9",D="D
*) A few features were inspired by $FG,2$MATLAB$FG$, such as $FG,2$ans$FG$ in expressions at the command-line. There is a lot of $FG,2$MSDOS$FG$ , $FG,2$Windows$FG$, $FG,2$VAXTMOS$FG$ (VAX Ticketmaster O.S.) and $FG,2$Unix$FG$ inspiration, too, such as drive letters, command names, etc.
*) I included $LK,"PCIDevice Lst File",A="FI:::/Misc/PCIDevices.DD",HTML="http://www.pcidatabase.com/reports.php?type=tab-delimeted"$.
*) I included $LK,"PCIDevice List File",A="FI:::/Misc/PCIDevices.DD",HTML="http://www.pcidatabase.com/reports.php?type=tab-delimeted"$.
*) Thanks to whoever wrote this $FG,4$$TX,"CppHtml.HC",HTML="http://web.archive.org/web/20100325153025/http://home.scarlet.be/zoetrope/cpphtml.htm"$$FG$. I'm a novice on web stuff and you helped me with html. See $LK,"::/Demo/ToHtmlToTXTDemo/ToHtml.HC"$.

View File

@ -1,4 +1,4 @@
$WW,1$ZenithOS has a string indirection feature implemented with the same hash symbol table entry as $FG,2$#define$FG$ macros, $LK,"HTT_DEFINE_STR",A="MN:HTT_DEFINE_STR"$. Support for string lists is also provided, but it's not very efficient, though, you can make a hash table with a list using $LK,"HashDefineLstAdd",A="MN:HashDefineLstAdd"$(). See $LK,"::/Zenith/DolDoc/DocInit.HC",A="FF:::/Zenith/DolDoc/DocInit.HC,HashDefineLstAdd"$.
$WW,1$ZenithOS has a string indirection feature implemented with the same hash symbol table entry as $FG,2$#define$FG$ macros, $LK,"HTT_DEFINE_STR",A="MN:HTT_DEFINE_STR"$. Support for string lists is also provided, but it's not very efficient, though, you can make a hash table with a list using $LK,"HashDefineListAdd",A="MN:HashDefineListAdd"$(). See $LK,"::/Zenith/DolDoc/DocInit.HC",A="FF:::/Zenith/DolDoc/DocInit.HC,HashDefineListAdd"$.
If you have an $FG,2$@$FG$ as the first char of a define list entry, it is an alias for the prev entry num.

View File

@ -83,7 +83,7 @@ $FG,2$Let$FG$ Letter
$FG,2$Lex$FG$ Lexical Analyser
$FG,2$Loc$FG$ Location, Lines of Code
$FG,2$Log$FG$ Logarithm, Logical
$FG,2$Lst$FG$ List
$FG,2$List$FG$ List
$FG,2$Man$FG$ Manual
$FG,2$Mem$FG$ Memory
$FG,2$Mgd$FG$ Managed

Binary file not shown.

View File

@ -45,9 +45,9 @@ $FG,2$"%D"$FG$ date. Pass a $LK,"CDate",A="MN:CDate"$.
$FG,2$"%T"$FG$ time. Pass a $LK,"CDate",A="MN:CDate"$.
$FG,2$"%z"$FG$ sub_entry of an enumerated list of text entries. See $LK,"LstSub",A="MN:LstSub"$(). Pass sub_entry_num first, list second.
$FG,2$"%z"$FG$ sub_entry of an enumerated list of text entries. See $LK,"ListSub",A="MN:ListSub"$(). Pass sub_entry_num first, list second.
$FG,2$"%Z"$FG$ $LK,"DefineLstLoad",A="MN:DefineLstLoad"$() subentry. Pass sub_entry_num first, define_name second.
$FG,2$"%Z"$FG$ $LK,"DefineListLoad",A="MN:DefineListLoad"$() subentry. Pass sub_entry_num first, define_name second.
$FG,2$"%Q"$FG$ convert "\" to "\\" and quote to backslash quote. (For use in creating strs in strs.)

Binary file not shown.

View File

@ -287,7 +287,7 @@ I64 MountIDEAuto()
}
tmpha=tmpha->next;
}
LinkedLstDel(head);
LinkedListDel(head);
blkdev.mount_ide_auto_count=res;
return res;
}

View File

@ -17,7 +17,7 @@ Bool ISOInit(CDrive *dv,I64 blk)
BlkRead(dv,iso,i*spc,spc);
buf[0](U32)=iso->id[0](U32);
buf[4](U16)=iso->id[4](U8);
switch (LstMatch(buf,"CD001\0CDW02\0BEA01\0BOOT2\0NSR02\0NSR03\0TEA01\0",
switch (ListMatch(buf,"CD001\0CDW02\0BEA01\0BOOT2\0NSR02\0NSR03\0TEA01\0",
LMF_EXACT)) {
case 0:
switch (iso->type) {

View File

@ -91,7 +91,7 @@ U0 DirFilesSort(CDirEntry **_tmpde,I64 key)
I64 i,count;
CDirEntry *tmpde=*_tmpde,*tmpde1,**sort_buf;
if (tmpde) {
count=LinkedLstCount(tmpde);
count=LinkedListCount(tmpde);
if (count>1) {
sort_buf=MAlloc(count*sizeof(U8 *));
i=0;

View File

@ -69,7 +69,7 @@ U8 DriveNextFreeLet(U8 first_drv_let='C')
U0 DriveDel(CDrive *dv)
{//Delete drv
if (dv->fs_type==FSt_REDSEA && dv->next_free)
RedSeaFreeFreeLst(dv);
RedSeaFreeFreeList(dv);
Free(dv->cur_fat_blk);
Free(dv->fis);
MemSet(dv,0,sizeof(CDrive));
@ -246,7 +246,7 @@ U0 DiskChg(U8 drv_let=0)
DiskCacheInvalidate(dv);
}
Drive(drv_let);
RedSeaFreeFreeLst(dv);
RedSeaFreeFreeList(dv);
}
Bool DriveMap(U8 drv_let,CDrive *dv)

View File

@ -1,8 +1,8 @@
// See $LK,"RedSea File System",A="FI:::/Doc/RedSea.DD"$
U0 RedSeaFreeFreeLst(CDrive *dv)
U0 RedSeaFreeFreeList(CDrive *dv)
{
CFreeLst *tmpf,*tmpf1;
CFreeList *tmpf,*tmpf1;
Bool unlock;
try {
unlock=DriveLock(dv);
@ -21,15 +21,15 @@ U0 RedSeaFreeFreeLst(CDrive *dv)
DriveUnlock(dv);
}
U0 RedSeaFreeLstBuild(CDrive *dv)
U0 RedSeaFreeListBuild(CDrive *dv)
{
Bool unlock;
CFreeLst *tmpf;
CFreeList *tmpf;
I64 i,first=dv->data_area,max_blk=dv->size+dv->drv_offset;
try {
unlock=DriveLock(dv);
if (dv->next_free)
RedSeaFreeFreeLst(dv);
RedSeaFreeFreeList(dv);
QueueInit(&dv->next_free);
while (first<max_blk) {
i=0; //count free clus
@ -41,7 +41,7 @@ U0 RedSeaFreeLstBuild(CDrive *dv)
i++;
}
if (i) {
tmpf=AMAlloc(sizeof(CFreeLst));
tmpf=AMAlloc(sizeof(CFreeList));
tmpf->size=i;
tmpf->start=first;
QueueInsert(tmpf,dv->last_free);
@ -65,7 +65,7 @@ U0 RedSeaInit(CDrive *dv)
if (br.signature!=MBR_PT_REDSEA || br.signature2!=0xAA55)
throw('Drive');
dv->fs_type=FSt_REDSEA;
RedSeaFreeFreeLst(dv);
RedSeaFreeFreeList(dv);
dv->spc=1;
dv->size=br.sects;
dv->data_area=dv->drv_offset+br.bitmap_sects;
@ -247,7 +247,7 @@ Bool RedSeaCd(U8 *name,I64 cur_dir_clus)
U0 RedSeaFreeClus(CDrive *dv,I64 c,I64 count)
{
CFreeLst *tmpf;
CFreeList *tmpf;
Bool found=FALSE,unlock,unlock_break;
DriveCheck(dv);
if (!c) return;
@ -258,7 +258,7 @@ U0 RedSeaFreeClus(CDrive *dv,I64 c,I64 count)
unlock_break=BreakLock;
unlock=DriveLock(dv);
if (!dv->next_free)
RedSeaFreeLstBuild(dv);
RedSeaFreeListBuild(dv);
tmpf=dv->next_free;
while (!found && tmpf!=&dv->next_free) {
if (tmpf->start+tmpf->size==c) {
@ -272,7 +272,7 @@ U0 RedSeaFreeClus(CDrive *dv,I64 c,I64 count)
tmpf=tmpf->next;
}
if (!found) {
tmpf=AMAlloc(sizeof(CFreeLst));
tmpf=AMAlloc(sizeof(CFreeList));
tmpf->size=count;
tmpf->start=c;
QueueInsert(tmpf,dv->last_free);
@ -299,7 +299,7 @@ U0 RedSeaFreeClus(CDrive *dv,I64 c,I64 count)
I64 RedSeaAllocClus(CDrive *dv,I64 count)
{
CFreeLst *tmpf,*best_free=NULL;
CFreeList *tmpf,*best_free=NULL;
I64 i,first,best_size=I64_MAX;
Bool unlock,unlock_break;
if (count<=0)
@ -308,7 +308,7 @@ I64 RedSeaAllocClus(CDrive *dv,I64 count)
unlock_break=BreakLock;
unlock=DriveLock(dv);
if (!dv->next_free)
RedSeaFreeLstBuild(dv);
RedSeaFreeListBuild(dv);
tmpf=dv->next_free;
while (tmpf!=&dv->next_free) {
if (tmpf->size>=count && tmpf->size<best_size) {

View File

@ -40,7 +40,7 @@ CDoc *KCfgAddDev(CKCfg *c)
if ('A'<=ch<='Z')
c->boot_drv_let=ch;
else
c->boot_drv_let=Drive2Letter(Fs->cur_dv);
c->boot_drv_let=Drive2Letter(Fs->cur_dv);
"\n\n$$BK,1$$$$PURPLE$$Mount drives so they will be present when "
"you boot.$$FG$$$$BK,0$$\n";
Mount2(c->boot_drv_let,doc,FALSE);
@ -61,7 +61,7 @@ U0 KCfgOptions(CKCfg *c)
"$$PURPLE$$%13tz$$FG$$:%Z\n",i,kernel_cfg_options,c->opts[i],"ST_OFF_ON";
"\nType '$$PURPLE$$Help$$FG$$' for help.\n";
st=GetStr("Option ($$PURPLE$$<ENTER>$$FG$$ when done):","");
i=LstMatch(st,kernel_cfg_options,LMF_IGNORE_CASE);
i=ListMatch(st,kernel_cfg_options,LMF_IGNORE_CASE);
if (i==CFG_HELP)
"\n"
"$$PURPLE$$MemInit$$FG$$ Initializes memory above 0x100000 "

View File

@ -1,39 +1,39 @@
U0 LinkedLstDel(U8 **_lst)
U0 LinkedListDel(U8 **_list)
{//Free entire linked-list.
U8 **tmpl;
while (_lst) {
tmpl=*_lst;
Free(_lst);
_lst=tmpl;
while (_list) {
tmpl=*_list;
Free(_list);
_list=tmpl;
}
}
U8 *LinkedLstCopy(U8 **_lst,CTask *mem_task=NULL)
U8 *LinkedListCopy(U8 **_list,CTask *mem_task=NULL)
{//MAlloc ident copy of entire linked-list.
U8 *res=NULL,**tmpl=&res;
while (_lst) {
tmpl=*tmpl=MAllocIdent(_lst,mem_task);
_lst=*_lst;
while (_list) {
tmpl=*tmpl=MAllocIdent(_list,mem_task);
_list=*_list;
}
return res;
}
I64 LinkedLstCount(U8 **_lst)
I64 LinkedListCount(U8 **_list)
{//Count of nodes in linked-list.
I64 res=0;
while (_lst) {
while (_list) {
res++;
_lst=*_lst;
_list=*_list;
}
return res;
}
I64 LinkedLstSize(U8 **_lst)
I64 LinkedListSize(U8 **_list)
{//Mem size of all nodes in linked-list.
I64 res=0;
while (_lst) {
res+=MSize2(_lst);
_lst=*_lst;
while (_list) {
res+=MSize2(_list);
_list=*_list;
}
return res;
}

View File

@ -347,8 +347,8 @@ CBpt *BptFind(U8 *needle_addr,CTask *haystack_task=NULL,Bool rem=FALSE)
if (!haystack_task) haystack_task=Fs;
PUSHFD
CLI
tmpb1=&haystack_task->bpt_lst;
tmpb=haystack_task->bpt_lst;
tmpb1=&haystack_task->bpt_list;
tmpb=haystack_task->bpt_list;
while (tmpb) {
tmpb2=tmpb->next;
if (tmpb->addr==needle_addr) {
@ -377,8 +377,8 @@ Bool BptS(U8 *addr,CTask *task=NULL,Bool live=TRUE)
tmpb->addr=addr;
tmpb->val=*addr;
res=FALSE;
tmpb->next=task->bpt_lst;
task->bpt_lst=tmpb;
tmpb->next=task->bpt_list;
task->bpt_list=tmpb;
if (task==Fs && live)
*addr=OC_BPT;
}
@ -427,8 +427,8 @@ I64 B2(CTask *task=NULL,Bool live=TRUE)
if (!task) task=Fs;
PUSHFD
CLI
tmpb=task->bpt_lst;
task->bpt_lst=NULL;
tmpb=task->bpt_list;
task->bpt_list=NULL;
while (tmpb) {
tmpb1=tmpb->next;
if (task==Fs && live)

View File

@ -10,7 +10,7 @@ CHashDefineStr *DefineLoad(U8 *dname,U8 *st)
return tmph;
}
CHashDefineStr *DefineLstLoad(U8 *dname,U8 *lst)
CHashDefineStr *DefineListLoad(U8 *dname,U8 *list)
{//Create DEFINE list. Not efficient, but handy.
I64 count=0;
U8 *ptr,**idx;
@ -18,18 +18,18 @@ CHashDefineStr *DefineLstLoad(U8 *dname,U8 *lst)
tmph->type=HTT_DEFINE_STR;
tmph->str=StrNew(dname);
tmph->src_link=MStrPrint("AD:0x%X",Caller);
ptr=lst;
ptr=list;
while (*ptr) {
if (*ptr!='@')
count++;
while (*ptr++);
}
tmph->data=MAlloc(ptr+1-lst);
MemCpy(tmph->data,lst,ptr+1-lst);
tmph->data=MAlloc(ptr+1-list);
MemCpy(tmph->data,list,ptr+1-list);
tmph->count=count;
idx=tmph->sub_idx=MAlloc(count*sizeof(U8 *));
ptr=lst;
ptr=list;
while (*ptr) {
if (*ptr!='@')
*idx++=ptr;
@ -82,9 +82,9 @@ I64 DefineCount(U8 *dname)
return -1;
}
I64 DefineMatch(U8 *needle,U8 *haystack_lst_dname,I64 flags=0)
I64 DefineMatch(U8 *needle,U8 *haystack_list_dname,I64 flags=0)
{//Find match for string in define list.
return LstMatch(needle,Define(haystack_lst_dname),flags);
return ListMatch(needle,Define(haystack_list_dname),flags);
}
U0 DefinePrint(U8 *dname,U8 *src,...)
@ -96,26 +96,26 @@ U0 DefinePrint(U8 *dname,U8 *src,...)
U0 SysDefinesLoad()
{
DefineLstLoad("ST_OFF_ON","Off\0On\0");
DefineLstLoad("ST_HTT_TYPES","ExportSysSym\0ImportSysSym\0DefineStr\0GlbVar\0"
DefineListLoad("ST_OFF_ON","Off\0On\0");
DefineListLoad("ST_HTT_TYPES","ExportSysSym\0ImportSysSym\0DefineStr\0GlbVar\0"
"Class\0IntType\0Funct\0Word\0DictWord\0KeyWord\0AsmKeyWord\0OpCode\0"
"Reg\0File\0Module\0HelpFile\0FramePtr\0\0\0\0\0\0\0Private\0"
"Public\0Export\0Import\0Imm\0Goto\0Res\0Unres\0Local\0");
DefineLstLoad("ST_DAYS_OF_WEEK","Sunday\0Monday\0Tuesday\0Wednesday\0"
DefineListLoad("ST_DAYS_OF_WEEK","Sunday\0Monday\0Tuesday\0Wednesday\0"
"Thursday\0Friday\0Saturday\0");
DefineLstLoad("ST_MONTHS","January\0February\0March\0April\0May\0"
DefineListLoad("ST_MONTHS","January\0February\0March\0April\0May\0"
"June\0July\0August\0September\0October\0November\0December\0");
DefineLstLoad("ST_FILE_ATTRS","R\0H\0S\0V\0D\0A\0\0\0X\0T\0Z\0C\0F\0");
DefineLstLoad("ST_FILE_UTIL_FLAGS","r\0d\0i\0a\0c\0R\0p\0m\0x\0s\0"
DefineListLoad("ST_FILE_ATTRS","R\0H\0S\0V\0D\0A\0\0\0X\0T\0Z\0C\0F\0");
DefineListLoad("ST_FILE_UTIL_FLAGS","r\0d\0i\0a\0c\0R\0p\0m\0x\0s\0"
"D\0F\0T\0$$\0S\0A\0J\0G\0Z\0O\0P\0f\0l\0lb\0la\0");
DefineLstLoad("ST_BLKDEV_TYPES",
DefineListLoad("ST_BLKDEV_TYPES",
"NULL\0RAM\0ATA\0FILE_READ\0FILE_WRITE\0ATAPI\0");
DefineLstLoad("ST_DRV_TYPES",
DefineListLoad("ST_DRV_TYPES",
"NULL\0REDSEA\0FAT32\0ISO9660\0NTFS\0UNKNOWN\0");
DefineLstLoad("ST_COLORS","BLACK\0BLUE\0GREEN\0CYAN\0"
DefineListLoad("ST_COLORS","BLACK\0BLUE\0GREEN\0CYAN\0"
"RED\0PURPLE\0BROWN\0LTGRAY\0DKGRAY\0LTBLUE\0LTGREEN\0"
"LTCYAN\0LTRED\0LTPURPLE\0YELLOW\0WHITE\0");
DefineLstLoad("ST_INT_NAMES","Divide Error\0SingleStep\0NMI\0Breakpoint\0"
DefineListLoad("ST_INT_NAMES","Divide Error\0SingleStep\0NMI\0Breakpoint\0"
"Overflow\0BOUND Range Exceeded\0Invalid Opcode\0No Math Coprocessor\0"
"Double Fault\0Coprocessor Segment Fault\0Invalid TASK\0"
"Segment Not Present\0Stk Segment Fault\0General Protection\0"
@ -153,7 +153,7 @@ U8 *Color2Str(U8 *buf,CColorROPU32 c)
return buf;
}
U8 *str2color_lst="/,)}>";
U8 *str2color_list="/,)}>";
CColorROPU16 Str2ColorU16(U8 *st)
{//$LK,"DCLighting",A="MN:DCLighting"$ color str with flags to $LK,"CColorROPU16",A="MN:CColorROPU16"$.
@ -162,7 +162,7 @@ CColorROPU16 Str2ColorU16(U8 *st)
U8 *ptr,*ptr2,*st2;
if (!st) return COLOR_INVALID;
while (TRUE) {
if (!*st||StrOcc(str2color_lst,*st))
if (!*st||StrOcc(str2color_list,*st))
return res;
if (Bt(char_bmp_alpha,*st)) {
ptr=st;
@ -205,7 +205,7 @@ CColorROPU32 Str2ColorU32(U8 *st)
CColorROPU32 res=0;
if (!st) return COLOR_INVALID;
st2=MAlloc(StrLen(st)+1);
StrFirstRemove(st,str2color_lst,st2);
StrFirstRemove(st,str2color_list,st2);
res.c0=Str2ColorU16(st2);
if (*st) {
res.c1=Str2ColorU16(st);

View File

@ -26,7 +26,7 @@ extern U8 *CatPrint(U8 *_dst,U8 *fmt,...);
extern Bool Cd(U8 *dirname=NULL,Bool make_dirs=FALSE);
extern U0 DebugHelp();
extern U8 *Define(U8 *dname);
extern I64 DefineMatch(U8 *needle,U8 *haystack_lst_dname,I64 flags=0);
extern I64 DefineMatch(U8 *needle,U8 *haystack_list_dname,I64 flags=0);
extern U8 *DefineSub(I64 sub,U8 *dname);
extern I64 Del(U8 *files_find_mask,Bool make_mask=FALSE,
Bool del_dir=FALSE,Bool print_message=TRUE);
@ -89,7 +89,7 @@ extern Bool RedSeaDirNew(CDrive *dv,U8 *cur_dir,CDirEntry *tmpde,
extern Bool RedSeaFileFind(CDrive *dv,I64 cur_dir_clus,U8 *name,
CDirEntry *_res,I64 fuf_flags=0);
extern U0 RedSeaFmt(U8 drv_let,Bool quick=TRUE);
extern U0 RedSeaFreeFreeLst(CDrive *dv);
extern U0 RedSeaFreeFreeList(CDrive *dv);
extern U0 RedSeaInit(CDrive *dv);
extern Bool RedSeaValidate(U8 drv_let);
extern CTask *SpawnQueue(U0 (*fp_addr)(U8 *data),U8 *data=NULL,

View File

@ -65,19 +65,19 @@ U0 HashDel(CHashSrcSym *tmph)
Free(tmph->src_link);
Free(tmph->idx);
Free(tmph->import_name);
LinkedLstDel(tmph->ie_lst);
LinkedListDel(tmph->ie_list);
if (tmph->type & (HTT_FUN | HTT_EXPORT_SYS_SYM))
Free(tmph->dbg_info);
if (tmph->type & (HTT_FUN | HTT_CLASS))
//Assumes code not on heap, so doesn't Free.
//$LK,"ClassMemberLstDel",A="MN:ClassMemberLstDel"$() is an import to the Kernel module
ClassMemberLstDel(tmph);
//$LK,"ClassMemberListDel",A="MN:ClassMemberListDel"$() is an import to the Kernel module
ClassMemberListDel(tmph);
else if (tmph->type&HTT_DEFINE_STR)
Free(tmph(CHashDefineStr *)->data);
else if (tmph->type & HTT_GLBL_VAR) {
if (!(tmph(CHashGlobalVar *)->flags&GVF_ALIAS))
Free(tmph(CHashGlobalVar *)->data_addr);
LinkedLstDel(tmph(CHashGlobalVar *)->dim.next);
LinkedListDel(tmph(CHashGlobalVar *)->dim.next);
if (tmph(CHashGlobalVar *)->fun_ptr)
HashDel(tmph(CHashGlobalVar *)->fun_ptr
-tmph(CHashGlobalVar *)->fun_ptr->ptr_stars_count);
@ -182,32 +182,32 @@ CHashGeneric *HashPublic(U8 *st,I64 mask,Bool val=TRUE)
return NULL;
}
I64 HashLstAdd(U8 *lst,I64 type,CHashTable *table)
I64 HashListAdd(U8 *list,I64 type,CHashTable *table)
{//Add a list to a hash table.
I64 i=0;
CHashGeneric *tmph;
if (lst) {
while (*lst) {
if (*lst=='@')
lst++;
if (list) {
while (*list) {
if (*list=='@')
list++;
else
i++;
tmph=CAlloc(sizeof(CHashGeneric));
tmph->user_data0=i-1;
tmph->str=StrNew(lst);
tmph->str=StrNew(list);
tmph->type=type;
HashAdd(tmph,table);
while (*lst++);
while (*list++);
}
}
return i;
}
I64 HashDefineLstAdd(U8 *dname,I64 type,CHashTable *table)
{//Add define list to a hash table. See $LK,"::/Zenith/DolDoc/DocInit.HC",A="FF:::/Zenith/DolDoc/DocInit.HC,HashDefineLstAdd"$.
I64 HashDefineListAdd(U8 *dname,I64 type,CHashTable *table)
{//Add define list to a hash table. See $LK,"::/Zenith/DolDoc/DocInit.HC",A="FF:::/Zenith/DolDoc/DocInit.HC,HashDefineListAdd"$.
CHashDefineStr *tmph;
if (tmph=HashFind(dname,Fs->hash_table,HTT_DEFINE_STR))
return HashLstAdd(tmph->data,type,table);
return HashListAdd(tmph->data,type,table);
else
return 0;
}

File diff suppressed because one or more lines are too long

View File

@ -732,7 +732,7 @@ public class CHashSrcSym:CHash
*idx;
CDebugInfo *dbg_info;
U8 *import_name;
CAOTImportExport *ie_lst;
CAOTImportExport *ie_list;
};
public class CHashGeneric:CHash
@ -775,7 +775,7 @@ public class CHashImport:CHashSrcSym
#help_index "Compiler/Internal"
#define PTR_STARS_NUM 4
//Member Lst Flags
//Member List Flags
#define MLF_DFT_AVAILABLE 1
#define MLF_LASTCLASS 2
#define MLF_STR_DFT_AVAILABLE 4
@ -791,21 +791,21 @@ public class CArrayDim
};
#define MLMF_IS_STR 1
public class CMemberLstMeta
public class CMemberListMeta
{
CMemberLstMeta *next;
CMemberListMeta *next;
U8 *str;
I64 flags,
user_data;
};
public class CMemberLst
public class CMemberList
{
CMemberLst *next,*left,*right,
CMemberList *next,*left,*right,
*left_class_base,*right_class_base; //For finding dup class local vars.
U8 *str;
CHashClass *member_class,*member_class_base;
CMemberLstMeta *meta;
CMemberListMeta *meta;
U32 use_count;
U16 flags;
I8 reg,pad;
@ -841,9 +841,9 @@ public class CHashClass:CHashSrcSym
U32 member_count;
U8 ptr_stars_count,raw_type;
U16 flags;
CMemberLst *member_lst_and_root, //Head of linked list and head of tree.
CMemberList *member_list_and_root, //Head of linked list and head of tree.
*member_class_base_root, //For finding dup class local vars.
*last_in_member_lst;
*last_in_member_list;
CHashClass *base_class,
*fwd_class;
};
@ -864,7 +864,7 @@ public class CHashFun:CHashClass
U32 arg_count,pad,
used_reg_mask,clobbered_reg_mask;
U8 *exe_addr;
CExternUsage *ext_lst;
CExternUsage *ext_list;
};
//Global Var Flags
@ -934,7 +934,7 @@ public class CHashGlobalVar:CHashSrcSym
#define DOCT_BTTN 29
#define DOCT_DATA 30
#define DOCT_CHECK_BOX 31
#define DOCT_LST 32
#define DOCT_LIST 32
#define DOCT_MACRO 33
#define DOCT_MENU_VAL 34
#define DOCT_HEX_ED 35
@ -1019,7 +1019,7 @@ public class CHashGlobalVar:CHashSrcSym
#define DOCEF_ZERO_BASED 0x4000000000000
#define DOCEF_HOLD 0x8000000000000
#define DOCEF_TREE 0x10000000000000
#define DOCEF_LST 0x20000000000000
#define DOCEF_LIST 0x20000000000000
#define DOCEF_SKIP 0x40000000000000
#define DOCEF_POPUP 0x80000000000000
#define DOCEF_SKIP_IN_FORM 0x100000000000000
@ -1105,7 +1105,7 @@ public class CHashGlobalVar:CHashSrcSym
#define DOCEf_ZERO_BASED 50
#define DOCEf_HOLD 51
#define DOCEf_TREE 52
#define DOCEf_LST 53
#define DOCEf_LIST 53
#define DOCEf_SKIP 54
#define DOCEf_POPUP 55
#define DOCEf_SKIP_IN_FORM 56
@ -1398,7 +1398,7 @@ public class CDoc //Linked Text File header
Bool (*user_put_s)(CDoc *doc,U8 *data,U8 *st);
CDoc *parent_doc; //(When browsing deeper, opening deeper docs.)
U64 desc; //8 characters. See $LK,"DocBorderLstDraw",A="MN:DocBorderLstDraw"$().
U64 desc; //8 characters. See $LK,"DocBorderListDraw",A="MN:DocBorderListDraw"$().
CDocBin bin_head;
CDocSettings settings_head;
@ -1532,8 +1532,8 @@ public class CAutoCompleteGlobals
#define ACD_FILLINS_NUM 10
public class CAutoCompleteDictGlobals
{
U8 *word_lst;
I64 word_lst_size,num_words,num_fillins;
U8 *word_list;
I64 word_list_size,num_words,num_fillins;
U8 *fillins[ACD_FILLINS_NUM];
Bool has_words,has_defs;
};
@ -2068,11 +2068,11 @@ class CAOTCtrl
CAsmUnresolvedRef *local_unresolved,*glbl_unresolved;
CAOTAbsAddr *abss;
CAOTHeapGlobal *heap_glbls;
I64 lst_col,lst_last_rip;
U8 *last_label,*lst_last_line;
CLexFile *lst_last_lfn;
I64 list_col,list_last_rip;
U8 *last_label,*list_last_line;
CLexFile *list_last_lfn;
I64 seg_size;
Bool lst;
Bool list;
};
//Tokens
@ -2125,9 +2125,9 @@ class CLexHashTableContext
{
CLexHashTableContext *next;
I64 old_flags,hash_mask;
CHashFun *local_var_lst,
CHashFun *local_var_list,
*fun;
CHashTable *hash_table_lst,
CHashTable *hash_table_list,
*define_hash_table,
*local_hash_table,
*glbl_hash_table;
@ -2197,7 +2197,7 @@ public class CCompCtrl
CHashGeneric *hash_entry;
CAbsCountsI64 abs_counts;
CAsmUndefHash *asm_undef_hash;
CMemberLst *local_var_entry;
CMemberList *local_var_entry;
CCodeMisc *lb_leave;
U8 *cur_buf_ptr;
CLexFile *lex_include_stk,
@ -2397,7 +2397,7 @@ class CFAT32DirEntry
CrtTimeTenth;
U16 CrtTime,
CrtDate,
LstAccDate,
ListAccDate,
clus_hi,
WrtTime,
WrtDate,
@ -2676,9 +2676,9 @@ public class CBlkDev
#define MBR_PT_NTFS 0x07
#define MBR_PT_REDSEA 0x88
class CFreeLst
class CFreeList
{
CFreeLst *next,*last;
CFreeList *next,*last;
I64 start,size;
};
@ -2709,7 +2709,7 @@ public class CDrive
I64 fat_blk_dirty,
cur_fat_blk_num;
U32 *cur_fat_blk;
CFreeLst *next_free,*last_free;
CFreeList *next_free,*last_free;
};
#define DSK_CACHE_HASH_SIZE 0x2000
@ -2849,8 +2849,8 @@ class CMemRange
public class CBlkPool
{
I64 locked_flags,alloced_u8s,used_u8s;
CMemBlk *mem_free_lst,
*mem_free_2meg_lst, //This is for Sup1CodeScraps/Mem/Mem2Meg.HC.
CMemBlk *mem_free_list,
*mem_free_2meg_list, //This is for Sup1CodeScraps/Mem/Mem2Meg.HC.
*free_pag_hash[MEM_FREE_PAG_HASH_SIZE],
*free_pag_hash2[64-MEM_PAG_BITS];
};
@ -2868,7 +2868,7 @@ public class CHeapCtrl
CTask *mem_task;
CMemBlk *next_mem_blk,*last_mem_blk;
CMemBlk *last_mergable;
CMemUnused *malloc_free_lst;
CMemUnused *malloc_free_list;
CMemUsed *next_um,*last_um;
CMemUnused *heap_hash[MEM_HEAP_HASH_SIZE/sizeof(U8 *)];
};
@ -3327,7 +3327,7 @@ public class CTask //The Fs segment reg points to current CTask.
U8 answer_type,pad[5];
I64 answer;
F64 answer_time;
CBpt *bpt_lst;
CBpt *bpt_list;
CCtrl *next_ctrl,*last_ctrl;
CMenu *cur_menu;
CTaskSettings *next_settings;
@ -3745,7 +3745,7 @@ public class CArcCompress
#define SFF_WHOLE_LABELS_AFTER 4
#define SFG_WHOLE_LABELS (SFF_WHOLE_LABELS_BEFORE|SFF_WHOLE_LABELS_AFTER)
//Flags for LstMatch
//Flags for ListMatch
#define LMF_IGNORE_CASE 1
#define LMF_EXACT 2

View File

@ -52,12 +52,12 @@ public extern U8 *StrScan(U8 *src,U8 *fmt,...);
public extern CDate Str2Date(U8 *src);
#help_index "Char/Flags"
public extern U0 ScanFlags(U8 *_dst_flags,U8 *lst,U8 *src);
public extern U8 *StrPrintFlags(U8 *dst,U8 *lst,I64 flags);
public extern U0 ScanFlags(U8 *_dst_flags,U8 *list,U8 *src);
public extern U8 *StrPrintFlags(U8 *dst,U8 *list,I64 flags);
#help_index "Char/Lists"
public extern I64 LstMatch(U8 *needle, U8 *haystack_lst,I64 flags=0);
public extern U8 *LstSub(I64 sub, U8 *lst);
public extern I64 ListMatch(U8 *needle, U8 *haystack_list,I64 flags=0);
public extern U8 *ListSub(I64 sub, U8 *list);
#help_index "Char/Operations"
public extern U8 *MStrPrint(U8 *fmt,...);
@ -150,10 +150,10 @@ public extern Bool FifoU8Peek(CFifoU8 *f,U8 *_b);
public extern Bool FifoU8Remove(CFifoU8 *f,U8 *_b);
#help_index "Data Types/Linked List"
public extern I64 LinkedLstCount(U8 **_lst);
public extern U8 *LinkedLstCopy(U8 **_lst,CTask *mem_task=NULL);
public extern U0 LinkedLstDel(U8 **_lst);
public extern I64 LinkedLstSize(U8 **_lst);
public extern I64 LinkedListCount(U8 **_list);
public extern U8 *LinkedListCopy(U8 **_list,CTask *mem_task=NULL);
public extern U0 LinkedListDel(U8 **_list);
public extern I64 LinkedListSize(U8 **_list);
#help_index "Data Types/Queue Vector"
public extern U0 QueueVectU8Del(CQueueVectU8 *v);
@ -237,8 +237,8 @@ public extern U0 DefinePrint(U8 *dname,U8 *src,...);
#help_index "Define;Char/Define;Char/Lists"
public extern I64 DefineCount(U8 *dname);
public extern CHashDefineStr *DefineLstLoad(U8 *dname,U8 *lst);
public extern I64 DefineMatch(U8 *needle,U8 *haystack_lst_dname,I64 flags=0);
public extern CHashDefineStr *DefineListLoad(U8 *dname,U8 *list);
public extern I64 DefineMatch(U8 *needle,U8 *haystack_list_dname,I64 flags=0);
public extern U8 *DefineSub(I64 sub,U8 *dname);
#help_index "Devices;Memory/Page Tables"
@ -433,10 +433,10 @@ public extern I64 HashVal(CHash *tmph);
extern U0 SysSymImportsResolve(U8 *sptr,I64 ld_flags=0);
#help_index "Hash/System;Char/Lists"
public extern I64 HashLstAdd(U8 *lst,I64 type,CHashTable *table);
public extern I64 HashListAdd(U8 *list,I64 type,CHashTable *table);
#help_index "Hash/System;Define;Char/Define;Char/Lists"
public extern I64 HashDefineLstAdd(U8 *dname,I64 type,CHashTable *table);
public extern I64 HashDefineListAdd(U8 *dname,I64 type,CHashTable *table);
#help_index "Help System;Debugging/Debugger"
public extern U0 Help();

View File

@ -6,11 +6,11 @@ U0 BlkPoolAdd(CBlkPool *bp,CMemBlk *m,I64 pags)
CLI
while (LBts(&bp->locked_flags,BPlf_LOCKED))
PAUSE
m->next=bp->mem_free_lst;
m->next=bp->mem_free_list;
m->pags=pags;
m->mb_signature=MBS_UNUSED_SIGNATURE_VAL;
bp->alloced_u8s+=pags<<MEM_PAG_BITS;
bp->mem_free_lst=m;
bp->mem_free_list=m;
LBtr(&bp->locked_flags,BPlf_LOCKED);
POPFD
}

View File

@ -69,8 +69,8 @@ _MALLOC::
ADD RSI,sizeof(CMemBlk)
JMP I32 MALLOC_ALMOST_DONE
//Little allocation, chunk-off piece from free lst chunks
@@35: LEA RSI,U64 CHeapCtrl.malloc_free_lst-CMemUnused.next[RDX]
//Little allocation, chunk-off piece from free list chunks
@@35: LEA RSI,U64 CHeapCtrl.malloc_free_list-CMemUnused.next[RDX]
@@40: MOV RBX,RSI
MOV RSI,U64 CMemUnused.next[RBX]
@ -121,7 +121,7 @@ _MALLOC::
@@55: MOV U64 CHeapCtrl.last_mergable[RDX],RSI
LEA RSI,U64 sizeof(CMemBlk)[RSI]
SUB RAX,sizeof(CMemBlk)
LEA RBX,U64 CHeapCtrl.malloc_free_lst-CMemUnused.next[RDX]
LEA RBX,U64 CHeapCtrl.malloc_free_list-CMemUnused.next[RDX]
MOV RDI,U64 CMemUnused.next[RBX]
MOV U64 CMemUnused.next[RSI],RDI
MOV U64 CMemUnused.size[RSI],RAX

View File

@ -42,7 +42,7 @@ Return: NULL if out of memory.
goto at_done;
}
}
m=&bp->mem_free_lst;
m=&bp->mem_free_list;
while (TRUE) {
if (!(res=m->next)) {
//We're probably out of luck, but lets search for a
@ -124,13 +124,13 @@ Return: NULL if out of memory.
res->mb_signature=MBS_USED_SIGNATURE_VAL;
hc->alloced_u8s+=res->pags<<MEM_PAG_BITS;
//Tidy-up free lst (Move into heap hash)
//because if free lst gets long, delay causes crash.
//Tidy-up free list (Move into heap hash)
//because if free list gets long, delay causes crash.
threshold=MEM_HEAP_HASH_SIZE>>4;
#assert MEM_HEAP_HASH_SIZE>>4>=sizeof(U8 *)
do {
count=0;
_uum=&hc->malloc_free_lst;
_uum=&hc->malloc_free_list;
while (uum=*_uum) {
#assert !offset(CMemUnused.next)
size=uum->size;

View File

@ -182,11 +182,11 @@ SYS_INIT_16MEG_SYS_CODE_BP::
@@05: SHR EAX,MEM_PAG_BITS
MOV ESI,SYS_FIXED_AREA+CSysFixedArea.sys_code_bp
MOV EBX,U32 CBlkPool.mem_free_lst[ESI]
MOV EBX,U32 CBlkPool.mem_free_list[ESI]
MOV U32 CMemBlk.next[EDI],EBX
MOV U32 CMemBlk.next+4[EDI],0
MOV U32 CBlkPool.mem_free_lst[ESI],EDI
MOV U32 CBlkPool.mem_free_lst+4[ESI],0
MOV U32 CBlkPool.mem_free_list[ESI],EDI
MOV U32 CBlkPool.mem_free_list+4[ESI],0
MOV U32 CMemBlk.mb_signature[EDI],MBS_UNUSED_SIGNATURE_VAL
MOV U32 CMemBlk.pags[EDI],EAX
SHL EAX,MEM_PAG_BITS

View File

@ -86,7 +86,7 @@ It's a little faster.
MOV RAX,U64 CTask.fpu_mmx[RSI]
FXSAVE U64 [RAX]
MOV RDX,U64 CTask.bpt_lst[RSI]
MOV RDX,U64 CTask.bpt_list[RSI]
@@05: TEST RDX,RDX
JZ @@10
MOV RDI,U64 CBpt.addr[RDX]
@ -105,7 +105,7 @@ _TASK_CONTEXT_RESTORE::
BTS U32 GS:CCPU.cpu_flags[RAX],CPUf_RAN_A_TASK
@@05: BT U64 CTask.task_flags[RSI],TASKf_DISABLE_BPTS
JC @@15
MOV RDX,U64 CTask.bpt_lst[RSI]
MOV RDX,U64 CTask.bpt_list[RSI]
@@10: TEST RDX,RDX
JZ @@15
MOV RDI,U64 CBpt.addr[RDX]

View File

@ -394,52 +394,52 @@ U32
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF};
U8 *LstSub(I64 sub, U8 *lst)
{//Point to lst entry.
U8 *ListSub(I64 sub, U8 *list)
{//Point to list entry.
//Not efficient.Use an array of U8 ptrs for efficiency.
if (!lst) return NULL;
while (*lst && sub>0) {
while (*lst) //Advance to end of cur entry.
lst++;
lst++; //Skip trailing zero.
if (*lst=='@') //Check for '@' alias lst entry.
lst++;
if (!list) return NULL;
while (*list && sub>0) {
while (*list) //Advance to end of cur entry.
list++;
list++; //Skip trailing zero.
if (*list=='@') //Check for '@' alias list entry.
list++;
else
sub--;
}
if (sub||!*lst)
if (sub||!*list)
return NULL;
else
return lst;
return list;
}
I64 LstMatch(U8 *needle, U8 *haystack_lst,I64 flags=0)
I64 ListMatch(U8 *needle, U8 *haystack_list,I64 flags=0)
{//-2 if Ambiguous
// -1 if not found
// Not efficient. Use hash tables for efficiency.
I64 n,sub=0,res=-1;
U8 *ptr;
Bool exact_match=FALSE;
if (!haystack_lst) return -1;
if (!haystack_list) return -1;
n=StrLen(needle);
while (*haystack_lst) {
if (*haystack_lst=='@') { //Check for '@' alias haystack_lst entry
while (*haystack_list) {
if (*haystack_list=='@') { //Check for '@' alias haystack_list entry
sub--;
haystack_lst++;
haystack_list++;
}
ptr=needle;
if (flags & LMF_IGNORE_CASE)
while (*ptr && ToUpper(*ptr)==ToUpper(*haystack_lst)) {
while (*ptr && ToUpper(*ptr)==ToUpper(*haystack_list)) {
ptr++;
haystack_lst++;
haystack_list++;
}
else
while (*ptr && *ptr==*haystack_lst) {
while (*ptr && *ptr==*haystack_list) {
ptr++;
haystack_lst++;
haystack_list++;
}
if (!*ptr) { //Did we reach end of needle?
if (!*haystack_lst) //Did we reach end of haystack_lst?
if (!*haystack_list) //Did we reach end of haystack_list?
return sub; //Found Exact match
else {
if (res!=-1) {
@ -451,9 +451,9 @@ I64 LstMatch(U8 *needle, U8 *haystack_lst,I64 flags=0)
}
}
}
while (*haystack_lst) //Advance to end of cur entry.
haystack_lst++;
haystack_lst++; //Skip trailing zero
while (*haystack_list) //Advance to end of cur entry.
haystack_list++;
haystack_list++; //Skip trailing zero
sub++;
}
return res;

View File

@ -120,7 +120,7 @@ U0 Help()
PopUp("Type(\"::/Doc/HelpIndex.DD\");DocTop;View;");
}
U0 ScanFlags(U8 *_dst_flags,U8 *lst,U8 *src)
U0 ScanFlags(U8 *_dst_flags,U8 *list,U8 *src)
{/*More than 64 flags. Flags passed by ref.
Examples:
@ -144,7 +144,7 @@ ScanFlags(&flags,"R\0L\0Dump\0Scan\0","+Dump-R"); //Sets Bit#2, Clears Bit#0.
*src!=CH_SPACE && *src!=CH_SHIFT_SPACE)
*ptr++=*src++;
*ptr=0;
i=LstMatch(buf,lst);
i=ListMatch(buf,list);
if (i>=0)
LBts(_dst_flags,i);
else {
@ -160,7 +160,7 @@ ScanFlags(&flags,"R\0L\0Dump\0Scan\0","+Dump-R"); //Sets Bit#2, Clears Bit#0.
*src!=CH_SPACE && *src!=CH_SHIFT_SPACE)
*ptr++=*src++;
*ptr=0;
i=LstMatch(buf,lst);
i=ListMatch(buf,list);
if (i>=0)
LBtr(_dst_flags,i);
else {
@ -174,14 +174,14 @@ ScanFlags(&flags,"R\0L\0Dump\0Scan\0","+Dump-R"); //Sets Bit#2, Clears Bit#0.
}
}
U8 *StrPrintFlags(U8 *dst,U8 *lst,I64 flags)
U8 *StrPrintFlags(U8 *dst,U8 *list,I64 flags)
{//Only 64 flags. Flags passed by value.
I64 i;
*dst=0;
while (flags) {
i=Bsf(flags);
Btr(&flags,i);
CatPrint(dst,"+%z",i,lst);
CatPrint(dst,"+%z",i,list);
}
return dst;
}

View File

@ -199,8 +199,8 @@ U8 *MPrintq(U8 *ptr,I64 flags)
U8 *sys_pos_pows_lets="KMGTPEZY",
*sys_neg_pows_lets="mænpfazy",
*sys_pos_pows_lst="kilo\0mega\0giga\0tera\0peta\0exa\0zetta\0yotta\0",
*sys_neg_pows_lst="milli\0micro\0nano\0pico\0femto\0atto\0zepto\0yocto\0";
*sys_pos_pows_list="kilo\0mega\0giga\0tera\0peta\0exa\0zetta\0yotta\0",
*sys_neg_pows_list="milli\0micro\0nano\0pico\0femto\0atto\0zepto\0yocto\0";
#define TMP_BUF_LEN 256
#define SLOP 8
@ -373,7 +373,7 @@ to avoid this.
case 'z':
if (cur_arg+1>=argc)
throw('StrPrint');
ptr=LstSub(argv[cur_arg],argv[cur_arg+1]);
ptr=ListSub(argv[cur_arg],argv[cur_arg+1]);
cur_arg=cur_arg+2;
break;
case 'Z':

View File

@ -288,7 +288,7 @@ and take addr.
if (cur_arg+1>=argc)
throw('Scan');
i_ptr=argv[cur_arg++];
*i_ptr=LstMatch(buf,argv[cur_arg++]);
*i_ptr=ListMatch(buf,argv[cur_arg++]);
break;
case 'Z':
if (cur_arg+1>=argc)

View File

@ -18093,7 +18093,7 @@ LORD thy God giveth thee for an inheritance.
neither shall he be charged with any business: but he shall be free at
home one year, and shall cheer up his wife which he hath taken.
24:6 No man shall take the nether or the upper millstone to pledge:
24:6 No man shall take the nether or the upper millistone to pledge:
for he taketh a man's life to pledge.
24:7 If a man be found stealing any of his brethren of the children of
@ -20002,7 +20002,7 @@ up to Bethhoron, and smote them to Azekah, and unto Makkedah.
10:11 And it came to pass, as they fled from before Israel, and were
in the going down to Bethhoron, that the LORD cast down great stones
from heaven upon them unto Azekah, and they died: they were more which
died with hailstones than they whom the children of Israel slew with
died with hailistones than they whom the children of Israel slew with
the sword.
10:12 Then spake Joshua to the LORD in the day when the LORD delivered
@ -21947,7 +21947,7 @@ he hath cut down the grove that was by it.
6:31 And Joash said unto all that stood against him, Will ye plead for
Baal? will ye save him? he that will plead for him, let him be put to
death whilst it is yet morning: if he be a god, let him plead for
death whilist it is yet morning: if he be a god, let him plead for
himself, because one hath cast down his altar.
6:32 Therefore on that day he called him Jerubbaal, saying, Let Baal
@ -22394,7 +22394,7 @@ and gat them up to the top of the tower.
9:52 And Abimelech came unto the tower, and fought against it, and
went hard unto the door of the tower to burn it with fire.
9:53 And a certain woman cast a piece of a millstone upon Abimelech's
9:53 And a certain woman cast a piece of a millistone upon Abimelech's
head, and all to brake his skull.
9:54 Then he called hastily unto the young man his armourbearer, and
@ -25770,7 +25770,7 @@ If thou save not thy life to night, to morrow thou shalt be slain.
fled, and escaped.
19:13 And Michal took an image, and laid it in the bed, and put a
pillow of goats' hair for his bolster, and covered it with a cloth.
pillow of goats' hair for his bolister, and covered it with a cloth.
19:14 And when Saul sent messengers to take David, she said, He is
sick.
@ -25779,7 +25779,7 @@ sick.
him up to me in the bed, that I may slay him.
19:16 And when the messengers were come in, behold, there was an image
in the bed, with a pillow of goats' hair for his bolster.
in the bed, with a pillow of goats' hair for his bolister.
19:17 And Saul said unto Michal, Why hast thou deceived me so, and
sent away mine enemy, that he is escaped? And Michal answered Saul, He
@ -26471,7 +26471,7 @@ thee.
26:7 So David and Abishai came to the people by night: and, behold,
Saul lay sleeping within the trench, and his spear stuck in the ground
at his bolster: but Abner and the people lay round about him.
at his bolister: but Abner and the people lay round about him.
26:8 Then said Abishai to David, God hath delivered thine enemy into
thine hand this day: now therefore let me smite him, I pray thee, with
@ -26486,10 +26486,10 @@ perish.
26:11 The LORD forbid that I should stretch forth mine hand against
the LORD's anointed: but, I pray thee, take thou now the spear that is
at his bolster, and the cruse of water, and let us go.
at his bolister, and the cruse of water, and let us go.
26:12 So David took the spear and the cruse of water from Saul's
bolster; and they gat them away, and no man saw it, nor knew it,
bolister; and they gat them away, and no man saw it, nor knew it,
neither awaked: for they were all asleep; because a deep sleep from
the LORD was fallen upon them.
@ -26507,7 +26507,7 @@ ye are worthy to die, because ye have not kept your master, the LORD's
anointed.
And now see where the king's spear is, and the cruse of water that was
at his bolster.
at his bolister.
26:17 And Saul knew David's voice, and said, Is this thy voice, my son
David? And David said, It is my voice, my lord, O king.
@ -27778,7 +27778,7 @@ telling the matters of the war unto the king, 11:20 And if so be that
the king's wrath arise, and he say unto thee, Wherefore approached ye
so nigh unto the city when ye did fight? knew ye not that they would
shoot from the wall? 11:21 Who smote Abimelech the son of
Jerubbesheth? did not a woman cast a piece of a millstone upon him
Jerubbesheth? did not a woman cast a piece of a millistone upon him
from the wall, that he died in Thebez? why went ye nigh the wall? then
say thou, Thy servant Uriah the Hittite is dead also.
@ -42084,7 +42084,7 @@ Geshem sent unto me, saying, Come, let us meet together in some one of
the villages in the plain of Ono. But they thought to do me mischief.
6:3 And I sent messengers unto them, saying, I am doing a great work,
so that I cannot come down: why should the work cease, whilst I leave
so that I cannot come down: why should the work cease, whilist I leave
it, and come down to you? 6:4 Yet they sent unto me four times after
this sort; and I answered them after the same manner.
@ -44025,7 +44025,7 @@ to the search of their fathers: 8:9 (For we are but of yesterday, and
know nothing, because our days upon earth are a shadow:) 8:10 Shall
not they teach thee, and tell thee, and utter words out of their
heart? 8:11 Can the rush grow up without mire? can the flag grow
without water? 8:12 Whilst it is yet in his greenness, and not cut
without water? 8:12 Whilist it is yet in his greenness, and not cut
down, it withereth before any other herb.
8:13 So are the paths of all that forget God; and the hypocrite's hope
@ -45476,7 +45476,7 @@ judgment.
32:10 Therefore I said, Hearken to me; I also will shew mine opinion.
32:11 Behold, I waited for your words; I gave ear to your reasons,
whilst ye searched out what to say.
whilist ye searched out what to say.
32:12 Yea, I attended unto you, and, behold, there was none of you
that convinced Job, or that answered his words: 32:13 Lest ye should
@ -46098,7 +46098,7 @@ before him.
themselves; they cannot be moved.
41:24 His heart is as firm as a stone; yea, as hard as a piece of the
nether millstone.
nether millistone.
41:25 When he raiseth up himself, the mighty are afraid: by reason of
breakings they purify themselves.
@ -53424,7 +53424,7 @@ trust; leave not my soul destitute.
141:9 Keep me from the snares which they have laid for me, and the
gins of the workers of iniquity.
141:10 Let the wicked fall into their own nets, whilst that I withal
141:10 Let the wicked fall into their own nets, whilist that I withal
escape.
@ -59326,7 +59326,7 @@ into the mountain of the LORD, to the mighty One of Israel.
30:30 And the LORD shall cause his glorious voice to be heard, and
shall shew the lighting down of his arm, with the indignation of his
anger, and with the flame of a devouring fire, with scattering, and
tempest, and hailstones.
tempest, and hailistones.
30:31 For through the voice of the LORD shall the Assyrian be beaten
down, which smote with a rod.
@ -60532,7 +60532,7 @@ in Zion for Israel my glory.
on the ground: there is no throne, O daughter of the Chaldeans: for
thou shalt no more be called tender and delicate.
47:2 Take the millstones, and grind meal: uncover thy locks, make bare
47:2 Take the millistones, and grind meal: uncover thy locks, make bare
the leg, uncover the thigh, pass over the rivers.
47:3 Thy nakedness shall be uncovered, yea, thy shame shall be seen: I
@ -63269,7 +63269,7 @@ is The LORD.
17:1 The sin of Judah is written with a pen of iron, and with the
point of a diamond: it is graven upon the table of their heart, and
upon the horns of your altars; 17:2 Whilst their children remember
upon the horns of your altars; 17:2 Whilist their children remember
their altars and their groves by the green trees upon the high hills.
17:3 O my mountain in the field, I will give thy substance and all thy
@ -63923,7 +63923,7 @@ hissing, and perpetual desolations.
25:10 Moreover I will take from them the voice of mirth, and the voice
of gladness, the voice of the bridegroom, and the voice of the bride,
the sound of the millstones, and the light of the candle.
the sound of the millistones, and the light of the candle.
25:11 And this whole land shall be a desolation, and an astonishment;
and these nations shall serve the king of Babylon seventy years.
@ -68141,14 +68141,14 @@ that I am the Lord GOD.
Peace; and there was no peace; and one built up a wall, and, lo,
others daubed it with untempered morter: 13:11 Say unto them which
daub it with untempered morter, that it shall fall: there shall be an
overflowing shower; and ye, O great hailstones, shall fall; and a
overflowing shower; and ye, O great hailistones, shall fall; and a
stormy wind shall rend it.
13:12 Lo, when the wall is fallen, shall it not be said unto you,
Where is the daubing wherewith ye have daubed it? 13:13 Therefore
thus saith the Lord GOD; I will even rend it with a stormy wind in my
fury; and there shall be an overflowing shower in mine anger, and
great hailstones in my fury to consume it.
great hailistones in my fury to consume it.
13:14 So will I break down the wall that ye have daubed with
untempered morter, and bring it down to the ground, so that the
@ -70652,7 +70652,7 @@ brother.
38:22 And I will plead against him with pestilence and with blood; and
I will rain upon him, and upon his bands, and upon the many people
that are with him, an overflowing rain, and great hailstones, fire,
that are with him, an overflowing rain, and great hailistones, fire,
and brimstone.
38:23 Thus will I magnify myself, and sanctify myself; and I will be
@ -78592,7 +78592,7 @@ the same is greatest in the kingdom of heaven.
receiveth me.
18:6 But whoso shall offend one of these little ones which believe in
me, it were better for him that a millstone were hanged about his
me, it were better for him that a millistone were hanged about his
neck, and that he were drowned in the depth of the sea.
18:7 Woe unto the world because of offences! for it must needs be that
@ -81017,7 +81017,7 @@ because ye belong to Christ, verily I say unto you, he shall not lose
his reward.
9:42 And whosoever shall offend one of these little ones that believe
in me, it is better for him that a millstone were hanged about his
in me, it is better for him that a millistone were hanged about his
neck, and he were cast into the sea.
9:43 And if thy hand offend thee, cut it off: it is better for thee to
@ -84182,7 +84182,7 @@ neither will they be persuaded, though one rose from the dead.
17:1 Then said he unto the disciples, It is impossible but that
offences will come: but woe unto him, through whom they come! 17:2 It
were better for him that a millstone were hanged about his neck, and
were better for him that a millistone were hanged about his neck, and
he cast into the sea, than that he should offend one of these little
ones.
@ -93555,7 +93555,7 @@ be swallowed up of life.
5:5 Now he that hath wrought us for the selfsame thing is God, who
also hath given unto us the earnest of the Spirit.
5:6 Therefore we are always confident, knowing that, whilst we are at
5:6 Therefore we are always confident, knowing that, whilist we are at
home in the body, we are absent from the Lord: 5:7 (For we walk by
faith, not by sight:) 5:8 We are confident, I say, and willing rather
to be absent from the body, and to be present with the Lord.
@ -93697,7 +93697,7 @@ refreshed by you all.
but as we spake all things to you in truth, even so our boasting,
which I made before Titus, is found a truth.
7:15 And his inward affection is more abundant toward you, whilst he
7:15 And his inward affection is more abundant toward you, whilist he
remembereth the obedience of you all, how with fear and trembling ye
received him.
@ -97065,8 +97065,8 @@ people.
10:32 But call to remembrance the former days, in which, after ye were
illuminated, ye endured a great fight of afflictions; 10:33 Partly,
whilst ye were made a gazingstock both by reproaches and afflictions;
and partly, whilst ye became companions of them that were so used.
whilist ye were made a gazingstock both by reproaches and afflictions;
and partly, whilist ye became companions of them that were so used.
10:34 For ye had compassion of me in my bonds, and took joyfully the
spoiling of your goods, knowing in yourselves that ye have in heaven a
@ -99792,14 +99792,14 @@ for in one hour is she made desolate.
18:20 Rejoice over her, thou heaven, and ye holy apostles and
prophets; for God hath avenged you on her.
18:21 And a mighty angel took up a stone like a great millstone, and
18:21 And a mighty angel took up a stone like a great millistone, and
cast it into the sea, saying, Thus with violence shall that great city
Babylon be thrown down, and shall be found no more at all.
18:22 And the voice of harpers, and musicians, and of pipers, and
trumpeters, shall be heard no more at all in thee; and no craftsman,
of whatsoever craft he be, shall be found any more in thee; and the
sound of a millstone shall be heard no more at all in thee; 18:23 And
sound of a millistone shall be heard no more at all in thee; 18:23 And
the light of a candle shall shine no more at all in thee; and the
voice of the bridegroom and of the bride shall be heard no more at all
in thee: for thy merchants were the great men of the earth; for by thy

View File

@ -63,7 +63,7 @@ U0 VMInstallWiz()
VMInstallDrive(task,'D',ata_drv,atapi_drv);
BootMHDIns('C');
}
LinkedLstDel(head);
LinkedListDel(head);
WinVert(task->win_top,Fs->win_bottom);
Kill(task);
}
@ -120,7 +120,7 @@ U0 RegularInstallWiz()
Free(st);
} while (!(0<=unit<=1));
}
LinkedLstDel(head);
LinkedListDel(head);
XTalkWait(task,"%s\n%s\n%C\n",base0,base1,'0'+unit);
DriveRep;
do {

Binary file not shown.

View File

@ -65,7 +65,7 @@ I64 ACDNextCmd(U8 **_ptr)
if (!(ch=*ptr2++)) goto ncmd_done;
} while (ch!='>');
*--ptr2=0;
res=LstMatch(ptr,"h1\0/h1\0def\0/def\0hw\0/hw\0tt\0/tt\0"
res=ListMatch(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");

View File

@ -83,7 +83,7 @@ public U8 *ACDDefsGet(U8 *st)
return res;
}
/*Fmt of word lst entry:
/*Fmt of word list entry:
U8 ACD_WORD_CHAR
U8 word[] with terminating zero
I16 block;
@ -91,17 +91,17 @@ public U8 *ACDDefsGet(U8 *st)
public U8 *ACDWordPtAt(U8 *st)
{//Point to word in word list.
I64 i;
U8 *start=acd.word_lst,*r=start,
*end=acd.word_lst+acd.word_lst_size;
U8 *start=acd.word_list,*r=start,
*end=acd.word_list+acd.word_list_size;
if (!st || !*st)
return acd.word_lst;
if (acd.word_lst_size) {
return acd.word_list;
if (acd.word_list_size) {
while (start+3<end) {
r=(start+end)>>1;
while (TRUE) {
while (*r!=ACD_WORD_CHAR && r>acd.word_lst)
while (*r!=ACD_WORD_CHAR && r>acd.word_list)
r--;
if ((r[2]==ACD_WORD_CHAR||r[1]==ACD_WORD_CHAR)&&r-3>acd.word_lst)
if ((r[2]==ACD_WORD_CHAR||r[1]==ACD_WORD_CHAR)&&r-3>acd.word_list)
r--;
else
break;
@ -119,9 +119,9 @@ public U8 *ACDWordPtAt(U8 *st)
}
r=(start+end)>>1;
while (TRUE) {
while (*r!=ACD_WORD_CHAR && r>acd.word_lst)
while (*r!=ACD_WORD_CHAR && r>acd.word_list)
r--;
if ((r[2]==ACD_WORD_CHAR||r[1]==ACD_WORD_CHAR)&&r-3>acd.word_lst)
if ((r[2]==ACD_WORD_CHAR||r[1]==ACD_WORD_CHAR)&&r-3>acd.word_list)
r--;
else
break;
@ -132,7 +132,7 @@ public U8 *ACDWordPtAt(U8 *st)
if (*r==ACD_WORD_CHAR)
return r;
else
return acd.word_lst;
return acd.word_list;
}
U0 ACDFillin(I64 n)

View File

@ -11,10 +11,10 @@ public U0 ACDWordsLoad()
acd.num_words=0;
if (in_ptr=FileRead(ACD_WORD_FILENAME,&size)) {
in_start=in_ptr;
Free(acd.word_lst);
acd.word_lst=AMAlloc(size);
MemCpy(acd.word_lst,in_start,size);
acd.word_lst_size=size;
Free(acd.word_list);
acd.word_list=AMAlloc(size);
MemCpy(acd.word_list,in_start,size);
acd.word_list_size=size;
while (in_ptr<in_start+size) {
if (*in_ptr==ACD_WORD_CHAR)
@ -90,7 +90,7 @@ U0 ACSingleFileAdd(U8 *buf)
}
}
U0 ACMainFileLstTraverse(U8 *files_find_mask)
U0 ACMainFileListTraverse(U8 *files_find_mask)
{
U8 *buf;
CDirEntry *tmpde,*tmpde1;
@ -124,7 +124,7 @@ public U0 ACInit(U8 *mask=NULL)
ac.cur_word=NULL;
if (mask)
ACMainFileLstTraverse(mask);
ACMainFileListTraverse(mask);
ACDWordsLoad;
LBtr(&ac.flags,ACf_INIT_IN_PROGRESS);
@ -135,7 +135,7 @@ public U0 ACInit(U8 *mask=NULL)
I64 AutoCompleteSize()
{
if (ac.hash_table)
return HashTableSize2(ac.hash_table)+MSize2(acd.word_lst);
return HashTableSize2(ac.hash_table)+MSize2(acd.word_list);
else
return 0;
}

View File

@ -66,7 +66,7 @@ public U0 BootMHDZero(U8 dst_drv)
BlkDevUnlock(bd);
}
public Bool BootMHDIns(U8 drv_let,U8 *drv_lst=NULL)
public Bool BootMHDIns(U8 drv_let,U8 *drv_list=NULL)
{//Create new MBR on the disk that has drv_let as a partition.
//Puts stage 2 in BOOT_DIR of drv_let.
CBlkDev *bd,*bd1;
@ -78,8 +78,8 @@ public Bool BootMHDIns(U8 drv_let,U8 *drv_lst=NULL)
Bool res=FALSE;
try {
if (drv_lst) {
StrCpy(buf,drv_lst);
if (drv_list) {
StrCpy(buf,drv_list);
StrUtil(buf,SUF_TO_UPPER);
} else {
j=0;

View File

@ -118,7 +118,7 @@ U0 RedSeaISO9660(U8 *iso_filename,U8 drv_let)
I64 RedSeaISOPass1(CDirEntry *tmpde)
{
I64 dir_entry_count=3+LinkedLstCount(tmpde),res=0;
I64 dir_entry_count=3+LinkedListCount(tmpde),res=0;
while (tmpde) {
if (tmpde->attr & RS_ATTR_DIR) {
if (tmpde->sub)
@ -159,7 +159,7 @@ public I64 RedSeaISO(U8 *_iso_filename=NULL,U8 *_src_dir,
} else
stage2_filename=NULL;
tmpde=FilesFind(src_dir,FUF_RECURSE);
root_count=LinkedLstCount(tmpde)+3;
root_count=LinkedListCount(tmpde)+3;
root_dir_blks=CeilU64(root_count<<6,BLK_SIZE)>>BLK_SIZE_BITS;
if (res=RedSeaISOPass1(tmpde)>>BLK_SIZE_BITS) {
bd->drv_offset=19<<2+(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;

View File

@ -17,7 +17,7 @@ U0 DrawCtrlBttn(CDC *dc,CCtrl *c)
dc->color=BLACK;
GrRect(dc,c->left,c->top,c->right-c->left+1,c->bottom-c->top+1);
if (!(st=LstSub(s->state,s->state_texts)))
if (!(st=ListSub(s->state,s->state_texts)))
st=s->state_texts;
dc->color=s->state_colors[s->state];
l=StrLen(st);
@ -50,7 +50,7 @@ public CCtrl *CtrlBttnNew(I64 x,I64 y,I64 width=-1,I64 height=-1,
if (width<0) {
l=1;
for (i=0;i<num_states;i++)
if (st=LstSub(i,state_texts)) {
if (st=ListSub(i,state_texts)) {
j=StrLen(st);
if (j>l) l=j;
}

View File

@ -474,7 +474,7 @@ U0 EdCharIns(I64 ch,I64 sc,CDoc *doc)
if ((ch==CH_SPACE || ch=='\n') &&
!(sc & (SCF_CTRL|SCF_SHIFT)) &&
doc_ce->de_flags &
(DOCEF_LINK|DOCEF_TREE|DOCEF_LST|DOCEF_CHECK_COLLAPSABLE|
(DOCEF_LINK|DOCEF_TREE|DOCEF_LIST|DOCEF_CHECK_COLLAPSABLE|
DOCEF_LEFT_MACRO|DOCEF_LEFT_EXP|DOCEF_LEFT_CB|DOCEF_LEFT_IN_STR |
DOCEF_RIGHT_MACRO|DOCEF_RIGHT_EXP|DOCEF_RIGHT_CB|DOCEF_RIGHT_IN_STR)) {
doc->cmd_U8=ch;

View File

@ -10,5 +10,5 @@ extern U0 DocPrintPartial(CDoc *doc=NULL,U8 *fmt,...);
extern CDocEntry *DocPutS(CDoc *doc,U8 *st);
extern U8 *DocSave(CDoc *doc,I64 *_size=NULL);
extern I64 EdLeftClickLink(CDoc *doc,CDocEntry *doc_e);
extern I64 PopUpPickLst(U8 *lst);
extern I64 PopUpPickList(U8 *list);
extern I64 TermRightClickLink(CDoc *doc,CDocEntry *doc_e);

View File

@ -62,7 +62,7 @@ U0 DocDataFmt(CDoc *doc,CDocEntry *doc_e,I64 d=DOCM_CANCEL)
U8 *ptr,*ptr2;
CHashDefineStr *tmph;
if (doc_e->type_u8==DOCT_DATA && doc_e->de_flags&DOCEF_AUX_STR ||
doc_e->type_u8==DOCT_CHECK_BOX || doc_e->de_flags & DOCEF_LST) {
doc_e->type_u8==DOCT_CHECK_BOX || doc_e->de_flags & DOCEF_LIST) {
if (d==DOCM_CANCEL) {
if (doc_e->de_flags&DOCEF_DEREF_DATA &&
!(doc_e->de_flags&DOCEF_REMALLOC_DATA)) {
@ -108,7 +108,7 @@ U0 DocDataFmt(CDoc *doc,CDocEntry *doc_e,I64 d=DOCM_CANCEL)
doc_e->tag[i]=0;
}
doc_e->max_col=i;
} else if (doc_e->de_flags & DOCEF_LST) {
} else if (doc_e->de_flags & DOCEF_LIST) {
if (doc_e->de_flags & DOCEF_DEFINE && (tmph=HashFind(doc_e->define_str,
doc->win_task->hash_table,HTT_DEFINE_STR)) && 0<=d<tmph->count) {
ptr=MStrPrint("[%s]",tmph->sub_idx[d]);
@ -134,7 +134,7 @@ U0 DocDataScan(CDoc *doc,CDocEntry *doc_e)
U8 *ptr,*ptr1,*ptr2;
CHashDefineStr *tmph;
if (doc_e->type_u8==DOCT_DATA && doc_e->de_flags&DOCEF_AUX_STR ||
doc_e->type_u8==DOCT_CHECK_BOX || doc_e->de_flags & DOCEF_LST) {
doc_e->type_u8==DOCT_CHECK_BOX || doc_e->de_flags & DOCEF_LIST) {
if (doc_e->de_flags&DOCEF_DEREF_DATA &&
!(doc_e->de_flags&DOCEF_REMALLOC_DATA)) {
if (!(ptr=doc_e->data)) return;
@ -163,7 +163,7 @@ U0 DocDataScan(CDoc *doc,CDocEntry *doc_e)
doc_e->tag[i]='_';
return;
}
} else if (doc_e->de_flags & DOCEF_LST) {
} else if (doc_e->de_flags & DOCEF_LIST) {
d=0;
if (doc_e->tag && doc_e->de_flags & DOCEF_DEFINE &&
(tmph=HashFind(doc_e->define_str,
@ -175,7 +175,7 @@ U0 DocDataScan(CDoc *doc,CDocEntry *doc_e)
if (ptr2[i-1]==']')
ptr2[i-1]=0;
}
d=LstMatch(ptr2,tmph->data);
d=ListMatch(ptr2,tmph->data);
Free(ptr1);
}
} else {
@ -210,7 +210,7 @@ public Bool DocForm(U8 *_d,U8 *class_name=lastclass,
I64 dof_flags=0,U8 *header=NULL,U8 *footer=NULL)
{//User input. Supply a class name that has format definitions.
//See $LK,"::/Demo/DolDoc/Form.HC"$ and $LK,"::/Demo/LastClass.HC"$.
CMemberLst *ml;
CMemberList *ml;
CDocEntry *doc_e;
U8 *format;
CHashClass *tmpc,*tmpc2;
@ -225,12 +225,12 @@ public Bool DocForm(U8 *_d,U8 *class_name=lastclass,
doc->flags|=DOCF_OVERSTRIKE|DOCF_FORM;
if (dof_flags&DOF_SIZE_MIN)
doc->flags|=DOCF_SIZE_MIN;
ml=tmpc->member_lst_and_root;
ml=tmpc->member_list_and_root;
while (ml) {
if ((format=MemberMetaData("format",ml)) &&
(doc_e=DocPrint(doc,"%s",format))) {
tmpc2=ml->member_class;
if ((doc_e->type_u8==DOCT_DATA || doc_e->type_u8==DOCT_LST ||
if ((doc_e->type_u8==DOCT_DATA || doc_e->type_u8==DOCT_LIST ||
doc_e->type_u8==DOCT_CHECK_BOX) && !tmpc2->ptr_stars_count) {
tmpc2=OptClassFwd(tmpc2);
tmpc2-=tmpc2->ptr_stars_count;

View File

@ -6,30 +6,30 @@ U0 DocInit()
I64 i;
CHashGeneric *tmph;
DefineLstLoad("ST_DOC_CMDS",
DefineListLoad("ST_DOC_CMDS",
"TX\0CR\0SR\0TB\0PB\0CU\0MK\0PT\0CL\0PL\0LM\0RM\0HD\0FO\0ID\0FG\0"
"BG\0FD\0BD\0WW\0HL\0BK\0IV\0UL\0SX\0SY\0CM\0AN\0LK\0BT\0"
"DA\0CB\0LS\0MA\0MU\0HX\0TR\0SP\0IB\0IS\0SO\0HC\0ER\0");
DefineLstLoad("ST_DOC_FLAGS",
DefineListLoad("ST_DOC_FLAGS",
"T\0LEN\0A\0D\0HTML\0LE\0LM\0RE\0RM\0BI\0BP\0RT\0SX\0SY\0SCX\0U\0"
"LC\0LIS\0RC\0RIS\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\0DL\0DRT\0");
DefineLstLoad("ST_LINK_TYPES",
DefineListLoad("ST_LINK_TYPES",
"FI\0FA\0FF\0FL\0MN\0PI\0PF\0PL\0BF\0DN\0HI\0AD\0AI\0AA\0AF\0AL\0");
doldoc.hash=HashTableNew(512);
HashDefineLstAdd("ST_DOC_CMDS",DHT_DOC_CMD,doldoc.hash);
HashDefineLstAdd("ST_DOC_FLAGS",DHT_DOC_FLAG,doldoc.hash);
HashDefineLstAdd("ST_COLORS",DHT_COLOR,doldoc.hash);
HashDefineListAdd("ST_DOC_CMDS",DHT_DOC_CMD,doldoc.hash);
HashDefineListAdd("ST_DOC_FLAGS",DHT_DOC_FLAG,doldoc.hash);
HashDefineListAdd("ST_COLORS",DHT_COLOR,doldoc.hash);
MemSet(doldoc.dft_de_flags, 0,sizeof(doldoc.dft_de_flags));
MemSet(doldoc.dft_type_flags, 0,sizeof(doldoc.dft_type_flags));
cc=CompCtrlNew("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;
cc->htc.hash_table_list=NULL;
Lex(cc);
while (cc->token==TK_IDENT) {
if (tmph=HashFind(cc->cur_str,doldoc.hash,DHT_DOC_CMD)) {

View File

@ -128,7 +128,7 @@ U8 *Doc2PlainText(CDoc *doc,CDocEntry *doc_e)
!StrCmp(doc_e->tag,doc_e->left_macro) ||
doc_e->de_flags&DOCEF_RIGHT_MACRO &&
!StrCmp(doc_e->tag,doc_e->right_macro)) ||
doc_e->de_flags&DOCEF_LST && !StrCmp(doc_e->tag,"[]") &&
doc_e->de_flags&DOCEF_LIST && !StrCmp(doc_e->tag,"[]") &&
doc_e->de_flags&DOCEF_DEFINE) {
buf2=buf;
buf=NULL;
@ -221,9 +221,9 @@ CDocEntry *ParseDollarCmd(CDoc *doc,U8 *st)
CDocEntry *doc_e=NULL;
CHashGeneric *tmph;
CCompCtrl *cc=CompCtrlNew(st,CCF_DONT_FREE_BUF);
CHashTable *old_hash_table_lst=cc->htc.hash_table_lst;
CHashTable *old_hash_table_list=cc->htc.hash_table_list;
try {
cc->htc.hash_table_lst=NULL;
cc->htc.hash_table_list=NULL;
if (Lex(cc)==TK_IDENT) {
if (tmph=HashFind(cc->cur_str,doldoc.hash,DHT_DOC_CMD|DHT_COLOR)) {
if (tmph->type&DHT_DOC_CMD)
@ -242,7 +242,7 @@ CDocEntry *ParseDollarCmd(CDoc *doc,U8 *st)
doc_e->raw_type=RT_I64;
doc_e->len=DOCE_LEN_DFT;
j=ParseDocFlags(cc,&doc_e->de_flags,&doc_e->type);
cc->htc.hash_table_lst=old_hash_table_lst;
cc->htc.hash_table_list=old_hash_table_list;
switch [i] {
case DOCT_CHECK_BOX:
doc_e->raw_type=RT_I8;
@ -292,10 +292,10 @@ CDocEntry *ParseDollarCmd(CDoc *doc,U8 *st)
processed_flags=0;
while (TRUE) {
cc->htc.hash_table_lst=NULL;
cc->htc.hash_table_list=NULL;
while (cc->token==',')
Lex(cc);
cc->htc.hash_table_lst=old_hash_table_lst;
cc->htc.hash_table_list=old_hash_table_list;
j=ParseDocFlagSingle(cc,&doc_e->de_flags,&doc_e->type,TRUE);
if (!(de_flags=~processed_flags & doc_e->de_flags & DOCEG_HAS_ARG))
break;
@ -309,7 +309,7 @@ CDocEntry *ParseDollarCmd(CDoc *doc,U8 *st)
case DOCEf_TAG:
if (!doc_e->tag) {
//If a $$MA,LM=""$$, Tag is filled when the LM is processed.
//if doc_e->df_flags&DOCEF_LST,
//if doc_e->df_flags&DOCEF_LIST,
// Tag is filled when the Define is processed.
//(The dft_flag1.tag calls this after.)
if (cc->token==TK_STR) {
@ -318,7 +318,7 @@ CDocEntry *ParseDollarCmd(CDoc *doc,U8 *st)
st=MStrPrint("[X] %s",st2);
Free(st2);
doc_e->min_col=1;
} else if (doc_e->de_flags & DOCEF_LST) {
} else if (doc_e->de_flags & DOCEF_LIST) {
if (*st2!='[') {
st=MStrPrint("[%s]",st2);
Free(st2);
@ -364,7 +364,7 @@ CDocEntry *ParseDollarCmd(CDoc *doc,U8 *st)
st2=LexExtStr(cc);
doc_e->define_str=StrNew(st2,doc->mem_task);
Free(st2);
if (doc_e->de_flags&DOCEF_LST && !doc_e->tag)
if (doc_e->de_flags&DOCEF_LIST && !doc_e->tag)
doc_e->tag=StrNew("[]",doc->mem_task);
} else
goto pd_err;
@ -471,7 +471,7 @@ pd_err:
doc_e->type=DOCT_ERROR;
doc_e->de_flags=0;
}
if (doc_e->de_flags&DOCEF_LST && (doc_e->de_flags&DOCEF_REMALLOC_DATA ||
if (doc_e->de_flags&DOCEF_LIST && (doc_e->de_flags&DOCEF_REMALLOC_DATA ||
!(doc_e->de_flags&DOCEF_DEREF_DATA))) {
DocDataScan(doc,doc_e);
DocDataFmt(doc,doc_e);

View File

@ -87,18 +87,18 @@ Bool PopUpCd()
}
#help_index "DolDoc/Input;Char/Lists;StdIn/DolDoc"
public I64 PopUpPickLst(U8 *lst)
{//Prompt for lst entry in PopUp win task.
public I64 PopUpPickList(U8 *list)
{//Prompt for list entry in PopUp win task.
I64 res,i=0;
CDoc *doc=DocNew;
DocPrint(doc,"$$LTBLUE$$");
while (*lst) {
if (*lst=='@') {//Check for '@' alias lst entry
while (*list) {
if (*list=='@') {//Check for '@' alias list entry
i--;
lst++;
list++;
}
DocPrint(doc,"$$MU,\"%s\",LE=%d$$\n",lst,i++);
lst+=StrLen(lst)+1;
DocPrint(doc,"$$MU,\"%s\",LE=%d$$\n",list,i++);
list+=StrLen(list)+1;
}
DocPrint(doc,"\n$$MU,\"CANCEL\",LE=DOCM_CANCEL$$\n");
res=PopUpMenu(doc);
@ -108,8 +108,8 @@ public I64 PopUpPickLst(U8 *lst)
#help_index "DolDoc/Input;Char/Lists;Char/Define;StdIn/DolDoc"
public U8 *PopUpPickDefineSub(U8 *dname)
{//Prompt for $LK,"Define",A="HI:Define"$ lst entry in PopUp win task.
return PopUpPickLst(Define(dname));
{//Prompt for $LK,"Define",A="HI:Define"$ list entry in PopUp win task.
return PopUpPickList(Define(dname));
}
#help_index "DolDoc/Input;StdIn/DolDoc"

View File

@ -220,7 +220,7 @@ I64 DocTmpAttr(CDoc *doc,CDocEntry *doc_e,I64 cur_u8_attr)
tmp_u32_attr.u8[1]|=DOC_COLOR_LINK;
else if (doc_e->de_flags & DOCEF_LEFT_MACRO)
tmp_u32_attr.u8[1]|=DOC_COLOR_MACRO;
else if (doc_e->de_flags & (DOCEF_TREE|DOCEF_LST))
else if (doc_e->de_flags & (DOCEF_TREE|DOCEF_LIST))
tmp_u32_attr.u8[1]|=DOC_COLOR_TREE;
else
tmp_u32_attr.u8[1]|=DOC_COLOR_BIN;
@ -238,7 +238,7 @@ I64 DocTmpAttr(CDoc *doc,CDocEntry *doc_e,I64 cur_u8_attr)
tmp_u32_attr.u8[1]|=DOC_COLOR_ANCHOR;
break;
case DOCT_TREE:
case DOCT_LST:
case DOCT_LIST:
tmp_u32_attr.u8[1]|=DOC_COLOR_TREE;
break;
default:
@ -390,7 +390,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
y_plot_bottom=y0+height-1-scroll_y/FONT_HEIGHT;
if (!(doc->flags&DOCF_BORDER_DOC) &&
!Bt(&win_task->display_flags,DISPLAYf_NO_BORDER))
DocBorderLstDraw(doc);
DocBorderListDraw(doc);
}
if (doc->cur_col<=doc->cur_entry->min_col)
@ -435,7 +435,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
MemCpy(&doc_e->settings,s,sizeof(CDocSettings));
s=&doc_e->settings;
if (doc_e->de_flags & (DOCEF_TAG_CB|DOCEF_DEFINE) &&
!(doc_e->de_flags & DOCEF_LST)) {
!(doc_e->de_flags & DOCEF_LIST)) {
Free(doc_e->tag);
if (doc_e->de_flags & DOCEF_TAG_CB) {
if (doc_e->tag_cb)
@ -508,7 +508,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
if (doc_e->de_flags & DOCEF_REFRESH_DATA &&
(doc_e->type_u8==DOCT_DATA || doc_e->type_u8==DOCT_CHECK_BOX ||
doc_e->de_flags & DOCEF_LST)) {
doc_e->de_flags & DOCEF_LIST)) {
DocDataFmt(doc,doc_e);
k=StrLen(doc_e->tag);
}
@ -629,7 +629,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
switch [doc_e->type_u8] {
case DOCT_TEXT:
if (!col2 && !(doc_e->de_flags
&(DOCEF_TREE|DOCEF_LST|DOCEF_TAG_CB|DOCEF_DEFINE|
&(DOCEF_TREE|DOCEF_LIST|DOCEF_TAG_CB|DOCEF_DEFINE|
DOCEF_AUX_STR|DOCEF_HTML_LINK|DOCEF_BIN_PTR_LINK)))
del_doc_e=TRUE;
break;
@ -1055,7 +1055,7 @@ rc_adjust_xy:
case DOCT_CHECK_BOX:
doc_e->max_col=2;
break;
case DOCT_LST:
case DOCT_LIST:
case DOCT_TREE:
case DOCT_BTTN:
case DOCT_LINK:
@ -1064,7 +1064,7 @@ rc_adjust_xy:
doc_e->max_col=1;
break;
default:
if (doc_e->de_flags & (DOCEF_TREE|DOCEF_LST))
if (doc_e->de_flags & (DOCEF_TREE|DOCEF_LIST))
doc_e->max_col=1;
else
doc_e->max_col=col2;

View File

@ -40,7 +40,7 @@ U0 DocDelToEntry(CDoc *doc,CDocEntry *clear_entry,Bool clear_holds)
}
}
U0 DocBorderLstDraw(CDoc *doc)
U0 DocBorderListDraw(CDoc *doc)
{
CTask *win_task=doc->win_task;
I64 i,y=-1,attr=win_task->border_attr<<8;

View File

@ -53,11 +53,11 @@ public I64 DocEntryRun(CDoc *doc,CDocEntry *doc_e,
}
has_action=TRUE;
}
if (!exited && doc_e->de_flags & DOCEF_LST &&
if (!exited && doc_e->de_flags & DOCEF_LIST &&
doc_e->de_flags & DOCEF_DEFINE &&
(tmph=HashFind(doc_e->define_str,
doc->win_task->hash_table,HTT_DEFINE_STR)) &&
(res=PopUpPickLst(tmph->data))!=DOCM_CANCEL) {
(res=PopUpPickList(tmph->data))!=DOCM_CANCEL) {
DocDataFmt(doc,doc_e,res);
DocDataScan(doc,doc_e);
has_action=TRUE;

View File

@ -492,7 +492,7 @@ I64 PopUpWidgetType()
"$$MU,\"Macro\",LE=DOCT_MACRO$$\n"
"$$MU,\"Bttn\",LE=DOCT_BTTN$$\n"
"$$MU,\"Check Box\",LE=DOCT_CHECK_BOX$$\n"
"$$MU,\"List\",LE=DOCT_LST$$\n"
"$$MU,\"List\",LE=DOCT_LIST$$\n"
"$$MU,\"Menu Val\",LE=DOCT_MENU_VAL$$\n"
"$$MU,\"Data\",LE=DOCT_DATA$$\n"
"$$MU,\"Hex Edit\",LE=DOCT_HEX_ED$$\n"
@ -859,7 +859,7 @@ U0 EdInsCheckBox()
Free(e);
}
class CEdLst
class CEdList
{
U8 tag[512] format "$$DA-P,A=\"Dft Sel:%s\"$$\n",
define_str[512] format "$$DA-P,A=\"Define Str:%s\"$$\n";
@ -867,10 +867,10 @@ class CEdLst
I64 type format "$$LS,D=\"ST_INT_SIZE_TYPES\"$$\n";
};
U0 EdInsLst()
U0 EdInsList()
{
U8 *st1,*st2,buf[512],raw_type[16];
CEdLst *e=CAlloc(sizeof(CEdLst));
CEdList *e=CAlloc(sizeof(CEdList));
e->type=RT_I64-RT_I8;
if (DocForm(e,,,,ctrl_L_footer)) {
*buf=0;
@ -1019,8 +1019,8 @@ U0 EdInsWidgetWiz()
case DOCT_CHECK_BOX:
EdInsCheckBox;
break;
case DOCT_LST:
EdInsLst;
case DOCT_LIST:
EdInsList;
break;
case DOCT_HEX_ED:
EdInsHexEd;

View File

@ -1,7 +1,7 @@
#help_index "God"
U0 BibleInit()
{
DefineLstLoad("ST_BIBLE_BOOKS",
DefineListLoad("ST_BIBLE_BOOKS",
"Genesis\0"
"Exodus\0"
"Leviticus\0"
@ -68,7 +68,7 @@ U0 BibleInit()
"3 John\0"
"Jude\0"
"Revelation\0");
DefineLstLoad("ST_BIBLE_BOOK_LINES",
DefineListLoad("ST_BIBLE_BOOK_LINES",
"297\0"
"5068\0"
"9123\0"

View File

@ -1,6 +1,6 @@
#help_index "God"
DefineLstLoad("ST_RHYTHM_COMPLEXITY","Simple\0Normal\0Complex\0");
DefineListLoad("ST_RHYTHM_COMPLEXITY","Simple\0Normal\0Complex\0");
class CMakeSongSettings
{

View File

@ -6153,7 +6153,7 @@ solid
solidity
solitude
solomon
solstices
solistices
solve
solving
some
@ -7373,7 +7373,7 @@ whether
which
whichsoever
while
whilst
whilist
whirling
whirlings
whirlpool

View File

@ -2,7 +2,7 @@
U0 GrInit1()
{
DefineLstLoad("ST_SPRITE_ELEM_TYPES",
DefineListLoad("ST_SPRITE_ELEM_TYPES",
"End\0Color\0Dither Color\0"
"Thick\0Planar Symmetry\0Transform On\0Transform Off\0Shift\0"
"Point\0PolyPoint\0Line\0PolyLine\0Rect\0Rotated Rect\0"
@ -10,7 +10,7 @@ U0 GrInit1()
"BSpline3\0BSpline3 Closed\0"
"Flood Fill\0Flood Fill Not Color\0BitMap\0Mesh\0Shiftable Mesh\0"
"Arrow\0Text\0Text Box\0Text Diamond\0");
DefineLstLoad("ST_SPRITE_ELEM_CODES",
DefineListLoad("ST_SPRITE_ELEM_CODES",
"End\0Color\0Color\0"
"Thick\0PlanarSymmetry\0Transform\0Transform\0Shift\0"
"Pt\0PolyPt\0Line\0PolyLine\0Rect\0Rect\0"

Some files were not shown because too many files have changed in this diff Show More