From 134f3170f6efa139b6e6825f2e45e454214f6551 Mon Sep 17 00:00:00 2001 From: tth Date: Fri, 1 Nov 2019 11:37:35 +0100 Subject: [PATCH] use verbosity flag --- files/t.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/t.c b/files/t.c index 62efd01..b26a437 100644 --- a/files/t.c +++ b/files/t.c @@ -35,7 +35,7 @@ fprintf(stderr, ">>> %s ( '%s' %p )\n", __func__, line, sref); */ ptr = strtok(line, "|"); cp = ltrim(rtrim(ptr)); -fprintf(stderr, "key [%s]\n", cp); +if (verbosity) fprintf(stderr, "key [%s]\n", cp); if ( ! isalpha(*cp)) { fprintf(stderr, "invalid key 0x%02x\n", *cp); return -2; @@ -48,7 +48,7 @@ if (NULL==ptr) { return -3; } cp = ltrim(rtrim(ptr)); -fprintf(stderr, "text [%s]\n", cp); +if (verbosity) fprintf(stderr, "text [%s]\n", cp); if (strlen(cp) > SZ_TEXT) { fprintf(stderr, "text too long\n"); return -4; @@ -60,7 +60,7 @@ if (NULL==ptr) { fprintf(stderr, "line to short\n"); return -6; } -fprintf(stderr, "path [%s]\n", ltrim(rtrim(ptr))); +if (verbosity) fprintf(stderr, "path [%s]\n", ltrim(rtrim(ptr))); if (strlen(ptr) > SZ_TEXT) { fprintf(stderr, "path too long\n"); return -5;