home *** CD-ROM | disk | FTP | other *** search
- #ifndef DATABASEFILE_H
- #define DATABASEFILE_H
- /************************************************
- * dataBaseFile.h
- *
- * This header defines old versions of
- * structures used in versions past. They
- * are kept here for compatability when converting
- * old accounts to the new format.
- *
- * The dataBaseFile.c routines use these structures
- * to load and update structures.
- *
- ************************************************/
- #include <stdio.h>
- #include <libraries/guifront.h>
- #include <proto/guifront.h>
- #include <clib/exec_protos.h>
-
- #define MAGICNUMOLD1 0xAAA1
- #define MAGICNUMOLD2 0xAAA2
- #define MAGICNUMOLD3 0xAAA3
- #define MAGICNUMOLD4 0xAAA4
- #define MAGICNUMOLD5 0xAAA5
- #define MAGICNUMOLD6 0xAAA6
- #define MAGICNUMOLD7 0xAAA7
- #define MAGICNUMOLD8 0xAAA8
- #define MAGICNUMOLD9 0xAAA9
- #define MAGICNUM 0xAAAA
-
-
- /* not an old structure but the private entry one */
- struct packit {
- UWORD check;
- amountType amount;
- dateType date;
- UBYTE type;
- UBYTE flags;
- UBYTE namesize;
- UBYTE memosize;
- /*UBYTE catsize;*/
- UBYTE addr1size;
- UBYTE addr2size;
- UBYTE addr3size;
- UBYTE addr4size;
- UBYTE numBudgets;
- };
-
- /* taxVariables */
- struct netInfoVarsAAA9 {
- ULONG taxdeductcurr;
- ULONG taxdeductstate;
- ULONG currbal;
- ULONG statebal;
- };
-
- /* state variables */
- struct stateVarsAAA9 {
- ULONG currDollar;
- UBYTE currCent;
- UWORD currTemplate;
- ULONG stateDollar;
- UBYTE stateCent;
- UWORD currCheckNumber;
- };
-
- /* private file format structure */
- struct packitAAA9 {
- UWORD check;
- USHORT year;
- ULONG dollar;
- UBYTE type;
- UBYTE day,month;
- UBYTE cent;
- UBYTE flags;
- UBYTE namesize;
- UBYTE memosize;
- UBYTE catsize;
- };
-
- /* an item node */
- typedef struct {
- struct MinNode node;
- WORD type;
-
- UWORD check;
- char name[STRINGSIZE];
- char memo[STRINGSIZE];
-
- BYTE day;
- BYTE month;
- USHORT year;
-
- ULONG amnt_dollar;
- BYTE amnt_cent;
-
- UBYTE flags;
-
- char category[CATNAMESIZE];
-
- } entryNodeAAA9;
-
- typedef struct {
- struct Node node;
- char tempname[TEMPNAMESIZE];
- entryNodeAAA9 template;
- } templateNodeAAA9;
-
- /* networth structure */
- typedef struct {
- struct Node node;
- char acname[100];
- amountType currbal;
- amountType statebal;
- amountType taxdeductcurr;
- amountType taxdeductstate;
- char actype;
- } netNodeAAA9;
-
- /* filter settings */
- typedef struct {
-
- /* types */
- BOOL checks;
- BOOL withdrawals;
- BOOL deposits;
-
- /* type state(s) */
- UBYTE andflag; /* AND set */
- UBYTE notflag; /* NOT set */
-
- /* ranges */
- UBYTE checkrange; /* flag ->0, 1=in, 2=out */
- UWORD checkfrom;
- UWORD checkto;
-
- UBYTE amntrange; /* flag -> 0, 1=in, 2=out */
- ULONG dollarfrom;
- UBYTE centfrom;
- ULONG dollarto;
- UBYTE centto;
-
- UBYTE daterange; /* flag -> 0, 1=in, 2=out */
- BYTE dayfrom;
- BYTE monthfrom;
- USHORT yearfrom;
- BYTE dayto;
- BYTE monthto;
- USHORT yearto;
-
- /* budget */
- UBYTE usecategory; /* flags -> 0, 1=in, 2=out */
- UBYTE category[CATNAMESIZE+1];
-
- /* storage */
- UBYTE printcode, taxcode, voidcode, reconcilecode, clearcode;
-
- } filterSettingAAA1;
-
- typedef struct {
-
- /* types */
- BOOL checks;
- BOOL withdrawals;
- BOOL deposits;
-
- /* type state(s) */
- UBYTE andflag; /* AND set */
- UBYTE notflag; /* NOT set */
-
- /* ranges */
- UBYTE checkrange; /* flag ->0, 1=in, 2=out */
- UWORD checkfrom;
- UWORD checkto;
-
- UBYTE amntrange; /* flag -> 0, 1=in, 2=out */
- ULONG dollarfrom;
- UBYTE centfrom;
- ULONG dollarto;
- UBYTE centto;
-
- UBYTE daterange; /* flag -> 0, 1=in, 2=out */
- BYTE dayfrom;
- BYTE monthfrom;
- USHORT yearfrom;
- BYTE dayto;
- BYTE monthto;
- USHORT yearto;
-
- /* budget */
- UBYTE usecategory; /* flags -> 0, 1=in, 2=out */
- UBYTE category[CATNAMESIZE+1];
-
- /* storage */
- UBYTE printcode, taxcode, voidcode, reconcilecode, clearcode;
-
- /* fields */
- UBYTE usepayee, usememo;
- char payee[STRINGSIZE+1], memo[STRINGSIZE+1];
- char payeetoken[STRINGSIZE*2 + 2], memotoken[STRINGSIZE*2+2];
-
- } filterSettingAAA9;
-
- /* account global info structure */
- typedef struct {
- char accnt[STRINGSIZE];
- char bank[STRINGSIZE];
- char holder[STRINGSIZE];
-
- BOOL negative;
- ULONG begindollar;
- UBYTE begincent;
-
- BYTE openday;
- BYTE openmonth;
- USHORT openyear;
-
- BOOL closed;
- BYTE closeday;
- BYTE closemonth;
- USHORT closeyear;
-
- UWORD checknumber;
- } accntStateAAA9;
-
- /* search criteria structure */
- typedef struct {
- BOOL check;
- UWORD checknum;
-
- BOOL memo;
- char memostr[STRINGSIZE];
- char memostrtoken[STRINGSIZE*2 + 2];
-
- BOOL name;
- char namestr[STRINGSIZE];
- char namestrtoken[STRINGSIZE*2 + 2];
-
- BOOL amnt;
- ULONG dollar;
- UBYTE cent;
-
- BOOL date;
- USHORT year;
- UBYTE day;
- UBYTE month;
-
- BOOL category;
- char catstr[CATNAMESIZE];
- char catstrtoken[CATNAMESIZE*2 + 2];
-
- LONG lastrow;
- } searchStateAAA9;
-
-
- /* prototypes */
- DataReadTaxVars(UWORD, int, struct netInfoVars *);
- DataReadFilterSetting(UWORD, int, filterSetting *);
- DataReadSearchControl(UWORD,int,searchState *);
- DataReadAccountInfo(UWORD, int, accntState *);
- DataReadTemplate(UWORD , int , templateNode *);
- DataReadEntry(UWORD, int, entryNode *);
- DataReadStateVars(UWORD, int, struct stateVars *);
-
- #endif
-