libc: Remove printf-like functions

They are too big for the Trusted Firmware, and it can be confusing to
have two versions of the same functions with different names. tf_printf
and tf_snprintf will replace them in the next patch.

Change-Id: I978414ac169cc3156e249549ef101a70eb31a295
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
Antonio Nino Diaz 2018-08-15 16:54:55 +01:00
parent 90f2d452a8
commit 7addcb33ef
2 changed files with 0 additions and 584 deletions

View file

@ -1,36 +0,0 @@
/*
* Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdio.h>
#include <stdarg.h>
/* Choose max of 128 chars for now. */
#define PRINT_BUFFER_SIZE 128
int printf(const char *fmt, ...)
{
va_list args;
char buf[PRINT_BUFFER_SIZE];
int count;
va_start(args, fmt);
vsnprintf(buf, sizeof(buf) - 1, fmt, args);
va_end(args);
/* Use putchar directly as 'puts()' adds a newline. */
buf[PRINT_BUFFER_SIZE - 1] = '\0';
count = 0;
while (buf[count])
{
if (putchar(buf[count]) != EOF) {
count++;
} else {
count = EOF;
break;
}
}
return count;
}