mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 12:34:19 +00:00

To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file. NOTE: Files that have been imported by FreeBSD have not been modified. [0]: https://spdx.org/ Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
31 lines
484 B
C
31 lines
484 B
C
/*
|
|
* Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
int puts(const char *s)
|
|
{
|
|
int count = 0;
|
|
while(*s)
|
|
{
|
|
if (putchar(*s++) != EOF) {
|
|
count++;
|
|
} else {
|
|
count = EOF;
|
|
break;
|
|
}
|
|
}
|
|
|
|
/* According to the puts(3) manpage, the function should write a
|
|
* trailing newline.
|
|
*/
|
|
if ((count != EOF) && (putchar('\n') != EOF))
|
|
count++;
|
|
else
|
|
count = EOF;
|
|
|
|
return count;
|
|
}
|