GQSGUS(3NCARG)
π GQSGUS β the "who's on the guest list" routine π
okay bestie, so this one is from the NCAR Graphics manual (that's the <pink>3NCARG</pink> bit, iykyk), and it's genuinely one of my faves because it's just... asking the universe which segments are currently in use. that's it. that's the whole vibe. a headcount. a vibe check for your segment list. β¨
πΈ NAME πΈ
GQSGUS (Inquire set of segment names in use) β literally retrieves what segment names are currently in use. it's giving census. it's giving "hey who's here". π
π SYNOPSIS π
CALL GQSGUS(N,ERRIND,OL,SGNA)
β¨ C-BINDING SYNOPSIS β¨
#include <ncarg/gks.h>
void ginq_set_seg_names(Gint num_elems_appl_list, Gint start_pos, Gint
*err_ind, Gint_list *seg_names, Gint *length_list);
π¦ DESCRIPTION π¦
here's the tea on every single argument, no skips:
N(Integer, Input) β the set member requested. like, which one do you want, bestie. π«ΆERRIND(Integer, Output) β if the GKS state is WSOP (workstation open), WSAC (workstation active), or SGOP (segment open), thenERRINDis returned as"0"; otherwiseERRINDis returned as"7". so basically 0 means we're good and 7 means the state is not it. πOL(Integer, Output) β the number of segment names that are currently in use. the headcount, the total, the how-many-people-showed-up. π₯SGNA(Integer, Output) β if the GKS state is WSOP (workstation open), WSAC (workstation active), or SGOP (segment open), and ifOLis larger than zero, thenSGNAis returned as the name in theNth element of the list of segment names that are currently in use; otherwiseSGNAis undefined. β οΈ yeah, undefined. we don't love that, but we respect it. π
π USAGE π
okay so for NCAR GKS, segment names are integers between 0 and 99 inclusive (see the man page for GCRSG). cute little range, love that for them. π
now the move β if one wants to obtain a list of all segment names that are currently in use, then the procedure usually is first to determines the number of segment names currently in use by making an initial call to GQSGUS with first argument of "1". π§
if ERRIND is returned as "0", then OL will tell you how many segments are currently in use. iconic. β¨
then, to get the list of all segment names currently in use, call GQSGUS in a loop on N from 1 to OL and retrieve the N values of SGNA returned from such calls. it's a loop, it's a little grind, but it's the way, and it works. periodt. π
π ACCESS π
to use GKS routines, load the NCAR GKS-0A library ncarg_gks. that's the whole instruction. go forth. π
β SEE ALSO β
Online: gevtm, gactm, gclsg, gcrsg, gcsgwk, gqopsg, gdsg, gssgt., ginq_set_seg_names
Hardcopy: "User's Guide for NCAR GKS-0A Graphics"
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
bestie reminder: this is the GQSGUS page from the UNIX manual, dated March 1993 β yes she's vintage, yes she still slays, no cap. π π π
π¦ πΈ π«Ά β¨
bye ily, go ask your segments who they are ππ
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms