Exemplo n.º 1
0
// ---------------------------------------------------------------------
FskErr FskFSFileGetPathInfo(const char *rootpath, const char *filepath, FskFileInfo *itemInfo) {
	int err;
	STATTYPE statbuf;
	char	*fullpath;

	err = FskMemPtrNew(FskStrLen(rootpath) + FskStrLen(filepath) + 2, (FskMemPtr*)(void*)&fullpath);
	if (err)
		return err;

	FskStrCopy(fullpath, rootpath);
	FskStrCat(fullpath, "/");
	FskStrCat(fullpath, filepath);

	err = STAT(fullpath, &statbuf);
	if (err == -1) {
		err = errnoToFskErr(errno);
		goto bail;
	}

	GetFileInfoFromStat(&statbuf, itemInfo);

bail:
	FskMemPtrDispose(fullpath);
	if (err)
		FskMemSet(itemInfo, 0, sizeof(*itemInfo));
	return err;
}
Exemplo n.º 2
0
// ---------------------------------------------------------------------
FskErr FskFSFileOpen(const char *fullPath, UInt32 permissions, FskFSFile *frefOut) {
	FskErr		err;
	FskFSFile	fref;
	FskFileInfo itemInfo;

	if (frefOut)
		*frefOut = NULL;

	err = sCheckFullPath(fullPath, kFskPathIsFile);
	BAIL_IF_ERR(err);

	err = FskFSFileGetFileInfo(fullPath, &itemInfo);
	BAIL_IF_ERR(err);

	if (itemInfo.filetype == kFskDirectoryItemIsDirectory)
		BAIL(kFskErrIsDirectory);

	err = FskMemPtrNewClear(sizeof(FskFSFileRecord), (FskMemPtr*)(void*)&fref);
	BAIL_IF_NONZERO(err, err, kFskErrMemFull);

	fref->thePermissions = permissions;

	fref->theFile = FOPEN(fullPath, sPermsToPermStr(permissions));
	if (!fref->theFile) {
		FskMemPtrDispose(fref);
		BAIL(errnoToFskErr(errno));
	}

	*frefOut = fref;
	
bail:
	return err;
}
Exemplo n.º 3
0
// ---------------------------------------------------------------------
FskErr FskFSVolumeIteratorDispose(FskFSVolumeIterator volIt)
{
	if (volIt)
		FskMemPtrDispose(volIt);

	return kFskErrNone;
}
Exemplo n.º 4
0
void unpackAndroid() {
	char * src, *dst, buf[4096];
	int doit=0;
	UInt32 amt, amtWrt;
	FskFileInfo info, infoSrc;
	FskFile srcFref, dstFref;
	FskErr err;

	dst = FskStrDoCat(gAndroidCallbacks->getStaticDataDirCB(), "ca-bundle.crt");
	src = FskStrDoCat(gAndroidCallbacks->getStaticAppDirCB(), "/res/raw/kinoma.jet/ca-bundle.crt");
	if (kFskErrFileNotFound == FskFileGetFileInfo(dst, &info)) {
		fprintf(stderr, "dst: %s not found\n", dst);
		doit = 1;
	}
	else if (kFskErrNone == FskFileGetFileInfo(src, &infoSrc)) {
		if (infoSrc.filesize != info.filesize) {
			fprintf(stderr, "src size: %lld, dstSize: %lld\n", infoSrc.filesize, info.filesize);
			doit = 1;
		}
	}
	if (doit) {
		fprintf(stderr, "Need to copy it over.\n");
		err = FskFileOpen(src, kFskFilePermissionReadOnly, &srcFref);
		if (err) fprintf(stderr, "open %s failed %d\n", src, err);
		err = FskFileCreate(dst);
		if (err) fprintf(stderr, "create %s failed %d\n", dst, err);
		err = FskFileOpen(dst, kFskFilePermissionReadWrite, &dstFref);
		if (err) fprintf(stderr, "open %s failed %d\n", dst, err);
		while (kFskErrNone == err) {
			err = FskFileRead(srcFref, 4096, buf, &amt);
			if (err) fprintf(stderr, "read %s (%lu bytes) failed %d\n", src, amt, err);
			if (0 >= amt)
				break;
			while (amt) {
				err = FskFileWrite(dstFref, amt, buf, &amtWrt);
				if (err) fprintf(stderr, "write %s (%lu bytes) failed %d\n", dst, amt, err);
				amt -= amtWrt;
			}
		}
		err = FskFileClose(dstFref);
		if (err) fprintf(stderr, "close %s failed %d\n", src, err);
		err = FskFileClose(srcFref);
		if (err) fprintf(stderr, "close %s failed %d\n", src, err);
	}
	FskMemPtrDispose(src);
	FskMemPtrDispose(dst);
}
Exemplo n.º 5
0
FskErr loadGrammar(const char *xsbPath, xsGrammar *theGrammar)
{
	FskErr err;
	FskFile fref = NULL;
	UInt32 atom[2];

	err = FskFileOpen(xsbPath, kFskFilePermissionReadOnly, &fref);
	if (err) goto bail;

	err = FskFileRead(fref, sizeof(atom), atom, NULL);
	if (err) goto bail;

	atom[0] = FskEndianU32_BtoN(atom[0]);
	atom[1] = FskEndianU32_BtoN(atom[1]);
	if (atom[1] == 'XS11') {
		SInt32 totalSize = (SInt32)atom[0] - sizeof(atom);
		while (totalSize > 0) {
			UInt32 blockSize;
			char *block;

			err = FskFileRead(fref, sizeof(atom), atom, NULL);
			if (err) break;
			atom[0] = FskEndianU32_BtoN(atom[0]);
			atom[1] = FskEndianU32_BtoN(atom[1]);

			totalSize -= atom[0];

			blockSize = atom[0] - sizeof(atom);
			err = FskMemPtrNew(blockSize, &block);
			if (err) break;

			err = FskFileRead(fref, blockSize, block, NULL);
			if (err) break;

			switch (atom[1]) {
				case 'SYMB':
					theGrammar->symbols = block;
					theGrammar->symbolsSize = blockSize;
					break;

				case 'CODE':
					theGrammar->code = block;
					theGrammar->codeSize = blockSize;
					break;

				default:
					FskMemPtrDispose(block);
					err = kFskErrBadData;
					break;
			}
		}
	}
	else
		err = kFskErrBadData;

bail:
	FskFileClose(fref);
	return err;
}
Exemplo n.º 6
0
static FskErr
FillJaggyPolygonContours(
	UInt32					nContours,
	const UInt32			*nPts,
	const FskFixedPoint2D	*pts,
	const FskColorSource	*colorSource,
	SInt32					fillRule,
	const FskFixedMatrix3x2	*M,
	FskConstRectangle		clipRect,
	FskBitmap				dstBM
)
{
	FskRectangleRecord	dstRect;
	LinkedEdge			edges[MAX_EDGES], *pEdges = edges;	/* Small polygons use auto edges, large ones need to be alloc'ed */
	UInt32				numEdges, totPts;
	FskSpan				span;
	FskErr				err = kFskErrNone;
	SInt32				n;
	const UInt32		*np;
	LinkedEdge			*pe;
	static FskInitSpanProc	initProcs[] = {
								FskInitSolidColorSpan,
								FskInitLinearGradientSpan,
								FskInitRadialGradientSpan,
								FskInitTextureSpan,
								NULL						/* Procedure span is not yet implemented */
							};
	FskInitSpanProc		initSpan;

	if (clipRect == NULL)	dstRect = dstBM->bounds;
	else					if (!FskRectangleIntersect(&dstBM->bounds, clipRect, &dstRect)) return kFskErrNothingRendered;

	for (n = nContours, np = nPts, totPts = 0; n--; )
		totPts += *np++;

	FskInitSpan(&span, dstBM, sizeof(LinkedEdge));										/* Generic span init */
	initSpan =  initProcs[((n = colorSource->type) <= kFskColorSourceTypeMax) ? n : 0];
	if ((err = (*initSpan)(&span, dstBM, M, 0, colorSource)) != kFskErrNone)			/* Specialized span init - this may bump up the edge size */
		return err;
	span.edgeBytes = (span.edgeBytes + 3) & ~3;											/* Ceil up to multiple of 4 bytes */
	if (	CANT_USE_AUTO_EDGES(totPts)																							/* Either small enough for auto storage ... */
		&&	(err = (FskMemPtrNew(totPts * CLIP_MULTIPLIER * sizeof(LinkedEdge), (FskMemPtr*)(void*)(&pEdges))) != kFskErrNone)	/* ... or we can allocate memory */
	)
		return err;																		/* Polygon is too big to render */

	for (numEdges = 0, pe = pEdges; nContours--; pts += *nPts++, numEdges += n, pe += n)
		BAIL_IF_NEGATIVE(n = TransformClipAndMakeEdges(*nPts, pts, M, &dstRect, &span, pe), err, kFskErrMemFull);
	BAIL_IF_FALSE(numEdges >= 2, err, kFskErrNothingRendered);
	err = ScanConvertLinkedEdges(numEdges, pEdges, fillRule, &span);

bail:
	if (pEdges != edges)
		FskMemPtrDispose(pEdges);	/* Deallocate big polygon edges */

	if ((span.disposeSpanData != NULL) && (span.spanData != NULL))
		span.disposeSpanData(span.spanData);

	return err;
}
Exemplo n.º 7
0
static void
kcl_int_free(cint_t *ai)
{
	if (ai->cint_data != NULL) {
		FskMemPtrDispose(ai->cint_data);
		ai->cint_data = NULL;
	}
}
Exemplo n.º 8
0
void mraaPWMDispose(FskPinPWM pin)
{
	mraaPWM mpwm = (mraaPWM)pin;
	mraaPWMSetDutyCycle(pin, 0);
	mraa_pwm_enable(mpwm->context, 0);
	mraa_pwm_close(mpwm->context);
	FskMemPtrDispose(mpwm);
}
Exemplo n.º 9
0
FskErr androidAudioOutDispose(FskAudioOut audioOut) {
	androidAudioExt *ext;

	FskAudioNativePrintfVerbose("audioOutDispose %x", audioOut);
	if (audioOut == NULL)
		return kFskErrNone;
	ext = (androidAudioExt*)audioOut->ext;

	FskAudioNativePrintfVerbose("audioOutDispose ext is %x", ext);
	if (ext) {
		androidAudioOutStop(audioOut);
audioOut->ext = 0;

		FskListMutexRemove(audioOuts, audioOut);

		FskAudioNativePrintfDebug("removing audioOut->blocks list %x", audioOut->blocks);
		FskListMutexDispose(audioOut->blocks);
		FskMutexDispose(ext->getSamplePositionMutex);

		if (ext->playItf) {
			SLresult	res;
 			FskAudioNativePrintfDebug("before delete ext->playItf: %x", ext->playItf);
			res = (*ext->playItf)->SetPlayState(ext->playItf, SL_PLAYSTATE_STOPPED);
			CheckErr("audioOutDispose - set playstate STOPPED", res);
			res = (*ext->bufferQueueItf)->Clear(ext->bufferQueueItf);
			CheckErr("audioOutDispose - calling clear on bufferQueue", res);

 			FskAudioNativePrintfDebug("after delete ext->playItf: %x", ext->playItf);
 		}

		if (ext->audioBuf[0])
			FskMemPtrDispose(ext->audioBuf[0]);
		if (ext->audioBuf[1])
			FskMemPtrDispose(ext->audioBuf[1]);

		if (ext->player != NULL)
			(*ext->player)->Destroy(ext->player);
		if (ext->outputMixObject != NULL)
			(*ext->outputMixObject)->Destroy(ext->outputMixObject);

		FskMemPtrDispose(ext);
	}

	FskMemPtrDispose(audioOut);
	return kFskErrNone;
}
Exemplo n.º 10
0
void xs_i2c(void *data)
{
    if (data) {
        xsI2C i2c = data;
        FskPinI2CDispose(i2c->pin);
        FskMemPtrDispose(i2c);
    }
}
Exemplo n.º 11
0
FskErr KplSemaphoreDispose(KplSemaphore sem)
{
	if (sem) {
		sem_destroy(&sem->hSem);
		FskMemPtrDispose(sem);
	}
	return kFskErrNone;
}
Exemplo n.º 12
0
// ---------------------------------------------------------------------
FskErr FskFSFileClose(FskFSFile fref) {
	if (fref) {
		fclose(fref->theFile);
		FskMemPtrDispose(fref);
	}

	return kFskErrNone;
}
Exemplo n.º 13
0
FskErr FskFSFileTerminate()
{
	if (gStatFS != NULL) {
		FskMemPtrDispose(gStatFS);
		gStatFS = NULL;
	}
	return kFskErrNone;
}
Exemplo n.º 14
0
void KplTimeCallbackDispose(KplTimeCallback callback)
{
	if (NULL == callback)
		return;

	KplTimeCallbackCancel(callback);
	FskMemPtrDispose(callback);
}
Exemplo n.º 15
0
void KprHTTPConnectionDispose(KprHTTPConnection self)
{
	if (self->client) {
		KprHTTPConnectionClose(self);
	}
	FskInstrumentedItemDispose(self);
	FskMemPtrDispose(self);
}
Exemplo n.º 16
0
FskErr KplAudioDispose(KplAudio audio)
{
	FskErr err = kFskErrNone;

    if (!audio) goto bail;

	if (audio->thread) {
		audio->stopping = true;
		FskThreadJoin(audio->thread);
	}
	KplMutexDispose(audio->mutex);
	audio->mutex = NULL;
	FskMemPtrDispose(audio->data);
	FskMemPtrDispose(audio);
bail:
	return err;
}
Exemplo n.º 17
0
void KprDebugDispose(KprDebug self)
{
	if (self) {
		KprDebugClose(self);
		FskInstrumentedItemDispose(self);
		FskMemPtrDispose(self);
	}
}
Exemplo n.º 18
0
void KPR_Message(xsMachine* the)
{
	xsStringValue url = NULL;
	KprMessage self = NULL;
	xsTry {
		xsThrowIfFskErr(KprMessageURL(xsGetContext(the), xsToString(xsArg(0)), &url));
		xsThrowIfFskErr(KprMessageNew(&self, url));
		xsSetHostData(xsThis, self);
		FskInstrumentedItemSendMessageDebug(self, kprInstrumentedMessageConstruct, self);
		self->usage++; // host
		FskMemPtrDispose(url);
	}
	xsCatch {
		FskMemPtrDispose(url);
		xsThrow(xsException);
	}
}
Exemplo n.º 19
0
void on_drag_data_received(GtkWidget* widget, GdkDragContext* context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data)
{
	FskGtkWindow gtkWin = user_data;
	gboolean dnd_success = FALSE;
	FskDragDropFile dropFileList = NULL;
	FskDragDropFile droppedFile = NULL;
	char* path = NULL;
	if (gdk_drag_context_get_suggested_action(context) == GDK_ACTION_COPY) {
		char* string = (char*)gtk_selection_data_get_data(data);
		char* end;
		FskFileInfo itemInfo;
		for (end = FskStrStr(string, "\r\n"); end; end = FskStrStr(string, "\r\n")) {
			BAIL_IF_ERR(FskMemPtrNewClear(sizeof(FskDragDropFileRecord), (FskMemPtr*)&droppedFile));
			FskListAppend((FskList *)&dropFileList, droppedFile);
			*end = 0;
			BAIL_IF_ERR(KprURLToPath(string, &path));
			BAIL_IF_ERR(FskFileGetFileInfo(path, &itemInfo));
			if (itemInfo.filetype == kFskDirectoryItemIsDirectory) {
				int length = FskStrLen(path);
				BAIL_IF_ERR(FskMemPtrNew(length + 2, &droppedFile->fullPathName));
				FskMemCopy(droppedFile->fullPathName, path, length);
				droppedFile->fullPathName[length] = '/';
				droppedFile->fullPathName[length + 1] = 0;
				FskMemPtrDispose(path);
			}
			else {
				droppedFile->fullPathName = path;
			}
			path = NULL;
			string = end + 2;
			*end = '\r';
		}
		(*gDropTargetProc)(kFskDragDropTargetEnterWindow, x, y, dropFileList, gtkWin->owner);
		(*gDropTargetProc)(kFskDragDropTargetDropInWindow, x, y, dropFileList, gtkWin->owner);
		dnd_success = TRUE;
	}
bail:
	gtk_drag_finish(context, dnd_success, TRUE, time);
	FskMemPtrDispose(path);
	while (NULL != dropFileList) {
		droppedFile = dropFileList;
		FskListRemove((FskList *)&dropFileList, droppedFile);
		FskMemPtrDispose(droppedFile->fullPathName);
		FskMemPtrDispose(droppedFile);
	}
}
Exemplo n.º 20
0
void KprSSDPClientDispose(KprSSDPClient self)
{
	if (!self) return;
	if (FskListContains(&gKprSSDPClients, self)) {
		(void)KprSSDPClientStop(self);
	}
	if (self->services) {
		UInt32 i;
		for (i = 0; self->services[i]; i++) {
			FskMemPtrDispose(self->services[i]);
		}
		FskMemPtrDispose(self->services);
	}
	FskMemPtrDispose(self->type);
	FskInstrumentedItemDispose(self);
	FskMemPtrDispose(self);
}
Exemplo n.º 21
0
FskErr KplDirectoryIteratorNew(const char *directoryPath, UInt32 flags, KplDirectoryIterator *dirIt)
{
	KplDirectoryIterator di = NULL;
	FskErr	err;
	KplFileInfo itemInfo;

	if (directoryPath[FskStrLen(directoryPath) -1] != '/') {
		err = kFskErrInvalidParameter;
		goto bail;
	}

	err = KplFileGetFileInfo(directoryPath, &itemInfo);
	if (err) goto bail;

	if (itemInfo.filetype != kKplDirectoryItemIsDirectory) {
		err = kFskErrNotDirectory;
		goto bail;
	}

	err = FskMemPtrNew(sizeof(KplDirectoryIteratorRecord), (FskMemPtr*)&di);
	if (err != kFskErrNone)
		return err;

    di->flags = flags;
	di->root = (unsigned char *)FskStrDoCopy(directoryPath);

	di->theDir = opendir(directoryPath);
	if (di->theDir == NULL) {
		FskMemPtrDispose(di->root);
		err = errnoToFskErr(err);
		goto bail;
	}

	*dirIt = (KplDirectoryIterator)di;
	err = kFskErrNone;

bail:
	if (err) {
		if (di && di->root)
			FskMemPtrDispose(di->root);
		if (di)
			FskMemPtrDispose(di);
	}
	return err;
}
Exemplo n.º 22
0
    // t7 like platform - TODO
