initiaql check-in, moved repository -- no-longer a fork of
haikuarchives/yab
This commit is contained in:
43
yab-IDE/BuildFactory/parts/YabMain.cpp.end
Normal file
43
yab-IDE/BuildFactory/parts/YabMain.cpp.end
Normal file
@@ -0,0 +1,43 @@
|
||||
for(int i=1; i<argc; i++)
|
||||
{
|
||||
if(argv[i][0]!='-')
|
||||
{
|
||||
BFile file(argv[i], B_READ_ONLY);
|
||||
if(file.InitCheck()==B_OK)
|
||||
{
|
||||
char readData[1024];
|
||||
int pos;
|
||||
file.Read(readData,1024);
|
||||
BString tmpString(readData);
|
||||
pos = tmpString.IFindFirst("MIMETYPE");
|
||||
if(pos!=B_ERROR)
|
||||
{
|
||||
int quote1, quote2;
|
||||
quote1 = tmpString.FindFirst("\"",pos);
|
||||
if(quote1!=B_ERROR)
|
||||
{
|
||||
quote2 = tmpString.FindFirst("\"",quote1+1);
|
||||
if(quote2!=B_ERROR)
|
||||
{
|
||||
tmp.SetTo("");
|
||||
tmpString.CopyInto(tmp,quote1+1,quote2-quote1-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
strcpy(t,tmp.String());
|
||||
return (const char*)t;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ret;
|
||||
YabInterface *yabInterface = new YabInterface(argc, argv, readSignature(argc, argv));
|
||||
yabInterface->Run();
|
||||
ret = yabInterface->GetErrorCode();
|
||||
delete yabInterface;
|
||||
return ret;
|
||||
}
|
||||
Reference in New Issue
Block a user