Commit 427bccf7 authored by claes's avatar claes

Output print changed

parent d5231b6b
...@@ -93,24 +93,23 @@ ini_RcReadAndSet( ...@@ -93,24 +93,23 @@ ini_RcReadAndSet(
cdh_ToLower(filename, filename); cdh_ToLower(filename, filename);
fp = fopen(filename, "r"); fp = fopen(filename, "r");
if (fp == NULL) { if (fp == NULL)
printf("** Could not read '%s'\n%s", filename, strerror(errno)); return 1;
} else {
printf("-- Reading rc file %s\n", filename); printf("-- Reading rc file %s\n", filename);
for ( for (
s = fgets(buf, sizeof(buf) - 1, fp); s = fgets(buf, sizeof(buf) - 1, fp);
s != NULL; s != NULL;
s = fgets(buf, sizeof(buf) - 1, fp) s = fgets(buf, sizeof(buf) - 1, fp)
) { ) {
printf("-- %s", buf); if (buf[0] == '#' || buf[0] == 0) continue;
if (buf[0] == '#') continue; printf("-- %s", buf);
name[0] = '\0'; name[0] = '\0';
sscanf(buf, "%s %d\n", name, &interval); sscanf(buf, "%s %d\n", name, &interval);
if (name[0] == '\0') continue; if (name[0] == '\0') continue;
setRcValue(def_rc, name, interval); setRcValue(def_rc, name, interval);
}
fclose(fp);
} }
fclose(fp);
return 1; return 1;
} }
...@@ -118,3 +117,4 @@ ini_RcReadAndSet( ...@@ -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