void scanVolumes() {
	int err;
	volInfo	vi, walker;
	struct statfs fsinfo;

// ROOT
	FskMemPtrNewClear(sizeof(volInfoRec), &vi);
	vi->type = kKplVolumeTypeFixed;
	vi->removable = false;
	vi->mounted = true;
	vi->typeStr = FskStrDoCopy("ext4");

	vi->mountPoint = FskStrDoCopy("/\0");
	vi->name = FskStrDoCopy("/\0");
	err = statfs("/", &fsinfo);
	vi->capacity = fsinfo.f_blocks * fsinfo.f_bsize;
	vi->remaining = fsinfo.f_bavail * fsinfo.f_bsize;
	vi->fsid = fsinfo.f_fsid;
	FskListAppend(&volumeList, vi);
//fprintf(stderr, " fsid: %d:%d, capacity: %d, remaining: %d\n", vi->fsid.__val[0], vi->fsid.__val[1], vi->capacity, vi->remaining);

// SDCARD - there may be a better way to do this
	FskMemPtrNewClear(sizeof(volInfoRec), &vi);
	vi->type = kKplVolumeTypeSDMemory;
	vi->removable = true;
	vi->mounted = true;
	vi->typeStr = FskStrDoCopy("vfat");

	vi->mountPoint = FskStrDoCopy("/mnt/external_sdcard/\0");
	vi->name = FskStrDoCopy("sdcard\0");
	vi->fsid.__val[0] = -1;
	vi->fsid.__val[1] = -1;
	err = statfs("/mnt/sdcard", &fsinfo);
	if (0 == err) {
		walker = volumeList;
		while (walker) {
			if ((fsinfo.f_fsid.__val[0] == walker->fsid.__val[0])
				&& (fsinfo.f_fsid.__val[1] == walker->fsid.__val[1])) {
				// same fsid - it's not a different mount
				break;
			}
			walker = walker->next;
		}
		if (!walker) {		// didn't find an entry with the same fsid
			vi->mounted = true;
			vi->fsid = fsinfo.f_fsid;
			vi->capacity = fsinfo.f_blocks * fsinfo.f_bsize;
			vi->remaining = fsinfo.f_bavail * fsinfo.f_bsize;
//fprintf(stderr, " fsid: %d:%d, capacity: %d, remaining: %d\n", vi->fsid.__val[0], vi->fsid.__val[1], vi->capacity, vi->remaining);
		}
	}
	if (vi->fsid.__val[0] == -1 && vi->fsid.__val[1] == -1) {
		FskMemPtrDispose(vi);
	}
	else
		FskListAppend(&volumeList, vi);
}
Exemplo n.º 23
0
void mraaDigitalDispose(FskPinDigital pin)
{
	mraaDigital md = (mraaDigital)pin;

	if (md->context)
		mraa_gpio_close(md->context);

	FskMemPtrDispose(pin);
}
Exemplo n.º 24
0
void KPR_mergeURI(xsMachine *the)
{
	xsStringValue base = xsToString(xsArg(0));
	xsStringValue url = xsToString(xsArg(1));
	xsStringValue target;
	xsThrowIfFskErr(KprURLMerge(base, url, &target));
	xsResult = xsString(target);
	FskMemPtrDispose(target);
}
Exemplo n.º 25
0
FskErr KplMutexDispose(KplMutex mutex)
{
	if (mutex) {
		pthread_mutex_destroy(&mutex->mutex);
		FskMemPtrDispose(mutex);
	}

	return kFskErrNone;
}
Exemplo n.º 26
0
FskErr winTextDispose(FskTextEngineState state)
{
	if (state) {
		DeleteDC(state->dc);
		FskMemPtrDispose(state);
	}

	return kFskErrNone;
}
Exemplo n.º 27
0
FskErr FskHTTPServerListenerDispose(FskHTTPServerListener listener) {
	FskInstrumentedTypePrintfDebug(&gFskHTTPServerTypeInstrumentation, "httpServerListenerDispose - listener: %p\n", listener);
	if (listener) {
		if (listener->http && listener->http->listeners)
			FskListRemove((FskList*)&listener->http->listeners, listener);
		if (listener->handshaking) {
			FskInstrumentedTypePrintfDebug(&gFskHTTPServerTypeInstrumentation, "httpServerListenerDispose - listener: %p - wait for handshaking\n", listener);
			listener->http = NULL;
		}
		else {
			FskThreadRemoveDataHandler(&listener->dataHandler);
			FskNetSocketClose(listener->skt);
			FskMemPtrDispose(listener->ifcName);
			FskMemPtrDispose(listener);
		}
	}
	return kFskErrNone;
}
Exemplo n.º 28
0
void KprZeroconfServiceForget(KprService self, char* authority, char* id)
{
	FskErr err = kFskErrNone;
	char* type = NULL;
	KprZeroconfBrowser browser = NULL;
	bailIfError(KprZeroconfServiceNewType(id, &type));
	browser = KprZeroconfBrowserFind(gKprZeroconfBrowsers, type);
	if (browser) {
		FskListRemove(&gKprZeroconfBrowsers, browser);
		bailIfError(KprZeroconfBrowserStop(browser));
		KprZeroconfBrowserDispose(browser);
	}
bail:
	FskMemPtrDispose(type);
	FskMemPtrDispose(authority);
	FskMemPtrDispose(id);
	return;
}
Exemplo n.º 29
0
void KprLibrarySessionDispose(KprLibrarySession self)
{
    if (self) {
        if (self->file.file)
            KprFileServerClose(self);
        else if (self->http.client)
            KprProxyServerClose(self);
        else
            KprDataServerClose(self);
        FskMemPtrDispose(self->authorization);
        FskMemPtrDispose(self->url);
        FskMemPtrDispose(self->mime);
        FskMemPtrDispose(self->info);
        FskHTTPServerRequestSetRefcon(self->request, NULL);
        FskInstrumentedItemDispose(self);
        KprMemPtrDispose(self);
    }
}
Exemplo n.º 30
0
void fxOpenProfileFile(txMachine* the, char* theName)
{ 
	FskFile fref;
	char *applicationPath = NULL;
	char *profilePath = NULL;
	if (the->profileDirectory)
		profilePath = FskStrDoCat(the->profileDirectory, theName);
	else {
		applicationPath = FskEnvironmentDoApply(FskStrDoCopy("[applicationPath]"));
		profilePath = FskStrDoCat(applicationPath, theName);
	}
	FskFileDelete(profilePath);
	FskFileCreate(profilePath);
	if (kFskErrNone == FskFileOpen(profilePath, kFskFilePermissionReadWrite, &fref))
		the->profileFile = fref;
	FskMemPtrDispose(profilePath);
	FskMemPtrDispose(applicationPath);
}