aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/tru/tinyradutil.c17
-rw-r--r--src/tru/tinyradutil.h7
2 files changed, 24 insertions, 0 deletions
diff --git a/src/tru/tinyradutil.c b/src/tru/tinyradutil.c
index 71f725d..05f3b89 100644
--- a/src/tru/tinyradutil.c
+++ b/src/tru/tinyradutil.c
@@ -277,6 +277,23 @@ tru_errors(
277} 277}
278 278
279 279
280int
281tru_printf(
282 TinyRadUtilConf * cnf,
283 const char * fmt,
284 ... )
285{
286 int rc;
287 va_list args;
288 if ((cnf->opts & TRUTILS_OPT_QUIET))
289 return(0);
290 va_start(args, fmt);
291 rc = vprintf(fmt, args);
292 va_end(args);
293 return(rc);
294}
295
296
280//-------------------------// 297//-------------------------//
281// miscellaneous functions // 298// miscellaneous functions //
282//-------------------------// 299//-------------------------//
diff --git a/src/tru/tinyradutil.h b/src/tru/tinyradutil.h
index 78b3b1d..9fbaf8d 100644
--- a/src/tru/tinyradutil.h
+++ b/src/tru/tinyradutil.h
@@ -194,6 +194,13 @@ tru_errors(
194 char ** errs ); 194 char ** errs );
195 195
196 196
197int
198tru_printf(
199 TinyRadUtilConf * cnf,
200 const char * fmt,
201 ... );
202
203
197//--------------------------// 204//--------------------------//
198// miscellaneous prototypes // 205// miscellaneous prototypes //
199//--------------------------// 206//--------------------------//