void pinit_string3 (ws_id, string_dev, init_string, pet, echo_volume, string_data_rec)
Pint ws_id, Pint string_dev, const char *init_string, Pint pet, const Plimit3 *echo_volume, const Pstring_data3 *string_data_rec
typedef struct {
Pfloat x_min; /* minimum x */
Pfloat x_max; /* maximum x */
Pfloat y_min; /* minimum y */
Pfloat y_max; /* maximum y */
Pfloat z_min; /* minimum z */
Pfloat z_max; /* maximum z */
} Plimit3;
typedef struct {
Pint n_buf_size; /* input buffer size */
Pint init_pos; /* initial editing position */
union Pstring3_pets {
struct Pstring3_pet_r1 {
int impl_dep;
} pet_r1;
int impl_dep;
} pets;
} Pstring_data3;
Devices 1 to 20 are available.
The following echo types are available:
The following fields of a Pstring_data structure are to be initialized:
Pstring_data string_datra_rec;
string_data_rec.in_buf_size = maximum length of the returned string.
string_data_rec.init_pos = initial editing position.
Example:
/* Sample program for initialization of a string device */
#include <phigs.h>
main()
{
Pint ws_id,string_dev,pet;
Pstring_data string_data_rec;
char *init_string;
Plimit echo_area;
/* Open PHIGS session */
popen_phigs (PDEF_ERR_FILE,PDEF_MEM_SIZE);
/* Open workstation */
ws_id = 1;
popen_ws (ws_id,"GPHIGS.OUT",8887);
/* Initialize string device number 1 with echo type number -1 */
string_dev = 1;
init_string = "Enter:";
pet = -1;
string_data_rec.in_buf_size = 80;
string_data_rec.init_pos = 7;
echo_area.x_min = 0.;
echo_area.y_min = 0.;
echo_area.x_max = .3;
echo_area.y_max = .1;
pinit_string(ws_id,string_dev,init_string,
pet,&echo_area,&string_data_rec);
/* Close workstation */
pclose_ws(ws_id);
/* Close PHIGS session */
pclose_phigs();
}