mirror of
https://github.com/vivier/EMILE.git
synced 2025-03-11 08:32:45 +00:00
improve list scan
This commit is contained in:
parent
979196f410
commit
de3844b97d
@ -195,16 +195,23 @@ int main(int argc, char** argv)
|
||||
printf("timeout %ld\n", strtol(property, NULL, 0));
|
||||
|
||||
current = 0;
|
||||
res = config_get_property(configuration + current,
|
||||
"title", title);
|
||||
if (res != -1)
|
||||
printf("title %s\n", title);
|
||||
for (index = 0; index < 20; index++)
|
||||
{
|
||||
current += res;
|
||||
current = config_get_next_property(configuration,
|
||||
current,
|
||||
NULL, NULL);
|
||||
res = config_get_property(configuration + current,
|
||||
"title", title);
|
||||
if (res == -1)
|
||||
{
|
||||
if (index)
|
||||
break;
|
||||
}
|
||||
else {
|
||||
printf("title %s\n", title);
|
||||
current += res;
|
||||
current = config_get_next_property(
|
||||
configuration,
|
||||
current,
|
||||
NULL, NULL);
|
||||
}
|
||||
for (i = 0; known_properties[i] != NULL; i++)
|
||||
{
|
||||
if (config_get_indexed_property(
|
||||
@ -217,11 +224,6 @@ int main(int argc, char** argv)
|
||||
known_properties[i],
|
||||
property);
|
||||
}
|
||||
res = config_get_property(configuration + current,
|
||||
"title", title);
|
||||
if (res == -1)
|
||||
break;
|
||||
printf("title %s\n", title);
|
||||
}
|
||||
|
||||
free(configuration);
|
||||
|
Loading…
x
Reference in New Issue
Block a user