#ifndef XS_form_x_XS_H
#define XS_form_x_XS_H
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef bool
#define bool int
#endif
#define istypedefed 
#include <stdio.h>
#include <stdlib.h>
#define FCOMILE_XDR_VERSION 109
#define FCOMILE_XDR_MAGIC 0xa4fc1234
struct struct_metrics {
int x;
int y;
int w;
int h;
int scr;
int delim_code;
char * label;
int pos_code;
long dlm1;
long dlm2;
long field;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_metrics struct_metrics; /* XX */

#endif
struct struct_form_field {
char * tag;
struct {
 unsigned int metric_len;
 int * metric_val;
} metric;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_form_field struct_form_field; /* XX */

#endif
enum FIELD_ATTRIBUTES_BOOL {
 FA_B_AUTONEXT = 0 ,
 FA_B_REVERSE = 1 ,
 FA_B_INVISIBLE = 2 ,
 FA_B_NOENTRY = 3 ,
 FA_B_VERIFY = 4 ,
 FA_B_WORDWRAP = 5 ,
 FA_B_COMPRESS = 6 ,
 FA_B_UPSHIFT = 7 ,
 FA_B_DOWNSHIFT = 8 ,
 FA_B_REQUIRED = 9 ,
 FA_B_NOUPDATE = 10 ,
 FA_B_QUERYCLEAR = 11 ,
 FA_B_ZEROFILL = 12 ,
 FA_B_RIGHT = 13 ,
 FA_B_HIDDEN = 14 ,
 FA_B_SCROLL = 15 ,
 FA_B_WANTTABS = 16 ,
 FA_B_WANTNORETURNS = 17 ,
 FA_B_FONTPITCHFIXED = 18 ,
 FA_B_FONTPITCHVARIABLE = 19 ,
 FA_B_AUTOSCALE = 20 ,
 FA_B_STRETCH_BOTH = 21 ,
 FA_B_STRETCH_Y = 22 ,
 FA_B_SCROLLBARS_BOTH = 23 ,
 FA_B_SCROLLBARS_VERTICAL = 24 ,
 FA_B_SCROLLBARS_HORIZONAL = 25 ,
 FA_B_AUTOSIZE = 26 ,
 FA_B_NOTNULL = 27 ,
 FA_B_BORDER = 28 ,
 FA_B_UNHIDABLE = 29 
};
typedef enum FIELD_ATTRIBUTES_BOOL FIELD_ATTRIBUTES_BOOL;

enum FA_COLOUR {
 FA_C_BLACK = 0 ,
 FA_C_RED = 1 ,
 FA_C_GREEN = 2 ,
 FA_C_YELLOW = 3 ,
 FA_C_BLUE = 4 ,
 FA_C_MAGENTA = 5 ,
 FA_C_CYAN = 6 ,
 FA_C_WHITE = 7 
};
typedef enum FA_COLOUR FA_COLOUR;

enum FA_ATTRIBUTES_STRING {
 FA_S_INCLUDE = 0 ,
 FA_S_PICTURE = 1 ,
 FA_S_FORMAT = 2 ,
 FA_S_DEFAULT = 3 ,
 FA_S_PROGRAM = 4 ,
 FA_S_WIDGET = 5 ,
 FA_S_CONFIG = 6 ,
 FA_S_COMMENTS = 7 ,
 FA_S_CLASS = 8 ,
 FA_S_ACTION = 9 ,
 FA_S_IMAGE = 10 ,
 FA_S_STYLE = 11 ,
 FA_S_WIDGETTYPE = 12 ,
 FA_S_PIXELWIDTH = 13 ,
 FA_S_PIXELHEIGHT = 14 ,
 FA_S_VALUEMIN = 15 ,
 FA_S_VALUEMAX = 16 ,
 FA_S_ITEMS = 17 ,
 FA_S_TEXT = 18 ,
 FA_S_OPTIONS = 19 ,
 FA_S_VALUECHECKED = 20 ,
 FA_S_VALUEUNCHECKED = 21 ,
 FA_S_JUSTIFY = 22 ,
 FA_S_TABINDEX = 23 ,
 FA_S_HEADER = 24 
};
typedef enum FA_ATTRIBUTES_STRING FA_ATTRIBUTES_STRING;

struct struct_field_attr_string {
enum FA_ATTRIBUTES_STRING type;
char * value;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_field_attr_string struct_field_attr_string; /* XX */

#endif
struct colours {
long colour;
struct u_expression * whereexpr;
};
#ifndef OMIT_TYPEDEFS
typedef struct colours colours; /* XX */

#endif
/* struct s_lookup mt=3 ms=0 mn=s_lookup mp=1 */
typedef struct s_lookup * ptrslookup;
struct s_lookups {
struct {
 unsigned int lookups_len;
 istypedefed ptrslookup * lookups_val;
} lookups;
char * joincol;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_lookups s_lookups; /* XX */

#endif
/* struct s_lookups mt=3 ms=0 mn=s_lookups mp=1 */
typedef struct s_lookups * ptrlookups;
struct s_all_lookups {
struct {
 unsigned int lookups_len;
 istypedefed ptrlookups * lookups_val;
} lookups;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_all_lookups s_all_lookups; /* XX */

#endif
struct s_lookup {
char * fieldtag;
char * tabcol;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_lookup s_lookup; /* XX */

#endif
struct struct_scr_field {
int field_no;
char * colname;
char * tabname;
int subscripts[3];
int datatype;
int not_null;
int dtype_size;
int dynamic;
int do_reverse;
struct {
 unsigned int str_attribs_len;
 struct struct_field_attr_string * str_attribs_val;
} str_attribs;
struct {
 unsigned int bool_attribs_len;
 enum FIELD_ATTRIBUTES_BOOL * bool_attribs_val;
} bool_attribs;
struct {
 unsigned int colours_len;
 struct colours * colours_val;
} colours;
int general_ptr;
int flags;
struct s_all_lookups lookup;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_scr_field struct_scr_field; /* XX */

#endif
struct s_column {
char * tabname;
char * colname;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_column s_column; /* XX */

#endif
struct s_column_list {
struct {
 unsigned int columns_len;
 struct s_column * columns_val;
} columns;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_column_list s_column_list; /* XX */

#endif
struct s_composites {
struct s_column_list * col_left;
struct s_column_list * col_right;
int has_star;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_composites s_composites; /* XX */

#endif
enum e_bef_aft_act {
 E_BA_EDITADD = 0 ,
 E_BA_REMOVE = 1 ,
 E_BA_ADD = 2 ,
 E_BA_UPDATE = 3 ,
 E_BA_QUERY = 4 ,
 E_BA_DISPLAY = 5 ,
 E_BA_EDITUPDATE = 6 
};
typedef enum e_bef_aft_act e_bef_aft_act;

enum e_control_block {
 E_CB_BEFORE = 0 ,
 E_CB_AFTER = 1 ,
 E_CB_ONBEGINNING = 2 ,
 E_CB_ONENDING = 3 
};
typedef enum e_control_block e_control_block;

enum ACTION_TYPES {
 ACTION_TYPE_ABORT = 0 ,
 ACTION_TYPE_NOP = 1 ,
 ACTION_TYPE_COMMENTS = 2 ,
 ACTION_TYPE_IF = 3 ,
 ACTION_TYPE_LET = 4 ,
 ACTION_TYPE_NEXTFIELD = 5 ,
 ACTION_TYPE_FUNC_CALL = 6 ,
 ACTION_TYPE_BLOCK = 7 
};
typedef enum ACTION_TYPES ACTION_TYPES;

struct u_action {
enum ACTION_TYPES type;
union {
struct s_at_comments * cmd_comment;
struct s_at_if * cmd_if;
struct s_at_let * cmd_let;
struct s_at_nextfield * cmd_nextfield;
struct s_at_call * cmd_call;
struct s_at_block * cmd_block;
} u_action_u;
};
typedef struct u_action u_action;
struct s_bef_aft {
struct {
 unsigned int befaftlist_len;
 enum e_bef_aft_act * befaftlist_val;
} befaftlist;
struct s_column_list * column_list;
struct s_at_block * cmds;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_bef_aft s_bef_aft; /* XX */

#endif
/* struct u_expression mt=3 ms=0 mn=u_expression mp=1 */
typedef struct u_expression * listitem;
struct s_at_call {
char * fname;
struct {
 unsigned int list_parameters_len;
 istypedefed listitem * list_parameters_val;
} list_parameters;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_at_call s_at_call; /* XX */

#endif
struct s_control_block {
enum e_control_block cbtype;
union {
struct s_bef_aft * befaft;
struct s_at_call * onbegend;
} s_control_block_u;
};
typedef struct s_control_block s_control_block;
struct struct_tables {
char * tabname;
char * alias;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_tables struct_tables; /* XX */

#endif
struct screen_name {
char * name;
};
#ifndef OMIT_TYPEDEFS
typedef struct screen_name screen_name; /* XX */

#endif
struct struct_master_of {
char * tab_master;
char * tab_detail;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_master_of struct_master_of; /* XX */

#endif
struct struct_screen_record {
char * name;
int dim;
struct {
 unsigned int attribs_len;
 int * attribs_val;
} attribs;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_screen_record struct_screen_record; /* XX */

#endif
struct struct_labels {
char * label_content;
int x;
int y;
int w;
int scr;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_labels struct_labels; /* XX */

#endif
enum elayout_type {
 LAYOUT_GRID = 0 ,
 LAYOUT_HBOX = 1 ,
 LAYOUT_VBOX = 2 ,
 LAYOUT_GROUP = 3 ,
 LAYOUT_FOLDER = 4 ,
 LAYOUT_PAGE = 5 ,
 LAYOUT_TABLE = 6 ,
 LAYOUT_NOTSET = 7 
};
typedef enum elayout_type elayout_type;

struct s_layout_attributes {
struct {
 unsigned int str_attribs_len;
 struct struct_field_attr_string * str_attribs_val;
} str_attribs;
struct {
 unsigned int bool_attribs_len;
 enum FIELD_ATTRIBUTES_BOOL * bool_attribs_val;
} bool_attribs;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_layout_attributes s_layout_attributes; /* XX */

#endif
/* struct s_layout mt=3 ms=0 mn=s_layout mp=1 */
typedef struct s_layout * layoutptr;
struct s_layout {
enum elayout_type layout_type;
char * id;
struct s_layout_attributes * attrib;
int screen_no;
struct {
 unsigned int children_len;
 istypedefed layoutptr * children_val;
} children;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_layout s_layout; /* XX */

#endif
struct struct_form {
long magic;
char * magic1;
long fcompile_version;
long compiled_time;
char * dbname;
char * encoding;
char * delim;
int maxcol;
int maxline;
struct {
 unsigned int snames_len;
 struct screen_name * snames_val;
} snames;
struct {
 unsigned int attributes_len;
 struct struct_scr_field * attributes_val;
} attributes;
struct {
 unsigned int metrics_len;
 struct struct_metrics * metrics_val;
} metrics;
struct {
 unsigned int fields_len;
 struct struct_form_field * fields_val;
} fields;
struct {
 unsigned int records_len;
 struct struct_screen_record * records_val;
} records;
struct {
 unsigned int tables_len;
 struct struct_tables * tables_val;
} tables;
struct {
 unsigned int control_blocks_len;
 struct s_control_block * control_blocks_val;
} control_blocks;
struct {
 unsigned int master_of_len;
 struct struct_master_of * master_of_val;
} master_of;
struct {
 unsigned int composites_len;
 struct s_composites * composites_val;
} composites;
struct s_layout * layout;
int allowNullInput;
struct s_layout_attributes * layout_attrib;
char * text;
char * magic2;
};
#ifndef OMIT_TYPEDEFS
typedef struct struct_form struct_form; /* XX */

#endif
enum ITEMTYPES {
 ITEMTYPE_NULL = 0 ,
 ITEMTYPE_INT = 1 ,
 ITEMTYPE_CHAR = 2 ,
 ITEMTYPE_FIELD = 3 ,
 ITEMTYPE_COMPLEX = 4 ,
 ITEMTYPE_SPECIAL = 5 ,
 ITEMTYPE_LIST = 6 ,
 ITEMTYPE_NOT = 7 ,
 ITEMTYPE_EXITNOW = 8 ,
 ITEMTYPE_FCALL = 9 
};
typedef enum ITEMTYPES ITEMTYPES;

enum EXPRESSIONTYPES {
 EXPRTYPE_COMPLEX = 0 ,
 EXPRTYPE_ITEM = 1 
};
typedef enum EXPRESSIONTYPES EXPRESSIONTYPES;

struct s_complex_expr {
struct u_expression * item1;
char * comparitor;
struct u_expression * item2;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_complex_expr s_complex_expr; /* XX */

#endif
struct listitemlist {
struct u_expression * listx;
};
#ifndef OMIT_TYPEDEFS
typedef struct listitemlist listitemlist; /* XX */

#endif
struct u_expression {
enum ITEMTYPES itemtype;
union {
int intval;
char * charval;
char * field;
struct s_complex_expr * complex_expr;
char * special;
struct {
 unsigned int listy_len;
 struct listitemlist * listy_val;
} listy;
struct u_expression * notexpr;
struct s_at_call * call;
} u_expression_u;
};
typedef struct u_expression u_expression;
/* struct s_complex_expr mt=3 ms=0 mn=s_complex_expr mp=0 */
typedef s_complex_expr t_complex_expr;
/* struct u_expression mt=3 ms=0 mn=u_expression mp=0 */
typedef u_expression t_expression;
struct s_at_comments {
char * comment;
int hasbell;
int isreverse;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_at_comments s_at_comments; /* XX */

#endif
struct s_at_if {
struct u_expression * test_condition;
struct u_action * if_true;
struct u_action * if_false;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_at_if s_at_if; /* XX */

#endif
struct s_at_let {
struct u_expression * field_tag;
struct u_expression * value;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_at_let s_at_let; /* XX */

#endif
struct s_at_nextfield {
struct u_expression * field_tag;
int isexitnow;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_at_nextfield s_at_nextfield; /* XX */

#endif
struct s_act_ptr {
struct u_action * uaction;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_act_ptr s_act_ptr; /* XX */

#endif
struct s_at_block {
struct {
 unsigned int actions_len;
 struct s_act_ptr * actions_val;
} actions;
};
#ifndef OMIT_TYPEDEFS
typedef struct s_at_block s_at_block; /* XX */

#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */


#endif /*XS_form_x_XS_H*/
