/*
 *			r e c n u m . c
 */

/*)LIBRARY
*/

#ifdef DOCUMENTATION

title	recnum	Set Record Number
index		set Record number

synopsis

	int
	recnum(ioptr,number)
	 FILE *ioptr;	/* the file to have it's record number set in */
	 long number;	/* the record number to point it at */

description

	recnum() points a file's record pointer at the specified record.
	ranacc() must have been called before access to the file via this
	routine can be used (recnum will work, but read/write wont).

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 */





recnum(ioptr,number)		/* set record number any time after open */
char *ioptr;		/* which file */
long number;		/* which record */
{
	FDB	*fdbp;	/* file descriptor pointer */

	/* point the users file descriptor at the correct place */
	fdbp = (char *)(ioptr) + FDBOFF;

	/* set the record number */
	fdbp->f_rcnm=number;

}

