/*
 *			r a n a c c . c
 */

/*)LIBRARY
*/

#ifdef DOCUMENTATION

title	ranacc	Define the File as Random Access
index		define the File as random access

synopsis

	int
	ranacc(ioptr)
	 FILE *ioptr;		/* the file to define */

description

	ranacc() sets the random access bits in the file header block,
	allowing the user to use recnum(). This routine will set the
	R.FIX bit, when the file is closed.

bugs

author

	Machiavelli Systems

#endif

#define _production

#include <stdio.h>
#include <cx.h>
#include <nboff.h>
#include <fdoff.h>

#define	FDBOFF	024		/* where the fdb really is in FILE struct */




ranacc(ioptr)		/* set random access mode any time after open */
char *ioptr;		/* which file */
{
	FDB	*fdbp;	/* pointer to file descriptor block */

	/* point the user fdp at the correct place */
	fdbp = (char *)(ioptr) + FDBOFF;

	/* set the bits */
	fdbp->f_racc = fd_ran;

}
