Replace "printf" calls with "Print", a wrapper

This commit is contained in:
2016-08-28 20:28:22 +02:00
committed by Valeriano A.R
parent 670e1e86eb
commit 05569184a5
5 changed files with 62 additions and 43 deletions

View File

@@ -1,8 +1,9 @@
// Copyright (C) 2011 Valeriano Alfonso Rodriguez (Kableado)
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "Util.h"
@@ -354,3 +355,23 @@ unsigned Rand_Get() {
return (val);
}
/////////////////////////////
// Print
//
// Prints the formated text
int Print(char *fmt, ...) {
va_list ap;
int n;
// Print
va_start(ap, fmt);
n = vprintf(fmt, ap);
va_end(ap);
// Flush
fflush(stdout);
return(n);
}