-+-+-+-+-+-+-+-+ START OF PART 231 -+-+-+-+-+-+-+-+ X Pint ws_no, s_name; X Pfloat pri; X X ws_no = readinteger("workstation identifier ? "); X s_name = readintvalue("structure identifier ? ", PTKESTRUCTID); X pri = readreal("priority ? "); X ppoststruct(ws_no, s_name, pri); X`7D /* do_ppoststruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preadmf() X`7B X phintererror(1, (Pchar *)NULL, INFORM); X`7D /* do_preadmf */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_predrawallstruct() X`7B X Pint wsid; X Pcontrol controlflag; X X wsid = readinteger("workstation identifier ? "); X controlflag = readphigsenum(PTKECONTROL, "Control flag ? "); X predrawallstruct(wsid, controlflag); X`7D /* do_predrawallstruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_premovenameset() X`7B X Pintlst remset; X X readintlst(&remset, "name set", PTKENAME); X premovenameset(&remset); X free(remset.integers);`20 X`7D /* do_premovenameset */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqchoice() X`7B X Pint wsid, dev; X Pqchoice choice; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("choice device number ? "); X preqchoice(wsid, dev, &choice); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEQCHOICESTATUS, choice.status); X if (choice.status == PQCH_OK) X `7B X phinprintf(PTKEINFORM, "choice = "); X writeinteger(PTKEINFORM, choice.choice); X `7D X `7D X`7D /* do_preqchoice */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqloc() X`7B X Pint wsid, dev; X Pqloc loc; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("locator device number ? "); X preqloc(wsid, dev, &loc); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEISTATUS, loc.status); X if (loc.status == PSTAT_OK) X `7B X phinprintf(PTKEINFORM, "view index"); X writeintvalue(PTKEINFORM, loc.loc.view_index, PTKEVIEWIND); X phinprintf(PTKEINFORM, "point:\n"); X writepoint(PTKEINFORM, &loc.loc.position); X `7D X `7D X`7D /* do_preqloc */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqloc3() X`7B X Pint wsid, dev; X Pqloc3 loc; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("locator device number ? "); X preqloc3(wsid, dev, &loc); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEISTATUS, loc.status); X if (loc.status == PSTAT_OK) X `7B X phinprintf(PTKEINFORM, "view index = "); X writeintvalue(PTKEINFORM, loc.loc.view_index, PTKEVIEWIND); X phinprintf(PTKEINFORM, "point:\n"); X writepoint3(PTKEINFORM, &loc.loc.position); X `7D X `7D X`7D /* do_preqloc3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqpick() X`7B X Pint wsid, dev, depth; X Pqpick pick; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("pick device number ? "); X depth = readinteger("pick path depth ? "); X pick.pick.pick_path = (Ppickpathel *)calloc(depth, sizeof(Ppickpathel)); X pick.pick.depth = depth; X preqpick(wsid, dev, depth, &pick); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEQPICKSTATUS, pick.status); X if (pick.status == PQP_OK) X `7B X phinprintf(PTKEINFORM, "pick path:\n"); X writepickpath(PTKEINFORM, &pick.pick);`20 X `7D X `7D X free(pick.pick.pick_path); X`7D /* do_preqpick */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqstring() X`7B X Pint wsid, dev, size; X Pqstring string; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("string device number ? "); X size = readinteger("size of string buffer ? "); X string.string = (Pchar *)malloc(size); X preqstring(wsid, dev, &string); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEISTATUS, string.status); X if (string.status == PSTAT_OK) X phinprintf(PTKEINFORM, "string = \"%s\"\n", string.string);`20 X `7D X free(string.string); X`7D /* do_preqstring */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqstroke() X`7B X Pint wsid, dev, size; X Pqstroke stroke; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("stroke device number ? "); X size = readinteger("number of points in stroke buffer ? "); X stroke.stroke.points = (Ppoint *)calloc(size, sizeof(Ppoint)); X preqstroke(wsid, dev, &stroke); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEISTATUS, stroke.status); X if (stroke.status == PSTAT_OK) X `7B X phinprintf(PTKEINFORM, "view index = "); X writeintvalue(PTKEINFORM, stroke.stroke.view_index, PTKEVIEWIND); X phinprintf(PTKEINFORM, "number of points = "); X writeinteger(PTKEINFORM, stroke.stroke.n_points); X phinprintf(PTKEINFORM, "points:\n"); X writepointarray(PTKEINFORM, stroke.stroke.n_points, X stroke.stroke.points); X `7D X `7D X free(stroke.stroke.points); X`7D /* do_preqstroke */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqstroke3() X`7B X Pint wsid, dev, size; X Pqstroke3 stroke; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("stroke device number ? "); X size = readinteger("number of points in stroke buffer ? "); X stroke.stroke.points = (Ppoint3 *)calloc(size, sizeof(Ppoint3)); X preqstroke3(wsid, dev, &stroke); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEISTATUS, stroke.status); X if (stroke.status == PSTAT_OK) X `7B X phinprintf(PTKEINFORM, "view index = "); X writeintvalue(PTKEINFORM, stroke.stroke.view_index, PTKEVIEWIND); X phinprintf(PTKEINFORM, "number of points = "); X writeinteger(PTKEINFORM, stroke.stroke.n_points); X phinprintf(PTKEINFORM, "points:\n"); X writepointarray3(PTKEINFORM, stroke.stroke.n_points, X stroke.stroke.points); X `7D X `7D X free(stroke.stroke.points); X`7D /* do_preqstroke3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_preqval() X`7B X Pint wsid, dev; X Pqval val; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("valuator device number ? "); X preqval(wsid, dev, &val); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "status of request = "); X writephigsenum(PTKEINFORM, PTKEISTATUS, val.status); X if (val.status == PSTAT_OK) X `7B X phinprintf(PTKEINFORM, "value = "); X writereal(PTKEINFORM, val.val); X `7D X `7D X`7D /* do_preqval */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_prestoremodelclipvolume() X`7B X#ifdef SUN X prestoremodelclipvolume(); X#endif X#ifdef VMS X phintererror(1, (Pchar *)NULL, INFORM); X#endif X`7D /* do_prestoremodelclipvolume */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pretrieveallstruct() X`7B X pretrieveallstruct(readinteger("archive identifier ? ")); X`7D /* do_pretrieveallstruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pretrieveancesstruct() X`7B X#ifdef SUN X Pint arid, stid, depth, err, totsize, i, j; X Ppathorder order; X Pchar *buffer; X Pexecreflstlst paths; X X arid = readinteger("archive identifier ? "); X stid = readintvalue("structure identifier ? ", PTKESTRUCTID); X order = readphigsenum(PTKEPATHORDER, "path order ? "); X depth = readinteger("path depth ? "); X pretrieveancesstruct(arid, stid, order, depth, 0, &err, buffer, &totsize,` V20 X &paths); X buffer = (Pchar *)malloc(totsize); X pretrieveancesstruct(arid, stid, order, depth, totsize, &err, buffer,`20 X &totsize, &paths); X free(buffer); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "ancestor paths of structure %d are:\n", stid); X for (i = 0; i < paths.number; i++) X `7B X phinprintf(PTKEINFORM, "path %d:\n", i); X for (j = 0; j < paths.erls`5Bi`5D.number; j++) X `7B X phinprintf(PTKEINFORM, "structure identifier = "); X writeintvalue(PTKEINFORM, paths.erls`5Bi`5D.ers`5Bj`5D.struct_id, X PTKESTRUCTID); X phinprintf(PTKEINFORM, "element number = "); X writeinteger(PTKEINFORM,`20 X paths.erls`5Bi`5D.ers`5Bj`5D.elem_num); X `7D X `7D X `7D X else X phigserror(PTKEINFORM, err); X `7D X#endif X`7D /* do_pretrieveancesstruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pretrievedescstruct() X`7B X#ifdef SUN X Pint arid, stid, depth, err, totsize, i, j; X Ppathorder order; X Pchar *buffer; X Pexecreflstlst paths; X X arid = readinteger("archive identifier ? "); X stid = readintvalue("structure identifier ? ", PTKESTRUCTID); X order = readphigsenum(PTKEPATHORDER, "path order ? "); X depth = readinteger("path depth ? "); X pretrievedescstruct(arid, stid, order, depth, 0, &err, buffer, &totsize,`2 V0 X &paths); X buffer = (Pchar *)malloc(totsize); X pretrievedescstruct(arid, stid, order, depth, totsize, &err, buffer,`20 X &totsize, &paths); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "descendant paths of structure %d are:\n", stid V); X for (i = 0; i < paths.number; i++) X `7B X phinprintf(PTKEINFORM, "path %d:\n", i); X for (j = 0; j < paths.erls`5Bi`5D.number; j++) X `7B X phinprintf(PTKEINFORM, "structure identifier = "); X writeintvalue(PTKEINFORM, paths.erls`5Bi`5D.ers`5Bj`5D.struct_id, X PTKESTRUCTID); X phinprintf(PTKEINFORM, "element number = "); X phinprintf(PTKEINFORM,`20 X paths.erls`5Bi`5D.ers`5Bj`5D.elem_num, "element"); X `7D X `7D X `7D X else X phigserror(PTKEINFORM, err); X `7D X#endif X`7D /* do_pretrievedescstruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pretrievestructids() X`7B X Pint arid, start, totlength; X Pintlst ids; X X arid = readinteger("archive identifier ? "); X start = readinteger("starting position ? "); X pretrievestructids(arid, 0, start, &ids, &totlength); X ids.integers = (Pint *)calloc(totlength, sizeof(Pint)); X ids.number = totlength; X pretrievestructids(arid, totlength, start, &ids, &totlength); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "structure identifiers:\n"); X writeintlst(PTKEINFORM, &ids, PTKESTRUCTID); X `7D X free(ids.integers); X`7D /* do_pretrievestructids */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pretrievestruct() X`7B X Pint i, libid; X Pint snsnames`5B255`5D; X Pintlst sns; X Pchar prom`5B30`5D; X X sns.integers = snsnames; X libid = readinteger("archive identifier? "); X sns.number = readinteger("number of structures to retrieve? "); X for (i = 0; i < sns.number; i++)`20 X `7B X sprintf(prom, "structure identifier `5B%d`5D ? ", i); X sns.integers`5Bi`5D = readintvalue(prom, PTKESTRUCTID); X `7D X pretrievestruct(libid, &sns); X`7D /* do_pretrievestruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pretrievestructnet() X`7B X Pint i, libid; X Pint snsnames`5B255`5D; X Pintlst sns; X Pchar prom`5B30`5D; X X sns.integers = snsnames; X libid = readinteger("archive identifier ? "); X sns.number = readinteger("number of structure networks to retrieve? "); X for (i = 0; i < sns.number; i++)`20 X `7B X sprintf(prom, "root structure identifier `5B%d`5D ? ", i); X sns.integers`5Bi`5D = readintvalue(prom, PTKESTRUCTID); X `7D X pretrievestructnet(libid, &sns); X`7D /* do_pretrievestructnet */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_protate() X`7B X Pfloat angle; X Pint err; X X angle = readreal("angle ? "); X protate(angle, &err, tm); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "transformation matrix:\n"); X writematrix(PTKEINFORM, tm); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_protate */ X +-+-+-+-+-+-+-+- END OF PART 231 +-+-+-+-+-+-+-+-