sources/format.h

changeset 14
33b8f428bacb
parent 11
cffa2777d917
child 15
33da84af4bba
--- a/sources/format.h	Sat Dec 13 04:50:33 2014 +0200
+++ b/sources/format.h	Sat Dec 13 07:36:00 2014 +0200
@@ -185,7 +185,7 @@
 {
 	FILE* handle;
 
-	if ((handle = fopen (filename, "w+")))
+	if ((handle = fopen (filename, "a")))
 	{
 		print_to (handle, fmtstr, args...);
 		fclose (handle);
@@ -193,10 +193,10 @@
 }
 
 // -------------------------------------------------------------------------------------------------
-// Prints the formatting result to stdout
+// Prints the formatting result to the console
 //
 template<typename... argtypes>
 void print (const String& fmtstr, const argtypes&... args)
 {
-	print_to (stdout, fmtstr, args...);
+	print_to_console (format (fmtstr, args...);
 }

mercurial