From 2b87c219ca07aebcf6e8ff02009dca88babc04c3 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 7 May 2019 20:26:05 -0700 Subject: Introduce nni_plat_printf() This permits the stats dump to avoid some extra buffering, and resolves a complaint about possible format buffer overruns. --- src/core/platform.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/platform.h') diff --git a/src/core/platform.h b/src/core/platform.h index e415b438..1418ba4f 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -52,6 +52,11 @@ extern void nni_plat_abort(void); // not contain newlines, but the output will add them. extern void nni_plat_println(const char *); +// nni_plat_printf is like printf. It should conform to C99 standard printf, +// but is a function to allow platform ports to redirect. It should go to +// the same place that nni_plat_println does. +extern void nni_plat_printf(const char *, ...); + // nni_plat_strerror allows the platform to use additional error messages // for additional error codes. The err code passed in should be the // equivalent of errno or GetLastError, without the NNG_ESYSERR component. -- cgit v1.2.3-70-g09d2