-+-+-+-+-+-+-+-+ START OF PART 229 -+-+-+-+-+-+-+-+ X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pgetstroke() X`7B X Pint size; X Pstroke stroke; X X size = readinteger("number of points in buffer ? "); X stroke.points = (Ppoint *)calloc(size, sizeof(Ppoint)); X pgetstroke(&stroke); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "view index = "); X writeintvalue(PTKEINFORM, stroke.view_index, PTKEVIEWIND); X phinprintf(PTKEINFORM, "number of points = "); X writeinteger(PTKEINFORM, stroke.n_points); X phinprintf(PTKEINFORM, "points:\n"); X writepointarray(PTKEINFORM, stroke.n_points, X stroke.points); X `7D X free(stroke.points); X`7D /* do_pgetstroke */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pgetstroke3() X`7B X Pint size; X Pstroke3 stroke; X X size = readinteger("number of points in buffer ? "); X stroke.points = (Ppoint3 *)calloc(size, sizeof(Ppoint3)); X pgetstroke3(&stroke); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "view index = "); X writeintvalue(PTKEINFORM, stroke.view_index, PTKEVIEWIND); X phinprintf(PTKEINFORM, "number of points = "); X writeinteger(PTKEINFORM, stroke.n_points); X phinprintf(PTKEINFORM, "points:\n"); X writepointarray(PTKEINFORM, stroke.n_points, X stroke.points); X `7D X free(stroke.points); X`7D /* do_pgetstroke3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pgetval() X`7B X Pfloat val; X X pgetval(&val); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "value = "); X writereal(PTKEINFORM, val); X `7D X`7D /* do_pgetval */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pincrspasrch() X`7B X#ifdef SUN X Ppoint ref; X Pfloat dist; X Pexecreflst sp, fp; X Pint ceil, len, st, err, totlen, i; X Pfilterlst norm, inv; X `20 X ref = readpoint("search reference point"); X dist = readreal("search distance ? "); X readexecreflst(&sp, "starting path list"); X ceil = readinteger("search ceiling index ? "); X readfilterlst(&norm, "normal filter list"); X readfilterlst(&inv, "inverted filter list"); X st = readinteger("starting position ? "); X pincrspasrch(&ref, dist, &sp, ceil, &norm, &inv, 0, st, &err, &fp, &totlen V); X fp.ers = (Pexecref *)calloc(totlen, sizeof(Pexecref)); X pincrspasrch(&ref, dist, &sp, ceil, &norm, &inv, totlen, st, &err, &fp,`20 X &totlen); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X for (i = 0; i < totlen; i++) X `7B X phinprintf(PTKEINFORM, "structure identifier = "); X writeintvalue(PTKEINFORM, fp.ers`5Bi`5D.struct_id, PTKESTRUCTID); X phinprintf(PTKEINFORM, "element number = "); X writeinteger(PTKEINFORM, fp.ers`5Bi`5D.elem_num); X `7D X `7D X else X phigserror(PTKEINFORM, err); X `7D X#endif X#ifdef VMS X phintererror(1, (Pchar *)NULL, INFORM); X#endif X`7D /* do_pincrspasrch */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pincrspasrch3() X`7B X#ifdef SUN X Ppoint3 ref; X Pfloat dist; X Pexecreflst sp, fp; X Pint ceil, len, st, err, totlen, i; X Pfilterlst norm, inv; X `20 X ref = readpoint3("search reference point"); X dist = readreal("search distance ? "); X readexecreflst(&sp, "starting path list"); X ceil = readinteger("search ceiling index ? "); X readfilterlst(&norm, "normal filter list"); X readfilterlst(&inv, "inverted filter list"); X st = readinteger("starting position ? "); X pincrspasrch3(&ref, dist, &sp, ceil, &norm, &inv, 0, st, &err, &fp,`20 X &totlen); X fp.ers = (Pexecref *)calloc(totlen, sizeof(Pexecref)); X pincrspasrch3(&ref, dist, &sp, ceil, &norm, &inv, totlen, st, &err, &fp,`2 V0 X &totlen); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X for (i = 0; i < totlen; i++) X `7B X phinprintf(PTKEINFORM, "structure identifier = "); X writeintvalue(PTKEINFORM, fp.ers`5Bi`5D.struct_id, PTKESTRUCTID); X phinprintf(PTKEINFORM, "element number = "); X writeinteger(PTKEINFORM, fp.ers`5Bi`5D.elem_num); X `7D X `7D X else X phigserror(PTKEINFORM, err); X `7D X#endif X#ifdef VMS X phintererror(1, (Pchar *)NULL, INFORM); X#endif X`7D /* do_pincrspasrch3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitchoice() X`7B X Pint wsid, dev, init, pet; X Pchoicestatus status; X Plimit echo; X Pchoicerec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("choice device number ? "); X status = readphigsenum(PTKECHOICESTATUS, "initial choice status ? "); X init = readinteger("initial choice ? "); X pet = readinteger("prompt and echo type ? "); X echo = readlimit("echo area"); X readchoicerec(dev, pet, &record); X pinitchoice(wsid, dev, status, init, pet, &echo, &record); X`7D /* do_pinitchoice */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitchoice3() X`7B X Pint wsid, dev, init, pet; X Pchoicestatus status; X Plimit3 echo; X Pchoicerec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("choice device number ? "); X status = readphigsenum(PTKECHOICESTATUS, "initial choice status ? "); X init = readinteger("initial choice ? "); X pet = readinteger("prompt and echo type ? "); X echo = readlimit3("echo volume"); X readchoicerec(dev, pet, &record); X pinitchoice3(wsid, dev, status, init, pet, &echo, &record); X`7D /* do_pinitchoice3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitloc() X`7B X Pint wsid, dev, pet; X Ploc init; X Plimit echo; X Plocrec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("locator device number ? "); X init.view_index = readintvalue("initial view index ? ", PTKEVIEWIND); X init.position = readpoint("initial position"); X pet = readinteger("prompt and echo type ? "); X echo = readlimit("echo area"); X readlocrec(dev, pet, &record); X pinitloc(wsid, dev, &init, pet, &echo, &record); X`7D /* do_pinitloc */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitloc3() X`7B X Pint wsid, dev, pet; X Ploc3 init; X Plimit3 echo; X Plocrec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("locator device number ? "); X init.view_index = readintvalue("initial view index ? ", PTKEVIEWIND); X init.position = readpoint3("initial position"); X pet = readinteger("prompt and echo type ? "); X echo = readlimit3("echo volume"); X readlocrec(dev, pet, &record); X pinitloc3(wsid, dev, &init, pet, &echo, &record); X`7D /* do_pinitloc3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitpick() X`7B X Pint wsid, dev, pet; X Ppickstatus status; X Ppickpath init; X Plimit echo; X Ppickrec record; X Ppathorder order; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("pick device number ? "); X status = readphigsenum(PTKEPICKSTATUS, "initial pick status ? "); X readpickpath(&init, "initial pick path"); X pet = readinteger("prompt and echo type ? "); X echo = readlimit("echo area"); X /* read data record depending on dev, pet */ X readpickrec(dev, pet, &record); X order = readphigsenum(PTKEPATHORDER, "pick path order ? "); X pinitpick(wsid, dev, status, &init, pet, &echo, &record, order); X`7D /* do_pinitpick */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitpick3() X`7B X Pint wsid, dev, pet; X Ppickstatus status; X Ppickpath init; X Plimit3 echo; X Ppickrec record; X Ppathorder order; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("pick device number ? "); X status = readphigsenum(PTKEPICKSTATUS, "initial pick status ? "); X init.depth = readinteger("initial pick path depth ? "); X /* read initial pick path */ X pet = readinteger("prompt and echo type ? "); X echo = readlimit3("echo volume"); X /* read data record depending on dev, pet */ X readpickrec(dev, pet, &record); X order = readphigsenum(PTKEPATHORDER, "pick path order ? "); X pinitpick3(wsid, dev, status, &init, pet, &echo, &record, order); X`7D /* do_pinitpick3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitstring() X`7B X Pint wsid, dev, pet; X Pchar init`5B255`5D; X Plimit echo; X Pstringrec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("string device number ? "); X readquote(init, "initial string ? "); X pet = readinteger("prompt and echo type ? "); X echo = readlimit("echo area"); X /* read data record depending on dev, pet */ X readstringrec(dev, pet, &record); X pinitstring(wsid, dev, init, pet, &echo, &record); X`7D /* do_pinitstring */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitstring3() X`7B X Pint wsid, dev, pet; X Pchar init`5B255`5D; X Plimit3 echo; X Pstringrec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("string device number ? "); X readquote(init, "initial string ? "); X pet = readinteger("prompt and echo type ? "); X echo = readlimit3("echo volume"); X /* read data record depending on dev, pet */ X readstringrec(dev, pet, &record); X pinitstring(wsid, dev, init, pet, &echo, &record); X`7D /* do_pinitstring3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitstroke() X`7B X Pint wsid, dev, pet, i; X Pstroke init; X Plimit echo; X Pstrokerec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("stroke device number ? "); X init.view_index = readintvalue("initial view index ? ", PTKEVIEWIND); X init.n_points = readinteger("initial number of points ? "); X for (i = 0; i < init.n_points; i++) X init.points`5Bi`5D = readpoint("initial point"); X pet = readinteger("prompt and echo type ? "); X echo = readlimit("echo area"); X /* read data record depending on dev, pet */ X readstrokerec(dev, pet, &record); X pinitstroke(wsid, dev, &init, pet, &echo, &record); X`7D /* do_pinitstroke */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitstroke3() X`7B X Pint wsid, dev, pet, i; X Pstroke3 init; X Plimit3 echo; X Pstrokerec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("stroke device number ? "); X init.view_index = readintvalue("initial view index ? ", PTKEVIEWIND); X init.n_points = readinteger("initial number of points ? "); X for (i = 0; i < init.n_points; i++) X init.points`5Bi`5D = readpoint3("initial point"); X pet = readinteger("prompt and echo type ? "); X echo = readlimit3("echo volume"); X /* read data record depending on dev, pet */ X readstrokerec(dev, pet, &record); X pinitstroke3(wsid, dev, &init, pet, &echo, &record); X`7D /* do_pinitstroke3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitval() X`7B X Pint wsid, dev, pet; X Pfloat init; X Plimit echo; X Pvalrec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("valuator device number ? "); X init = readreal("initial value ? "); X pet = readinteger("prompt and echo type ? "); X echo = readlimit("echo area"); X /* read data record depending on dev, pet */ X readvalrec(dev, pet, &record); X pinitval(wsid, dev, init, pet, &echo, &record); X`7D /* do_pinitval */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinitval3() X`7B X Pint wsid, dev, pet; X Pfloat init; X Plimit3 echo; X Pvalrec record; X X wsid = readinteger("workstation identifier ? "); X dev = readinteger("valuator device number ? "); X init = readreal("initial value ? "); X pet = readinteger("prompt and echo type ? "); X echo = readlimit3("echo volume"); X /* read data record depending on dev, pet */ X readvalrec(dev, pet, &record); X pinitval3(wsid, dev, init, pet, &echo, &record); X`7D /* do_pinitval3 */ X X/*-------------------------------------------------------------------------- V*/ X X#include "pinqfns.c" X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinterpret() X`7B X phintererror(1, (Pchar *)NULL, INFORM); X`7D /* do_pinterpret */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_plabel() X`7B X plabel(readintvalue("label ? ", PTKELABELVAL)); X`7D /* do_plabel */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pmessage() X`7B X Pint wsid; X Pchar str`5B255`5D; X X wsid = readinteger("workstation identifier ? "); X readquote(str, "message ? "); X pmessage(wsid, str); X`7D /* do_pmessage */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_poffsetelemptr() X`7B X poffsetelemptr(readinteger("offset ? ")); X`7D /* do_poffsetelemptr */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_popenarfile() X`7B X Pint lib_id; X Pchar s`5B201`5D; X X readargument(s, "archive file name ? "); X lib_id = readinteger("archive identifier ? "); X popenarfile(lib_id, s); X`7D /* do_popenarfile */ X +-+-+-+-+-+-+-+- END OF PART 229 +-+-+-+-+-+-+-+-