


curs_util(3X)                                       curs_util(3X)


NNAAMMEE
       ccuurrss__uuttiill:   uunnccttrrll,  kkeeyynnaammee,  ffiilltteerr,  uussee__eennvv,  ppuuttwwiinn,
       ggeettwwiinn,  ddeellaayy__oouuttppuutt,  fflluusshhiinnpp  -  miscellaneous  ccuurrsseess
       utility routines

SSYYNNOOPPSSIISS
       ##iinncclluuddee <<ccuurrsseess..hh>>

       cchhaarr **uunnccttrrll((cchhttyyppee cc));;
       cchhaarr **kkeeyynnaammee((iinntt cc));;
       iinntt ffiilltteerr((vvooiidd));;
       vvooiidd uussee__eennvv((cchhaarr bbooooll));;
       iinntt ppuuttwwiinn((WWIINNDDOOWW **wwiinn,, FFIILLEE **ffiilleepp));;
       WWIINNDDOOWW **ggeettwwiinn((FFIILLEE **ffiilleepp));;
       iinntt ddeellaayy__oouuttppuutt((iinntt mmss));;
       iinntt fflluusshhiinnpp((vvooiidd));;

DDEESSCCRRIIPPTTIIOONN
       The  uunnccttrrll macro expands to a character string which is a
       printable representation  of  the  character  _c.   Control
       characters  are  displayed  in  the ^^_X notation.  Printing
       characters are displayed as is.

       The kkeeyynnaammee routine returns a character string correspond-
       ing to the key _c.

       The ffiilltteerr routine, if used, must be called before iinniittssccrr
       or nneewwtteerrmm are called.  The effect is that,  during  those
       calls,  LLIINNEESS  is  set  to 1; the capabilities cclleeaarr, ccuupp,
       ccuudd, ccuudd11, ccuuuu11, ccuuuu,  vvppaa  are  disabled;  and  the  hhoommee
       string is set to the value of ccrr.

       The  uussee__eennvv routine, if used, is called before iinniittssccrr or
       nneewwtteerrmm are called.  When called with FFAALLSSEE  as  an  argu-
       ment,  the  values  of  lliinneess and ccoolluummnnss specified in the
       _t_e_r_m_i_n_f_o database will be used, even if environment  vari-
       ables  LLIINNEESS  and CCOOLLUUMMNNSS (used by default) are set, or if
       ccuurrsseess is running in  a  window  (in  which  case  default
       behavior  would  be  to  use  the window size if LLIINNEESS and
       CCOOLLUUMMNNSS are not set).

       The ppuuttwwiinn routine writes all data associated with  window
       _w_i_n into the file to which _f_i_l_e_p points.  This information
       can be later retrieved using the ggeettwwiinn function.

       The ggeettwwiinn routine reads window related data stored in the
       file  by ppuuttwwiinn.  The routine then creates and initializes
       a new window using that data.  It returns a pointer to the
       new window.

       The  ddeellaayy__oouuttppuutt  routine inserts an _m_s millisecond pause
       in output.  This routine should not  be  used  extensively
       because  padding  characters  are  used  rather than a CPU
       pause.



                                                                1





curs_util(3X)                                       curs_util(3X)


       The fflluusshhiinnpp routine throws away any  typeahead  that  has
       been  typed  by  the user and has not yet been read by the
       program.

RREETTUURRNN VVAALLUUEE
       Except for  fflluusshhiinnpp,  routines  that  return  an  integer
       return  EERRRR  upon  failure and OOKK (SVr4 specifies only "an
       integer value other than EERRRR") upon successful completion.

       fflluusshhiinnpp always returns OOKK.

       Routines that return pointers return NNUULLLL on error.

PPOORRTTAABBIILLIITTYY
       The  XSI  Curses  standard,  Issue 4 describes these func-
       tions.

       The SVr4 documentation describes the action of ffiilltteerr only
       in  the  vaguest  terms.   The description here is adapted
       from the XSI Curses standard (which erroneously  fails  to
       describe the disabling of ccuuuu).

NNOOTTEESS
       Note  that  uunnccttrrll  is  a macro, which is defined in <uunncc--
       ttrrll..hh>.

SSEEEE AALLSSOO
       ccuurrsseess(3X), ccuurrss__iinniittssccrr(3X), ccuurrss__ssccrr__dduummpp(3X).





























                                                                2


