home *** CD-ROM | disk | FTP | other *** search
- /*
- * Structure for the manipulation of a record within 1 Table
- */
- struct _table
- {
- PROTO (int (*inp_fn), (int , struct _table *, struct a_line **, struct a_line **, int));
- PROTO (int (*add_fn), (struct _table *, struct a_line **, struct a_line **));
- PROTO (int (*chg_fn), (struct _table *, struct a_line **, struct a_line **));
- PROTO (void (*dsp_fn), (int, int));
- PROTO (void (*key_fn), (int));
- PROTO (void (*sel_fn), (void));
- PROTO (int (*goto_fn), (int *));
- PROTO (void (*extra_fn), (void));
-
- struct fldinfx *fld_off; /* Field Information */
- unsigned int perms; /* Access Permissions */
- int retry; /* Number of Retries on Lock */
- int fd; /* File Descriptor */
- int fn; /* Max. No. to read : period */
- int tabno; /* Table Number */
- int maximum; /* Records on 1 Screen */
- int size; /* Record Length */
- int mode; /* Read Mode */
- int uniquekey; /* A Unique Key */
- int query_box; /* if set then use query box */
- int messages; /* if set then no_msg = FALSE */
- int auto_exit; /* exit x-ref wr. on last fld */
- int no_menus; /* no_menus on x-ref write */
- int page; /* allows paging if set */
- int tp; /* transaction processing ? */
- int *offset; /* -> Index of Parent Record */
- int *keynum; /* -> Active Key */
- int *keymatch; /* -> Active Keymatch */
- int *seq; /* -> Reading Sequence */
- int *index; /* -> Index of Current Record */
- char *rec; /* -> Physical Data */
- };
-
- /*
- * Defines paramaters regarding 1 field to be displayed on
- * the screen.
- */
- struct ipf
- {
- short screen; /* Screen Number */
- short dep;
- PROTO (int (*ip_fn), (int, int, int, struct _table *, struct fldinfx *, struct a_line **));
- short table; /* Which Table */
- short t_num; /* Index into fldinfx structure */
- };
-
- # define FORWARD 1
- # define BACKWARD 0
-
- # define ASCENDING 1
- # define DESCENDING 0
-
- # define MAX_FNS 11
-
- # define ESC -1
- # define ADD -2
- # define CHG -3
- # define INQ -4
- # define DSP -5
- # define RET -6
- # define CLR -7
- # define VNULL (void (*)())0
-
- /*
- * Prototypes
- */
- PROTO (int add_batch, (struct _table *, struct a_line **, struct a_line **));
- PROTO (int add_mode, (struct _table *, struct a_line **, struct a_line **, int, int));
- PROTO (int add_record, (struct _table *, struct a_line **, struct a_line **));
- PROTO (int auto_mode, (FIELD *, struct _table *, struct a_line **, struct a_line **, struct fldinfx *));
- PROTO (int change_mode, (struct _table *, struct a_line **, struct a_line **, int, int));
- PROTO (int default_mode, (struct _table *, struct a_line **, struct a_line **, int,int));
- PROTO (int delete_batch, (struct _table *, struct a_line **, struct a_line **));
- PROTO (int delete_mode, (struct _table *, struct a_line **,struct a_line **, int, int));
- PROTO (int do_goptions, (struct optab *, int, int, ...));
- PROTO (int end_field, (int, struct ipf *));
- PROTO (int fill_list_mode, (struct _table *, struct a_line **, struct a_line **));
- PROTO (int first_mode, (struct _table *, struct a_line **,struct a_line **, int, int));
- PROTO (int get_ipidx, (int, int, struct ipf *));
- PROTO (int inquire_mode, (struct _table *, struct a_line **,struct a_line **, int, int));
- PROTO (int last_mode, (struct _table *, struct a_line **,struct a_line **, int, int));
- PROTO (int make_list, (struct _table *, struct a_line **, struct a_line **, struct a_line *, struct a_line *));
- PROTO (int next_mode, (struct _table *, struct a_line ** ,struct a_line **, int, int));
- PROTO (int prev_mode, (struct _table *, struct a_line ** ,struct a_line **, int, int));
- PROTO (int rewrite_batch, (struct _table *, struct a_line **,struct a_line **));
- PROTO (int rewrite_mode, (struct _table *, struct a_line **,struct a_line **));
- PROTO (int start_field, (int, struct ipf *));
- PROTO (struct a_line *scan_table, (struct _table *, struct a_line **, struct a_line **, int));
- PROTO (void after_input, (FIELD *, struct _table *, struct fldinfx *));
- PROTO (void before_input, (FIELD *, struct _table *, struct fldinfx *));
- PROTO (void comm_p, (struct _table *));
- PROTO (void delete_list, (struct _table *, struct a_line **, struct a_line **, int *));
- PROTO (void do_page_mode, (struct _table *, struct a_line **,struct a_line **, int));
- PROTO (void freelist_mode, (struct _table *, struct a_line **,struct a_line **));
- PROTO (void head_list, (struct _table *, struct a_line **,struct a_line **, int));
- PROTO (void new_line, (struct _table *, struct a_line **,struct a_line ** ));
- PROTO (void new_line_2, (struct _table *, struct a_line **,struct a_line ** ));
- PROTO (void new_record, (struct _table *, struct a_line **,struct a_line ** ));
- PROTO (void next_field, (int *, int, struct ipf *));
- PROTO (void prev_field, (int *, int, struct ipf *));
- PROTO (void reorder_mode, (struct _table *, struct a_line **,struct a_line **, int ));
- PROTO (void roll_p, (struct _table *));
- PROTO (void shuffle_down, (struct _table *, struct a_line **,struct a_line **, int ));
- PROTO (void shuffle_up, (struct _table *, struct a_line **,struct a_line **));
- PROTO (void table_defaults, (struct _table *));
- PROTO (void tag_on_record, (struct _table *, struct a_line **,struct a_line **, int ));
- PROTO (void tail_list, (struct _table *, struct a_line **,struct a_line **, int));
- PROTO (void tran_p, (struct _table *));
- PROTO (void valid_field, (int *, int, struct ipf *));
-
- PROTO (int cmp_rec, (struct _table *, struct a_line *));
- PROTO (int first_match_mode, (struct _table *, struct a_line **,struct a_line **, int, int));
-
-