/* Automatically generated by
	VMPluginCodeGenerator Melchor-tonel.1 uuid: 08095e25-d001-0e00-9989-8f9909ca3285
   from
	NewFilePlugin VMMaker-tonel.1 uuid: b254b225-d001-0e00-998e-8d8109ca3285
 */
static char __buildInfo[] = "NewFilePlugin VMMaker-tonel.1 uuid: b254b225-d001-0e00-998e-8d8109ca3285 " __DATE__ ;



#include "config.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

/* Default EXPORT macro that does nothing (see comment in sq.h): */
#define EXPORT(returnType) returnType

/* Do not include the entire sq.h file but just those parts needed. */
#include "sqConfig.h"			/* Configuration options */
#include "virtualMachine.h"	/*  The virtual machine proxy definition */
#include "sqPlatformSpecific.h"	/* Platform specific definitions */

#define true 1
#define false 0
#define null 0  /* using 'null' because nil is predefined in Think C */
#ifdef SQUEAK_BUILTIN_PLUGIN
# undef EXPORT
# define EXPORT(returnType) static returnType
#endif

#include "NewFilePlugin.h"
#include "memoryAccess.h"


/*** Function Prototypes ***/
EXPORT(const char*) getModuleName(void);
EXPORT(sqInt) primitiveDeleteFile(void);
EXPORT(sqInt) primitiveDirectoryClose(void);
EXPORT(sqInt) primitiveDirectoryCreate(void);
EXPORT(sqInt) primitiveDirectoryNext(void);
EXPORT(sqInt) primitiveDirectoryOpen(void);
EXPORT(sqInt) primitiveDirectoryRemoveEmpty(void);
EXPORT(sqInt) primitiveDirectoryRewind(void);
EXPORT(sqInt) primitiveFileClose(void);
EXPORT(sqInt) primitiveFileGetSize(void);
EXPORT(sqInt) primitiveFileOpen(void);
EXPORT(sqInt) primitiveFileReadInto(void);
EXPORT(sqInt) primitiveFileReadIntoAtFileOffset(void);
EXPORT(sqInt) primitiveFileSeek(void);
EXPORT(sqInt) primitiveFileTell(void);
EXPORT(sqInt) primitiveFileTruncate(void);
EXPORT(sqInt) primitiveFileWriteFrom(void);
EXPORT(sqInt) primitiveFileWriteFromAtFileOffset(void);
EXPORT(sqInt) primitiveIsAvailable(void);
EXPORT(sqInt) primitiveMemoryMapWithProtection(void);
EXPORT(sqInt) primitiveMemoryUnmap(void);
EXPORT(sqInt) setInterpreter(struct VirtualMachine *_anInterpreter);


/*** Variables ***/

#if !defined(SQUEAK_BUILTIN_PLUGIN)
static sqInt (*byteSizeOf)(sqInt oop);
static sqInt (*classExternalAddress)(void);
static sqInt (*failed)(void);
static void * (*firstIndexableField)(sqInt oop);
static sqInt (*instantiateClassindexableSize)(sqInt classPointer, sqInt size);
static sqInt (*isBytes)(sqInt oop);
static sqInt (*methodReturnBool)(sqInt boolean);
static sqInt (*methodReturnValue)(sqInt oop);
static sqInt (*pop)(sqInt nItems);
static unsigned int (*positive32BitValueOf)(sqInt oop);
static usqLong (*positive64BitValueOf)(sqInt oop);
static usqIntptr_t (*positiveMachineIntegerValueOf)(sqInt oop);
static sqInt (*primitiveFail)(void);
static sqInt (*signed64BitIntegerFor)(sqLong integerValue);
static sqLong (*signed64BitValueOf)(sqInt oop);
static sqInt (*stackValue)(sqInt offset);
static sqInt (*trueObject)(void);
#else /* !defined(SQUEAK_BUILTIN_PLUGIN) */
extern sqInt byteSizeOf(sqInt oop);
extern sqInt classExternalAddress(void);
extern sqInt failed(void);
extern void * firstIndexableField(sqInt oop);
extern sqInt instantiateClassindexableSize(sqInt classPointer, sqInt size);
extern sqInt isBytes(sqInt oop);
extern sqInt methodReturnBool(sqInt boolean);
extern sqInt methodReturnValue(sqInt oop);
extern sqInt pop(sqInt nItems);
extern unsigned int positive32BitValueOf(sqInt oop);
extern usqLong positive64BitValueOf(sqInt oop);
extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop);
extern sqInt primitiveFail(void);
extern sqInt signed64BitIntegerFor(sqLong integerValue);
extern sqLong signed64BitValueOf(sqInt oop);
extern sqInt stackValue(sqInt offset);
extern sqInt trueObject(void);
extern
#endif
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
	"NewFilePlugin VMMaker-tonel.1 (i)"
