Beispiel #1
0
void UAE::RefsReceived(BMessage *msg)
{
	if (!IsLaunching())
		return;

	entry_ref ref;

	if (msg->FindRef("refs", &ref) == B_NO_ERROR)
	{
		BEntry entry(&ref);
		if (entry.InitCheck() == B_NO_ERROR)
		{
			BPath path;
			entry.GetPath(&path);

			// set default settings entry
			// gSettingsEntry = new BEntry(entry);

			int32_t argc = 3;
			char **argv = new char *[argc];

			argv[0] = argvCopy[0];	// fake command line arguments
			argv[1] = "-f";
			argv[2] = (char *)path.Path();

			freeCopiedArgs();
			copyArgs(argc,argv);
		}
	}
}
Beispiel #2
0
int PV_Arguments::initialize(int argc, char * argv[], bool allowUnrecognizedArguments) {
   if (argc<=0) {
      pvError().printf("PV_Arguments: argc must be positive (called with argc=%d)\n", argc);
   }
   numArgs = argc;
   args = copyArgs(argc, argv);
   return setStateFromCmdLineArgs(allowUnrecognizedArguments);
}