Example #1
0
FILE *moduleripper_fopen (const char *aname, const char *amode)
{
	TCHAR tmp2[MAX_DPATH];
	TCHAR tmp[MAX_DPATH];
	TCHAR *name, *mode;
	FILE *f;

	fetch_ripperpath (tmp, sizeof tmp);
	name = au (aname);
	mode = au (amode);
	_stprintf (tmp2, _T("%s%s"), tmp, name);
	f = uae_tfopen (tmp2, mode);
	xfree (mode);
	xfree (name);
	return f;
}
Example #2
0
static void moduleripper_filename(const char *aname, TCHAR *out, bool fullpath)
{
	TCHAR tmp[MAX_DPATH];
	TCHAR img[MAX_DPATH];
	TCHAR *name;

	fetch_ripperpath(tmp, sizeof tmp / sizeof(TCHAR));

	img[0] = 0;
	if (currprefs.floppyslots[0].dfxtype >= 0)
		_tcscpy(img, currprefs.floppyslots[0].df);
	else if (currprefs.cdslots[0].inuse)
		_tcscpy(img, currprefs.cdslots[0].name);
	if (img[0]) {
		namesplit(img);
		_tcscat(img, _T("_"));
	}

	name = au(aname);
	if (!fullpath)
		tmp[0] = 0;
	_stprintf(out, _T("%s%s%s"), tmp, img, name);
	xfree(name);
}