-+-+-+-+-+-+-+-+ START OF PART 237 -+-+-+-+-+-+-+-+ V*/ X/*-------------------- phinter inquire functions --------------------------- V*/ X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqallconfstruct() X`7B X Pint arid, i, start, err, totlength, def; X Pintlst ids; X X arid = readinteger("archive identifier ? "); X start = readinteger("starting position ? "); X pinqallconfstruct(arid, 0, start, &err, &ids, &totlength); X ids.integers = (Pint *)calloc(totlength, sizeof(Pint)); X ids.number = totlength; X pinqallconfstruct(arid, totlength, start, &err, &ids, &totlength); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "conflicting structures:\n"); X writeintlst(PTKEINFORM, &ids, PTKESTRUCTID); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(ids.integers); X`7D /* do_pinqallconfstruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqannotationfacil() X`7B X Pwstype wstype; X Pint start, err, totlength, i; X Pintlst styles; X X readwstype(&wstype); X start = readinteger("starting position ? "); X pinqannotationfacil(wstype, 0, start, &err, &styles, &totlength); X styles.integers = (Pint *)calloc(totlength, sizeof(Pint)); X styles.number = totlength; X pinqannotationfacil(wstype, totlength, start, &err, &styles, &totlength); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "annotation styles:\n"); X writeintlst(PTKEINFORM, &styles, PTKENOTABLE); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(styles.integers); X`7D /* do_pinqannotationfacil */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqancesstruct() X`7B X Pint stid, depth, err, totsize, i, j; X Ppathorder order; X Pchar *buffer; X Pexecreflstlst paths; X X stid = readintvalue("structure identifier ? ", PTKESTRUCTID); X order = readphigsenum(PTKEPATHORDER, "path order ? "); X depth = readinteger("path depth ? "); X pinqancesstruct(stid, order, depth, 0, &err, buffer, &totsize, &paths); X buffer = (Pchar *)malloc(totsize); X pinqancesstruct(stid, order, depth, totsize, &err, buffer, &totsize,`20 X &paths); 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:\n", X 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 %d\n",`20 X paths.erls`5Bi`5D.ers`5Bj`5D.struct_id); X phinprintf(PTKEINFORM, "element %d\n",`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 free(buffer); X`7D /* do_pinqancesstruct */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqarfiles() X`7B X Pchar *buffer; X Pint err, totsize, i, start; X Parchivefilelst arfiles; X X#ifdef VMS X start = readinteger("start position ? "); X pinqarfiles(0, start, &err, buffer, &arfiles, &totsize); X#endif X#ifdef SUN X pinqarfiles(0, &err, buffer, &arfiles, &totsize); X#endif X buffer = (Pchar *)malloc(totsize); X#ifdef SUN X pinqarfiles(totsize, &err, buffer, &arfiles, &totsize); `20 X#endif X#ifdef VMS X pinqarfiles(totsize, start, &err, buffer, &arfiles, &totsize); `20 X#endif X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n",`20 X phigsnamelist`5Bactivefunction`5D); X if (err == 0) X `7B X for (i = 0; i < arfiles.number; i++) X phinprintf(PTKEINFORM,`20 X "open archive file `5B%d`5D, identifier = %d, name = \"%s\"\ Vn",`20 X i, arfiles.ids`5Bi`5D, arfiles.names`5Bi`5D); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(buffer); X`7D /* do_pinqarfiles */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqarst() X`7B X Parchivestate archivestate; X X pinqarst(&archivestate); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X phinprintf(PTKEINFORM, "archive state = "); X writephigsenum(PTKEINFORM, PTKEARCHIVESTATE, archivestate); X `7D X`7D /* do_pinqarst */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqchoicest() X`7B X Pint ws, dev, err, totsize; X Pchar *buffer; X Pchoicest state; X X ws = readinteger("workstation identifier ? "); X dev = readinteger("choice device number ? "); X pinqchoicest(ws, dev, 0, &err, buffer, &totsize, &state); X buffer = (Pchar *)malloc(totsize); X pinqchoicest(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 choice 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 status = "); X writephigsenum(PTKEINFORM, PTKECHOICESTATUS, X state.choice.status); `20 X phinprintf(PTKEINFORM, "initial choice = "); X writeinteger(PTKEINFORM, state.choice.choice); X phinprintf(PTKEINFORM, "prompt/echo type = "); X writeinteger(PTKEINFORM, state.pet); X phinprintf(PTKEINFORM, "limits:\n"); X writelimit(PTKEINFORM, &state.e_area); X writechoicerec(PTKEINFORM, dev, state.pet, &state.record); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(buffer); X`7D /* do_pinqchoicest */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqchoicest3() X`7B X Pint ws, dev, err, totsize; X Pchar *buffer; X Pchoicest3 state; X X ws = readinteger("workstation identifier ? "); X dev = readinteger("choice device number ? "); X pinqchoicest(ws, dev, 0, &err, buffer, &totsize, &state); X buffer = (Pchar *)malloc(totsize); X pinqchoicest(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 choice 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 status = "); X writephigsenum(PTKEINFORM, PTKECHOICESTATUS, X state.choice.status); `20 X phinprintf(PTKEINFORM, "initial choice = "); X writeinteger(PTKEINFORM, state.choice.choice); 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 writechoicerec(PTKEINFORM, dev, state.pet, &state.record); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(buffer); X`7D /* do_pinqchoicest3 */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqcolourfacil() X`7B X Pwstype wstype; X Pint err, i; X Pcofac facil; X Pfloat z; X X readwstype(&wstype); X pinqcolourfacil(wstype, &err, &facil); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "colour facilities:\n"); X phinprintf(PTKEINFORM, "number of colours = "); X writeinteger(PTKEINFORM, facil.colours); X phinprintf(PTKEINFORM, "colour availability = "); X writephigsenum(PTKEINFORM, PTKECOAVAIL, facil.coavail); X phinprintf(PTKEINFORM, "number of predefined bundles = "); X writeinteger(PTKEINFORM, facil.predefined); X#ifdef SUN X for (i = 0; i < 3; i++) X `7B X z = 1.0 - facil.primary`5Bi`5D.x - facil.primary`5Bi`5D.y; X phinprintf(PTKEINFORM, "primary colour:\n"); X writereal(PTKEINFORM, facil.primary`5Bi`5D.x); X writereal(PTKEINFORM, facil.primary`5Bi`5D.y); X writereal(PTKEINFORM, z); X `7D X#endif X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqcolourfacil */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqcolourmodel() X`7B X Pint ws, err, model; X X ws = readinteger("workstation identifier ? "); X pinqcolourmodel(ws, &err, &model); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "colour model = "); X writeinteger(PTKEINFORM, model); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqcolourmodel */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqcolourmodelfacil() X`7B X Pwstype wstype; X Pint start, err, totlength, def, i; X Pintlst models; X X readwstype(&wstype); X start = readinteger("starting position ? "); X pinqcolourmodelfacil(wstype, 0, start, &err, &totlength, &models, &def); X models.integers = (Pint *)calloc(totlength, sizeof(Pint)); X models.number = totlength; X pinqcolourmodelfacil(wstype, totlength, start, &err, &totlength, &models,` V20 X &def); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "colour model facilities:\n"); X phinprintf(PTKEINFORM, "colour models:\n"); X writeintlst(PTKEINFORM, models, PTKENOTABLE); X phinprintf(PTKEINFORM, "default colour model = "); X writeinteger(PTKEINFORM, def); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(models.integers); X`7D /* do_pinqcolourmodelfacil */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqcolourrep() X`7B X Pint ws, index, err; X Pinqtype type; X Pcobundl rep; X X ws = readinteger("workstation identifier ? "); X index = readintvalue("colour index ? ", PTKECOLOURIND); X type = readphigsenum(PTKEINQTYPE, "colour type ? "); X pinqcolourrep(ws, 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, "colour representation:\n"); X writecobundl(PTKEINFORM, &rep); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqcolourrep */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqconfres() X`7B X Pint err; X Pconfres archive, retrieval; X X pinqconfres(&err, &archive, &retrieval); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "archive resolution = "); X writephigsenum(PTKEINFORM, PTKECONFRES, archive); X phinprintf(PTKEINFORM, "retrieval resolution = "); X writephigsenum(PTKEINFORM, PTKECONFRES, retrieval); X `7D X else X phigserror(PTKEINFORM, err); X `7D X`7D /* do_pinqconfres */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqconfstructinnet() X`7B X Pint arid, stid, totlength, err, start; X Pstructnetsrc src; X Pintlst ids; X X arid = readinteger("archive identifier ? "); X stid = readintvalue("structure identifier ? ", PTKESTRUCTID); X src = readphigsenum(PTKESTRUCTNETSRC, "structure network source ? "); X start = readinteger("starting position ? "); X pinqconfstructinnet(arid, stid, src, 0, start, &err, &ids, &totlength); X ids.integers = (Pint *)calloc(totlength, sizeof(Pint)); X ids.number = totlength; X pinqconfstructinnet(arid, stid, src, totlength, start, &err, &ids,`20 X &totlength); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "conflicting structures:\n"); X writeintlst(PTKEINFORM, &ids, PTKESTRUCTID); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(ids.integers); `20 X`7D /* do_pinqconfstructinnet */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqcurelemcontent() X`7B X Pchar *buffer; X ptkselcontent elcont; X Pint err; X X ptk_inqcurelemtypesizecontent(&err, &buffer, &elcont); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B X phinprintf(PTKEINFORM, "current element content:\n"); X writeelemcontent(PTKEINFORM, &elcont); X `7D X else X phigserror(PTKEINFORM, err); X `7D X free(buffer); X`7D /* do_pinqcurelemcontent */ X X/*-------------------------------------------------------------------------- V*/ X Xstatic void do_pinqcurelemtypesize() X`7B X Pint err; X Peltype eltype; X#ifdef SUN X Pint size; X#endif X#ifdef VMS X Pelsize size; X#endif X X pinqcurelemtypesize(&err, &eltype, &size); X if (writeinform) X `7B X phinprintf(PTKEINFORM, "--- %s ---\n", phigsnamelist`5Bactivefunction`5D V); X if (err == 0) X `7B +-+-+-+-+-+-+-+- END OF PART 237 +-+-+-+-+-+-+-+-