From 8e64d35dc33ba25d74bb5a48ce86db3893d1d7c9 Mon Sep 17 00:00:00 2001
From: jwindley <jwindley@unknown>
Date: Fri, 14 Nov 2003 19:00:57 +0000
Subject: [PATCH] Stringify large integers

---
 src/plugins/sched/dstring.h | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/plugins/sched/dstring.h b/src/plugins/sched/dstring.h
index 20c76543a8b..5ab3c4019fb 100644
--- a/src/plugins/sched/dstring.h
+++ b/src/plugins/sched/dstring.h
@@ -181,6 +181,20 @@ public:
 		sprintf( buf, fmt ? fmt : "%ld", val );
 		append( buf );
 	}
+
+	void append( const long int val, const char *fmt = NULL )
+	{
+		char buf[ 64 ];
+		sprintf( buf, fmt ? fmt : "%ld", val );
+		append( buf );
+	}
+
+	void append( const unsigned long int val, const char *fmt = NULL )
+	{
+		char buf[ 64 ];
+		sprintf( buf, fmt ? fmt : "%lu", val );
+		append( buf );
+	}
 	
 	void operator += ( const u_int32_t val )
 	{
@@ -190,7 +204,14 @@ public:
 	{
 		append( val );
 	}
-	
+	void operator += ( const long int val )
+	{
+		append( val );
+	}
+	void operator += ( const unsigned long int val )
+	{
+		append( val );
+	}
 	const size_t length( void ) const
 	{
 		return m_population;
-- 
GitLab