_SETMEDIA - change media or report code for a stream.

(GCOS-8 Only)

Usage:

#include <stdio.h>
oldmedia = _setmedia(fp,newmedia);

Where:

FILE *fp;
indicates the stream whose media or report code you want to change.
int newmedia;
is an integer of the form "00000000mmrr" where "mm" are two octal digits in the range (0-17) specifying the new media code for this file and "rr" are two octal digits specifying the new report code for further records of this file.
int oldmedia;
has the same format as "newmedia" and gives the old media and report code that the stream had before the change.

Description:

"_setmedia" can change the media and report code for an output stream.

"_setmedia" should only be called when you have finished outputting a complete record (e.g. after outputting a '\n', '\r' or '\f' character). If you call "_setmedia" to change media codes while in the middle of a record, the result is undefined.

Copyright © 1996, Thinkage Ltd.