aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2022-03-31 15:32:33 -0800
committerDavid M. Syzdek <david@syzdek.net>2022-03-31 15:32:33 -0800
commita10b176def2447563f5f5e6f0ddbad4044045e02 (patch)
tree5e5637df94fc33f74a66710dff12235acdd5c75e
parentf17dcc21a35a0ac7f22582132ee1c56330e93b13 (diff)
downloadtinyrad-a10b176def2447563f5f5e6f0ddbad4044045e02.tar.gz
tinyrad-a10b176def2447563f5f5e6f0ddbad4044045e02.tar.bz2
tinyrad-a10b176def2447563f5f5e6f0ddbad4044045e02.tar.xz
tinyrad-a10b176def2447563f5f5e6f0ddbad4044045e02.zip
tinyrad: adding tru_printf()
-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//--------------------------//