_FUNIT - obtain B unit number.

(GCOS-8 only)

Usage:

#include <stdio.h>
int _funit();
unit = _funit(fp);

Where:

FILE *fp;
is a stream pointer associated with an open I/O stream.
int unit;
is the B unit number associated with the stream.

Examples:

_funit(stdin)  == 0
_funit(stdout) == 1
_funit(stderr) == -4

Description:

The B unit number of an open stream is the number that is used by library routines in the "UW Tools" package when they perform I/O on the stream. This is not usually the same as the C file descriptor number associated with the stream. "_funit" returns the B unit number associated with a particular stream.

Notes:

This is only supported under GCOS-8, and will only be of interest to those who write programs using I/O routines from both the C library and the UW Tools library.

Copyright © 1996, Thinkage Ltd.