mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
@@ -53,8 +53,12 @@ void ion_main(int argc, const char * const argv[]) {
|
|||||||
const char * appNames[] = {"home", EPSILON_APPS_NAMES};
|
const char * appNames[] = {"home", EPSILON_APPS_NAMES};
|
||||||
for (int j = 0; j < AppsContainer::sharedAppsContainer()->numberOfApps(); j++) {
|
for (int j = 0; j < AppsContainer::sharedAppsContainer()->numberOfApps(); j++) {
|
||||||
App::Snapshot * snapshot = AppsContainer::sharedAppsContainer()->appSnapshotAtIndex(j);
|
App::Snapshot * snapshot = AppsContainer::sharedAppsContainer()->appSnapshotAtIndex(j);
|
||||||
int cmp = strcmp(argv[i]+2, appNames[j]);
|
// Compare name in order to find if the firsts chars which are different are NULL and '-'
|
||||||
if (cmp == '-') {
|
// -> check if the app name is in the argv
|
||||||
|
const char * s1 = argv[i]+2;
|
||||||
|
const char * s2 = appNames[j];
|
||||||
|
while (*s1 != '\0' && (*s1 == *s2)) {s1++; s2++;}
|
||||||
|
if (*s2 == '\0' && *s1 == '-') {
|
||||||
snapshot->setOpt(argv[i]+2+strlen(appNames[j])+1, argv[i+1]);
|
snapshot->setOpt(argv[i]+2+strlen(appNames[j])+1, argv[i+1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user