Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getc(K) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     GETC(K)                   UNIX System V                   GETC(K)



     Name
          getc, getcb, getcbp, getcf - read clist buffers

     Syntax
          int
          getc(cp)
          struct clist *cp;

          struct cblock*
          getcb(cp)
          struct clist *cp;

          int
          getcbp(p, cp, n)
          struct clist *p;
          char *cp;
          int n;

          struct cblock *
          getcf()

     Description
          The getc routine moves one character from the clist buffer
          for each call.

          The getcb routine moves one cblock from the clist buffer for
          each call.

          The getcbp routine copies characters from the specified
          clist, p, to the buffer addressed by the cp argument.

          The getcf routine takes a cblock from the freelist and
          returns a pointer to it.

     Parameters
          cp specifies the clist buffer from which characters are
          moved by getc.

          The pointer cp specifies the clist buffer the cblocks are
          moved from by getcb.

          The pointer p specifies the clist buffer the characters are
          copied from by getcbp.  The argument cp is a char * that
          addresses the buffer the characters are copied to.

          The value of n is the number of characters to be copied
          (which should denote the maximum size of the available
          buffer).

     Return Value
          The getc routine returns the next character in the buffer or
          -1 if the buffer is empty.

          The getcb routine returns a pointer to the first cblock on
          the clist or NULL if the clist is empty.

          The getcbp routine returns the number of characters actually
          copied (which is less than or equal to n ).

          getcf returns a pointer to a cblock if available. Otherwise,
          the routine returns NULL.

     Notes
          Note that these routines can be used only within character
          device drivers.

     See Also
          putc(K), spl(K)

                                                      (printed 7/6/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026