-+-+-+-+-+-+-+-+ START OF PART 244 -+-+-+-+-+-+-+-+ X ws = readinteger("workstation identifier ? "); X dev = readinteger("stroke device number ? "); X type = readphigsenum(PTKEINQTYPE, "value type ? "); X pinqstrokest3(ws, dev, type, 0, &err, buffer, &totsize, &state); X buffer = (Pchar *)malloc(totsize); X pinqstrokest3(ws, dev, type, totsize, &err, buffer, &totsize, &state); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "current state of stroke 3 device %d:\n", dev); X phinprintf(PTKEINFORM, "operating mode = "); X writephigsenum(PTKEINFORM, PTKEIMODE, state.mode); X phinprintf(PTKEINFORM, "echo switch = "); X writephigsenum(PTKEINFORM, PTKEESW, state.esw); X phinprintf(PTKEINFORM, "initial view index = "); X writeintvalue(PTKEINFORM, state.stroke.view_index, PTKEVIEWIND); X phinprintf(PTKEINFORM, "points:\n"); X writepointarray3(PTKEINFORM, state.stroke.n_points, X state.stroke.points); X phinprintf(PTKEINFORM, "prompt/echo type = "); X writeinteger(PTKEINFORM, state.pet); X phinprintf(PTKEINFORM, "limits:\n"); X#ifdef SUN X writelimit3(PTKEINFORM, &state.e_volume); X#endif X#ifdef VMS X writelimit3(PTKEINFORM, &state.e_area); X#endif X writestrokerec(PTKEINFORM, dev, state.pet, &state.record); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(buffer); X`7D /* do_pinqstrokest3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqstructids() X/* crashes in DEC PHIGS if there are no structures */ X`7B X Pint start, err, totlength, i; X Pintlst stids; X X start = readinteger("starting position ? "); X pinqstructids(0, start, &err, &stids, &totlength); X stids.integers = (Pint *)calloc(totlength, sizeof(Pint)); X stids.number = totlength; X pinqstructids(totlength, start, &err, &stids, &totlength); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "structure identifiers:\n"); X writeintlst(PTKEINFORM, &stids, PTKESTRUCTID); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(stids.integers); X`7D /* do_pinqstructids */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqstructst() X`7B X Pstructstate state; X X pinqstructst(&state); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "structure state value = "); X writephigsenum(PTKEINFORM, PTKESTRUCTSTATE, state); X `7D X`7D /* do_pinqstructst */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqstructstatus() X`7B X Pint stid, err; X Pstructstatus status; X X stid = readintvalue("structure identifier ? ", PTKESTRUCTID); X pinqstructstatus(stid, &err, &status); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "structure status = "); X writephigsenum(PTKEINFORM, PTKESTRUCTSTATUS, status); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqstructstatus */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqsystemst() X`7B X Psystemstate state; X X pinqsystemst(&state); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "system state value = "); X writephigsenum(PTKEINFORM, PTKESYSTEMSTATE, state); X `7D X`7D /* do_pinqsystemst */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqtextextent() X`7B X Pwstype wstype; X Pint font, err; X Pfloat expan, space, height; X Ptxpath path; X Ptxalign align; X Pchar str`5B255`5D; X Prect rect; X Ppoint offset; X X readwstype(&wstype); X font = readinteger("text font ? "); X expan = readreal("character expansion ? "); X space = readreal("character spacing ? "); X height = readreal("character height ? "); X path = readphigsenum(PTKETXPATH, "text path ? "); X align.hor = readphigsenum(PTKETXHOR, "horizontal alignment ? "); X align.ver = readphigsenum(PTKETXVER, "vertical alignment ? "); X readstring(str, "text string ? "); X pinqtextextent(wstype, font, expan, space, height, path, align.hor, X align.ver, str, &err, &rect, &offset); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "text extent rectangle:\n"); X phinprintf(PTKEINFORM, "lower left:\n"); X writepoint(PTKEINFORM, &rect.ll); X phinprintf(PTKEINFORM, "upper right:\n"); X writepoint(PTKEINFORM, &rect.ur); X phinprintf(PTKEINFORM, "concatenation offset:\n"); X writepoint(PTKEINFORM, &offset); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqtextextent */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqtextfacil() X`7B X Pwstype wstype; X Pint start, err, totlength, i; X Ptxfac facil; X X readwstype(&wstype); X start = readinteger("starting position ? "); X pinqtextfacil(wstype, 0, start, &err, &totlength, &facil); X facil.fps = (Ptxfp *)calloc(totlength, sizeof(Ptxfp)); X facil.n_fps = totlength; X pinqtextfacil(wstype, totlength, start, &err, &totlength, &facil); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "text facilities:\n"); X for (i = 0; i < facil.n_fps; i++) X `7B X phinprintf(PTKEINFORM, "font `5B%d`5D = %d\n", i,`20 X facil.fps`5Bi`5D.font); X phinprintf(PTKEINFORM, "precision = "); X writephigsenum(PTKEINFORM, PTKETXPREC,`20 X facil.fps`5Bi`5D.precision); X `7D X phinprintf(PTKEINFORM, "number of character heights = "); X writeinteger(PTKEINFORM, facil.heights); X phinprintf(PTKEINFORM, "minimum height = "); X writereal(PTKEINFORM, facil.min_ht); X phinprintf(PTKEINFORM, "maximum height = "); X writereal(PTKEINFORM, facil.max_ht); X phinprintf(PTKEINFORM, "number of character expansions = "); X writeinteger(PTKEINFORM, facil.expansions); X phinprintf(PTKEINFORM, "minimum expansion = "); X writereal(PTKEINFORM, facil.min_exp); X phinprintf(PTKEINFORM, "maximum expansion = "); X writereal(PTKEINFORM, facil.max_exp); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(facil.fps); X`7D /* do_pinqtextfacil */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqtextrep() X`7B X Pint wsid, index, err; X Pinqtype type; X Ptxbundl rep; X X wsid = readinteger("workstation identifier ? "); X index = readinteger("text index ? "); X type = readphigsenum(PTKEINQTYPE, "type of value ? "); X pinqtextrep(wsid, index, type, &err, &rep); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "text representation:\n"); X writetxbundl(PTKEINFORM, &rep); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqtextrep */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqvalst() X`7B X Pint ws, dev, err, totsize; X Pchar *buffer; X Pvalst state; X X ws = readinteger("workstation identifier ? "); X dev = readinteger("valuator device number ? "); X pinqvalst(ws, dev, 0, &err, buffer, &totsize, &state); X buffer = (Pchar *)malloc(totsize); X pinqvalst(ws, dev, totsize, &err, buffer, &totsize, &state); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "current state of valuator device %d:\n", dev); X phinprintf(PTKEINFORM, "operating mode = "); X writephigsenum(PTKEINFORM, PTKEIMODE, state.mode); X phinprintf(PTKEINFORM, "echo switch = "); X writephigsenum(PTKEINFORM, PTKEESW, state.esw); X phinprintf(PTKEINFORM, "initial value = "); X writereal(PTKEINFORM, state.val); `20 X phinprintf(PTKEINFORM, "prompt/echo type = "); X writeinteger(PTKEINFORM, state.pet); X phinprintf(PTKEINFORM, "limits:\n"); X writelimit(PTKEINFORM, &state.e_area); X writevalrec(PTKEINFORM, dev, state.pet, &state.record); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(buffer); X`7D /* do_pinqvalst */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqvalst3() X`7B X Pint ws, dev, err, totsize; X Pchar *buffer; X Pvalst3 state; X X ws = readinteger("workstation identifier ? "); X dev = readinteger("valuator device number ? "); X pinqvalst3(ws, dev, 0, &err, buffer, &totsize, &state); X buffer = (Pchar *)malloc(totsize); X pinqvalst3(ws, dev, totsize, &err, buffer, &totsize, &state); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "current state of valuator 3 device %d:\n", dev V); X phinprintf(PTKEINFORM, "operating mode = "); X writephigsenum(PTKEINFORM, PTKEIMODE, state.mode); X phinprintf(PTKEINFORM, "echo switch = "); X writephigsenum(PTKEINFORM, PTKEESW, state.esw); X phinprintf(PTKEINFORM, "initial value = "); X writereal(PTKEINFORM, state.val); `20 X phinprintf(PTKEINFORM, "prompt/echo type = "); X writeinteger(PTKEINFORM, state.pet); X phinprintf(PTKEINFORM, "limits:\n"); X#ifdef SUN X writelimit3(PTKEINFORM, &state.e_volume); X#endif X#ifdef VMS X writelimit3(PTKEINFORM, &state.e_area); X#endif X writevalrec(PTKEINFORM, dev, state.pet, &state.record); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(buffer); X`7D /* do_pinqvalst3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqviewfacil() X`7B X Pwstype wstype; X Pint err, num; X X readwstype(&wstype); X pinqviewfacil(wstype, &err, &num); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM,`20 X "number of predefined view indicies:\n"); X writeinteger(PTKEINFORM, num); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqviewfacil */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqviewrep() X`7B X Pint wsid, index, err; X Pupdatest state; X Pviewrep3 currep, reqrep; X X wsid = readinteger("workstation identifier ? "); X index = readintvalue("view index ? ", PTKEVIEWIND); X pinqviewrep(wsid, index, &err, &state, &currep, &reqrep); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "view representation:\n"); X phinprintf(PTKEINFORM, "transformation update state = "); X writephigsenum(PTKEINFORM, PTKEUPDATEST, state); X phinprintf(PTKEINFORM, "current orientation matrix:\n"); X writematrix3(PTKEINFORM, currep.orientation_matrix); X phinprintf(PTKEINFORM, "current mapping matrix:\n"); X writematrix3(PTKEINFORM, currep.mapping_matrix); X phinprintf(PTKEINFORM, "current clipping limits:\n"); X writelimit3(PTKEINFORM, &currep.clip_limit); X phinprintf(PTKEINFORM, "current x-y clipping = "); X writephigsenum(PTKEINFORM, PTKECLIP, currep.clip_xy); X phinprintf(PTKEINFORM, "current back clipping = "); X writephigsenum(PTKEINFORM, PTKECLIP, currep.clip_back); X phinprintf(PTKEINFORM, "current front clipping = "); X writephigsenum(PTKEINFORM, PTKECLIP, currep.clip_front); X phinprintf(PTKEINFORM, "requested orientation matrix:\n"); X writematrix3(PTKEINFORM, reqrep.orientation_matrix); X phinprintf(PTKEINFORM, "requested mapping matrix:\n"); X writematrix3(PTKEINFORM, reqrep.mapping_matrix); X phinprintf(PTKEINFORM, "requested clipping limits:\n"); X writelimit3(PTKEINFORM, &reqrep.clip_limit); X phinprintf(PTKEINFORM, "requested x-y clipping = "); X writephigsenum(PTKEINFORM, PTKECLIP, reqrep.clip_xy); X phinprintf(PTKEINFORM, "requested back clipping = "); X writephigsenum(PTKEINFORM, PTKECLIP, reqrep.clip_back); X phinprintf(PTKEINFORM, "requested front clipping = "); X writephigsenum(PTKEINFORM, PTKECLIP, reqrep.clip_front); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqviewrep */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqwscategory() X`7B X Pwstype wstype; X Pint err; X Pwscat category; X X readwstype(&wstype); X pinqwscategory(wstype, &err, &category); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "workstation category = "); X writephigsenum(PTKEINFORM, PTKEWSCAT, category); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqwscategory */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqwsclass() X`7B X Pwstype wstype; X Pint err; X Pwsclass class; X X readwstype(&wstype); X pinqwsclass(wstype, &err, &class); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "workstation class = "); X writephigsenum(PTKEINFORM, PTKEWSCLASS, class); +-+-+-+-+-+-+-+- END OF PART 244 +-+-+-+-+-+-+-+-