Commit 427bccf7 authored by claes's avatar claes

Output print changed

parent d5231b6b
......@@ -93,24 +93,23 @@ ini_RcReadAndSet(
cdh_ToLower(filename, filename);
fp = fopen(filename, "r");
if (fp == NULL) {
printf("** Could not read '%s'\n%s", filename, strerror(errno));
} else {
if (fp == NULL)
return 1;
printf("-- Reading rc file %s\n", filename);
for (
s = fgets(buf, sizeof(buf) - 1, fp);
s != NULL;
s = fgets(buf, sizeof(buf) - 1, fp)
) {
if (buf[0] == '#' || buf[0] == 0) continue;
printf("-- %s", buf);
if (buf[0] == '#') continue;
name[0] = '\0';
sscanf(buf, "%s %d\n", name, &interval);
if (name[0] == '\0') continue;
setRcValue(def_rc, name, interval);
}
fclose(fp);
}
return 1;
}
......@@ -118,3 +117,4 @@ ini_RcReadAndSet(
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment