text: /* Automatically generated by
  	VMPluginCodeGenerator VMMaker.oscog-eem.3166 uuid: bda1c176-bedf-4490-bb95-90d3851c1526
     from
  	FileDialogPlugin VMMaker.oscog-eem.3166 uuid: bda1c176-bedf-4490-bb95-90d3851c1526
   */
  static char __buildInfo[] = "FileDialogPlugin VMMaker.oscog-eem.3166 uuid: bda1c176-bedf-4490-bb95-90d3851c1526 " __DATE__ ;
  
  
  #include "config.h"
  #include <math.h>
  #include "sqMathShim.h"
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <time.h>
  
  /* Do not include the entire sq.h file but just those parts needed. */
  #include "sqConfig.h"			/* Configuration options */
  #include "sqVirtualMachine.h"	/*  The virtual machine proxy definition */
  #include "sqPlatformSpecific.h"	/* Platform specific definitions */
  
  #include "FileDialogPlugin.h"
  #include "sqMemoryAccess.h"
  
  #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
  # define INT_EXT "(i)"
  #else
  # define INT_EXT "(e)"
  #endif
  
  
  /*** Function Prototypes ***/
  EXPORT(const char*) getModuleName(void);
  EXPORT(sqInt) initialiseModule(void);
  EXPORT(sqInt) primitiveFileDialogAddFilter(void);
  EXPORT(sqInt) primitiveFileDialogCallbackReturn(void);
  EXPORT(sqInt) primitiveFileDialogCreate(void);
  EXPORT(sqInt) primitiveFileDialogDestroy(void);
  EXPORT(sqInt) primitiveFileDialogDone(void);
  EXPORT(sqInt) primitiveFileDialogDoneSemaphore(void);
  EXPORT(sqInt) primitiveFileDialogGetFilterIndex(void);
  EXPORT(sqInt) primitiveFileDialogGetResult(void);
  EXPORT(sqInt) primitiveFileDialogSetCallbackSemaphore(void);
  EXPORT(sqInt) primitiveFileDialogSetFile(void);
  EXPORT(sqInt) primitiveFileDialogSetFilterIndex(void);
  EXPORT(sqInt) primitiveFileDialogSetLabel(void);
  EXPORT(sqInt) primitiveFileDialogSetProperty(void);
  EXPORT(sqInt) primitiveFileDialogShow(void);
  EXPORT(sqInt) primitiveGetFileLocation(void);
  EXPORT(sqInt) setInterpreter(struct VirtualMachine *anInterpreter);
  
  
  /*** Variables ***/
  
  #if !defined(SQUEAK_BUILTIN_PLUGIN)
  static sqInt (*booleanValueOf)(sqInt obj);
  static sqInt (*byteSizeOf)(sqInt oop);
  static sqInt (*failed)(void);
  static void * (*firstIndexableField)(sqInt oop);
  static sqInt (*isBytes)(sqInt oop);
  static sqInt (*methodArgumentCount)(void);
  static sqInt (*methodReturnBool)(sqInt boolean);
  static sqInt (*methodReturnInteger)(sqInt integer);
  static sqInt (*methodReturnReceiver)(void);
  static sqInt (*methodReturnString)(char *aCString);
  static sqInt (*methodReturnValue)(sqInt oop);
  static sqInt (*nilObject)(void);
  static usqInt (*positive32BitValueOf)(sqInt oop);
  static sqInt (*primitiveFail)(void);
  static sqInt (*primitiveFailFor)(sqInt reasonCode);
  static sqInt (*stackIntegerValue)(sqInt offset);
  static sqInt (*stackValue)(sqInt offset);
  #else /* !defined(SQUEAK_BUILTIN_PLUGIN) */
  extern sqInt booleanValueOf(sqInt obj);
  extern sqInt byteSizeOf(sqInt oop);
  extern sqInt failed(void);
  extern void * firstIndexableField(sqInt oop);
  extern sqInt isBytes(sqInt oop);
  extern sqInt methodArgumentCount(void);
  extern sqInt methodReturnBool(sqInt boolean);
  extern sqInt methodReturnInteger(sqInt integer);
  extern sqInt methodReturnReceiver(void);
  extern sqInt methodReturnString(char *aCString);
  extern sqInt methodReturnValue(sqInt oop);
  extern sqInt nilObject(void);
  extern usqInt positive32BitValueOf(sqInt oop);
  extern sqInt primitiveFail(void);
  extern sqInt primitiveFailFor(sqInt reasonCode);
  extern sqInt stackIntegerValue(sqInt offset);
  extern sqInt stackValue(sqInt offset);
  extern
  #endif
  struct VirtualMachine* interpreterProxy;
  static const char *moduleName = "FileDialogPlugin VMMaker.oscog-eem.3166 " INT_EXT;
  
  
  
  /*	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;
  }
  
  	/* FileDialogPlugin>>#initialiseModule */
  EXPORT(sqInt)
  initialiseModule(void)
  {
  	return fileDialogInitialize();
  }
  
  
  /*	Primitive. Add a filter to an existing file dialog.
  	Arguments:
  	dlgHandle: Handle for the file dialog.
  	filterDesc: Description for the filter ('Text Files (*.txt)')
  	filterPattern: Filter pattern (*.txt)
  	Returns: Nothing. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogAddFilter */
  EXPORT(sqInt)
  primitiveFileDialogAddFilter(void)
  {
      int dlgHandle;
      char *dstPtr;
      char *dstPtr1;
      char *filterDesc;
      char *filterPattern;
      sqInt obj;
      sqInt obj1;
      sqInt sz;
      sqInt sz1;
  
  	if (!((methodArgumentCount()) == 3)) {
  		return primitiveFail();
  	}
  	/* begin stackEphemeralStringValue: */
  	obj = stackValue(0);
  	if (!(isBytes(obj))) {
  		primitiveFailFor(PrimErrBadArgument);
  		filterPattern = null;
  		goto l1;
  	}
  	sz = byteSizeOf(obj);
  	dstPtr = alloca(sz + 1);
  	if (!dstPtr) {
  		primitiveFailFor(PrimErrNoCMemory);
  		filterPattern = null;
  		goto l1;
  	}
  	memcpy(dstPtr, firstIndexableField(obj), sz);
  	dstPtr[sz] = 0;
  	filterPattern = dstPtr;
  	l1:	/* end stackEphemeralStringValue: */;
  	/* begin stackEphemeralStringValue: */
  	obj1 = stackValue(1);
  	if (!(isBytes(obj1))) {
  		primitiveFailFor(PrimErrBadArgument);
  		filterDesc = null;
  		goto l2;
  	}
  	sz1 = byteSizeOf(obj1);
  	dstPtr1 = alloca(sz1 + 1);
  	if (!dstPtr1) {
  		primitiveFailFor(PrimErrNoCMemory);
  		filterDesc = null;
  		goto l2;
  	}
  	memcpy(dstPtr1, firstIndexableField(obj1), sz1);
  	dstPtr1[sz1] = 0;
  	filterDesc = dstPtr1;
  	l2:	/* end stackEphemeralStringValue: */;
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(2))));
  	if (failed()) {
  		return primitiveFailFor(PrimErrBadArgument);
  	}
  	fileDialogAddFilter(dlgHandle, filterDesc, filterPattern);
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Reap the return value from the dialog callback.
  	This is unimplemented (stubbed out) on all current platforms and so it is
  	obsolete. 
   */
  
  	/* FileDialogPlugin>>#primitiveFileDialogCallbackReturn */
  EXPORT(sqInt)
  primitiveFileDialogCallbackReturn(void)
  {
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Create a new file dialog handle and answer the result.
  	Arguments: None.
  	Return value: File dialog handle. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogCreate */
  EXPORT(sqInt)
  primitiveFileDialogCreate(void)
  {
      sqInt dlgHandle;
  
  	if (!((methodArgumentCount()) == 0)) {
  		return primitiveFailFor(PrimErrBadNumArgs);
  	}
  	dlgHandle = fileDialogCreate();
  	if (dlgHandle < 0) {
  		return primitiveFailFor(PrimErrOperationFailed);
  	}
  	methodReturnInteger(dlgHandle);
  	return 0;
  }
  
  
  /*	Primitive. Hide/destroy the file dialog after it is done.
  	Arguments:
  	dlgHandle: Handle of the file dialog.
  	Return value: Nothing.
  	Notes: This primitive may fail if the dialog wasn't completed and platform
  	doesn't support destroying existing dialogs. Generally it is assumed that
  	the dialog has been closed by the user before calling this method. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogDestroy */
  EXPORT(sqInt)
  primitiveFileDialogDestroy(void)
  {
      int dlgHandle;
      sqInt ok;
  
  	if (!((methodArgumentCount()) == 1)) {
  		return primitiveFail();
  	}
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(0))));
  	if (failed()) {
  		return null;
  	}
  
  	/* inSmalltalk: false */
  	ok = fileDialogDestroy(dlgHandle);
  	if (!ok) {
  		return primitiveFail();
  	}
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Answer whether the file dialog completed or not.
  	Arguments:
  	dlgHandle: Handle of the file dialog.
  	Return value: Boolean indicating whether the dialog completed. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogDone */
  EXPORT(sqInt)
  primitiveFileDialogDone(void)
  {
      int dlgHandle;
  
  	if (!((methodArgumentCount()) == 1)) {
  		return primitiveFail();
  	}
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(0))));
  	if (!(failed())) {
  		methodReturnBool(fileDialogDone(dlgHandle));
  	}
  	return 0;
  }
  
  
  /*	Primitive. Set the semaphore to be signaled when the file dialog
  	completes. Arguments:
  	dlgHandle:	Handle of the file dialog.
  	semaIndex:	External semaphore index.
  	Return value: Nothing. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogDoneSemaphore */
  EXPORT(sqInt)
  primitiveFileDialogDoneSemaphore(void)
  {
      int dlgHandle;
      sqInt semaIndex;
  
  	if (!((methodArgumentCount()) == 2)) {
  		return primitiveFail();
  	}
  	semaIndex = stackIntegerValue(0);
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(1))));
  	if (failed()) {
  		return null;
  	}
  	fileDialogDoneSemaphore(dlgHandle, semaIndex);
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Get the current filter index from one of the previously chosen
  	filters. Arguments:
  	dlgHandle: Handle for the file dialog.
  	Return value: Filter index. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogGetFilterIndex */
  EXPORT(sqInt)
  primitiveFileDialogGetFilterIndex(void)
  {
      int dlgHandle;
      sqInt result;
  
  	if (!((methodArgumentCount()) == 1)) {
  		return primitiveFail();
  	}
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(0))));
  	if (failed()) {
  		return null;
  	}
  
  	/* inSmalltalk: 0 */
  	result = fileDialogGetFilterIndex(dlgHandle);
  	if (result == 0) {
  		return primitiveFail();
  	}
  	methodReturnInteger(result);
  	return 0;
  }
  
  
  /*	Primitive. Retrieve the result of the file dialog.
  	Arguments:
  	dlgHandle:	Handle of the file dialog.
  	Return value: String for choosen file, or nil if canceled */
  
  	/* FileDialogPlugin>>#primitiveFileDialogGetResult */
  EXPORT(sqInt)
  primitiveFileDialogGetResult(void)
  {
      char *cString;
      int dlgHandle;
  
  	if (!((methodArgumentCount()) == 1)) {
  		return primitiveFail();
  	}
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(0))));
  	if (!(failed())) {
  		cString = fileDialogGetResult(dlgHandle);
  		if (!(failed())) {
  			/* begin methodReturnStringOrNil: */
  			if (cString == null) {
  				methodReturnValue(nilObject());
  			}
  			else {
  				methodReturnString(cString);
  			}
  		}
  	}
  	return 0;
  }
  
  
  /*	Primitive. Set the callback semaphore to be used for running modal
  	dialogs. This is unimplemented (stubbed out) on all current platforms and
  	so it is obsolete. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogSetCallbackSemaphore */
  EXPORT(sqInt)
  primitiveFileDialogSetCallbackSemaphore(void)
  {
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Set the initial file name/path for the dialog.
  	Arguments:
  	dlgHandle: Handle for the file dialog.
  	filePath: Initial path for open dialog
  	Returns: Nothing. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogSetFile */
  EXPORT(sqInt)
  primitiveFileDialogSetFile(void)
  {
      int dlgHandle;
      char *dstPtr;
      char *filePath;
      sqInt obj;
      sqInt sz;
  
  	if (!((methodArgumentCount()) == 2)) {
  		return primitiveFail();
  	}
  	/* begin stackEphemeralStringValue: */
  	obj = stackValue(0);
  	if (!(isBytes(obj))) {
  		primitiveFailFor(PrimErrBadArgument);
  		filePath = null;
  		goto l1;
  	}
  	sz = byteSizeOf(obj);
  	dstPtr = alloca(sz + 1);
  	if (!dstPtr) {
  		primitiveFailFor(PrimErrNoCMemory);
  		filePath = null;
  		goto l1;
  	}
  	memcpy(dstPtr, firstIndexableField(obj), sz);
  	dstPtr[sz] = 0;
  	filePath = dstPtr;
  	l1:	/* end stackEphemeralStringValue: */;
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(1))));
  	if (failed()) {
  		return primitiveFailFor(PrimErrBadArgument);
  	}
  	fileDialogSetFile(dlgHandle, filePath);
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Set the current filter index from one of the previously chosen
  	filters. Arguments:
  	dlgHandle: Handle for the file dialog.
  	index: Current filter index.
  	Return value: Nothing. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogSetFilterIndex */
  EXPORT(sqInt)
  primitiveFileDialogSetFilterIndex(void)
  {
      int dlgHandle;
      sqInt index;
  
  	if (!((methodArgumentCount()) == 2)) {
  		return primitiveFail();
  	}
  	index = stackIntegerValue(0);
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(1))));
  	if (!(failed())) {
  		fileDialogSetFilterIndex(dlgHandle, index);
  		methodReturnReceiver();
  	}
  	return 0;
  }
  
  
  /*	Primitive. Set the label for the dialog.
  	Arguments:
  	dlgHandle: Handle for the file dialog.
  	dlgLabel: Dialog label.
  	Returns: Nothing. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogSetLabel */
  EXPORT(sqInt)
  primitiveFileDialogSetLabel(void)
  {
      int dlgHandle;
      char *dlgLabel;
      char *dstPtr;
      sqInt obj;
      sqInt sz;
  
  	if (!((methodArgumentCount()) == 2)) {
  		return primitiveFail();
  	}
  	/* begin stackEphemeralStringValue: */
  	obj = stackValue(0);
  	if (!(isBytes(obj))) {
  		primitiveFailFor(PrimErrBadArgument);
  		dlgLabel = null;
  		goto l1;
  	}
  	sz = byteSizeOf(obj);
  	dstPtr = alloca(sz + 1);
  	if (!dstPtr) {
  		primitiveFailFor(PrimErrNoCMemory);
  		dlgLabel = null;
  		goto l1;
  	}
  	memcpy(dstPtr, firstIndexableField(obj), sz);
  	dstPtr[sz] = 0;
  	dlgLabel = dstPtr;
  	l1:	/* end stackEphemeralStringValue: */;
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(1))));
  	if (failed()) {
  		return primitiveFailFor(PrimErrBadArgument);
  	}
  	fileDialogSetLabel(dlgHandle, dlgLabel);
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Set additional properties for a file dialog.
  	Arguments:
  	dlgHandle:	Handle of the file dialog.
  	propName:	Property name.
  	propValue: Boolean indication whether to turn it on or off.
  	Return value: Boolean, indicating whether the property is supported. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogSetProperty */
  EXPORT(sqInt)
  primitiveFileDialogSetProperty(void)
  {
      int dlgHandle;
      char *dstPtr;
      sqInt obj;
      char *propName;
      sqInt propValue;
      sqInt sz;
  
  	if (!((methodArgumentCount()) == 3)) {
  		return primitiveFail();
  	}
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(2))));
  	/* begin stackEphemeralStringValue: */
  	obj = stackValue(1);
  	if (!(isBytes(obj))) {
  		primitiveFailFor(PrimErrBadArgument);
  		propName = null;
  		goto l1;
  	}
  	sz = byteSizeOf(obj);
  	dstPtr = alloca(sz + 1);
  	if (!dstPtr) {
  		primitiveFailFor(PrimErrNoCMemory);
  		propName = null;
  		goto l1;
  	}
  	memcpy(dstPtr, firstIndexableField(obj), sz);
  	dstPtr[sz] = 0;
  	propName = dstPtr;
  	l1:	/* end stackEphemeralStringValue: */;
  	propValue = booleanValueOf(stackValue(0));
  	if (failed()) {
  		return primitiveFailFor(PrimErrBadArgument);
  	}
  	methodReturnBool(fileDialogSetProperty(dlgHandle, propName, propValue));
  	return 0;
  }
  
  
  /*	Primitive. Show the file dialog.
  	Arguments:
  	dlgHandle:	Handle of the file dialog.
  	fSaveAs:	Whether to show an 'open' or a 'save' style dialog.
  	Return value: Nothing. */
  
  	/* FileDialogPlugin>>#primitiveFileDialogShow */
  EXPORT(sqInt)
  primitiveFileDialogShow(void)
  {
      int dlgHandle;
      sqInt fSaveAs;
  
  	if (!((methodArgumentCount()) == 2)) {
  		return primitiveFail();
  	}
  	fSaveAs = booleanValueOf(stackValue(0));
  	dlgHandle = ((int) (positive32BitValueOf(stackValue(1))));
  	if (failed()) {
  		return null;
  	}
  	if (!(fileDialogShow(dlgHandle, fSaveAs))) {
  		return primitiveFail();
  	}
  	methodReturnReceiver();
  	return 0;
  }
  
  
  /*	Primitive. Query for a common file location.
  	Arguments:
  	location: String describing the common file location.
  	Return value: The path to the designated location.
  	Known locations:
  	'home' - the user's home directory
  	'desktop' - the user's desktop directory
  	
  	'temp' - the temp directory to use
  	'preferences' - the place to store (per user) app preferences
  	'applications' - the directory for installing applications
  	'fonts' - the directory to install fonts in the system
  	
  	'documents' - the users documents folder
  	'music' - the users default location for music
  	'pictures' - the users default location for pictures
  	'videos' - the users default location for videos
  	 */
  
  	/* FileDialogPlugin>>#primitiveGetFileLocation */
  EXPORT(sqInt)
  primitiveGetFileLocation(void)
  {
      char *cString;
      char *dstPtr;
      char *location;
      sqInt obj;
      sqInt sz;
  
  	if (!((methodArgumentCount()) == 1)) {
  		return primitiveFail();
  	}
  	/* begin stackEphemeralStringValue: */
  	obj = stackValue(0);
  	if (!(isBytes(obj))) {
  		primitiveFailFor(PrimErrBadArgument);
  		location = null;
  		goto l1;
  	}
  	sz = byteSizeOf(obj);
  	dstPtr = alloca(sz + 1);
  	if (!dstPtr) {
  		primitiveFailFor(PrimErrNoCMemory);
  		location = null;
  		goto l1;
  	}
  	memcpy(dstPtr, firstIndexableField(obj), sz);
  	dstPtr[sz] = 0;
  	location = dstPtr;
  	l1:	/* end stackEphemeralStringValue: */;
  	if (failed()) {
  		return primitiveFailFor(PrimErrBadArgument);
  	}
  	/* begin methodReturnStringOrNil: */
  	cString = ((char *) (fileDialogGetLocation(location)));
  	if (cString == null) {
  		methodReturnValue(nilObject());
  	}
  	else {
  		methodReturnString(cString);
  	}
  	return 0;
  }
  
  
  /*	Note: This is coded so that it can be run in Squeak. */
  
  	/* InterpreterPlugin>>#setInterpreter: */
  EXPORT(sqInt)
  setInterpreter(struct VirtualMachine *anInterpreter)
  {
      sqInt ok;
  
  
  	/* This may seem tautological, but in a real plugin it checks that the VM provides
  	   the version the plugin was compiled against which is the version the plugin expects. */
  	interpreterProxy = anInterpreter;
  	ok = ((interpreterProxy->majorVersion()) == (VM_PROXY_MAJOR))
  	 && ((interpreterProxy->minorVersion()) >= (VM_PROXY_MINOR));
  	if (ok) {
  		
  #if !defined(SQUEAK_BUILTIN_PLUGIN)
  		booleanValueOf = interpreterProxy->booleanValueOf;
  		byteSizeOf = interpreterProxy->byteSizeOf;
  		failed = interpreterProxy->failed;
  		firstIndexableField = interpreterProxy->firstIndexableField;
  		isBytes = interpreterProxy->isBytes;
  		methodArgumentCount = interpreterProxy->methodArgumentCount;
  		methodReturnBool = interpreterProxy->methodReturnBool;
  		methodReturnInteger = interpreterProxy->methodReturnInteger;
  		methodReturnReceiver = interpreterProxy->methodReturnReceiver;
  		methodReturnString = interpreterProxy->methodReturnString;
  		methodReturnValue = interpreterProxy->methodReturnValue;
  		nilObject = interpreterProxy->nilObject;
  		positive32BitValueOf = interpreterProxy->positive32BitValueOf;
  		primitiveFail = interpreterProxy->primitiveFail;
  		primitiveFailFor = interpreterProxy->primitiveFailFor;
  		stackIntegerValue = interpreterProxy->stackIntegerValue;
  		stackValue = interpreterProxy->stackValue;
  #endif /* !defined(SQUEAK_BUILTIN_PLUGIN) */
  	}
  	return ok;
  }
  
  
  #ifdef SQUEAK_BUILTIN_PLUGIN
  
  static char _m[] = "FileDialogPlugin";
  void* FileDialogPlugin_exports[][3] = {
  	{(void*)_m, "getModuleName", (void*)getModuleName},
  	{(void*)_m, "initialiseModule", (void*)initialiseModule},
  	{(void*)_m, "primitiveFileDialogAddFilter\000\377\000", (void*)primitiveFileDialogAddFilter},
  	{(void*)_m, "primitiveFileDialogCallbackReturn\000\377\000", (void*)primitiveFileDialogCallbackReturn},
  	{(void*)_m, "primitiveFileDialogCreate\000\377\000", (void*)primitiveFileDialogCreate},
  	{(void*)_m, "primitiveFileDialogDestroy\000\377\000", (void*)primitiveFileDialogDestroy},
  	{(void*)_m, "primitiveFileDialogDone\000\377\000", (void*)primitiveFileDialogDone},
  	{(void*)_m, "primitiveFileDialogDoneSemaphore\000\000\000", (void*)primitiveFileDialogDoneSemaphore},
  	{(void*)_m, "primitiveFileDialogGetFilterIndex\000\377\000", (void*)primitiveFileDialogGetFilterIndex},
  	{(void*)_m, "primitiveFileDialogGetResult\000\377\000", (void*)primitiveFileDialogGetResult},
  	{(void*)_m, "primitiveFileDialogSetCallbackSemaphore\000\377\000", (void*)primitiveFileDialogSetCallbackSemaphore},
  	{(void*)_m, "primitiveFileDialogSetFile\000\377\000", (void*)primitiveFileDialogSetFile},
  	{(void*)_m, "primitiveFileDialogSetFilterIndex\000\000\000", (void*)primitiveFileDialogSetFilterIndex},
  	{(void*)_m, "primitiveFileDialogSetLabel\000\377\000", (void*)primitiveFileDialogSetLabel},
  	{(void*)_m, "primitiveFileDialogSetProperty\000\377\000", (void*)primitiveFileDialogSetProperty},
  	{(void*)_m, "primitiveFileDialogShow\000\377\000", (void*)primitiveFileDialogShow},
  	{(void*)_m, "primitiveGetFileLocation\000\377\000", (void*)primitiveGetFileLocation},
  	{(void*)_m, "setInterpreter", (void*)setInterpreter},
  	{NULL, NULL, NULL}
  };
  
  #else // ifdef SQ_BUILTIN_PLUGIN
  
  #if SPURVM
  EXPORT(signed short) primitiveFileDialogDoneSemaphoreMetadata = 0;
  EXPORT(signed short) primitiveFileDialogSetFilterIndexMetadata = 0;
  #endif // SPURVM
  
  #endif // ifdef SQ_BUILTIN_PLUGIN
  