#ifdef	vms
#include	<stdio.h>
/*
 * This creates text files in vanilla RMS on VMS.  It should
 * be included in source files as needed.
 */
#define	CREATE(f, m)	vms_create(f, m)

static FILE *
vms_create(filename, mode)
char		*filename;
char		*mode;
{
	register int	unit;
	register FILE	*iov;
	extern FILE	*fdopen();

	if ((unit = creat(filename, 0, "rat=cr", "rfm=var")) == -1)
	    return (NULL);
	else if ((iov = fdopen(unit, mode)) == NULL) {
	    close(unit);
	    delete(filename);
	    return (NULL);
	}
	return (iov);
}
#else
#define	CREATE	fopen
#endif

