DataMuseum.dk

Presents historical artifacts from the history of:

ICL Comet 32

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about ICL Comet 32

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦a6252cb98⟧ TextFile

    Length: 12826 (0x321a)
    Types: TextFile
    Notes: UNIX file
    Names: »inquiry.c«

Derivation

└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
    └─⟦28c352965⟧ »/a« UNIX Filesystem
        └─⟦this⟧ »usr/src/gks/gks/inquiry.c« 

TextFile

#if INQU > 0
#include "../h/gks.h"
#include "../h/gksi.h"

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqlvks      - INQUIRE LEVEL OF GKS.
*
* Input       - 
*
* Process     - 
*
* Output      - level = pointer to level of GKS supported.  Range: "ma",
*                  "mb","mc","0a","0b","0c","1a","1b","1c","2a","2b","2c".
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqlvks(level)
int	*level;
{	*level = LEVEL;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqchh       - INQUIRE CHARACTER HEIGHT.
*               (INQUIRE CURRENT PRIMITIVE ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - chh = pointer to current character height.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqchh(chh)
Charht	*chh;
{	*chh = gks.gk_chht;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqchup      - INQUIRE CHARACTER UP VECTOR.
*               (INQUIRE CURRENT PRIMITIVE ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - chup = pointer to current character up vector.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqchup(chup)
Wc	*chup;
{	*chup = gks.gk_chup;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqtxal      - INQUIRE TEXT ALIGNMENT.
*               (INQUIRE CURRENT PRIMITIVE ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - txalh = pointer to current horizontal text alignment.
*               txalv = pointer to current vertical text alignment.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqtxal(txalh, txalv)
Horal	*txalh;
Veral	*txalv;
{	*txalh = gks.gk_tx_ha;
	*txalv = gks.gk_tx_va;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqln        - INQUIRE LINETYPE.
*               (INQUIRE CURRENT INDIVIDUAL ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - ltype = pointer to current linetype.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqln(ltype)
Ltype	*ltype;
{	*ltype = gks.gk_lr_lt;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqplci      - INQUIRE POLYLINE COLOUR INDEX.
*               (INQUIRE CURRENT INDIVIDUAL ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - coli = pointer to current polyline colour index.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqplci(coli)
Cindex	*coli;
{	*coli = gks.gk_lr_ci;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqmk        - INQUIRE MARKER TYPE.
*               (INQUIRE CURRENT INDIVIDUAL ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - mtype = pointer to current marker type.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqmk(mtype)
Mtype	*mtype;
{	*mtype = gks.gk_mr_mt;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqpmci      - INQUIRE POLYMARKER COLOUR INDEX.
*               (INQUIRE CURRENT INDIVIDUAL ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - coli = pointer to current polymarker colour index.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqpmci(coli)
Cindex	*coli;
{	*coli = gks.gk_mr_ci;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqtxci      - INQUIRE TEXT COLOUR INDEX.
*               (INQUIRE CURRENT INDIVIDUAL ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - coli = pointer to current text colour index.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqtxci(coli)
Cindex	*coli;
{	*coli = gks.gk_tx_ci;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqfais      - INQUIRE FILL AREA INTERIOR STYLE.
*               (INQUIRE CURRENT INDIVIDUAL ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - ints = pointer to current fill area interior style.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqfais(ints)
Istyle	*ints;
{	*ints = gks.gk_fa_is;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqfaci      - INQUIRE FILL AREA COLOUR INDEX.
*               (INQUIRE CURRENT INDIVIDUAL ATTRIBUTES).
*
* Input       - 
*
* Process     - 
*
* Output      - coli = pointer to current fill area colour index.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqfaci(coli)
Cindex	*coli;
{	*coli = gks.gk_fa_ci;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqcntn      - INQUIRE CURRENT NORMALIZATION TRANSFORMATION NUMBER.
*
* Input       - 
*
* Process     - 
*
* Output      - Returns 0 if ok, -1 if error.
*               ctnr = pointer to current normalization transformation
*                  number.
*
* Comments    - This function doesn't work in this implementation.
*               Need to fix type Gks.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqcntn(ctnr)
int	*ctnr;
{	*ctnr = -1;
	return(-1);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqnt        - INQUIRE NORMALIZATION TRANSFORMATION.
*
* Input       - ntnr = normalization transformation number.
*
* Process     - 
*
* Output      - window = pointer to window limits.
*               viewpt = pointer to viewport limits
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqnt(ntnr, window, viewpt)
int	ntnr;
Wrect	*window;
Nrect	*viewpt;
{	*window = gks.gk_ntran[ntnr]->nt_wind;
	*viewpt = gks.gk_ntran[ntnr]->nt_view;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqclip      - INQUIRE CLIPPING INDICATOR.
*
* Input       - 
*
* Process     - 
*
* Output      - clip = clipping indicator.  Range: CLIP, NOCLIP.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqclip(clip)
Bool	*clip;
{	*clip = gks.gk_clip;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqwkc       - INQUIRE WORKSTATION TYPE.
*
* Input       - wkid = workstation identifier.
*
* Process     - 
*
* Output      - 
*               wtype = workstation type.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqwkc(wkid,  wtype)
Wsi	wkid;
Dtype	**wtype;
{
	*wtype = (Wss *)wkid->ws_wsd->wd_type;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqeci       - INQUIRE LIST (element) OF COLOUR INDICES.
*
* Input       - wkid = workstation identifier.
*               n = 
*
* Process     - 
*
* Output      - ol = pointer to number of colour table entries.
*               colind = 
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqeci(wkid, n, ol, colind)
Wsi	wkid;
int	n;
Int	*ol;
int	*colind;
{	*ol = (Wss *)wkid->ws_ncolr;
	*colind = n;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqcr        - INQUIRE COLOUR REPRESENTATION.
*
* Input       - wkid = workstation identifier.
*               type = type of returned values.  Range: (SET, REALIZED).
*               coli = colour index.
*
* Process     - 
*
* Output      - red = pointer to red intensity, 0 to 1.
*               green = pointer to green intensity, 0 to 1.
*               blue = pointet to blue intensity, 0 to 1.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqcr(wkid, coli, type, red, green, blue)
Wsi	wkid;
Cindex	coli;
int	type;
Real	*red;
Real	*green;
Real	*blue;
{	/* Set vs. realized is ignored; always get set.*/
	*red = ((Wss *)wkid)->ws_colr[coli].c_red;
	*green = ((Wss *)wkid)->ws_colr[coli].c_green;
	*blue = ((Wss *)wkid)->ws_colr[coli].c_blue;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqwkt       - INQUIRE WORKSTATION TRANSFORMATION.
*
* Input       - wkid = workstation identifier.
*
* Process     - 
*
* Output      - tus = pointer to transformation update state.
*               rwindo = pointer to requested workstation window.
*               cwindo = pointer to current workstation window.
*               rviewp = pointer to requested workstation viewport.
*               cviewp = pointer to current workstation viewport.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqwkt(wkid, tus, rwindo, cwindo, rviewp, cviewp)
Wsi	wkid;
Bool	*tus;
Nrect	*rwindo;
Nrect	*cwindo;
Drect	*rviewp;
Drect	*cviewp;
{	*tus = (Wss *)wkid->ws_waitr;
	*rwindo = ((Wss *)wkid)->ws_reqw;
	*cwindo = ((Wss *)wkid)->ws_curw;
	*rviewp = ((Wss *)wkid)->ws_reqv;
	*cviewp = ((Wss *)wkid)->ws_curv;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqmds       - INQUIRE MAXIMUM DISPLAY SURFACE SIZE.
*
* Input       - wtype = workstation type. Range: TK4.
*
* Process     - 
*
* Output      - Returns 0 if ok, else error number.
*               dcunit = pointer to device coordinate units.  Range:
*                  METRES, OTHER.
*               dcsize = pointer to maximum display surface size in
*                  device coordinate units.
*               acsize = pointer to maximum display surface size in
*                  raster units.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqmds(wtype, dcunit, dcsize, acsize)
Dtype	wtype;
Dcunit	*dcunit;
Drect	*dcsize;
Arect	*acsize;
{	Wsd	*wsd;

	if((wsd = getwsd(wtype)) == NULL)
		return(23);

	*dcunit = wsd->wd_dcun;
	*dcsize = wsd->wd_dlim;
	*acsize = wsd->wd_alim;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqplf       - INQUIRE POLYLINE FACILITIES.
*
* Input       - wtype = workstation type.  Range: C32.
*               n = 
*
* Process     - 
*
* Output      - Returns 0 if ok, else error number.
*               nlt = pointer to number of available linetypes.
*               lt = 
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqplf(wtype, n, nlt, lt)
Dtype	wtype;
int	n;
Int	*nlt;
int	*lt;
{	Wsd	*wsd;

	if((wsd = getwsd(wtype)) == NULL)
		return(23);

	*nlt = wsd->wd_nlty;
	*lt = n;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqpmf       - INQUIRE POLYMARKER FACILITIES.
*
* Input       - wtype = workstation type.  Range: TK4.
*               n = 
*
* Process     - 
*
* Output      - Returns 0 if ok, else error number.
*               nmt = pointer to number of avaliable marker types.
*               mt = 
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqpmf(wtype, n, nmt, mt)
Dtype	wtype;
int	n;
Int	*nmt;
int	*mt;
{	Wsd	*wsd;

	if((wsd = getwsd(wtype)) == NULL)
		return(23);

	*nmt = wsd->wd_nmty;
	*mt = n;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqtxf       - INQUIRE TEXT FACILITIES.
*
* Input       - wtype = workstation type.  Range: TK4.
*
* Process     - 
*
* Output      - Returns 0 if ok, else error number.
*               nchh = pointer to number of available character heights.
*               minchh = pointer to minimum character height.
*               maxchh = pointer to maximum character height.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqtxf(wtype, nchh, minchh, maxchh)
Dtype	wtype;
Int	*nchh;
Real	*minchh;
Real	*maxchh;
{	Wsd	*wsd;

	if((wsd = getwsd(wtype)) == NULL)
		return(23);

	*nchh = wsd->wd_ncht;
	*minchh = wsd->wd_ldcht[0];
	*maxchh = wsd->wd_ldcht[wsd->wd_ncht - 1];
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqfaf       - INQUIRE FILL AREA FACILITIES.
*
* Input       - wtype = workstation type.  Range: TK4.
*               ni = 
*
* Process     - 
*
* Output      - Returns 0 if ok, else error number.
*               nis = pointer to number of available interior styles.
*               is = 
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqfaf(wtype, ni, nis, is)
Dtype	wtype;
int	ni;
int	*nis;
int	*is;
{	Wsd	*wsd;

	if((wsd = getwsd(wtype)) == NULL)
		return(23);

	/* Need to fix Wsd to include this info.*/
	*nis = 1;
	*is = ni;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* gqcf        - INQUIRE COLOUR FACILITIES.
*
* Input       - wtype = workstation type.  Range: TK4.
*
* Process     - 
*
* Output      - Returns 0 if ok, else error number.
*               ncoli = pointer to number of available colours or
*                  intensities.
*               cola = pointer to colour available.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
gqcf(wtype, ncoli, cola)
Dtype	wtype;
Int	*ncoli;
Bool	*cola;
{	Wsd	*wsd;

	if((wsd = getwsd(wtype)) == NULL)
		return(23);

	*ncoli = wsd->wd_ncol;
	*cola = wsd->wd_iscol;
}
#endif