Exemplo n.º 1
0
void CGuiManager::GetFileDescription(const char* aFileName, char* buffer, size_t size)
{
	bool isMulti;
	const char* ext = nullptr;
	CFileType* ft = getFT(aFileName, isMulti, &ext);

	if (!ft || isMulti)
		snprintf(buffer, size, ".%s file", ext);
	else
		strncpy(buffer, ft->description, size);
}
Exemplo n.º 2
0
IFileIcon* CGuiManager::GetFileIcon(const char* aFileName)
{
	bool isMulti;
	CFileType* ft = getFT(aFileName, isMulti);

	if (!ft)
		return oFiGeneric.getSelf();

	if (isMulti)
		return oFiConflict.getSelf();

	IFileIcon* ico = ft->opensWith->GetFileIcon();
	return ico ? ico : oFiGeneric.getSelf();
}
Exemplo n.º 3
0
void CGuiManager::OpenFile(const char* aFileName)
{
	bool isMulti;
	CFileType* ft = getFT(aFileName, isMulti);

	if (!ft)
		return;

	CAppData* app = ft->opensWith;

	if (isMulti)
	{
		// TODO: app selector :D
		app = nullptr;
	}

	printf("Opens with %p (isMulti=%d)\n", app, isMulti);

	if (!app)
		return;

	app->Run(aFileName);
}
Exemplo n.º 4
0
void DIV_S(unsigned long word)
{	//03 (03)
    sprintf(dis_op, "div.s\t%s, %s, %s", fpr_rn[getFD(word)], fpr_rn[getFS(word)], fpr_rn[getFT(word)]);
}
Exemplo n.º 5
0
void MUL_S(unsigned long word)
{	//02 (02)
    sprintf(dis_op, "mul.s\t%s, %s, %s", fpr_rn[getFD(word)], fpr_rn[getFS(word)], fpr_rn[getFT(word)]);
}
Exemplo n.º 6
0
void SUB_S(unsigned long word)
{	//01 (01)
    sprintf(dis_op, "sub.s\t%s, %s, %s", fpr_rn[getFD(word)], fpr_rn[getFS(word)], fpr_rn[getFT(word)]);
}
Exemplo n.º 7
0
//COP1.S
void ADD_S(unsigned long word)
{	//00 (00)
    sprintf(dis_op, "add.s\t%s, %s, %s", fpr_rn[getFD(word)], fpr_rn[getFS(word)], fpr_rn[getFT(word)]);
}