mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 03:09:13 +08:00
libc: Add IPTR for puts/fputs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I2a83afb4d934a44ad1b56ec6dd72e654f4e112a3
This commit is contained in:
committed by
Brennan Ashton
parent
4fbbd2e3bf
commit
43d7c1e807
@@ -1,7 +1,8 @@
|
||||
/****************************************************************************
|
||||
* libs/libc/stdio/lib_fputs.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008, 2011-2012, 2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008, 2011-2012, 2017 Gregory Nutt.
|
||||
* All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -60,7 +61,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_ARCH_ROMGETC)
|
||||
int fputs(FAR const char *s, FAR FILE *stream)
|
||||
int fputs(FAR const IPTR char *s, FAR FILE *stream)
|
||||
{
|
||||
int nput;
|
||||
int ret;
|
||||
@@ -104,7 +105,7 @@ int fputs(FAR const char *s, FAR FILE *stream)
|
||||
}
|
||||
|
||||
#else
|
||||
int fputs(FAR const char *s, FAR FILE *stream)
|
||||
int fputs(FAR const IPTR char *s, FAR FILE *stream)
|
||||
{
|
||||
int nput;
|
||||
|
||||
@@ -151,7 +152,7 @@ int fputs(FAR const char *s, FAR FILE *stream)
|
||||
}
|
||||
}
|
||||
|
||||
/* Without line buffering, we can write the whole string in one operation. */
|
||||
/* We can write the whole string in one operation without line buffering */
|
||||
|
||||
else
|
||||
{
|
||||
@@ -172,7 +173,6 @@ int fputs(FAR const char *s, FAR FILE *stream)
|
||||
{
|
||||
return EOF;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nput;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int puts(FAR const char *s)
|
||||
int puts(FAR const IPTR char *s)
|
||||
{
|
||||
FILE *stream = stdout;
|
||||
int nwritten;
|
||||
|
||||
Reference in New Issue
Block a user