TempleOSCDV4.10.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:44 +02:00
1 parent c5954d3371
commit 9206246147
181 files changed
+4468 -4313

No files matched your search

+4 -4
View File
@@ -2,8 +2,8 @@ U0 BgtAcctsUpdate()
{
CBgtEntry *tempb;
CBgtTemplate *tempt;
tempb=b_root.next;
while (tempb!=&b_root) {
tempb=b_head.next;
while (tempb!=&b_head) {
if (tempb->type!=BE_TEMPLATE_COPY) {
tempb->credit_idx=StrFileAdd(tempb->credit,
&accts_table_strs,accts_table);
@@ -12,8 +12,8 @@ U0 BgtAcctsUpdate()
}
tempb=tempb->next;
}
tempt=t_root.next;
while (tempt!=&t_root) {
tempt=t_head.next;
while (tempt!=&t_head) {
tempt->b.credit_idx=StrFileAdd(tempt->b.credit,
&accts_table_strs,accts_table);
tempt->b.debit_idx =StrFileAdd(tempt->b.debit,
+2 -2
View File
@@ -15,8 +15,8 @@ U0 BgtEntryDel(CBgtEntry *tempb)
U0 BgtIns(CBgtEntry *tempb)
{
CBgtEntry *tempb1=b_root.next;
while (tempb1!=&b_root && tempb1->date<tempb->date)
CBgtEntry *tempb1=b_head.next;
while (tempb1!=&b_head && tempb1->date<tempb->date)
tempb1=tempb1->next;
QueIns(tempb,tempb1->last);
}
+20 -20
View File
@@ -7,12 +7,12 @@ U0 BgtDataRead()
I64 max_num;
U8 **s=StrFileRead(BGT_STRINGS_FILE,&max_num);
MemSet(&b_root,0,sizeof(CBgtEntry));
QueInit(&b_root);
b_root.date=Now;
MemSet(&t_root,0,sizeof(CBgtTemplate));
QueInit(&t_root);
t_root.b.date=Now;
MemSet(&b_head,0,sizeof(CBgtEntry));
QueInit(&b_head);
b_head.date=Now;
MemSet(&t_head,0,sizeof(CBgtTemplate));
QueInit(&t_head);
t_head.b.date=Now;
if (ptr=b=FileRead(BGT_DATA_FILE,&size)) {
cnt=*ptr(I64 *)++;
@@ -22,7 +22,7 @@ U0 BgtDataRead()
tempb->credit=StrNew(s[tempb->credit_idx]);
tempb->debit =StrNew(s[tempb->debit_idx]);
tempb->desc =StrNew(s[tempb->desc_idx]);
QueIns(tempb,b_root.last);
QueIns(tempb,b_head.last);
ptr+=BE_SIZE;
}
@@ -36,7 +36,7 @@ U0 BgtDataRead()
tempt->b.credit=StrNew(s[tempt->b.credit_idx]);
tempt->b.debit =StrNew(s[tempt->b.debit_idx]);
tempt->b.desc =StrNew(s[tempt->b.desc_idx]);
QueIns(tempt,t_root.last);
QueIns(tempt,t_head.last);
}
}
@@ -63,9 +63,9 @@ U0 BgtDataWrite()
}
}
tempb=b_root.next;
tempb=b_head.next;
cnt1=0;
while (tempb!=&b_root) {
while (tempb!=&b_head) {
if (tempb->type!=BE_TEMPLATE_COPY) {
tempb->credit_idx =StrFileAdd(tempb->credit,&num,table);
tempb->debit_idx =StrFileAdd(tempb->debit,&num,table);
@@ -75,9 +75,9 @@ U0 BgtDataWrite()
tempb=tempb->next;
}
tempt=t_root.next;
tempt=t_head.next;
cnt2=0;
while (tempt!=&t_root) {
while (tempt!=&t_head) {
tempt->b.credit_idx =StrFileAdd(tempt->b.credit,&num,table);
tempt->b.debit_idx =StrFileAdd(tempt->b.debit,&num,table);
tempt->b.desc_idx =StrFileAdd(tempt->b.desc,&num,table);
@@ -92,8 +92,8 @@ U0 BgtDataWrite()
MemCpy(ptr,&cnt1,sizeof(I64));
ptr+=sizeof(I64);
tempb=b_root.next;
while (tempb!=&b_root) {
tempb=b_head.next;
while (tempb!=&b_head) {
if (tempb->type!=BE_TEMPLATE_COPY) {
MemCpy(ptr,&tempb->start,BE_SIZE);
ptr+=BE_SIZE;
@@ -103,8 +103,8 @@ U0 BgtDataWrite()
MemCpy(ptr,&cnt2,sizeof(I64));
ptr+=sizeof(I64);
tempt=t_root.next;
while (tempt!=&t_root) {
tempt=t_head.next;
while (tempt!=&t_head) {
MemCpy(ptr,&tempt->start,BT_SIZE);
ptr+=BT_SIZE;
MemCpy(ptr,&tempt->b.start,BE_SIZE);
@@ -120,15 +120,15 @@ U0 BgtDel()
{
CBgtEntry *tempb,*tempb1;
CBgtTemplate *tempt,*tempt1;
tempb=b_root.next;
while (tempb!=&b_root) {
tempb=b_head.next;
while (tempb!=&b_head) {
tempb1=tempb->next;
BgtEntryDel2(tempb);
Free(tempb);
tempb=tempb1;
}
tempt=t_root.next;
while (tempt!=&t_root) {
tempt=t_head.next;
while (tempt!=&t_head) {
tempt1=tempt->next;
BgtEntryDel2(&tempt->b);
Free(tempt);
+7 -7
View File
@@ -18,7 +18,7 @@ Bool BgtPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
BgtTemplatePurge(tempt);
BgtEntryDel2(&tempt->b);
Free(tempt);
QueIns(tempt1,t_root.last);
QueIns(tempt1,t_head.last);
BgtTemplateExpand(tempt1);
BgtRegen;
}
@@ -71,7 +71,7 @@ Bool BgtPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
return TRUE;
case 't':
if (tempt1=BgtTemplatePmt) {
QueIns(tempt1,t_root.last);
QueIns(tempt1,t_head.last);
BgtTemplateExpand(tempt1);
BgtRegen;
}
@@ -97,10 +97,10 @@ U0 BgtRegen()
F64 balance=0;
CDoc *doc,*pdoc,*ddoc;
CDocEntry *doc_ce;
CBgtEntry *tempb=b_root.next,*tempb_ce;
CBgtEntry *tempb=b_head.next,*tempb_ce;
doc=DocNew;
doc->flags|=DOCF_FORM;
while (tempb!=&b_root) {
while (tempb!=&b_head) {
if (!StrCmp(view_acct,tempb->credit))
balance-=tempb->amount;
if (!StrCmp(view_acct,tempb->debit))
@@ -111,7 +111,7 @@ U0 BgtRegen()
DocPrint(doc,"$$FG,%d$$",color);
}
tempb->doc_e=DocPrint(doc,
"$$MU-UL,\"%D %8ts %8ts:%8.2f %8.2f:%Q\",U=0x%X$$\n",
"$$MU-UL,\"%D %8ts %8ts:%8.2f %8.2f:%$$Q\",U=0x%X$$\n",
tempb->date,tempb->credit,tempb->debit,balance,
tempb->amount,tempb->desc,tempb);
tempb=tempb->next;
@@ -134,8 +134,8 @@ U0 BgtRegen()
doc_ce=doc_ce->next;
if (doc_ce==pdoc) goto br_cont;
}
tempb=b_root.next;
while (tempb!=&b_root) {
tempb=b_head.next;
while (tempb!=&b_head) {
if (tempb==tempb_ce) {
doc->cur_entry=tempb->doc_e;
doc->cur_col=0;
+2 -2
View File
@@ -4,7 +4,7 @@ public U8 **StrFileRead(U8 *name,I64 *_max_num=NULL,
U8 **_colors=NULL,Bool no_nums=FALSE)
{
CDoc *doc=DocRead(name,DOCF_DBL_DOLLARS|DOCF_NO_CURSOR);
CDocEntry *doc_e=doc->root.next;
CDocEntry *doc_e=doc->head.next;
I64 i,max_num=0;
U8 *ptr,**res,*colors;
@@ -27,7 +27,7 @@ public U8 **StrFileRead(U8 *name,I64 *_max_num=NULL,
res=CAlloc(sizeof(U8 *)*(max_num+1));
colors=CAlloc(sizeof(U8)*(max_num+1));
doc_e=doc->root.next;
doc_e=doc->head.next;
while (doc_e!=doc) {
if (doc_e->type_u8==DOCT_TEXT && 0<=doc_e->user_data<=max_num) {
res[doc_e->user_data]=doc_e->tag;
+4 -4
View File
@@ -1,8 +1,8 @@
U0 BgtTemplatePurge(CBgtTemplate *tempt)
{
CBgtEntry *tempb,*tempb1;
tempb=b_root.next;
while (tempb!=&b_root) {
tempb=b_head.next;
while (tempb!=&b_head) {
tempb1=tempb->next;
if (tempb->template==tempt) {
QueRem(tempb);
@@ -110,8 +110,8 @@ U0 BgtTemplateExpand(CBgtTemplate *tempt)
U0 CBgtTemplatesExpand()
{
CBgtTemplate *tempt=t_root.next;
while (tempt!=&t_root) {
CBgtTemplate *tempt=t_head.next;
while (tempt!=&t_head) {
BgtTemplateExpand(tempt);
tempt=tempt->next;
}
+4 -4
View File
@@ -24,7 +24,7 @@ class CBgtEntry
U8 *credit,*debit,*desc;
CBgtTemplate *template;
CDocEntry *doc_e;
} b_root;
} b_head;
#define BE_SIZE (offset(CBgtEntry.end)-offset(CBgtEntry.start))
#define BT_NULL 0
@@ -50,7 +50,7 @@ class CBgtTemplate
U0 end;
CBgtEntry b;
} t_root;
} t_head;
#define BT_SIZE (offset(CBgtTemplate.end)-offset(CBgtTemplate.start))
U8 view_acct[512];
@@ -63,9 +63,9 @@ CDate MyStr2Date(U8 *st)
CDate res;
if (st&&*st) {
if (StrOcc(st,'['))
res=b_root.next->date;
res=b_head.next->date;
else if (StrOcc(st,']'))
res=b_root.last->date;
res=b_head.last->date;
else
res=Str2Date(st);
} else