quiet debug output

This commit is contained in:
Jan-Piet Mens
2015-08-22 17:34:51 +02:00
parent 1e7175cd7b
commit 5e7ca6d743
2 changed files with 7 additions and 6 deletions

2
ocat.c
View File

@@ -221,7 +221,7 @@ int main(int argc, char **argv)
if ((json = lister(username, device, s_lo, s_hi)) != NULL) {
if ((arr = json_find_member(json, "results")) != NULL) { // get array
json_foreach(f, arr) {
printf("%s\n", f->string_);
// fprintf(stderr, "%s\n", f->string_);
locations(f->string_, obj, locs, s_lo, s_hi);
}
}

View File

@@ -56,7 +56,7 @@ static int str_time_to_secs(char *s, time_t *secs)
for (f = formats; f && *f; f++) {
if (strptime(s, *f, &tm) != NULL) {
success = 1;
fprintf(stderr, "str_time_to_secs succeeds with %s\n", *f);
// fprintf(stderr, "str_time_to_secs succeeds with %s\n", *f);
break;
}
}
@@ -71,10 +71,11 @@ static int str_time_to_secs(char *s, time_t *secs)
* effect for the specified time. */
*secs = mktime(&tm);
printf("str_time_to_secs: %s becomes %04d-%02d-%02d %02d:%02d:%02d\n",
s,
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
// fprintf(stderr, "str_time_to_secs: %s becomes %04d-%02d-%02d %02d:%02d:%02d\n",
// s,
// tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
// tm.tm_hour, tm.tm_min, tm.tm_sec);
return (1);
}