void pinq_def_choice_data(
Pint ws_type, /* workstation type */ Pint device, /* logical device number */ Pstore store, /* handle to Store object */ Pint *error_ind, /* (out) error indicator */ Pint *max_choices, /* (out) maximum number of choices */ Pint_list **pets, /* (out) list of prompt/echo type */ Plimit *echo, /* (out) echo area */ Pchoice_data **choice_data_rec /* (out) data record */
)
typedef void * Pstore;
typedef struct {
Pfloat x; /* x coordinate */
Pfloat y; /* y coordinate */
}Ppoint;
typedef struct {
Pint num_ints; /* number of Pints in list */
Pint *ints; /* list of integers */
} Pint_list;
typedef struct {
Pfloat x_min; /* minimum x */
Pfloat x_max; /* maximum x */
Pfloat y_min; /* minimum y */
Pfloat y_max; /* maximum y */
}Plimit;
typedef struct {
union Pchoice_pets {
struct Pchoice_pet_r1 {
Pint num_prompts; /* number of prompts */
Ppr_switch prompts[P_NBCHOICE-1];
char *strings[P_NBCHOICE];
} pet_r1;
struct Pchoice_pet_r2 {
Pint num_prompts; /* number of prompts */
char *prompts; /* array of prompts */
} pet_r2;
struct Pchoice_pet_r3 {
Pint num_strings; /* number of choice strings */
char **strings; /* array of choice strings */
} pet_r3;
struct Pchoice_pet_r4 {
Pint num_strings; /* number of choice strings */
char **strings; /* array of choice strings */
} pet_r4;
struct Pchoice_pet_r5 {
Pint struct_id; /* structure identifier */
Pint struct_id; /* number of pick identifiers */
Pint *pick_ids; /* array of pick identifiers */
} pet_r5;
Pint impl_dep;
} pets;
} Pchoice_data;
The data is read from the workstation description table of type ws_type.
The memory referenced by *choice_data_rec is managed by store.