From ec8c38a73a1e4a61c5751e234c5ed71c7e8cbf96 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Thu, 25 Apr 2002 17:33:29 +0000
Subject: [PATCH] Added support for float output in logs. - Jette

---
 src/common/log.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/common/log.c b/src/common/log.c
index 44f191d565f..c5143481340 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -174,6 +174,12 @@ static char *vxstrfmt(const char *fmt, va_list ap)
 				xstrcat(buf, va_arg(ap, char *));
 				break;
 
+			case 'f':	/* "%f" => float (actually double)  */
+				snprintf(tmp2, sizeof(tmp2), "%f", 
+					 va_arg(ap, double));
+				xstrcat(buf, tmp2);
+				break;
+
 			default:	/* try to handle the rest  */
 
 				/* back up to `%' char */
-- 
GitLab