/* New routines added by TNOS/KO4KS version of NOS */

#include "vmsmgr.hpp"
#include <conio.h>
#include <ctype.h>
#include <dos.h>

int myVMSsortinited = 0;
vmsmgr *VMSsort;

extern "C"	{
	
int VMSsortInit (unsigned long size, unsigned long number)
{
	myVMSsortinited = 1;
	VMSsort = new vmsmgr(size, number);
	return VMSsort->is_installed();
}

void VMSsortTerm (void)
{
	delete VMSsort;
	myVMSsortinited = 0;
}

void VMSsortFetch (char far *databuf, size_t index)
{
	VMSsort->fetch (databuf, index);
}

void VMSsortStow (char far *databuf, size_t index)
{
	VMSsort->stow (databuf, index);
}

} /* end of extern "C" stuff */
