Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

reentrant(3)

setbuf(3S)

setlinebuf(3C)



setbuffer(3C)                  DG/UX R4.11MU05                 setbuffer(3C)


NAME
       setbuffer - assign a buffer to a specified stream

SYNOPSIS
       #include <stdio.h>
       ...
       FILE *f1;
       char *bufptr;
       int size;
       void setbuffer();
       ...
       setbuffer(fp, bufptr, size); (or) setbuffer(fp, NULL, size);

       where size is the size of the character array bufptr.

DESCRIPTION
       The setbuffer function assigns a buffer to a stream whose I/O you
       have been handling with the stdio(3S) functions.  Output is sent to
       the file or device only when you call fflush(3S) or when the buffer
       fills up.  This function is an alternate form of setbuf.  If the
       buffer pointer bufptr is null (0), it specifies an unbuffered file
       and uses single byte I/O.  Otherwise, the routine assumes that the
       buffer can hold at least the number of characters specified by size.


   Considerations for Threads Programming
                     +----------+-----------------------------+
                     |          |                      async- |
                     |function  | reentrant   cancel   cancel |
                     |          |             point     safe  |
                     +----------+-----------------------------+
                     |setbuffer |     Y         N        N    |
                     +----------+-----------------------------+

RETURN VALUE
       setbuffer does not return a value.

SEE ALSO
       reentrant(3), setbuf(3S), setlinebuf(3C).


Licensed material--property of copyright holder(s)

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