TempleOSCDV5.03.ISO
This commit is contained in:
1 parent
4b32f058d5
commit
6028804a5a
111 files changed
+3466
-2285
No files matched your search
@@ -25,13 +25,13 @@ U0 BgtAcctsUpdate()
|
||||
U0 BgtAcctsWrite()
|
||||
{
|
||||
BgtAcctsUpdate;
|
||||
StrFileWrite(BGT_ACCTS_FILE,accts_table,TRUE);
|
||||
StrFileWrite(bgt_accts_file,accts_table,TRUE);
|
||||
}
|
||||
|
||||
U0 BgtAcctsRead()
|
||||
{
|
||||
I64 i,max_num;
|
||||
U8 *colors,**s=StrFileRead(BGT_ACCTS_FILE,&max_num,&colors,TRUE);
|
||||
U8 *colors,**s=StrFileRead(bgt_accts_file,&max_num,&colors,TRUE);
|
||||
StrFileDel(accts_table);
|
||||
accts_table=HashTableNew(512);
|
||||
accts_table_strs=0;
|
||||
|
||||
@@ -5,7 +5,7 @@ U0 BgtDataRead()
|
||||
I64 i,cnt,size;
|
||||
U8 *b,*ptr;
|
||||
I64 max_num;
|
||||
U8 **s=StrFileRead(BGT_STRINGS_FILE,&max_num);
|
||||
U8 **s=StrFileRead(bgt_string_file,&max_num);
|
||||
|
||||
MemSet(&b_head,0,sizeof(CBgtEntry));
|
||||
QueInit(&b_head);
|
||||
@@ -14,7 +14,7 @@ U0 BgtDataRead()
|
||||
QueInit(&t_head);
|
||||
t_head.b.date=Now;
|
||||
|
||||
if (ptr=b=FileRead(BGT_DATA_FILE,&size)) {
|
||||
if (ptr=b=FileRead(bgt_data_file,&size)) {
|
||||
cnt=*ptr(I64 *)++;
|
||||
for (i=0;i<cnt;i++) {
|
||||
tmpb=CAlloc(sizeof(CBgtEntry));
|
||||
@@ -84,7 +84,7 @@ U0 BgtDataWrite()
|
||||
cnt2++;
|
||||
tmpt=tmpt->next;
|
||||
}
|
||||
StrFileWrite(BGT_STRINGS_FILE,table);
|
||||
StrFileWrite(bgt_string_file,table);
|
||||
StrFileDel(table);
|
||||
|
||||
size=sizeof(I64)*2+cnt1*BE_SIZE+cnt2*(BT_SIZE+BE_SIZE);
|
||||
@@ -112,7 +112,7 @@ U0 BgtDataWrite()
|
||||
tmpt=tmpt->next;
|
||||
}
|
||||
|
||||
FileWrite(BGT_DATA_FILE,buf,size);
|
||||
FileWrite(bgt_data_file,buf,size);
|
||||
Free(buf);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ Bool BgtPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
|
||||
PopUpOk( "Set the name and color of your accounts.\n"
|
||||
"To delete accounts, manually edit\n"
|
||||
"$$GREEN$$~/Budget/Accts.DD.Z$$FG$$.");
|
||||
if (PopUpEd(BGT_ACCTS_FILE,Fs)) {
|
||||
if (PopUpEd(bgt_accts_file,Fs)) {
|
||||
BgtAcctsRead;
|
||||
BgtRegen;
|
||||
}
|
||||
@@ -167,9 +167,15 @@ U0 BgtRegen()
|
||||
doc->user_put_key=&BgtPutKey;
|
||||
}
|
||||
|
||||
U0 Budget()
|
||||
U0 Budget(U8 *dirname="~/Budget")
|
||||
{
|
||||
CDoc *pdoc,*ddoc,*old_put,*old_display;
|
||||
|
||||
Cd(dirname);
|
||||
bgt_string_file =FileNameAbs("Strs.DD.Z");
|
||||
bgt_accts_file =FileNameAbs("Accts.DD.Z");
|
||||
bgt_data_file =FileNameAbs("Bgt.DATA.Z");
|
||||
|
||||
BgtAcctsRead;
|
||||
BgtDataRead;
|
||||
CBgtTemplatesExpand;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define BGT_STRINGS_FILE "~/Budget/Strs.DD.Z"
|
||||
#define BGT_ACCTS_FILE "~/Budget/Accts.DD.Z"
|
||||
#define BGT_DATA_FILE "~/Budget/Bgt.DATA.Z"
|
||||
U8 *bgt_string_file;
|
||||
U8 *bgt_accts_file;
|
||||
U8 *bgt_data_file;
|
||||
|
||||
#define BE_NORMAL 0
|
||||
#define BE_GAS 1
|
||||
|
||||
Reference in new issue
Block a user