comparison th_util.c @ 469:fe5b803ae449

Rename the global variable th_verbosityLevel to th_verbosity.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 04 Jun 2018 02:41:27 +0300
parents bbe3c9175d77
children 167b66942c24
comparison
equal deleted inserted replaced
468:bbe3c9175d77 469:fe5b803ae449
11 11
12 12
13 /* Default settings 13 /* Default settings
14 */ 14 */
15 static BOOL th_initialized = FALSE; 15 static BOOL th_initialized = FALSE;
16 int th_verbosityLevel = 2; 16 int th_verbosity = 2;
17 char *th_prog_name = NULL, 17 char *th_prog_name = NULL,
18 *th_prog_desc = NULL, 18 *th_prog_desc = NULL,
19 *th_prog_version = NULL, 19 *th_prog_version = NULL,
20 *th_prog_author = NULL, 20 *th_prog_author = NULL,
21 *th_prog_license = NULL; 21 *th_prog_license = NULL;
87 87
88 void THMSG_V(int level, const char *fmt, va_list ap) 88 void THMSG_V(int level, const char *fmt, va_list ap)
89 { 89 {
90 assert(th_initialized == TRUE); 90 assert(th_initialized == TRUE);
91 91
92 if (th_verbosityLevel >= level) 92 if (th_verbosity >= level)
93 { 93 {
94 fprintf(stderr, "%s: ", th_prog_name); 94 fprintf(stderr, "%s: ", th_prog_name);
95 vfprintf(stderr, fmt, ap); 95 vfprintf(stderr, fmt, ap);
96 } 96 }
97 } 97 }
99 99
100 void THPRINT_V(int level, const char *fmt, va_list ap) 100 void THPRINT_V(int level, const char *fmt, va_list ap)
101 { 101 {
102 assert(th_initialized == TRUE); 102 assert(th_initialized == TRUE);
103 103
104 if (th_verbosityLevel >= level) 104 if (th_verbosity >= level)
105 { 105 {
106 vfprintf(stderr, fmt, ap); 106 vfprintf(stderr, fmt, ap);
107 } 107 }
108 } 108 }
109 109