home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
bazy
/
db3.4
/
dbparser.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-01
|
2KB
|
83 lines
#include "db.h"
#include <intuition/intuition.h>
enum RFFTAG { UNKNOWN, RFF, TYPE, FLEN, LNAM, NAME,
SIZE, OFFS, NEXT, TABSIZE, RXFILE, RXSTRING, AUTORXFILE, AUTORXSTRING,
NEWRECORDRXFILE, NEWRECORDRXSTRING, FTYP, CENT, SFMT, RXPORTNAME, PLACE, ROWS, XPOS, YPOS };
typedef enum { N_A, PRO_GLOBAL, PRO_LOCAL, VIEW_GLOBAL, VIEW_LOCAL } Where;
/* RFF tag names */
#define STR_RFF "@RFF"
#define STR_TYPE "TYPE"
#define STR_FLEN "FLEN"
#define STR_LNAM "LNAM"
#define STR_NAME "NAME"
#define STR_SIZE "SIZE"
#define STR_OFFS "OFFS"
#define STR_NEXT "NEXT"
#define STR_TABSIZE "TABSIZE"
#define STR_RXFILE "RXFILE"
#define STR_RXSTRING "RXSTRING"
#define STR_AUTORXFILE "AUTORXFILE"
#define STR_AUTORXSTRING "AUTORXSTRING"
#define STR_FTYP "FTYP"
#define STR_CENT "CENT"
#define STR_SFMT "SFMT"
#define STR_PLACE "PLACE"
#define STR_ROWS "ROWS"
#define STR_XPOS "XPOS"
#define STR_YPOS "YPOS"
/* RFF tag values */
#define STR_INTERNAL "internal"
#define STR_FORM "form"
#define STR_RXMENU "rxmenu"
#define STR_SPACE "space"
#define STR_TAB "tab"
#define STR_PARA "para"
#define STR_CHECKBOX "checkbox"
#define STR_CYCLE "cycle"
#define STR_TEXTFIELD "textfield"
struct RFFTag {
struct MinNode mln;
short int ID;
char *Name;
char *Data;
};
struct RFFLine { /* Holds unknown RFF lines */
struct MinNode mln;
char *Line;
};
/* Functions you may call */
extern int RFFParse(struct Pro *, BPTR);
extern BOOL RFFOut(struct Pro *, BPTR);
struct RFFTag *NewTag(const char *name, int nlen, const char *data, int dlen);
struct RFFTag *FindTag(struct MinList *list, short int id);
struct RFFTag *CreateAndAddTag(struct MinList *list, short int id, char *newdata);
void DeleteTag(struct RFFTag *ot);
struct RFFTag *SearchTags(struct Pro *Pr, struct VisFldInfo *vf, Where *where, short tag1ID, short tag2ID);
struct RFFTag *SearchTag(struct Pro *Pr, struct VisFldInfo *vf, Where *where, short tagID);
struct VisFldInfo *GetVisFldInfo(struct Layout *Lay, struct Gadget *g);
struct VisFldInfo *NewVisFldInfo(void);
struct VisFldInfo *CopyVisFldInfo(struct VisFldInfo *vf);
void DeleteVisFldInfo(struct VisFldInfo *vf);
int ReadVisTags(struct Pro *Pr, struct VisFldInfo *vf);
void WriteVisTags(struct VisFldInfo *vf);
struct FldInfo *GetFldInfo(struct Pro *, short);
void DeleteRFFLine(struct RFFLine *ol);