#else
	"NewFilePlugin VMMaker-tonel.1 (e)"
#endif
;

/*	Note: This is hardcoded so it can be run from Squeak. 
	The module name is used for validating a module *after* 
	it is loaded to check if it does really contain the module 
	we're thinking it contains. This is important! */
/* InterpreterPlugin>>#getModuleName */
EXPORT(const char*)
getModuleName(void)
{
	return moduleName;
}
/* NewFilePlugin>>#primitiveDeleteFile */
EXPORT(sqInt)
primitiveDeleteFile(void)
{
	char *_pathIndex;
	sqInt _pathPointer;
	sqInt _pathSize;
	bool _result;

	_pathPointer = stackValue(0);
	if (!(isBytes(_pathPointer))) {
		return primitiveFail();
	}
	_pathIndex = firstIndexableField(_pathPointer);
	_pathSize = byteSizeOf(_pathPointer);
	_result = NewFile_deleteFile(_pathIndex, _pathSize);
	if (!(failed())) {
		methodReturnBool(_result);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveDirectoryClose */
EXPORT(sqInt)
primitiveDirectoryClose(void)
{
	sqInt _directoryOop;
	NewDirectory_t *_directoryPointer;

	_directoryOop = stackValue(0);
	if (!(failed())) {
		_directoryPointer = ((NewDirectory_t *) (pointerAtPointer(firstIndexableField(_directoryOop))) );
		NewDirectory_close(_directoryPointer);
	}
	if (!(failed())) {
		pop(1);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveDirectoryCreate */
EXPORT(sqInt)
primitiveDirectoryCreate(void)
{
	char *_pathIndex;
	sqInt _pathPointer;
	sqInt _pathSize;
	bool _result;

	_pathPointer = stackValue(0);
	if (!(isBytes(_pathPointer))) {
		return primitiveFail();
	}
	_pathIndex = firstIndexableField(_pathPointer);
	_pathSize = byteSizeOf(_pathPointer);
	_result = NewDirectory_create(_pathIndex, _pathSize);
	if (!(failed())) {
		methodReturnBool(_result);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveDirectoryNext */
EXPORT(sqInt)
primitiveDirectoryNext(void)
{
	sqInt _directoryOop;
	NewDirectory_t *_directoryPointer;
	sqInt _stringOop;
	char *_stringPointer;

	_directoryOop = stackValue(0);
	_stringOop = instantiateClassindexableSize(classExternalAddress(), BytesPerWord);
	if (!(failed())) {
		_directoryPointer = ((NewDirectory_t *) (pointerAtPointer(firstIndexableField(_directoryOop))) );
		_stringPointer = NewDirectory_next(_directoryPointer);
		pointerAtPointerput(firstIndexableField(_stringOop), _stringPointer);
	}
	if (!(failed())) {
		methodReturnValue(_stringOop);
	}
	return 0;
}
/*	primitiveOpen: path mode: mode creationDisposition: creationDisposition 
	flags: flags 
	 */
/* NewFilePlugin>>#primitiveDirectoryOpen */
EXPORT(sqInt)
primitiveDirectoryOpen(void)
{
	sqInt _directoryOop;
	void *_directoryPointer;
	char *_pathIndex;
	sqInt _pathPointer;
	sqInt _pathSize;

	_pathPointer = stackValue(0);
	if (!(isBytes(_pathPointer))) {
		return primitiveFail();
	}
	_pathIndex = firstIndexableField(_pathPointer);
	_pathSize = byteSizeOf(_pathPointer);
	_directoryOop = instantiateClassindexableSize(classExternalAddress(), BytesPerWord);
	_directoryPointer = NewDirectory_open(_pathIndex, _pathSize);
	pointerAtPointerput(firstIndexableField(_directoryOop), _directoryPointer);
	if (!(failed())) {
		methodReturnValue(_directoryOop);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveDirectoryRemoveEmpty */
EXPORT(sqInt)
primitiveDirectoryRemoveEmpty(void)
{
	char *_pathIndex;
	sqInt _pathPointer;
	sqInt _pathSize;
	bool _result;

	_pathPointer = stackValue(0);
	if (!(isBytes(_pathPointer))) {
		return primitiveFail();
	}
	_pathIndex = firstIndexableField(_pathPointer);
	_pathSize = byteSizeOf(_pathPointer);
	_result = NewDirectory_removeEmpty(_pathIndex, _pathSize);
	if (!(failed())) {
		methodReturnBool(_result);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveDirectoryRewind */
EXPORT(sqInt)
primitiveDirectoryRewind(void)
{
	sqInt _directoryOop;
	NewDirectory_t *_directoryPointer;

	_directoryOop = stackValue(0);
	if (!(failed())) {
		_directoryPointer = ((NewDirectory_t *) (pointerAtPointer(firstIndexableField(_directoryOop))) );
		NewDirectory_rewind(_directoryPointer);
	}
	if (!(failed())) {
		pop(1);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileClose */
EXPORT(sqInt)
primitiveFileClose(void)
{
	sqInt _fileOop;
	NewFile_t *_filePointer;

	_fileOop = stackValue(0);
	if (!(failed())) {
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		NewFile_close(_filePointer);
	}
	if (!(failed())) {
		pop(1);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileGetSize */
EXPORT(sqInt)
primitiveFileGetSize(void)
{
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqLong _fileSize;

	_fileSize = 0;
	_fileOop = stackValue(0);
	if (!(failed())) {
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_fileSize = NewFile_getSize(_filePointer);
	}
	if (!(failed())) {
		methodReturnValue(signed64BitIntegerFor(_fileSize));
	}
	return 0;
}
/*	primitiveOpen: path mode: mode creationDisposition: creationDisposition 
	flags: flags 
	 */
/* NewFilePlugin>>#primitiveFileOpen */
EXPORT(sqInt)
primitiveFileOpen(void)
{
	sqInt _creationDisposition;
	sqInt _fileOop;
	void *_filePointer;
	sqInt _flags;
	sqInt _mode;
	char *_pathIndex;
	sqInt _pathPointer;
	sqInt _pathSize;

	_flags = positive32BitValueOf(stackValue(0));
	_creationDisposition = positive32BitValueOf(stackValue(1));
	_mode = positive32BitValueOf(stackValue(2));
	_pathPointer = stackValue(3);
	if (!(isBytes(_pathPointer))) {
		return primitiveFail();
	}
	_pathIndex = firstIndexableField(_pathPointer);
	_pathSize = byteSizeOf(_pathPointer);
	_fileOop = instantiateClassindexableSize(classExternalAddress(), BytesPerWord);
	_filePointer = NewFile_open(_pathIndex, _pathSize, _mode, _creationDisposition, _flags);
	pointerAtPointerput(firstIndexableField(_fileOop), _filePointer);
	if (!(failed())) {
		methodReturnValue(_fileOop);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileReadInto */
EXPORT(sqInt)
primitiveFileReadInto(void)
{
	sqInt _bufferOffset;
	sqInt _bufferOop;
	void *_bufferPointer;
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqLong _readResult;
	sqInt _readSize;

	_readResult = 0;
	_readSize = positiveMachineIntegerValueOf(stackValue(0));
	_bufferOffset = positiveMachineIntegerValueOf(stackValue(1));
	_bufferOop = stackValue(2);
	_fileOop = stackValue(3);
	if (!(failed())) {
		_bufferPointer = firstIndexableField(_bufferOop);
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_readResult = NewFile_read(_filePointer, _bufferPointer, _bufferOffset, _readSize);
	}
	if (!(failed())) {
		methodReturnValue(signed64BitIntegerFor(_readResult));
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileReadIntoAtFileOffset */
EXPORT(sqInt)
primitiveFileReadIntoAtFileOffset(void)
{
	sqInt _bufferOffset;
	sqInt _bufferOop;
	void *_bufferPointer;
	sqInt _fileOffset;
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqLong _readResult;
	sqInt _readSize;

	_readResult = 0;
	_fileOffset = positive64BitValueOf(stackValue(0));
	_readSize = positiveMachineIntegerValueOf(stackValue(1));
	_bufferOffset = positiveMachineIntegerValueOf(stackValue(2));
	_bufferOop = stackValue(3);
	_fileOop = stackValue(4);
	if (!(failed())) {
		_bufferPointer = firstIndexableField(_bufferOop);
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_readResult = NewFile_readAtOffset(_filePointer, _bufferPointer, _bufferOffset, _readSize, _fileOffset);
	}
	if (!(failed())) {
		methodReturnValue(signed64BitIntegerFor(_readResult));
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileSeek */
EXPORT(sqInt)
primitiveFileSeek(void)
{
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqInt _seekMode;
	sqInt _seekOffset;

	_seekMode = positive32BitValueOf(stackValue(0));
	_seekOffset = signed64BitValueOf(stackValue(1));
	_fileOop = stackValue(2);
	if (!(failed())) {
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		NewFile_seek(_filePointer, _seekOffset, _seekMode);
	}
	if (!(failed())) {
		pop(3);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileTell */
EXPORT(sqInt)
primitiveFileTell(void)
{
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqLong _fileSize;

	_fileSize = 0;
	_fileOop = stackValue(0);
	if (!(failed())) {
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_fileSize = NewFile_tell(_filePointer);
	}
	if (!(failed())) {
		methodReturnValue(signed64BitIntegerFor(_fileSize));
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileTruncate */
EXPORT(sqInt)
primitiveFileTruncate(void)
{
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqInt _newFileSize;
	bool _result;

	_newFileSize = positive64BitValueOf(stackValue(0));
	_fileOop = stackValue(1);
	if (!(failed())) {
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_result = NewFile_truncate(_filePointer, _newFileSize);
	}
	if (!(failed())) {
		methodReturnBool(_result);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileWriteFrom */
EXPORT(sqInt)
primitiveFileWriteFrom(void)
{
	sqInt _bufferOffset;
	sqInt _bufferOop;
	void *_bufferPointer;
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqLong _writeResult;
	sqInt _writeSize;

	_writeResult = 0;
	_writeSize = positiveMachineIntegerValueOf(stackValue(0));
	_bufferOffset = positiveMachineIntegerValueOf(stackValue(1));
	_bufferOop = stackValue(2);
	_fileOop = stackValue(3);
	if (!(failed())) {
		_bufferPointer = firstIndexableField(_bufferOop);
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_writeResult = NewFile_write(_filePointer, _bufferPointer, _bufferOffset, _writeSize);
	}
	if (!(failed())) {
		methodReturnValue(signed64BitIntegerFor(_writeResult));
	}
	return 0;
}
/* NewFilePlugin>>#primitiveFileWriteFromAtFileOffset */
EXPORT(sqInt)
primitiveFileWriteFromAtFileOffset(void)
{
	sqInt _bufferOffset;
	sqInt _bufferOop;
	void *_bufferPointer;
	sqInt _fileOffset;
	sqInt _fileOop;
	NewFile_t *_filePointer;
	sqLong _writeResult;
	sqInt _writeSize;

	_writeResult = 0;
	_fileOffset = positive64BitValueOf(stackValue(0));
	_writeSize = positiveMachineIntegerValueOf(stackValue(1));
	_bufferOffset = positiveMachineIntegerValueOf(stackValue(2));
	_bufferOop = stackValue(3);
	_fileOop = stackValue(4);
	if (!(failed())) {
		_bufferPointer = firstIndexableField(_bufferOop);
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_writeResult = NewFile_writeAtOffset(_filePointer, _bufferPointer, _bufferOffset, _writeSize, _fileOffset);
	}
	if (!(failed())) {
		methodReturnValue(signed64BitIntegerFor(_writeResult));
	}
	return 0;
}
/* NewFilePlugin>>#primitiveIsAvailable */
EXPORT(sqInt)
primitiveIsAvailable(void)
{
	if (!(failed())) {
		methodReturnValue(trueObject());
	}
	return 0;
}
/* NewFilePlugin>>#primitiveMemoryMapWithProtection */
EXPORT(sqInt)
primitiveMemoryMapWithProtection(void)
{
	sqInt _fileOop;
	NewFile_t *_filePointer;
	void *_memoryMappedPointer;
	sqInt _memoryMappedPointerOop;
	sqInt _protectionFlags;

	_protectionFlags = positive32BitValueOf(stackValue(0));
	_fileOop = stackValue(1);
	_memoryMappedPointerOop = instantiateClassindexableSize(classExternalAddress(), BytesPerWord);
	if (!(failed())) {
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		_memoryMappedPointer = NewFile_memoryMap(_filePointer, _protectionFlags);
		pointerAtPointerput(firstIndexableField(_memoryMappedPointerOop), _memoryMappedPointer);
	}
	if (!(failed())) {
		methodReturnValue(_memoryMappedPointerOop);
	}
	return 0;
}
/* NewFilePlugin>>#primitiveMemoryUnmap */
EXPORT(sqInt)
primitiveMemoryUnmap(void)
{
	sqInt _fileOop;
	NewFile_t *_filePointer;

	_fileOop = stackValue(0);
	if (!(failed())) {
		_filePointer = ((NewFile_t *) (pointerAtPointer(firstIndexableField(_fileOop))) );
		NewFile_memoryUnmap(_filePointer);
	}
	if (!(failed())) {
		pop(1);
	}
	return 0;
}
/*	Note: This is coded so that it can be run in Squeak. */
/* InterpreterPlugin>>#setInterpreter: */
EXPORT(sqInt)
setInterpreter(struct VirtualMachine *_anInterpreter)
{
	sqInt _ok;

	interpreterProxy = _anInterpreter;
	_ok = ((interpreterProxy->majorVersion()) == (VM_PROXY_MAJOR)) && ((interpreterProxy->minorVersion()) >= (VM_PROXY_MINOR));
	if (_ok) {
		
#    if !(defined(SQUEAK_BUILTIN_PLUGIN))
		{
			
			{
				{
					byteSizeOf = interpreterProxy->byteSizeOf;
				}
				{
					classExternalAddress = interpreterProxy->classExternalAddress;
				}
				{
					failed = interpreterProxy->failed;
				}
				{
					firstIndexableField = interpreterProxy->firstIndexableField;
				}
				{
					instantiateClassindexableSize = interpreterProxy->instantiateClassindexableSize;
				}
				{
					isBytes = interpreterProxy->isBytes;
				}
				{
					methodReturnBool = interpreterProxy->methodReturnBool;
				}
				{
					methodReturnValue = interpreterProxy->methodReturnValue;
				}
				{
					pop = interpreterProxy->pop;
				}
				{
					positive32BitValueOf = interpreterProxy->positive32BitValueOf;
				}
				{
					positive64BitValueOf = interpreterProxy->positive64BitValueOf;
				}
				{
					positiveMachineIntegerValueOf = interpreterProxy->positiveMachineIntegerValueOf;
				}
				{
					primitiveFail = interpreterProxy->primitiveFail;
				}
				{
					signed64BitIntegerFor = interpreterProxy->signed64BitIntegerFor;
				}
				{
					signed64BitValueOf = interpreterProxy->signed64BitValueOf;
				}
				{
					stackValue = interpreterProxy->stackValue;
				}
				{
					trueObject = interpreterProxy->trueObject;
				}
			}
		}
#    endif /* !(defined(SQUEAK_BUILTIN_PLUGIN)) */
	}
	return _ok;
}


#ifdef SQUEAK_BUILTIN_PLUGIN

static char _m[] = "NewFilePlugin";
void* NewFilePlugin_exports[][3] = {
	{(void*)_m, "getModuleName", (void*)getModuleName},
	{(void*)_m, "primitiveDeleteFile\000\001", (void*)primitiveDeleteFile},
	{(void*)_m, "primitiveDirectoryClose\000\000", (void*)primitiveDirectoryClose},
	{(void*)_m, "primitiveDirectoryCreate\000\001", (void*)primitiveDirectoryCreate},
	{(void*)_m, "primitiveDirectoryNext\000\000", (void*)primitiveDirectoryNext},
	{(void*)_m, "primitiveDirectoryOpen\000\001", (void*)primitiveDirectoryOpen},
	{(void*)_m, "primitiveDirectoryRemoveEmpty\000\001", (void*)primitiveDirectoryRemoveEmpty},
	{(void*)_m, "primitiveDirectoryRewind\000\000", (void*)primitiveDirectoryRewind},
	{(void*)_m, "primitiveFileClose\000\000", (void*)primitiveFileClose},
	{(void*)_m, "primitiveFileGetSize\000\000", (void*)primitiveFileGetSize},
	{(void*)_m, "primitiveFileOpen\000\001", (void*)primitiveFileOpen},
	{(void*)_m, "primitiveFileReadInto\000\001", (void*)primitiveFileReadInto},
	{(void*)_m, "primitiveFileReadIntoAtFileOffset\000\001", (void*)primitiveFileReadIntoAtFileOffset},
	{(void*)_m, "primitiveFileSeek\000\000", (void*)primitiveFileSeek},
	{(void*)_m, "primitiveFileTell\000\000", (void*)primitiveFileTell},
	{(void*)_m, "primitiveFileTruncate\000\000", (void*)primitiveFileTruncate},
	{(void*)_m, "primitiveFileWriteFrom\000\001", (void*)primitiveFileWriteFrom},
	{(void*)_m, "primitiveFileWriteFromAtFileOffset\000\001", (void*)primitiveFileWriteFromAtFileOffset},
	{(void*)_m, "primitiveIsAvailable\000\377", (void*)primitiveIsAvailable},
	{(void*)_m, "primitiveMemoryMapWithProtection\000\000", (void*)primitiveMemoryMapWithProtection},
	{(void*)_m, "primitiveMemoryUnmap\000\000", (void*)primitiveMemoryUnmap},
	{(void*)_m, "setInterpreter", (void*)setInterpreter},
	{NULL, NULL, NULL}
};

#else /* ifdef SQ_BUILTIN_PLUGIN */

EXPORT(signed char) primitiveDeleteFileAccessorDepth = 1;
EXPORT(signed char) primitiveDirectoryCloseAccessorDepth = 0;
EXPORT(signed char) primitiveDirectoryCreateAccessorDepth = 1;
EXPORT(signed char) primitiveDirectoryNextAccessorDepth = 0;
EXPORT(signed char) primitiveDirectoryOpenAccessorDepth = 1;
EXPORT(signed char) primitiveDirectoryRemoveEmptyAccessorDepth = 1;
EXPORT(signed char) primitiveDirectoryRewindAccessorDepth = 0;
EXPORT(signed char) primitiveFileCloseAccessorDepth = 0;
EXPORT(signed char) primitiveFileGetSizeAccessorDepth = 0;
EXPORT(signed char) primitiveFileOpenAccessorDepth = 1;
EXPORT(signed char) primitiveFileReadIntoAccessorDepth = 1;
EXPORT(signed char) primitiveFileReadIntoAtFileOffsetAccessorDepth = 1;
EXPORT(signed char) primitiveFileSeekAccessorDepth = 0;
EXPORT(signed char) primitiveFileTellAccessorDepth = 0;
EXPORT(signed char) primitiveFileTruncateAccessorDepth = 0;
EXPORT(signed char) primitiveFileWriteFromAccessorDepth = 1;
EXPORT(signed char) primitiveFileWriteFromAtFileOffsetAccessorDepth = 1;
EXPORT(signed char) primitiveMemoryMapWithProtectionAccessorDepth = 0;
EXPORT(signed char) primitiveMemoryUnmapAccessorDepth = 0;

#endif /* ifdef SQ_BUILTIN_PLUGIN */
